Interface CfnSubnetProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnSubnetProps.Jsii$Proxy
CfnSubnet
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ec2.*; Object privateDnsNameOptionsOnLaunch; CfnSubnetProps cfnSubnetProps = CfnSubnetProps.builder() .vpcId("vpcId") // the properties below are optional .assignIpv6AddressOnCreation(false) .availabilityZone("availabilityZone") .availabilityZoneId("availabilityZoneId") .cidrBlock("cidrBlock") .enableDns64(false) .enableLniAtDeviceIndex(123) .ipv4IpamPoolId("ipv4IpamPoolId") .ipv4NetmaskLength(123) .ipv6CidrBlock("ipv6CidrBlock") .ipv6IpamPoolId("ipv6IpamPoolId") .ipv6Native(false) .ipv6NetmaskLength(123) .mapPublicIpOnLaunch(false) .outpostArn("outpostArn") .privateDnsNameOptionsOnLaunch(privateDnsNameOptionsOnLaunch) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forCfnSubnetProps
static final class
An implementation forCfnSubnetProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic CfnSubnetProps.Builder
builder()
default Object
Indicates whether a network interface created in this subnet receives an IPv6 address.default String
The Availability Zone of the subnet.default String
The AZ ID of the subnet.default String
The IPv4 CIDR block assigned to the subnet.default Object
Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.default Number
Indicates the device position for local network interfaces in this subnet.default String
An IPv4 IPAM pool ID for the subnet.default Number
An IPv4 netmask length for the subnet.default String
The IPv6 CIDR block.default String
An IPv6 IPAM pool ID for the subnet.default Object
Indicates whether this is an IPv6 only subnet.default Number
An IPv6 netmask length for the subnet.default Object
Indicates whether instances launched in this subnet receive a public IPv4 address.default String
The Amazon Resource Name (ARN) of the Outpost.default Object
The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled.getTags()
Any tags assigned to the subnet.getVpcId()
The ID of the VPC the subnet is in.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVpcId
The ID of the VPC the subnet is in.If you update this property, you must also update the
CidrBlock
property.- See Also:
-
getAssignIpv6AddressOnCreation
Indicates whether a network interface created in this subnet receives an IPv6 address. The default value isfalse
.If you specify
AssignIpv6AddressOnCreation
, you must also specify an IPv6 CIDR block.- See Also:
-
getAvailabilityZone
The Availability Zone of the subnet.If you update this property, you must also update the
CidrBlock
property.- See Also:
-
getAvailabilityZoneId
The AZ ID of the subnet.- See Also:
-
getCidrBlock
The IPv4 CIDR block assigned to the subnet.If you update this property, we create a new subnet, and then delete the existing one.
- See Also:
-
getEnableDns64
Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.You must first configure a NAT gateway in a public subnet (separate from the subnet containing the IPv6-only workloads). For example, the subnet containing the NAT gateway should have a
0.0.0.0/0
route pointing to the internet gateway. For more information, see Configure DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .- See Also:
-
getEnableLniAtDeviceIndex
Indicates the device position for local network interfaces in this subnet.For example,
1
indicates local network interfaces in this subnet are the secondary network interface (eth1).- See Also:
-
getIpv4IpamPoolId
An IPv4 IPAM pool ID for the subnet.- See Also:
-
getIpv4NetmaskLength
An IPv4 netmask length for the subnet.- See Also:
-
getIpv6CidrBlock
The IPv6 CIDR block.If you specify
AssignIpv6AddressOnCreation
, you must also specify an IPv6 CIDR block.- See Also:
-
getIpv6IpamPoolId
An IPv6 IPAM pool ID for the subnet.- See Also:
-
getIpv6Native
Indicates whether this is an IPv6 only subnet.For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .
- See Also:
-
getIpv6NetmaskLength
An IPv6 netmask length for the subnet.- See Also:
-
getMapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IPv4 address. The default value isfalse
.AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the VPC pricing page .
- See Also:
-
getOutpostArn
The Amazon Resource Name (ARN) of the Outpost.- See Also:
-
getPrivateDnsNameOptionsOnLaunch
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)
- See Also:
-
getTags
Any tags assigned to the subnet.- See Also:
-
builder
- Returns:
- a
CfnSubnetProps.Builder
ofCfnSubnetProps
-