AllocateCidrRequest

class aws_cdk.aws_ec2.AllocateCidrRequest(*, requested_subnets, vpc_cidr)

Bases: object

Request for subnets CIDR to be allocated for a Vpc.

Parameters:
  • requested_subnets (Sequence[Union[RequestedSubnet, Dict[str, Any]]]) – The Subnets to be allocated.

  • vpc_cidr (str) – The IPv4 CIDR block for this Vpc.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2

allocate_cidr_request = ec2.AllocateCidrRequest(
    requested_subnets=[ec2.RequestedSubnet(
        availability_zone="availabilityZone",
        configuration=ec2.SubnetConfiguration(
            name="name",
            subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,

            # the properties below are optional
            cidr_mask=123,
            ipv6_assign_address_on_creation=False,
            map_public_ip_on_launch=False,
            reserved=False
        ),
        subnet_construct_id="subnetConstructId"
    )],
    vpc_cidr="vpcCidr"
)

Attributes

requested_subnets

The Subnets to be allocated.

vpc_cidr

The IPv4 CIDR block for this Vpc.