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 Summary
Modifier and TypeMethodDescriptionavailabilityZone
(String availabilityZone) The availability zone for the subnet.build()
The CIDR notation for this subnet.static PrivateSubnet.Builder
mapPublicIpOnLaunch
(Boolean mapPublicIpOnLaunch) Controls if a public IP is associated to an instance at launch.The VPC which this subnet is part of.
-
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
The availability zone for the subnet.- Parameters:
availabilityZone
- The availability zone for the subnet. This parameter is required.- Returns:
this
-
cidrBlock
The CIDR notation for this subnet.- Parameters:
cidrBlock
- The CIDR notation for this subnet. This parameter is required.- Returns:
this
-
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<PrivateSubnet>
- Returns:
- a newly built instance of
PrivateSubnet
.
-