SubnetConfiguration

class aws_cdk.aws_ec2.SubnetConfiguration(*, name, subnet_type, cidr_mask=None, reserved=None)

Bases: object

__init__(*, name, subnet_type, cidr_mask=None, reserved=None)

Specify configuration parameters for a single subnet group in a VPC.

Parameters
  • name (str) – Logical name for the subnet group. This name can be used when selecting VPC subnets to distinguish between different subnet groups of the same type.

  • subnet_type (SubnetType) – The type of Subnet to configure. The Subnet type will control the ability to route and connect to the Internet.

  • cidr_mask (Union[int, float, None]) – The number of leading 1 bits in the routing mask. 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. Default: - Available IP space is evenly divided across subnets.

  • reserved (Optional[bool]) – Controls if subnet IP space needs to be reserved. 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 availibility zones and on cidrMask - all other subnet properties are ignored. Default: false

Attributes

cidr_mask

The number of leading 1 bits in the routing mask.

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.

default :default: - Available IP space is evenly divided across subnets.

Return type

Union[int, float, None]

name

Logical name for the subnet group.

This name can be used when selecting VPC subnets to distinguish between different subnet groups of the same type.

Return type

str

reserved

Controls if subnet IP space needs to be reserved.

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 availibility zones and on cidrMask - all other subnet properties are ignored.

default :default: false

Return type

Optional[bool]

subnet_type

The type of Subnet to configure.

The Subnet type will control the ability to route and connect to the Internet.

Return type

SubnetType