SubnetV2Props
- class aws_cdk.aws_ec2_alpha.SubnetV2Props(*, availability_zone, ipv4_cidr_block, subnet_type, vpc, assign_ipv6_address_on_creation=None, default_route_table_name=None, ipv6_cidr_block=None, map_public_ip_on_launch=None, route_table=None, subnet_name=None)
- Bases: - object- (experimental) Properties to define subnet for VPC. - Parameters:
- availability_zone ( - str) – (experimental) Custom AZ for the subnet.
- ipv4_cidr_block ( - IpCidr) – (experimental) ipv4 cidr to assign to this subnet. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-cidrblock
- subnet_type ( - SubnetType) – (experimental) The type of Subnet to configure. The Subnet type will control the ability to route and connect to the Internet. TODO: Add validation check- subnetTypewhen adding resources (e.g. cannot add NatGateway to private)
- vpc ( - IVpcV2) – (experimental) VPC Prop.
- assign_ipv6_address_on_creation ( - Optional[- bool]) – (experimental) Indicates whether a network interface created in this subnet receives an IPv6 address. If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock. Default: - undefined in case not provided as an input
- default_route_table_name ( - Optional[- str]) – (experimental) Name of the default RouteTable created by CDK to be used for tagging. Default: - default route table name created by CDK as ‘DefaultCDKRouteTable’
- ipv6_cidr_block ( - Optional[- IpCidr]) – (experimental) Ipv6 CIDR Range for subnet. Default: - No Ipv6 address
- map_public_ip_on_launch ( - Optional[- bool]) – (experimental) Controls if instances launched into the subnet should be assigned a public IP address. This property can only be set for public subnets. Default: - undefined in case not provided as an input
- route_table ( - Optional[- IRouteTable]) – (experimental) Custom Route for subnet. Default: - a default route table created
- subnet_name ( - Optional[- str]) – (experimental) Subnet name. Default: - provisioned with an autogenerated name by CDK
 
- Stability:
- experimental 
- ExampleMetadata:
- infused 
 - Example: - my_vpc = VpcV2(self, "Vpc") route_table = RouteTable(self, "RouteTable", vpc=my_vpc ) subnet = SubnetV2(self, "Subnet", vpc=my_vpc, availability_zone="eu-west-2a", ipv4_cidr_block=IpCidr("10.0.0.0/24"), subnet_type=SubnetType.PRIVATE_ISOLATED ) natgw = NatGateway(self, "NatGW", subnet=subnet, vpc=my_vpc, connectivity_type=NatConnectivityType.PRIVATE, private_ip_address="10.0.0.42" ) Route(self, "NatGwRoute", route_table=route_table, destination="0.0.0.0/0", target={"gateway": natgw} ) - Attributes - assign_ipv6_address_on_creation
- (experimental) Indicates whether a network interface created in this subnet receives an IPv6 address. - If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock. - Default:
- undefined in case not provided as an input 
 
- Stability:
- experimental 
 
 - availability_zone
- (experimental) Custom AZ for the subnet. - Stability:
- experimental 
 
 - default_route_table_name
- (experimental) Name of the default RouteTable created by CDK to be used for tagging. - Default:
- default route table name created by CDK as ‘DefaultCDKRouteTable’ 
 
- Stability:
- experimental 
 
 - ipv4_cidr_block
- (experimental) ipv4 cidr to assign to this subnet. - Stability:
- experimental 
 
 - ipv6_cidr_block
- (experimental) Ipv6 CIDR Range for subnet. - Default:
- No Ipv6 address 
 
- Stability:
- experimental 
 
 - map_public_ip_on_launch
- (experimental) Controls if instances launched into the subnet should be assigned a public IP address. - This property can only be set for public subnets. - Default:
- undefined in case not provided as an input 
 
- Stability:
- experimental 
 
 - route_table
- (experimental) Custom Route for subnet. - Default:
- a default route table created 
 
- Stability:
- experimental 
 
 - subnet_name
- (experimental) Subnet name. - Default:
- provisioned with an autogenerated name by CDK 
 
- Stability:
- experimental 
 
 - subnet_type
- (experimental) The type of Subnet to configure. - The Subnet type will control the ability to route and connect to the Internet. - TODO: Add validation check - subnetTypewhen adding resources (e.g. cannot add NatGateway to private)- Stability:
- experimental 
 
 - vpc
- (experimental) VPC Prop. - Stability:
- experimental