NetworkConfigurationProperty Struct
This structure specifies the network configuration for an Amazon ECS task.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_pipes as pipes } from 'aws-cdk-lib';
const networkConfigurationProperty: pipes.CfnPipe.NetworkConfigurationProperty = {
awsvpcConfiguration: {
subnets: ['subnets'],
// the properties below are optional
assignPublicIp: 'assignPublicIp',
securityGroups: ['securityGroups'],
},
};
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_pipes as pipes
network_configuration_property = pipes.CfnPipe.NetworkConfigurationProperty(
awsvpc_configuration=pipes.CfnPipe.AwsVpcConfigurationProperty(
subnets=["subnets"],
# the properties below are optional
assign_public_ip="assignPublicIp",
security_groups=["securityGroups"]
)
)
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.pipes.*;
NetworkConfigurationProperty networkConfigurationProperty = NetworkConfigurationProperty.builder()
.awsvpcConfiguration(AwsVpcConfigurationProperty.builder()
.subnets(List.of("subnets"))
// the properties below are optional
.assignPublicIp("assignPublicIp")
.securityGroups(List.of("securityGroups"))
.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.Pipes;
var networkConfigurationProperty = new NetworkConfigurationProperty {
AwsvpcConfiguration = new AwsVpcConfigurationProperty {
Subnets = new [] { "subnets" },
// the properties below are optional
AssignPublicIp = "assignPublicIp",
SecurityGroups = new [] { "securityGroups" }
}
};
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"
networkConfigurationProperty := &NetworkConfigurationProperty{
AwsvpcConfiguration: &AwsVpcConfigurationProperty{
Subnets: []*string{
jsii.String("subnets"),
},
// the properties below are optional
AssignPublicIp: jsii.String("assignPublicIp"),
SecurityGroups: []*string{
jsii.String("securityGroups"),
},
},
}
Properties
awsvpcConfigurationoptionalIResolvable | CfnPipe.awsvpc_configurationoptionaltyping.Union[IResolvable, AwsVpcConfigurationProperty]awsvpcConfigurationoptionalIResolvableAwsvpcConfigurationoptionalIResolvableAwsvpcConfigurationoptionalinterface{} #Use this structure to specify the VPC subnets and security groups for the task, and whether a public IP address is to be used.
This structure is relevant only for ECS tasks that use the awsvpc network mode.