Class PublicSubnetProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.PublicSubnetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PublicSubnetProps>
- Enclosing interface:
PublicSubnetProps
@Stability(Stable)
public static final class PublicSubnetProps.Builder
extends Object
implements software.amazon.jsii.Builder<PublicSubnetProps>
A builder for
PublicSubnetProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignIpv6AddressOnCreation
(Boolean assignIpv6AddressOnCreation) Sets the value ofSubnetProps.getAssignIpv6AddressOnCreation()
availabilityZone
(String availabilityZone) Sets the value ofSubnetProps.getAvailabilityZone()
build()
Builds the configured instance.Sets the value ofSubnetProps.getCidrBlock()
ipv6CidrBlock
(String ipv6CidrBlock) Sets the value ofSubnetProps.getIpv6CidrBlock()
mapPublicIpOnLaunch
(Boolean mapPublicIpOnLaunch) Sets the value ofSubnetProps.getMapPublicIpOnLaunch()
Sets the value ofSubnetProps.getVpcId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZone
Sets the value ofSubnetProps.getAvailabilityZone()
- Parameters:
availabilityZone
- The availability zone for the subnet. This parameter is required.- Returns:
this
-
cidrBlock
Sets the value ofSubnetProps.getCidrBlock()
- Parameters:
cidrBlock
- The CIDR notation for this subnet. This parameter is required.- Returns:
this
-
vpcId
Sets the value ofSubnetProps.getVpcId()
- Parameters:
vpcId
- The VPC which this subnet is part of. This parameter is required.- Returns:
this
-
assignIpv6AddressOnCreation
@Stability(Stable) public PublicSubnetProps.Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) Sets the value ofSubnetProps.getAssignIpv6AddressOnCreation()
- Parameters:
assignIpv6AddressOnCreation
- Indicates whether a network interface created in this subnet receives an IPv6 address. If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.- Returns:
this
-
ipv6CidrBlock
Sets the value ofSubnetProps.getIpv6CidrBlock()
- Parameters:
ipv6CidrBlock
- The IPv6 CIDR block. If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.- Returns:
this
-
mapPublicIpOnLaunch
@Stability(Stable) public PublicSubnetProps.Builder mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch) Sets the value ofSubnetProps.getMapPublicIpOnLaunch()
- Parameters:
mapPublicIpOnLaunch
- Controls if a public IP is associated to an instance at launch.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<PublicSubnetProps>
- Returns:
- a new instance of
PublicSubnetProps
- Throws:
NullPointerException
- if any required attribute was not provided
-