All Products
Search
Document Center

Virtual Private Cloud:ModifyVpcAttribute

Last Updated:Mar 01, 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

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:ModifyVpcAttributeWrite
  • VPC
    acs:vpc:{#regionId}:{#accountId}:vpc/{#VpcId}
  • vpc:tag
none

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 changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 404
2023-12-14The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 404
2023-09-21API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
2023-07-05The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 404