Deletes a secondary CIDR block from a virtual private cloud (VPC).

Usage notes

  • Before you delete a secondary CIDR block from a VPC, delete the vSwitch which is created with the CIDR block. For more information, see DeleteVSwitch.
  • You cannot repeatedly call the UnassociateVpcCidrBlock operation to delete a secondary CIDR block from a VPC within the specified period of time.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes ch-hangzhou

The region ID of the VPC to which the secondary CIDR block to be deleted belongs.

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

VpcId String Yes vpc-o6wrloqsdqc9io3mg****

The ID of the VPC from which you want to delete a secondary CIDR block.

SecondaryCidrBlock String No

The secondary IPv4 CIDR block to be deleted.

Note You must set one of the SecondaryCidrBlock and Ipv6CidrBlock parameters.
IPv6CidrBlock String No 2408:XXXX:0:6a::/56

The secondary IPv6 CIDR block to be deleted.

Note You must set one of the Ipv6CidrBlock and SecondaryCidrBlock parameters.
Action String Yes UnassociateVpcCidrBlock

The operation that you want to perform. Set the value to UnassociateVpcCidrBlock.

Response parameters

Parameter Type Example Description
RequestId String C1221A1F-2ACD-4592-8F27-474E02883159

The ID of the request.


Sample requests

&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "C1221A1F-2ACD-4592-8F27-474E02883159"

Error codes

HttpCode Error code Error message Description
400 OperationFailed.Ipv6Gateway The operation is failed because of ipv6Gateway is in use. The error message returned because the IPv6 is still in use and the operation failed.

For a list of error codes, visit the API Error Center.