AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::SubnetCidrBlock

CfnSubnetCidrBlock

Associates a CIDR block with your subnet. You can associate a single IPv6 CIDR block with your subnet.

Import

import { CfnSubnetCidrBlock } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnSubnetCidrBlock

Properties

Configuration passed to the constructor as CfnSubnetCidrBlockProps.

subnetIdRequired
string | ISubnetRef

The ID of the subnet.

ipv6CidrBlockOptional
string

The IPv6 network range for the subnet, in CIDR notation.

ipv6IpamPoolIdOptional
string

An IPv6 IPAM pool ID for the subnet.

ipv6NetmaskLengthOptional
number

An IPv6 netmask length for the subnet.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic