NetworkConfigurationProperty Struct
This structure specifies the network configuration for an 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_events as events } from 'aws-cdk-lib';
const networkConfigurationProperty: events.CfnRule.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_events as events
network_configuration_property = events.CfnRule.NetworkConfigurationProperty(
aws_vpc_configuration=events.CfnRule.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.events.*;
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.Events;
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 | CfnRule.aws_vpc_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.