Deletes a NAT CIDR block.

Debugging

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
Action String Yes DeleteNatIpCidr

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

RegionId String Yes eu-central-1

The region ID of the NAT gateway to which the NAT CIDR block to be deleted belongs.

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

NatGatewayId String Yes ngw-gw8v16wgvtq26vh59****

The ID of the NAT gateway to which the NAT CIDR block to be deleted belongs.

NatIpCidr String Yes 172.16.0.0/24

The NAT CIDR block to be deleted.

  • Before you delete a NAT CIDR block, you must delete all NAT IP addresses of the CIDR block.
  • The default NAT CIDR block cannot be deleted.
DryRun Boolean No false

Specifies whether to precheck this request. Valid values:

  • true: sends the precheck request. The NAT CIDR block is not deleted. The system checks whether the AccessKey pair is valid, whether the RAM user is authorized, and whether the required parameters are specified. If the request fails the precheck, the corresponding error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false: sends the API request. This is the default value. If the request passes the precheck, a 2XX HTTP status code is returned and the NAT CIDR block is deleted.
ClientToken String No 5A2CFF0E-5718-45B5-9D4D-70B3FF3898

The client token that is used to ensure the idempotency. You can use the client to generate the value, but you must make sure that it is unique among different requests. ClientToken can contain only ASCII characters. It cannot exceed 64 characters in length.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The ID of each request may be unique.

Response parameters

Parameter Type Example Description
RequestId String 7021BEB1-210F-48A9-AB82-BE9A9110BB89

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeleteNatIpCidr
&RegionId=eu-central-1
&NatGatewayId=ngw-gw8v16wgvtq26vh59****
&NatIpCidr=172.16.0.0/24
&<Common request parameters>

Sample success responses

XML format

<DeleteNatIpCidrResponse>
  <RequestId>7021BEB1-210F-48A9-AB82-BE9A9110BB89</RequestId>
</DeleteNatIpCidrResponse>

JSON format

{
    "RequestId": "7021BEB1-210F-48A9-AB82-BE9A9110BB89"
}

Error codes

HttpCode Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.

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