Deletes a NAT CIDR block.

Usage notes

You cannot repeatedly call the DeleteNatIpCidr operation to delete a NAT CIDR block 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 parameter

Parameter Type Required Example Description
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.

NatIpCidr String Yes

The NAT CIDR block to be deleted.

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

Specifies whether only to precheck this request. Valid values:

  • true: sends the precheck request but does delete the NAT CIDR block. The system checks your AccessKey pair, the RAM user permissions, and the required parameters. If the request fails the precheck, an error code is returned. If the request passes the check, 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 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.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request may be different.
NatGatewayId String Yes ngw-gw8v16wgvtq26vh59****

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

Action String Yes DeleteNatIpCidr

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

Response parameters

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

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" : "7021BEB1-210F-48A9-AB82-BE9A9110BB89"

Error codes

HTTP status code 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.