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)
.ipv6CidrBlock("ipv6CidrBlock")
.ipv6CidrBlocks(List.of("ipv6CidrBlocks"))
.ipv6Native(false)
.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 classA builder forCfnSubnetPropsstatic final classAn implementation forCfnSubnetProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnSubnetProps.Builderbuilder()default ObjectIndicates whether a network interface created in this subnet receives an IPv6 address.default StringThe Availability Zone of the subnet.default StringThe AZ ID of the subnet.default StringThe IPv4 CIDR block assigned to the subnet.default ObjectIndicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.default StringThe IPv6 CIDR block.default ObjectIndicates whether this is an IPv6 only subnet.default ObjectIndicates whether instances launched in this subnet receive a public IPv4 address.default StringThe Amazon Resource Name (ARN) of the Outpost.default ObjectThe 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
CidrBlockproperty.- 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 specifyIpv6CidrBlock.- See Also:
-
getAvailabilityZone
The Availability Zone of the subnet.If you update this property, you must also update the
CidrBlockproperty.- 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.For more information, see DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .
- See Also:
-
getIpv6CidrBlock
The IPv6 CIDR block.If you specify
AssignIpv6AddressOnCreation, you must also specifyIpv6CidrBlock.- See Also:
-
getIpv6CidrBlocks
- 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:
-
getMapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IPv4 address. The default value isfalse.Starting on February 1, 2024, AWS will charge 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.BuilderofCfnSubnetProps
-