AWS::EC2::VPCCidrBlockAssociates a CIDR block with your VPC. A VPC must have an associated IPv4 CIDR block. You can optionally associate additional IPv4 CIDR blocks with a VPC. You can optionally associate an IPv6 CIDR block with a VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP). For more information, see [VPC CIDR blocks](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-cidr-blocks.html) in the *Amazon VPC User Guide* .
import { CfnVPCCidrBlock } from 'aws-cdk-lib/aws-ec2';Or use the module namespace:
import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnVPCCidrBlockConfiguration passed to the constructor as CfnVPCCidrBlockProps.
vpcIdRequiredstring | IVPCRefThe ID of the VPC.
amazonProvidedIpv6CidrBlockOptionalboolean | IResolvableRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses or the size of the CIDR block.
cidrBlockOptionalstringAn IPv4 CIDR block to associate with the VPC.
ipv4IpamPoolIdOptionalstringAssociate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide* .
ipv4NetmaskLengthOptionalnumberThe netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide* .
ipv6CidrBlockOptionalstringAn IPv6 CIDR block from the IPv6 address pool. You must also specify `Ipv6Pool` in the request. To let Amazon choose the IPv6 CIDR block for you, omit this parameter.
ipv6CidrBlockNetworkBorderGroupOptionalstringThe name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the CIDR block to this location. You must set `AmazonProvidedIpv6CidrBlock` to `true` to use this parameter. You can have one IPv6 CIDR block association per network border group.
ipv6IpamPoolIdOptionalstringAssociates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide* .
ipv6NetmaskLengthOptionalnumberThe netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see [What is IPAM?](https://docs.aws.amazon.com//vpc/latest/ipam/what-is-it-ipam.html) in the *Amazon VPC IPAM User Guide* .
ipv6PoolOptionalstringThe ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.
Download Free Infographicaws-ec2AWS::EC2::VPCCidrBlock