Skip to content
v2.277.0

TargetGroupPairInfoProperty Struct ​

Information about two target groups and how traffic is routed during an Amazon ECS deployment.

An optional test traffic route can be specified.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codedeploy as codedeploy } from 'aws-cdk-lib';
const targetGroupPairInfoProperty: codedeploy.CfnDeploymentGroup.TargetGroupPairInfoProperty = {
  prodTrafficRoute: {
    listenerArns: ['listenerArns'],
  },
  targetGroups: [{
    name: 'name',
  }],
  testTrafficRoute: {
    listenerArns: ['listenerArns'],
  },
};
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_codedeploy as codedeploy

target_group_pair_info_property = codedeploy.CfnDeploymentGroup.TargetGroupPairInfoProperty(
    prod_traffic_route=codedeploy.CfnDeploymentGroup.TrafficRouteProperty(
        listener_arns=["listenerArns"]
    ),
    target_groups=[codedeploy.CfnDeploymentGroup.TargetGroupInfoProperty(
        name="name"
    )],
    test_traffic_route=codedeploy.CfnDeploymentGroup.TrafficRouteProperty(
        listener_arns=["listenerArns"]
    )
)
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.codedeploy.*;

TargetGroupPairInfoProperty targetGroupPairInfoProperty = TargetGroupPairInfoProperty.builder()
        .prodTrafficRoute(TrafficRouteProperty.builder()
                .listenerArns(List.of("listenerArns"))
                .build())
        .targetGroups(List.of(TargetGroupInfoProperty.builder()
                .name("name")
                .build()))
        .testTrafficRoute(TrafficRouteProperty.builder()
                .listenerArns(List.of("listenerArns"))
                .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.CodeDeploy;

var targetGroupPairInfoProperty = new TargetGroupPairInfoProperty {
    ProdTrafficRoute = new TrafficRouteProperty {
        ListenerArns = new [] { "listenerArns" }
    },
    TargetGroups = new [] { new TargetGroupInfoProperty {
        Name = "name"
    } },
    TestTrafficRoute = new TrafficRouteProperty {
        ListenerArns = new [] { "listenerArns" }
    }
};
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"

targetGroupPairInfoProperty := &TargetGroupPairInfoProperty{
	ProdTrafficRoute: &TrafficRouteProperty{
		ListenerArns: []*string{
			jsii.String("listenerArns"),
		},
	},
	TargetGroups: []interface{}{
		&TargetGroupInfoProperty{
			Name: jsii.String("name"),
		},
	},
	TestTrafficRoute: &TrafficRouteProperty{
		ListenerArns: []*string{
			jsii.String("listenerArns"),
		},
	},
}

Properties ​

prodTrafficRouteoptionalIResolvable | CfnDeploymentGroup.TrafficRoutePropertyprod_traffic_routeoptionaltyping.Union[IResolvable, TrafficRouteProperty]prodTrafficRouteoptionalIResolvableProdTrafficRouteoptionalIResolvableProdTrafficRouteoptionalinterface{}#
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
targetGroupsoptionalIResolvable | IResolvable | CfnDeploymentGroup.TargetGroupInfoProperty[]target_groupsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, TargetGroupInfoProperty]]]targetGroupsoptionalIResolvableTargetGroupsoptionalIResolvableTargetGroupsoptionalinterface{}#
One pair of target groups.

One is associated with the original task set. The second is associated with the task set that serves traffic after the deployment is complete.

testTrafficRouteoptionalIResolvable | CfnDeploymentGroup.TrafficRoutePropertytest_traffic_routeoptionaltyping.Union[IResolvable, TrafficRouteProperty]testTrafficRouteoptionalIResolvableTestTrafficRouteoptionalIResolvableTestTrafficRouteoptionalinterface{}#
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment.

Validation can occur while test traffic is served during a deployment.