Class CfnService.AwsVpcConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnService.AwsVpcConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnService.AwsVpcConfigurationProperty>
- Enclosing interface:
CfnService.AwsVpcConfigurationProperty
@Stability(Stable)
public static final class CfnService.AwsVpcConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnService.AwsVpcConfigurationProperty>
A builder for
CfnService.AwsVpcConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignPublicIp
(String assignPublicIp) Sets the value ofCfnService.AwsVpcConfigurationProperty.getAssignPublicIp()
build()
Builds the configured instance.securityGroups
(List<String> securityGroups) Sets the value ofCfnService.AwsVpcConfigurationProperty.getSecurityGroups()
Sets the value ofCfnService.AwsVpcConfigurationProperty.getSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
subnets
@Stability(Stable) public CfnService.AwsVpcConfigurationProperty.Builder subnets(List<String> subnets) Sets the value ofCfnService.AwsVpcConfigurationProperty.getSubnets()
- Parameters:
subnets
- The IDs of the subnets associated with the task or service. This parameter is required. There's a limit of 16 subnets that can be specified perAwsVpcConfiguration
.All specified subnets must be from the same VPC.
- Returns:
this
-
assignPublicIp
@Stability(Stable) public CfnService.AwsVpcConfigurationProperty.Builder assignPublicIp(String assignPublicIp) Sets the value ofCfnService.AwsVpcConfigurationProperty.getAssignPublicIp()
- Parameters:
assignPublicIp
- Whether the task's elastic network interface receives a public IP address. The default value isDISABLED
.- Returns:
this
-
securityGroups
@Stability(Stable) public CfnService.AwsVpcConfigurationProperty.Builder securityGroups(List<String> securityGroups) Sets the value ofCfnService.AwsVpcConfigurationProperty.getSecurityGroups()
- Parameters:
securityGroups
- 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 perAwsVpcConfiguration
.All specified security groups must be from the same VPC.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnService.AwsVpcConfigurationProperty>
- Returns:
- a new instance of
CfnService.AwsVpcConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-