IpCidr

class aws_cdk.aws_ec2_alpha.IpCidr(props)

Bases: object

(experimental) IPv4 or IPv6 CIDR range for the subnet.

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}
)
Parameters:

props (str) –

Stability:

experimental

Attributes

cidr

(experimental) IPv6 CIDR range for the subnet Allowed only if IPv6 is enabled on VPc.

Stability:

experimental