Class CfnTaskSet.AwsVpcConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnTaskSet.AwsVpcConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTaskSet.AwsVpcConfigurationProperty>
- Enclosing interface:
CfnTaskSet.AwsVpcConfigurationProperty
@Stability(Stable)
public static final class CfnTaskSet.AwsVpcConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnTaskSet.AwsVpcConfigurationProperty>
A builder for
CfnTaskSet.AwsVpcConfigurationProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignPublicIp(String assignPublicIp) Sets the value ofCfnTaskSet.AwsVpcConfigurationProperty.getAssignPublicIp()build()Builds the configured instance.securityGroups(List<String> securityGroups) Sets the value ofCfnTaskSet.AwsVpcConfigurationProperty.getSecurityGroups()Sets the value ofCfnTaskSet.AwsVpcConfigurationProperty.getSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
subnets
@Stability(Stable) public CfnTaskSet.AwsVpcConfigurationProperty.Builder subnets(List<String> subnets) Sets the value ofCfnTaskSet.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.All specified subnets must be from the same VPC.
- Returns:
this
-
assignPublicIp
@Stability(Stable) public CfnTaskSet.AwsVpcConfigurationProperty.Builder assignPublicIp(String assignPublicIp) Sets the value ofCfnTaskSet.AwsVpcConfigurationProperty.getAssignPublicIp()- Parameters:
assignPublicIp- Whether the task's elastic network interface receives a public IP address. Consider the following when you set this value:- When you use
create-serviceorupdate-service, the default isDISABLED. - When the service
deploymentControllerisECS, the value must beDISABLED.
- When you use
- Returns:
this
-
securityGroups
@Stability(Stable) public CfnTaskSet.AwsVpcConfigurationProperty.Builder securityGroups(List<String> securityGroups) Sets the value ofCfnTaskSet.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.All specified security groups must be from the same VPC.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnTaskSet.AwsVpcConfigurationProperty>- Returns:
- a new instance of
CfnTaskSet.AwsVpcConfigurationProperty - Throws:
NullPointerException- if any required attribute was not provided
-