Class CfnSubnetProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnSubnetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSubnetProps>
- Enclosing interface:
CfnSubnetProps
@Stability(Stable)
public static final class CfnSubnetProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSubnetProps>
A builder for
CfnSubnetProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassignIpv6AddressOnCreation
(Boolean assignIpv6AddressOnCreation) Sets the value ofCfnSubnetProps.getAssignIpv6AddressOnCreation()
assignIpv6AddressOnCreation
(IResolvable assignIpv6AddressOnCreation) Sets the value ofCfnSubnetProps.getAssignIpv6AddressOnCreation()
availabilityZone
(String availabilityZone) Sets the value ofCfnSubnetProps.getAvailabilityZone()
availabilityZoneId
(String availabilityZoneId) Sets the value ofCfnSubnetProps.getAvailabilityZoneId()
build()
Builds the configured instance.Sets the value ofCfnSubnetProps.getCidrBlock()
enableDns64
(Boolean enableDns64) Sets the value ofCfnSubnetProps.getEnableDns64()
enableDns64
(IResolvable enableDns64) Sets the value ofCfnSubnetProps.getEnableDns64()
ipv6CidrBlock
(String ipv6CidrBlock) Sets the value ofCfnSubnetProps.getIpv6CidrBlock()
ipv6Native
(Boolean ipv6Native) Sets the value ofCfnSubnetProps.getIpv6Native()
ipv6Native
(IResolvable ipv6Native) Sets the value ofCfnSubnetProps.getIpv6Native()
mapPublicIpOnLaunch
(Boolean mapPublicIpOnLaunch) Sets the value ofCfnSubnetProps.getMapPublicIpOnLaunch()
mapPublicIpOnLaunch
(IResolvable mapPublicIpOnLaunch) Sets the value ofCfnSubnetProps.getMapPublicIpOnLaunch()
outpostArn
(String outpostArn) Sets the value ofCfnSubnetProps.getOutpostArn()
privateDnsNameOptionsOnLaunch
(Object privateDnsNameOptionsOnLaunch) Sets the value ofCfnSubnetProps.getPrivateDnsNameOptionsOnLaunch()
Sets the value ofCfnSubnetProps.getTags()
Sets the value ofCfnSubnetProps.getVpcId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
vpcId
Sets the value ofCfnSubnetProps.getVpcId()
- Parameters:
vpcId
- The ID of the VPC the subnet is in. This parameter is required. If you update this property, you must also update theCidrBlock
property.- Returns:
this
-
assignIpv6AddressOnCreation
@Stability(Stable) public CfnSubnetProps.Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) Sets the value ofCfnSubnetProps.getAssignIpv6AddressOnCreation()
- Parameters:
assignIpv6AddressOnCreation
- Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
. If you specifyAssignIpv6AddressOnCreation
, you must also specifyIpv6CidrBlock
.- Returns:
this
-
assignIpv6AddressOnCreation
@Stability(Stable) public CfnSubnetProps.Builder assignIpv6AddressOnCreation(IResolvable assignIpv6AddressOnCreation) Sets the value ofCfnSubnetProps.getAssignIpv6AddressOnCreation()
- Parameters:
assignIpv6AddressOnCreation
- Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
. If you specifyAssignIpv6AddressOnCreation
, you must also specifyIpv6CidrBlock
.- Returns:
this
-
availabilityZone
Sets the value ofCfnSubnetProps.getAvailabilityZone()
- Parameters:
availabilityZone
- The Availability Zone of the subnet. If you update this property, you must also update theCidrBlock
property.- Returns:
this
-
availabilityZoneId
Sets the value ofCfnSubnetProps.getAvailabilityZoneId()
- Parameters:
availabilityZoneId
- The AZ ID of the subnet.- Returns:
this
-
cidrBlock
Sets the value ofCfnSubnetProps.getCidrBlock()
- Parameters:
cidrBlock
- The IPv4 CIDR block assigned to the subnet. If you update this property, we create a new subnet, and then delete the existing one.- Returns:
this
-
enableDns64
Sets the value ofCfnSubnetProps.getEnableDns64()
- Parameters:
enableDns64
- Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. For more information, see DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .- Returns:
this
-
enableDns64
Sets the value ofCfnSubnetProps.getEnableDns64()
- Parameters:
enableDns64
- Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations. For more information, see DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .- Returns:
this
-
ipv6CidrBlock
Sets the value ofCfnSubnetProps.getIpv6CidrBlock()
- Parameters:
ipv6CidrBlock
- The IPv6 CIDR block. If you specifyAssignIpv6AddressOnCreation
, you must also specifyIpv6CidrBlock
.- Returns:
this
-
ipv6Native
Sets the value ofCfnSubnetProps.getIpv6Native()
- Parameters:
ipv6Native
- Indicates whether this is an IPv6 only subnet. For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .- Returns:
this
-
ipv6Native
Sets the value ofCfnSubnetProps.getIpv6Native()
- Parameters:
ipv6Native
- Indicates whether this is an IPv6 only subnet. For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .- Returns:
this
-
mapPublicIpOnLaunch
Sets the value ofCfnSubnetProps.getMapPublicIpOnLaunch()
- Parameters:
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a public IPv4 address. The default value isfalse
.- Returns:
this
-
mapPublicIpOnLaunch
@Stability(Stable) public CfnSubnetProps.Builder mapPublicIpOnLaunch(IResolvable mapPublicIpOnLaunch) Sets the value ofCfnSubnetProps.getMapPublicIpOnLaunch()
- Parameters:
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a public IPv4 address. The default value isfalse
.- Returns:
this
-
outpostArn
Sets the value ofCfnSubnetProps.getOutpostArn()
- Parameters:
outpostArn
- The Amazon Resource Name (ARN) of the Outpost.- Returns:
this
-
privateDnsNameOptionsOnLaunch
@Stability(Stable) public CfnSubnetProps.Builder privateDnsNameOptionsOnLaunch(Object privateDnsNameOptionsOnLaunch) Sets the value ofCfnSubnetProps.getPrivateDnsNameOptionsOnLaunch()
- Parameters:
privateDnsNameOptionsOnLaunch
- The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .Available options:
- EnableResourceNameDnsAAAARecord (true | false)
- EnableResourceNameDnsARecord (true | false)
- HostnameType (ip-name | resource-name)
- Returns:
this
-
tags
Sets the value ofCfnSubnetProps.getTags()
- Parameters:
tags
- Any tags assigned to the subnet.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnSubnetProps>
- Returns:
- a new instance of
CfnSubnetProps
- Throws:
NullPointerException
- if any required attribute was not provided
-