Class SubnetAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.SubnetAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SubnetAttributes>
- Enclosing interface:
SubnetAttributes
@Stability(Stable)
public static final class SubnetAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<SubnetAttributes>
A builder for
SubnetAttributes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone
(String availabilityZone) Sets the value ofSubnetAttributes.getAvailabilityZone()
build()
Builds the configured instance.ipv4CidrBlock
(String ipv4CidrBlock) Sets the value ofSubnetAttributes.getIpv4CidrBlock()
routeTableId
(String routeTableId) Sets the value ofSubnetAttributes.getRouteTableId()
Sets the value ofSubnetAttributes.getSubnetId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
subnetId
Sets the value ofSubnetAttributes.getSubnetId()
- Parameters:
subnetId
- The subnetId for this particular subnet. This parameter is required.- Returns:
this
-
availabilityZone
Sets the value ofSubnetAttributes.getAvailabilityZone()
- Parameters:
availabilityZone
- The Availability Zone the subnet is located in.- Returns:
this
-
ipv4CidrBlock
Sets the value ofSubnetAttributes.getIpv4CidrBlock()
- Parameters:
ipv4CidrBlock
- The IPv4 CIDR block associated with the subnet.- Returns:
this
-
routeTableId
Sets the value ofSubnetAttributes.getRouteTableId()
- Parameters:
routeTableId
- The ID of the route table for this particular subnet.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SubnetAttributes>
- Returns:
- a new instance of
SubnetAttributes
- Throws:
NullPointerException
- if any required attribute was not provided
-