Modifies the name and description of a VPC.

Make the API call

You can use OpenAPI Explorer to make API calls, search for API calls, perform debugging, and generate SDK example code.

Request parameters

Parameter Type Required? Example value Description
Action String Yes ModifyVpcAttribute

The name of this action. Value: ModifyVpcAttribute.

RegionId String  Yes cn-hangzhou

The ID of the region to which the VPC belongs.

VpcId String Yes vpc-bp1qtbach57ywecf****

The ID of the VPC.

CidrBlock String No

The IPv4 CIDR block of the VPC. It can be selected from,,, and their subnets. The mask length ranges from 8- to 24-bit.

Description String No This is my VPC.

The description of the VPC.

The description must be 2 to 256 characters in length. It must start with a letter and cannot start with http:// or https://.

EnableIPv6 Boolean No true

Indicates whether to enable the IPv6 CIDR block. Valid values:

  • true: Enable the IPv6 CIDR block.
  • false: Disable the IPv6 CIDR block.
VpcName String No Vpc-1

The name of the VPC.

The name must be 2 to 128 characters in length and can contain letters, numbers, periods (.), underscores (_), or hyphens (-). The name must start with a letter, and cannot start with http:// or https://.

Response parameters

Parameter Type Example value Description
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.


Request example

Response example

XML format


JSON format



HTTP status code Error code Error message Description
404 InvalidVpcId.NotFound Specified VPC does not exist. The specified VPC does not exist.
400 InvalidVpcName.Malformed Specified VPC name is not valid. The format of the VPC name is invalid.
400 InvalidVpcDiscription.Malformed Specified VPC description is not valid. The format of the description is invalid.
400 InvalidParameter Specified UserCidr invalid format. The format of the user CIDR is invalid.
400 InvalidParameter Specified UserCidr Subnet mask is not valid . The subnet mask of the user CIDR is invalid.
400 InvalidUserCidr.Quota Specified UserCidr number is greater than 3. The number of UserCidr has reached the quota.
400 InvalidUserCidr.Malformed Specified UserCidr overlapping in of The specified UserCidr overlaps with
400 IncorrectVpcStatus Current VPC status does not support this operation. The current status of the VPC does not support the action.
400 InvalidCidrBlock.Malformed Specified CIDR block is not valid. The specified CIDR format is invalid.

For a list of error codes, visit the API Error Center.