All Products
Document Center

Virtual Private Cloud:ModifyVpcAttribute

Last Updated:Dec 01, 2023

Modifies the name and description of a virtual private cloud (VPC).

Operation Description


You cannot repeatedly call the ModifyVpcAttribute operation to modify the name and description of a VPC within the specified period of time.


You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.


Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
  • VPC
  • vpc:tag

Request parameters


The ID of the VPC that you want to modify.


The new description of the VPC.

The description must be 1 to 256 characters in length, and cannot start with http:// or https://.

This is my VPC.

The new name of the VPC.

The name must be 1 to 128 characters in length and cannot start with http:// or https://.


The new IPv4 CIDR block of the VPC.

You can specify a larger or smaller IPv4 CIDR block than the IPv4 CIDR block of the VPC. The subnet mask must be 8 to 28 bits in length. If you specify a smaller IPv4 CIDR block and existing IP addresses do not fall within the CIDR block, the modification fails.

Note If you modify the CIDR block of a VPC, your existing services are not affected.

The region ID of the VPC.

You can call the DescribeRegions operation to query the most recent region list.


Specifies whether to enable IPv6 CIDR blocks. Valid values:

  • true
  • false (default)

The IPv6 CIDR block of the VPC.


The type of IPv6 CIDR block. Valid values:

  • BGP (default)
  • ChinaMobile
  • ChinaUnicom
  • ChinaTelecom
Note If your Alibaba Cloud account is allowed to activate single-ISP bandwidth, you can set this parameter to ChinaTelecom, ChinaUnicom, or ChinaMobile.

Response parameters


The request ID.


The request ID.



Sample success responses


  "RequestId": "43B72D30-25E1-4FA3-96A8-89374A521D1A"

Error codes

HTTP status codeError codeError messageDescription
400Forbidden.VpcNotFoundSpecified VPC does not exist.-
400InvalidDescription.Malformeddescription not valid..-
400InvalidVpcName.MalformedSpecified VPC name is not valid.The format of the VPC name is invalid. Enter a valid VPC name and try again.
400InvalidVpcDiscription.MalformedSpecified VPC description is not valid.The format of the VPC description is invalid.
400InvalidParameterSpecified UserCidr invalid format.The format of the user CIDR block is invalid.
400InvalidParameterSpecified UserCidr Subnet mask is not valid .The subnet mask of the user CIDR block is invalid.
400InvalidUserCidr.QuotaSpecified UserCidr number is greater than 3.The number of user CIDR blocks that you specify has reached the upper limit.
400InvalidUserCidr.MalformedSpecified UserCidr overlapping in of user CIDR block that you specify overlaps with
400InvalidUserCidr.MalformedSpecified UserCidr status is wrong, do not allow operation-
400InvalidVpcId.NotFoundSpecified VPC name is not valid.-
400IncorrectVpcStatusCurrent VPC status does not support this operation.This operation cannot be performed when the VPC is in the current state.
400IllegalCidrBlockSome subnet cidrBlock is not in the cidrBlock.-
400InvalidRegion.MalformedSpecified RegionId is not vaild.-
400InvalidCidrBlock.MalformedSpecified CIDR block is not valid.The format of the CIDR block is invalid.
400ParamExclusive.EnableIpv6AndCidrBlockEnableIpv6 and CidrBlock is mutually exclusive.-
400OperationFailed.ClassicLinkEnabledOperation failed because classicLink is enabled.-
400OperationFailed.Ipv6GatewayInUseThe IPv6 gateway is in use.You cannot modify the VPC attributes because the IPv6 gateway is in use.
400OperationFailed.QueryCenIpv6StatusFailed to query the IPv6 status of the specified VPC in CEN.The operation failed because the system failed to query the IPv6 status of the VPC that is attached to the CEN instance.
400OperationUnsupported.CenIpv6EnabledThe IPv6 feature is enabled in CEN.The IPv6 feature is already enabled for CEN.
400UnsupportedFeature.Ipv6IspThe Ipv6Isp feature is not supported.The specified IPv6 ISP is not supported.
400ResourceNotEnough.Ipv6CidrThe specified resource ipv6 cidr is not enough.Insufficient IPv6 CIDR block resources.
400OperationFailed.IPv6CidrNotReservedThe IPv6 CIDR block is not reserved.The operation failed. The IPv6 CIDR block is not reserved.
400OperationUnsupported.Ipv6FeatureThe IPv6 feature is not supported in the region.This region does not support IPv6.
404InvalidVpcId.NotFoundSpecified VPC does not exist.The specified VPC does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-21API Description Update,The error codes of the API operation change.see changesets
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 404
2023-07-05The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 404