Class CfnSubnet.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSubnet>
- Enclosing class:
CfnSubnet
CfnSubnet
.-
Method Summary
Modifier and TypeMethodDescriptionassignIpv6AddressOnCreation
(Boolean assignIpv6AddressOnCreation) Indicates whether a network interface created in this subnet receives an IPv6 address.assignIpv6AddressOnCreation
(IResolvable assignIpv6AddressOnCreation) Indicates whether a network interface created in this subnet receives an IPv6 address.availabilityZone
(String availabilityZone) The Availability Zone of the subnet.availabilityZoneId
(String availabilityZoneId) The AZ ID of the subnet.build()
The IPv4 CIDR block assigned to the subnet.static CfnSubnet.Builder
enableDns64
(Boolean enableDns64) Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.enableDns64
(IResolvable enableDns64) Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.ipv6CidrBlock
(String ipv6CidrBlock) The IPv6 CIDR block.ipv6Native
(Boolean ipv6Native) Indicates whether this is an IPv6 only subnet.ipv6Native
(IResolvable ipv6Native) Indicates whether this is an IPv6 only subnet.mapPublicIpOnLaunch
(Boolean mapPublicIpOnLaunch) Indicates whether instances launched in this subnet receive a public IPv4 address.mapPublicIpOnLaunch
(IResolvable mapPublicIpOnLaunch) Indicates whether instances launched in this subnet receive a public IPv4 address.outpostArn
(String outpostArn) The Amazon Resource Name (ARN) of the Outpost.privateDnsNameOptionsOnLaunch
(Object 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.Any tags assigned to the subnet.The ID of the VPC the subnet is in.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnSubnet.Builder
.
-
vpcId
The ID of the VPC the subnet is in.If you update this property, you must also update the
CidrBlock
property.- Parameters:
vpcId
- The ID of the VPC the subnet is in. This parameter is required.- Returns:
this
-
assignIpv6AddressOnCreation
@Stability(Stable) public CfnSubnet.Builder assignIpv6AddressOnCreation(Boolean assignIpv6AddressOnCreation) Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
.If you specify
AssignIpv6AddressOnCreation
, you must also specifyIpv6CidrBlock
.- Parameters:
assignIpv6AddressOnCreation
- Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
. This parameter is required.- Returns:
this
-
assignIpv6AddressOnCreation
@Stability(Stable) public CfnSubnet.Builder assignIpv6AddressOnCreation(IResolvable assignIpv6AddressOnCreation) Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
.If you specify
AssignIpv6AddressOnCreation
, you must also specifyIpv6CidrBlock
.- Parameters:
assignIpv6AddressOnCreation
- Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
. This parameter is required.- Returns:
this
-
availabilityZone
The Availability Zone of the subnet.If you update this property, you must also update the
CidrBlock
property.- Parameters:
availabilityZone
- The Availability Zone of the subnet. This parameter is required.- Returns:
this
-
availabilityZoneId
The AZ ID of the subnet.- Parameters:
availabilityZoneId
- The AZ ID of the subnet. This parameter is required.- Returns:
this
-
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.
- Parameters:
cidrBlock
- The IPv4 CIDR block assigned to the subnet. This parameter is required.- Returns:
this
-
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 .
- 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. This parameter is required.- Returns:
this
-
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 .
- 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. This parameter is required.- Returns:
this
-
ipv6CidrBlock
The IPv6 CIDR block.If you specify
AssignIpv6AddressOnCreation
, you must also specifyIpv6CidrBlock
.- Parameters:
ipv6CidrBlock
- The IPv6 CIDR block. This parameter is required.- Returns:
this
-
ipv6Native
Indicates whether this is an IPv6 only subnet.For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .
- Parameters:
ipv6Native
- Indicates whether this is an IPv6 only subnet. This parameter is required.- Returns:
this
-
ipv6Native
Indicates whether this is an IPv6 only subnet.For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .
- Parameters:
ipv6Native
- Indicates whether this is an IPv6 only subnet. This parameter is required.- Returns:
this
-
mapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IPv4 address.The default value is
false
.- Parameters:
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a public IPv4 address. This parameter is required.- Returns:
this
-
mapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IPv4 address.The default value is
false
.- Parameters:
mapPublicIpOnLaunch
- Indicates whether instances launched in this subnet receive a public IPv4 address. This parameter is required.- Returns:
this
-
outpostArn
The Amazon Resource Name (ARN) of the Outpost.- Parameters:
outpostArn
- The Amazon Resource Name (ARN) of the Outpost. This parameter is required.- Returns:
this
-
privateDnsNameOptionsOnLaunch
@Stability(Stable) public CfnSubnet.Builder privateDnsNameOptionsOnLaunch(Object 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)
- 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. This parameter is required.- Returns:
this
-
tags
Any tags assigned to the subnet.- Parameters:
tags
- Any tags assigned to the subnet. This parameter is required.- Returns:
this
-
build
-