Skip to content
v2.278.0

AlternateTargetConfig Struct ​

Configuration returned by AlternateTargetConfiguration.bind().

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 alternateTargetConfig: ecs.AlternateTargetConfig = {
  alternateTargetGroupArn: 'alternateTargetGroupArn',
  roleArn: 'roleArn',

  // the properties below are optional
  productionListenerRule: 'productionListenerRule',
  testListenerRule: 'testListenerRule',
};
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

alternate_target_config = ecs.AlternateTargetConfig(
    alternate_target_group_arn="alternateTargetGroupArn",
    role_arn="roleArn",

    # the properties below are optional
    production_listener_rule="productionListenerRule",
    test_listener_rule="testListenerRule"
)
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.*;

AlternateTargetConfig alternateTargetConfig = AlternateTargetConfig.builder()
        .alternateTargetGroupArn("alternateTargetGroupArn")
        .roleArn("roleArn")

        // the properties below are optional
        .productionListenerRule("productionListenerRule")
        .testListenerRule("testListenerRule")
        .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 alternateTargetConfig = new AlternateTargetConfig {
    AlternateTargetGroupArn = "alternateTargetGroupArn",
    RoleArn = "roleArn",

    // the properties below are optional
    ProductionListenerRule = "productionListenerRule",
    TestListenerRule = "testListenerRule"
};
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"

alternateTargetConfig := &AlternateTargetConfig{
	AlternateTargetGroupArn: jsii.String("alternateTargetGroupArn"),
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	ProductionListenerRule: jsii.String("productionListenerRule"),
	TestListenerRule: jsii.String("testListenerRule"),
}

Properties ​

alternateTargetGroupArnstringalternate_target_group_arnstralternateTargetGroupArnStringAlternateTargetGroupArnstringAlternateTargetGroupArn*string required #
The ARN of the alternate target group.
productionListenerRuleoptionalstringproduction_listener_ruleoptionalstrproductionListenerRuleoptionalStringProductionListenerRuleoptionalstringProductionListenerRuleoptional*string = none #
The production listener rule ARN (ALB) or listener ARN (NLB).
roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*string required #
The IAM role ARN for the configuration.

Default: a new role will be created

testListenerRuleoptionalstringtest_listener_ruleoptionalstrtestListenerRuleoptionalStringTestListenerRuleoptionalstringTestListenerRuleoptional*string = none #
The test listener rule ARN (ALB) or listener ARN (NLB).