Skip to content
v2.278.0

AppMeshProxyConfiguration Class ​

The class for App Mesh proxy configurations.

For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the ecs-init package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version 20190301 or later, then they contain the required versions of the container agent and ecs-init. For more information, see Amazon ECS-optimized AMIs.

For tasks using the Fargate launch type, the task or service requires platform version 1.3.0 or later.

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 appMeshProxyConfiguration = new ecs.AppMeshProxyConfiguration({
  containerName: 'containerName',
  properties: {
    appPorts: [123],
    proxyEgressPort: 123,
    proxyIngressPort: 123,

    // the properties below are optional
    egressIgnoredIPs: ['egressIgnoredIPs'],
    egressIgnoredPorts: [123],
    ignoredGID: 123,
    ignoredUID: 123,
  },
});
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

app_mesh_proxy_configuration = ecs.AppMeshProxyConfiguration(
    container_name="containerName",
    properties=ecs.AppMeshProxyConfigurationProps(
        app_ports=[123],
        proxy_egress_port=123,
        proxy_ingress_port=123,

        # the properties below are optional
        egress_ignored_i_ps=["egressIgnoredIPs"],
        egress_ignored_ports=[123],
        ignored_gid=123,
        ignored_uid=123
    )
)
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.*;

AppMeshProxyConfiguration appMeshProxyConfiguration = AppMeshProxyConfiguration.Builder.create()
        .containerName("containerName")
        .properties(AppMeshProxyConfigurationProps.builder()
                .appPorts(List.of(123))
                .proxyEgressPort(123)
                .proxyIngressPort(123)

                // the properties below are optional
                .egressIgnoredIPs(List.of("egressIgnoredIPs"))
                .egressIgnoredPorts(List.of(123))
                .ignoredGID(123)
                .ignoredUID(123)
                .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 appMeshProxyConfiguration = new AppMeshProxyConfiguration(new AppMeshProxyConfigurationConfigProps {
    ContainerName = "containerName",
    Properties = new AppMeshProxyConfigurationProps {
        AppPorts = new [] { 123 },
        ProxyEgressPort = 123,
        ProxyIngressPort = 123,

        // the properties below are optional
        EgressIgnoredIPs = new [] { "egressIgnoredIPs" },
        EgressIgnoredPorts = new [] { 123 },
        IgnoredGID = 123,
        IgnoredUID = 123
    }
});
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"

appMeshProxyConfiguration := awscdk.Aws_ecs.NewAppMeshProxyConfiguration(&AppMeshProxyConfigurationConfigProps{
	ContainerName: jsii.String("containerName"),
	Properties: &AppMeshProxyConfigurationProps{
		AppPorts: []*f64{
			jsii.Number(123),
		},
		ProxyEgressPort: jsii.Number(123),
		ProxyIngressPort: jsii.Number(123),

		// the properties below are optional
		EgressIgnoredIPs: []*string{
			jsii.String("egressIgnoredIPs"),
		},
		EgressIgnoredPorts: []*f64{
			jsii.Number(123),
		},
		IgnoredGID: jsii.Number(123),
		IgnoredUID: jsii.Number(123),
	},
})

Initializer ​

ts
new AppMeshProxyConfiguration(props: AppMeshProxyConfigurationConfigProps)
python
AppMeshProxyConfiguration(props: AppMeshProxyConfigurationConfigProps)
java
new AppMeshProxyConfiguration(AppMeshProxyConfigurationConfigProps props)
csharp
new AppMeshProxyConfiguration(AppMeshProxyConfigurationConfigProps props)
go
NewAppMeshProxyConfiguration(Props AppMeshProxyConfigurationConfigProps)

Methods ​

bind(_scope: Construct, _taskDefinition: TaskDefinition): CfnTaskDefinition.ProxyConfigurationPropertydef bind(self, _scope: Construct, _task_definition: TaskDefinition) -> ProxyConfigurationPropertypublic ProxyConfigurationProperty bind(Construct _scope, TaskDefinition _taskDefinition)public ProxyConfigurationProperty Bind(Construct _scope, TaskDefinition _taskDefinition)func Bind(_scope Construct, _taskDefinition TaskDefinition) ProxyConfigurationProperty #
Called when the proxy configuration is configured on a task definition.