Package software.amazon.awscdk.cxapi
Class VpcSubnet.Builder
java.lang.Object
software.amazon.awscdk.cxapi.VpcSubnet.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<VpcSubnet>
- Enclosing interface:
VpcSubnet
@Stability(Stable)
public static final class VpcSubnet.Builder
extends Object
implements software.amazon.jsii.Builder<VpcSubnet>
A builder for
VpcSubnet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone
(String availabilityZone) Sets the value ofVpcSubnet.getAvailabilityZone()
build()
Builds the configured instance.Sets the value ofVpcSubnet.getCidr()
routeTableId
(String routeTableId) Sets the value ofVpcSubnet.getRouteTableId()
Sets the value ofVpcSubnet.getSubnetId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZone
Sets the value ofVpcSubnet.getAvailabilityZone()
- Parameters:
availabilityZone
- The code of the availability zone this subnet is in (for example, 'us-west-2a'). This parameter is required.- Returns:
this
-
routeTableId
Sets the value ofVpcSubnet.getRouteTableId()
- Parameters:
routeTableId
- The identifier of the route table for this subnet. This parameter is required.- Returns:
this
-
subnetId
Sets the value ofVpcSubnet.getSubnetId()
- Parameters:
subnetId
- The identifier of the subnet. This parameter is required.- Returns:
this
-
cidr
Sets the value ofVpcSubnet.getCidr()
- Parameters:
cidr
- CIDR range of the subnet.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<VpcSubnet>
- Returns:
- a new instance of
VpcSubnet
- Throws:
NullPointerException
- if any required attribute was not provided
-