SubnetConfiguration Struct
Specify configuration parameters for a single subnet group in a VPC.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const subnetConfiguration: ec2.SubnetConfiguration = {
name: 'name',
subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
// the properties below are optional
cidrMask: 123,
ipv6AssignAddressOnCreation: false,
mapPublicIpOnLaunch: false,
reserved: false,
};
Properties
cidrMasknumbercidr_maskint | floatcidrMaskNumberCidrMaskdoubleCidrMask*float64= Available IP space is evenly div…#The number of available IP addresses in each subnet of this group will be equal to 2^(32 - cidrMask) - 2.
Valid values are 16--28.
Note this is specific to IPv4 addresses.
default
Default: Available IP space is evenly divided across subnets.
ipv6AssignAddressOnCreationbooleanipv6_assign_address_on_creationboolipv6AssignAddressOnCreationBooleanIpv6AssignAddressOnCreationboolIpv6AssignAddressOnCreation*bool= true#If set to false, then an IPv6 address will not be automatically assigned.
Note this is specific to IPv6 addresses.
mapPublicIpOnLaunchbooleanmap_public_ip_on_launchboolmapPublicIpOnLaunchBooleanMapPublicIpOnLaunchboolMapPublicIpOnLaunch*bool= true in Subnet.Public of IPV4_ON…#Note this is specific to IPv4 addresses.
default
Default: true in Subnet.Public of IPV4_ONLY VPCs, false otherwise
This name can be used when selecting VPC subnets to distinguish between different subnet groups of the same type.
When true, the IP space for the subnet is reserved but no actual resources are provisioned. This space is only dependent on the number of availability zones and on cidrMask - all other subnet properties are ignored.
subnetTypeSubnetTypesubnet_typeSubnetTypesubnetTypeSubnetTypeSubnetTypeSubnetTypeSubnetTypeSubnetTyperequired#The Subnet type will control the ability to route and connect to the Internet.