Skip to content
v2.278.0

VpcLatticeConfigurationProperty Struct ​

The VPC Lattice configuration for your service that holds the information for the target group(s) Amazon ECS tasks will be registered to.

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 vpcLatticeConfigurationProperty: ecs.CfnService.VpcLatticeConfigurationProperty = {
  portName: 'portName',
  roleArn: 'roleArn',
  targetGroupArn: 'targetGroupArn',

  // the properties below are optional
  advancedConfiguration: {
    alternateTargetGroupArn: 'alternateTargetGroupArn',
    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

vpc_lattice_configuration_property = ecs.CfnService.VpcLatticeConfigurationProperty(
    port_name="portName",
    role_arn="roleArn",
    target_group_arn="targetGroupArn",

    # the properties below are optional
    advanced_configuration=ecs.CfnService.VpcLatticeAdvancedConfigurationProperty(
        alternate_target_group_arn="alternateTargetGroupArn",
        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.*;

VpcLatticeConfigurationProperty vpcLatticeConfigurationProperty = VpcLatticeConfigurationProperty.builder()
        .portName("portName")
        .roleArn("roleArn")
        .targetGroupArn("targetGroupArn")

        // the properties below are optional
        .advancedConfiguration(VpcLatticeAdvancedConfigurationProperty.builder()
                .alternateTargetGroupArn("alternateTargetGroupArn")
                .productionListenerRule("productionListenerRule")
                .testListenerRule("testListenerRule")
                .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 vpcLatticeConfigurationProperty = new VpcLatticeConfigurationProperty {
    PortName = "portName",
    RoleArn = "roleArn",
    TargetGroupArn = "targetGroupArn",

    // the properties below are optional
    AdvancedConfiguration = new VpcLatticeAdvancedConfigurationProperty {
        AlternateTargetGroupArn = "alternateTargetGroupArn",
        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"

vpcLatticeConfigurationProperty := &VpcLatticeConfigurationProperty{
	PortName: jsii.String("portName"),
	RoleArn: jsii.String("roleArn"),
	TargetGroupArn: jsii.String("targetGroupArn"),

	// the properties below are optional
	AdvancedConfiguration: &VpcLatticeAdvancedConfigurationProperty{
		AlternateTargetGroupArn: jsii.String("alternateTargetGroupArn"),
		ProductionListenerRule: jsii.String("productionListenerRule"),
		TestListenerRule: jsii.String("testListenerRule"),
	},
}

Properties ​

advancedConfigurationoptionalIResolvable | CfnService.VpcLatticeAdvancedConfigurationPropertyadvanced_configurationoptionaltyping.Union[IResolvable, VpcLatticeAdvancedConfigurationProperty]advancedConfigurationoptionalIResolvableAdvancedConfigurationoptionalIResolvableAdvancedConfigurationoptionalinterface{} #
The advanced settings for VPC Lattice used in blue/green deployments.
notes

Specify the alternate target group and listener rules required for traffic shifting during blue/green deployments. For more information, see Required resources for Amazon ECS blue/green deployments in the Amazon Elastic Container Service Developer Guide.

portNamestringport_namestrportNameStringPortNamestringPortName*string required #
The name of the port mapping to register in the VPC Lattice target group.

This is the name of the portMapping you defined in your task definition.

roleArnstringrole_arnstrroleArnStringRoleArnstringRoleArn*string required #
The ARN of the IAM role to associate with this VPC Lattice configuration.

This is the Amazon ECS infrastructure IAM role that is used to manage your VPC Lattice infrastructure.

targetGroupArnstringtarget_group_arnstrtargetGroupArnStringTargetGroupArnstringTargetGroupArn*string required #
The full Amazon Resource Name (ARN) of the target group or groups associated with the VPC Lattice configuration that the Amazon ECS tasks will be registered to.