Modifies the name and description of a virtual private cloud (VPC).
Operation description
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:ModifyVpcAttribute | update |
|
| none |
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. | - |
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-10-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-08-27 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2024-08-06 | The Error code has changed | View Change Details |
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 |