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 Details

    • Builder

      public Builder()
  • Method Details

    • availabilityZone

      @Stability(Stable) public VpcSubnet.Builder availabilityZone(String availabilityZone)
      Parameters:
      availabilityZone - The code of the availability zone this subnet is in (for example, 'us-west-2a'). This parameter is required.
      Returns:
      this
    • routeTableId

      @Stability(Stable) public VpcSubnet.Builder routeTableId(String routeTableId)
      Sets the value of VpcSubnet.getRouteTableId()
      Parameters:
      routeTableId - The identifier of the route table for this subnet. This parameter is required.
      Returns:
      this
    • subnetId

      @Stability(Stable) public VpcSubnet.Builder subnetId(String subnetId)
      Sets the value of VpcSubnet.getSubnetId()
      Parameters:
      subnetId - The identifier of the subnet. This parameter is required.
      Returns:
      this
    • cidr

      @Stability(Stable) public VpcSubnet.Builder cidr(String cidr)
      Sets the value of VpcSubnet.getCidr()
      Parameters:
      cidr - CIDR range of the subnet.
      Returns:
      this
    • build

      @Stability(Stable) public VpcSubnet build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<VpcSubnet>
      Returns:
      a new instance of VpcSubnet
      Throws:
      NullPointerException - if any required attribute was not provided