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
-
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()
enableLniAtDeviceIndex
(Number enableLniAtDeviceIndex) Sets the value ofCfnSubnetProps.getEnableLniAtDeviceIndex()
ipv4IpamPoolId
(String ipv4IpamPoolId) Sets the value ofCfnSubnetProps.getIpv4IpamPoolId()
ipv4NetmaskLength
(Number ipv4NetmaskLength) Sets the value ofCfnSubnetProps.getIpv4NetmaskLength()
ipv6CidrBlock
(String ipv6CidrBlock) Sets the value ofCfnSubnetProps.getIpv6CidrBlock()
ipv6CidrBlocks
(List<String> ipv6CidrBlocks) Sets the value ofCfnSubnetProps.getIpv6CidrBlocks()
ipv6IpamPoolId
(String ipv6IpamPoolId) Sets the value ofCfnSubnetProps.getIpv6IpamPoolId()
ipv6Native
(Boolean ipv6Native) Sets the value ofCfnSubnetProps.getIpv6Native()
ipv6Native
(IResolvable ipv6Native) Sets the value ofCfnSubnetProps.getIpv6Native()
ipv6NetmaskLength
(Number ipv6NetmaskLength) Sets the value ofCfnSubnetProps.getIpv6NetmaskLength()
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 specify an IPv6 CIDR block.- 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 specify an IPv6 CIDR block.- 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
-
enableLniAtDeviceIndex
@Stability(Stable) public CfnSubnetProps.Builder enableLniAtDeviceIndex(Number enableLniAtDeviceIndex) Sets the value ofCfnSubnetProps.getEnableLniAtDeviceIndex()
- Parameters:
enableLniAtDeviceIndex
- 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).- Returns:
this
-
ipv4IpamPoolId
Sets the value ofCfnSubnetProps.getIpv4IpamPoolId()
- Parameters:
ipv4IpamPoolId
- An IPv4 IPAM pool ID for the subnet.- Returns:
this
-
ipv4NetmaskLength
Sets the value ofCfnSubnetProps.getIpv4NetmaskLength()
- Parameters:
ipv4NetmaskLength
- An IPv4 netmask length for the subnet.- Returns:
this
-
ipv6CidrBlock
Sets the value ofCfnSubnetProps.getIpv6CidrBlock()
- Parameters:
ipv6CidrBlock
- The IPv6 CIDR block. If you specifyAssignIpv6AddressOnCreation
, you must also specify an IPv6 CIDR block.- Returns:
this
-
ipv6CidrBlocks
Sets the value ofCfnSubnetProps.getIpv6CidrBlocks()
- Parameters:
ipv6CidrBlocks
- The IPv6 network ranges for the subnet, in CIDR notation.- Returns:
this
-
ipv6IpamPoolId
Sets the value ofCfnSubnetProps.getIpv6IpamPoolId()
- Parameters:
ipv6IpamPoolId
- An IPv6 IPAM pool ID for the subnet.- 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
-
ipv6NetmaskLength
Sets the value ofCfnSubnetProps.getIpv6NetmaskLength()
- Parameters:
ipv6NetmaskLength
- An IPv6 netmask length for the subnet.- 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
. 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 .- 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
. 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 .- 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
-