Deletes a secondary CIDR block from a virtual private cloud (VPC).
Description
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.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | ch-hangzhou |
The ID of the region 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 | 192.168.0.0/16 |
The secondary CIDR block that you want to delete. You can delete both secondary IPv4 and IPv6 CIDR blocks. |
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. |
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=ch-hangzhou
&VpcId=vpc-o6wrloqsdqc9io3mg****
&SecondaryCidrBlock=192.168.0.0/16
&Action=UnassociateVpcCidrBlock
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UnassociateVpcCidrBlockResponse>
<RequestId>C1221A1F-2ACD-4592-8F27-474E02883159 </RequestId>
</UnassociateVpcCidrBlockResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C1221A1F-2ACD-4592-8F27-474E02883159\t"
}
Error codes
For a list of error codes, visit the API Error Center.