All Products
Search
Document Center

Virtual Private Cloud:ModifyVpcAttribute

Last Updated:Jul 10, 2024

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

Operation description

Description

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
VpcIdstringYes

The ID of the VPC that you want to modify.

vpc-bp1qtbach57ywecf****
DescriptionstringNo

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.
VpcNamestringNo

The new name of the VPC.

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

Vpc-1
CidrBlockstringNo

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.
192.168.0.0/24
RegionIdstringNo

The region ID of the VPC.

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

cn-hangzhou
EnableIPv6booleanNo

Specifies whether to enable IPv6 CIDR blocks. Valid values:

  • true
  • false (default)
false
Ipv6CidrBlockstringNo

The IPv6 CIDR block of the VPC.

2408:XXXX:0:6a::/56
Ipv6IspstringNo

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.
BGP

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

43B72D30-25E1-4FA3-96A8-89374A521D1A

Examples

Sample success responses

JSONformat

{
  "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 100.64.0.0/10.The user CIDR block that you specify overlaps with 100.64.0.0/10.
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.
400OperationUnsupported.DisableIpv6%s-
400OperationUnsupported.Ipv6Feature%s-
400ParamExclusive.EnableIpv6AndCidrBlockEnableIpv6 and CidrBlock is mutually exclusive.-
400OperationFailed.ClassicLinkEnabledOperation failed because classicLink is enabled.-
400OperationFailed.IpV6VSwitchInuse%s-
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
2024-02-01The Error code has changedView Change Details
2023-12-14The Error code has changedView Change Details
2023-09-21API Description Update. The Error code has changedView Change Details
2023-07-05The Error code has changedView Change Details