Skip to content
v2.278.0

ServiceConnectTestTrafficRulesProperty Struct ​

The test traffic routing configuration for Amazon ECS blue/green deployments.

This configuration allows you to define rules for routing specific traffic to the new service revision during the deployment process, allowing for safe testing before full production traffic shift.

For more information, see Service Connect for Amazon ECS blue/green deployments in the Amazon Elastic Container Service Developer Guide .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const serviceConnectTestTrafficRulesProperty: ecs.CfnService.ServiceConnectTestTrafficRulesProperty = {
  header: {
    name: 'name',

    // the properties below are optional
    value: {
      exact: 'exact',
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

service_connect_test_traffic_rules_property = ecs.CfnService.ServiceConnectTestTrafficRulesProperty(
    header=ecs.CfnService.ServiceConnectTestTrafficRulesHeaderProperty(
        name="name",

        # the properties below are optional
        value=ecs.CfnService.ServiceConnectTestTrafficRulesHeaderValueProperty(
            exact="exact"
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

ServiceConnectTestTrafficRulesProperty serviceConnectTestTrafficRulesProperty = ServiceConnectTestTrafficRulesProperty.builder()
        .header(ServiceConnectTestTrafficRulesHeaderProperty.builder()
                .name("name")

                // the properties below are optional
                .value(ServiceConnectTestTrafficRulesHeaderValueProperty.builder()
                        .exact("exact")
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var serviceConnectTestTrafficRulesProperty = new ServiceConnectTestTrafficRulesProperty {
    Header = new ServiceConnectTestTrafficRulesHeaderProperty {
        Name = "name",

        // the properties below are optional
        Value = new ServiceConnectTestTrafficRulesHeaderValueProperty {
            Exact = "exact"
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

serviceConnectTestTrafficRulesProperty := &ServiceConnectTestTrafficRulesProperty{
	Header: &ServiceConnectTestTrafficRulesHeaderProperty{
		Name: jsii.String("name"),

		// the properties below are optional
		Value: &ServiceConnectTestTrafficRulesHeaderValueProperty{
			Exact: jsii.String("exact"),
		},
	},
}

Properties ​