Skip to content
v2.277.0

CfnCodeDeployBlueGreenEcsAttributes Struct ​

The attributes of the ECS Service being deployed.

Type of the CfnCodeDeployBlueGreenApplication.ecsAttributes property.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const cfnCodeDeployBlueGreenEcsAttributes: cdk.CfnCodeDeployBlueGreenEcsAttributes = {
  taskDefinitions: ['taskDefinitions'],
  taskSets: ['taskSets'],
  trafficRouting: {
    prodTrafficRoute: {
      logicalId: 'logicalId',
      type: 'type',
    },
    targetGroups: ['targetGroups'],
    testTrafficRoute: {
      logicalId: 'logicalId',
      type: 'type',
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

cfn_code_deploy_blue_green_ecs_attributes = cdk.CfnCodeDeployBlueGreenEcsAttributes(
    task_definitions=["taskDefinitions"],
    task_sets=["taskSets"],
    traffic_routing=cdk.CfnTrafficRouting(
        prod_traffic_route=cdk.CfnTrafficRoute(
            logical_id="logicalId",
            type="type"
        ),
        target_groups=["targetGroups"],
        test_traffic_route=cdk.CfnTrafficRoute(
            logical_id="logicalId",
            type="type"
        )
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

CfnCodeDeployBlueGreenEcsAttributes cfnCodeDeployBlueGreenEcsAttributes = CfnCodeDeployBlueGreenEcsAttributes.builder()
        .taskDefinitions(List.of("taskDefinitions"))
        .taskSets(List.of("taskSets"))
        .trafficRouting(CfnTrafficRouting.builder()
                .prodTrafficRoute(CfnTrafficRoute.builder()
                        .logicalId("logicalId")
                        .type("type")
                        .build())
                .targetGroups(List.of("targetGroups"))
                .testTrafficRoute(CfnTrafficRoute.builder()
                        .logicalId("logicalId")
                        .type("type")
                        .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;

var cfnCodeDeployBlueGreenEcsAttributes = new CfnCodeDeployBlueGreenEcsAttributes {
    TaskDefinitions = new [] { "taskDefinitions" },
    TaskSets = new [] { "taskSets" },
    TrafficRouting = new CfnTrafficRouting {
        ProdTrafficRoute = new CfnTrafficRoute {
            LogicalId = "logicalId",
            Type = "type"
        },
        TargetGroups = new [] { "targetGroups" },
        TestTrafficRoute = new CfnTrafficRoute {
            LogicalId = "logicalId",
            Type = "type"
        }
    }
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"

cfnCodeDeployBlueGreenEcsAttributes := &CfnCodeDeployBlueGreenEcsAttributes{
	TaskDefinitions: []*string{
		jsii.String("taskDefinitions"),
	},
	TaskSets: []*string{
		jsii.String("taskSets"),
	},
	TrafficRouting: &CfnTrafficRouting{
		ProdTrafficRoute: &CfnTrafficRoute{
			LogicalId: jsii.String("logicalId"),
			Type: jsii.String("type"),
		},
		TargetGroups: []*string{
			jsii.String("targetGroups"),
		},
		TestTrafficRoute: &CfnTrafficRoute{
			LogicalId: jsii.String("logicalId"),
			Type: jsii.String("type"),
		},
	},
}

Properties ​

taskDefinitionsstring[]task_definitionstyping.List[str]taskDefinitionsList<String>TaskDefinitionsstring[]TaskDefinitions*[]*string required #
The logical IDs of the blue and green, respectively, AWS::ECS::TaskDefinition task definitions.
taskSetsstring[]task_setstyping.List[str]taskSetsList<String>TaskSetsstring[]TaskSets*[]*string required #
The logical IDs of the blue and green, respectively, AWS::ECS::TaskSet task sets.
trafficRoutingCfnTrafficRoutingtraffic_routingCfnTrafficRoutingtrafficRoutingCfnTrafficRoutingTrafficRoutingCfnTrafficRoutingTrafficRoutingCfnTrafficRouting required #
The traffic routing configuration.