Class SubnetV2Props.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.alpha.SubnetV2Props.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SubnetV2Props>
- Enclosing interface:
SubnetV2Props
@Stability(Experimental)
public static final class SubnetV2Props.Builder
extends Object
implements software.amazon.jsii.Builder<SubnetV2Props>
A builder for
SubnetV2Props
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignIpv6AddressOnCreation
(Boolean assignIpv6AddressOnCreation) Sets the value ofSubnetV2Props.getAssignIpv6AddressOnCreation()
availabilityZone
(String availabilityZone) Sets the value ofSubnetV2Props.getAvailabilityZone()
build()
Builds the configured instance.ipv4CidrBlock
(IpCidr ipv4CidrBlock) Sets the value ofSubnetV2Props.getIpv4CidrBlock()
ipv6CidrBlock
(IpCidr ipv6CidrBlock) Sets the value ofSubnetV2Props.getIpv6CidrBlock()
routeTable
(IRouteTable routeTable) Sets the value ofSubnetV2Props.getRouteTable()
subnetName
(String subnetName) Sets the value ofSubnetV2Props.getSubnetName()
subnetType
(SubnetType subnetType) Sets the value ofSubnetV2Props.getSubnetType()
Sets the value ofSubnetV2Props.getVpc()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZone
Sets the value ofSubnetV2Props.getAvailabilityZone()
- Parameters:
availabilityZone
- Custom AZ for the subnet. This parameter is required.- Returns:
this
-
ipv4CidrBlock
Sets the value ofSubnetV2Props.getIpv4CidrBlock()
- Parameters:
ipv4CidrBlock
- ipv4 cidr to assign to this subnet. This parameter is required. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-cidrblock- Returns:
this
-
subnetType
Sets the value ofSubnetV2Props.getSubnetType()
- Parameters:
subnetType
- The type of Subnet to configure. This parameter is required. The Subnet type will control the ability to route and connect to the Internet.TODO: Add validation check
subnetType
when adding resources (e.g. cannot add NatGateway to private)- Returns:
this
-
vpc
Sets the value ofSubnetV2Props.getVpc()
- Parameters:
vpc
- VPC Prop. This parameter is required.- Returns:
this
-
assignIpv6AddressOnCreation
@Stability(Experimental) public SubnetV2Props.Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) Sets the value ofSubnetV2Props.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 ofSubnetV2Props.getIpv6CidrBlock()
- Parameters:
ipv6CidrBlock
- Ipv6 CIDR Range for subnet.- Returns:
this
-
routeTable
Sets the value ofSubnetV2Props.getRouteTable()
- Parameters:
routeTable
- Custom Route for subnet.- Returns:
this
-
subnetName
Sets the value ofSubnetV2Props.getSubnetName()
- Parameters:
subnetName
- Subnet name.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SubnetV2Props>
- Returns:
- a new instance of
SubnetV2Props
- Throws:
NullPointerException
- if any required attribute was not provided
-