interface AwsVpcConfigurationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ECS.CfnTaskSet.AwsVpcConfigurationProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#CfnTaskSet_AwsVpcConfigurationProperty |
![]() | software.amazon.awscdk.services.ecs.CfnTaskSet.AwsVpcConfigurationProperty |
![]() | aws_cdk.aws_ecs.CfnTaskSet.AwsVpcConfigurationProperty |
![]() | aws-cdk-lib » aws_ecs » CfnTaskSet » AwsVpcConfigurationProperty |
An object representing the networking details for a task or service.
For example awsVpcConfiguration={subnets=["subnet-12344321"],securityGroups=["sg-12344321"]}
.
Example
// 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 awsVpcConfigurationProperty: ecs.CfnTaskSet.AwsVpcConfigurationProperty = {
subnets: ['subnets'],
// the properties below are optional
assignPublicIp: 'assignPublicIp',
securityGroups: ['securityGroups'],
};
Properties
Name | Type | Description |
---|---|---|
subnets | string[] | The IDs of the subnets associated with the task or service. |
assign | string | Whether the task's elastic network interface receives a public IP address. |
security | string[] | The IDs of the security groups associated with the task or service. |
subnets
Type:
string[]
The IDs of the subnets associated with the task or service.
There's a limit of 16 subnets that can be specified.
All specified subnets must be from the same VPC.
assignPublicIp?
Type:
string
(optional)
Whether the task's elastic network interface receives a public IP address.
Consider the following when you set this value:
- When you use
create-service
orupdate-service
, the default isDISABLED
. - When the service
deploymentController
isECS
, the value must beDISABLED
. - When you use
create-service
orupdate-service
, the default isENABLED
.
securityGroups?
Type:
string[]
(optional)
The IDs of the security groups associated with the task or service.
If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified.
All specified security groups must be from the same VPC.