Modifies the name and description of a virtual private cloud (VPC).
Operation description
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
VpcId | string | Yes | The ID of the VPC that you want to modify. | vpc-bp1qtbach57ywecf**** |
Description | string | No | The new description of the VPC. The description must be 1 to 256 characters in length, and cannot start with | This is my VPC. |
VpcName | string | No | The new name of the VPC. The name must be 1 to 128 characters in length and cannot start with | Vpc-1 |
CidrBlock | string | No | 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 |
RegionId | string | No | The region ID of the VPC. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
EnableIPv6 | boolean | No | Specifies whether to enable IPv6 CIDR blocks. Valid values:
| false |
Ipv6CidrBlock | string | No | The IPv6 CIDR block of the VPC. | 2408:XXXX:0:6a::/56 |
Ipv6Isp | string | No | The type of IPv6 CIDR block. Valid values:
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
Examples
Sample success responses
JSON
format
{
"RequestId": "43B72D30-25E1-4FA3-96A8-89374A521D1A"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Forbidden.VpcNotFound | Specified VPC does not exist. | - |
400 | InvalidDescription.Malformed | description not valid.. | - |
400 | InvalidVpcName.Malformed | Specified VPC name is not valid. | The format of the VPC name is invalid. Enter a valid VPC name and try again. |
400 | InvalidVpcDiscription.Malformed | Specified VPC description is not valid. | The format of the VPC description is invalid. |
400 | InvalidParameter | Specified UserCidr invalid format. | The format of the user CIDR block is invalid. |
400 | InvalidParameter | Specified UserCidr Subnet mask is not valid . | The subnet mask of the user CIDR block is invalid. |
400 | InvalidUserCidr.Quota | Specified UserCidr number is greater than 3. | The number of user CIDR blocks that you specify has reached the upper limit. |
400 | InvalidUserCidr.Malformed | Specified UserCidr overlapping in of 100.64.0.0/10. | The user CIDR block that you specify overlaps with 100.64.0.0/10. |
400 | InvalidUserCidr.Malformed | Specified UserCidr status is wrong, do not allow operation | - |
400 | InvalidVpcId.NotFound | Specified VPC name is not valid. | - |
400 | IncorrectVpcStatus | Current VPC status does not support this operation. | This operation cannot be performed when the VPC is in the current state. |
400 | IllegalCidrBlock | Some subnet cidrBlock is not in the cidrBlock. | - |
400 | InvalidRegion.Malformed | Specified RegionId is not vaild. | - |
400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | The format of the CIDR block is invalid. |
400 | OperationUnsupported.DisableIpv6 | %s | - |
400 | OperationUnsupported.Ipv6Feature | %s | - |
400 | ParamExclusive.EnableIpv6AndCidrBlock | EnableIpv6 and CidrBlock is mutually exclusive. | - |
400 | OperationFailed.ClassicLinkEnabled | Operation failed because classicLink is enabled. | - |
400 | OperationFailed.IpV6VSwitchInuse | %s | - |
400 | OperationFailed.Ipv6GatewayInUse | The IPv6 gateway is in use. | You cannot modify the VPC attributes because the IPv6 gateway is in use. |
400 | OperationFailed.QueryCenIpv6Status | Failed 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. |
400 | OperationUnsupported.CenIpv6Enabled | The IPv6 feature is enabled in CEN. | The IPv6 feature is already enabled for CEN. |
400 | UnsupportedFeature.Ipv6Isp | The Ipv6Isp feature is not supported. | The specified IPv6 ISP is not supported. |
400 | ResourceNotEnough.Ipv6Cidr | The specified resource ipv6 cidr is not enough. | Insufficient IPv6 CIDR block resources. |
400 | OperationFailed.IPv6CidrNotReserved | The IPv6 CIDR block is not reserved. | The operation failed. The IPv6 CIDR block is not reserved. |
400 | OperationUnsupported.Ipv6Feature | The IPv6 feature is not supported in the region. | This region does not support IPv6. |
404 | InvalidVpcId.NotFound | Specified VPC does not exist. | The specified VPC does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-02-01 | The Error code has changed | View Change Details |
2023-12-14 | The Error code has changed | View Change Details |
2023-09-21 | API Description Update. The Error code has changed | View Change Details |
2023-07-05 | The Error code has changed | View Change Details |