Deletes a CIDR block from an IP address pool.
Usage notes
- The DeletePublicIpAddressPoolCidrBlock operation is asynchronous. After you send the request, the system returns a request ID. However, the operation is still being performed in the system background. You can call the ListPublicIpAddressPoolCidrBlocks operation to query the status of a CIDR block in an IP address pool:
- If the CIDR block is in the Deleting state, the CIDR block is being deleted. In this state, you can only query the CIDR block and cannot perform other operations.
- If you cannot query the CIDR block, the CIDR block is deleted.
- You cannot repeatedly call the DeletePublicIpAddressPoolCidrBlock operation to delete a CIDR block within the specified period of time.
Prerequisites
Before you delete a CIDR block, make sure that it is not being used.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeletePublicIpAddressPoolCidrBlock | The operation that you want to perform. Set the value to DeletePublicIpAddressPoolCidrBlock. |
PublicIpAddressPoolId | String | Yes | pippool-6wetvn6fumkgycssx**** | The ID of the IP address pool. |
CidrBlock | String | Yes | 47.0.XX.XX/24 | The CIDR block. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 | The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The client token can contain only ASCII characters. |
DryRun | Boolean | No | false | Specifies whether to perform a dry run. Valid values:
|
RegionId | String | Yes | cn-chengdu | The region ID of the IP address pool from which you want to delete a CIDR block. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4EC47282-1B74-4534-BD0E-403F3EE64CAF | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DeletePublicIpAddressPoolCidrBlock
&PublicIpAddressPoolId=pippool-6wetvn6fumkgycssx****
&CidrBlock=47.0.XX.XX/24
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&DryRun=false
&RegionId=cn-chengdu
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeletePublicIpAddressPoolCidrBlockResponse>
<RequestId>4EC47282-1B74-4534-BD0E-403F3EE64CAF</RequestId>
</DeletePublicIpAddressPoolCidrBlockResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "4EC47282-1B74-4534-BD0E-403F3EE64CAF"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.CidrBlock | The param of CidrBlock [%s] is illegal. | The error message returned because the CidrBlock parameter is set to an invalid value. |
400 | IllegalParam.CidrBlockMask | The param of CidrBlock Mask [%s] is illegal. | The error message returned because the subnet mask of the CIDR block is invalid. |
400 | ResourceNotFound.PublicIpAddressPool | The specified resource of PublicIpAddressPool [%s] is not found. | The error message returned because the specified public IP address pool does not exist. |
400 | OperationDenied.OperateSharedResource | The operation is not allowed because of the PublicIpAddressPool is a shared resource. | The error message returned because the public IP address pool is a shared resource and cannot be modified. |
For a list of error codes, see Service error codes.