Interface CfnRule.AwsVpcConfigurationProperty

All Superinterfaces:
All Known Implementing Classes:
Enclosing class:

@Stability(Stable) public static interface CfnRule.AwsVpcConfigurationProperty extends
This structure specifies 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.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 AwsVpcConfigurationProperty awsVpcConfigurationProperty = AwsVpcConfigurationProperty.builder()
         // the properties below are optional
  • Method Details

    • getSubnets

      @Stability(Stable) @NotNull List<String> getSubnets()
      Specifies the subnets associated with the task.

      These subnets must all be in the same VPC. You can specify as many as 16 subnets.

    • getAssignPublicIp

      @Stability(Stable) @Nullable default String getAssignPublicIp()
      Specifies whether the task's elastic network interface receives a public IP address.

      You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE .

    • getSecurityGroups

      @Stability(Stable) @Nullable default List<String> getSecurityGroups()
      Specifies the security groups associated with the task.

      These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

    • builder

      @Stability(Stable) static CfnRule.AwsVpcConfigurationProperty.Builder builder()
      a CfnRule.AwsVpcConfigurationProperty.Builder of CfnRule.AwsVpcConfigurationProperty