Class PrivateSubnet.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.PrivateSubnet.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<PrivateSubnet>
Enclosing class:
PrivateSubnet

@Stability(Stable) public static final class PrivateSubnet.Builder extends Object implements software.amazon.jsii.Builder<PrivateSubnet>
A fluent builder for PrivateSubnet.
  • Method Details

    • create

      @Stability(Stable) public static PrivateSubnet.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of PrivateSubnet.Builder.
    • availabilityZone

      @Stability(Stable) public PrivateSubnet.Builder availabilityZone(String availabilityZone)
      The availability zone for the subnet.

      Parameters:
      availabilityZone - The availability zone for the subnet. This parameter is required.
      Returns:
      this
    • cidrBlock

      @Stability(Stable) public PrivateSubnet.Builder cidrBlock(String cidrBlock)
      The CIDR notation for this subnet.

      Parameters:
      cidrBlock - The CIDR notation for this subnet. This parameter is required.
      Returns:
      this
    • vpcId

      @Stability(Stable) public PrivateSubnet.Builder vpcId(String vpcId)
      The VPC which this subnet is part of.

      Parameters:
      vpcId - The VPC which this subnet is part of. This parameter is required.
      Returns:
      this
    • mapPublicIpOnLaunch

      @Stability(Stable) public PrivateSubnet.Builder mapPublicIpOnLaunch(Boolean mapPublicIpOnLaunch)
      Controls if a public IP is associated to an instance at launch.

      Default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.

      Parameters:
      mapPublicIpOnLaunch - Controls if a public IP is associated to an instance at launch. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public PrivateSubnet build()
      Specified by:
      build in interface software.amazon.jsii.Builder<PrivateSubnet>
      Returns:
      a newly built instance of PrivateSubnet.