CreateVpc
In this article:
CreateVpc#
Description#
Creates a VPC with the specified CIDR block.
Request Parameters#
Required parameters#
CidrBlock — The address range in the CIDR (X.X.X.X/YY) notation. How to create subnets in a virtual private cloud, see CreateSubnet.
Type: String
Required: Yes
Constraints: The address block must be in the range from /16 to /28 and must not overlap with the 169.254.0.0/16 subnet
Optional parameters#
AvailabilityZone — The availability zone.
Type: String
Required: No
Valid values:
ru-msk-vol51|ru-msk-comp1p|ru-msk-vol52
TagSpecification.N — The tags assigned to the resource when it is created.
Type: List of TagSpecification objects
Required: No
Response Elements#
requestId — The request ID.
Type: String
vpc — Information about VPC.
Type: Vpc object
Examples#
c2-ec2 CreateVpc CidrBlock 10.10.10.0/24
c2-ec2 CreateVpc CidrBlock 10.10.10.0/24 AvailabilityZone ru-reg-az1
c2-ec2 CreateVpc CidrBlock 10.10.10.0/24 TagSpecification.1.ResourceType vpc \
TagSpecification.1.Tag.1.Key "tag_key" TagSpecification.1.Tag.1.Value "tag_value"