Modifies the name and description of 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
RegionId String Yes eu-central-1

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

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

NatIpCidrName String Yes newname

The new name of the NAT CIDR block.

The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.

DryRun Boolean No false

Specifies whether to check the request without performing the operation. Valid values:

  • true: checks the request but does not modify information about the NAT CIDR block. The system checks whether your AccessKey pair is valid, whether RAM users are granted required permissions, and whether the required parameters are set. If the request fails the check, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
  • false: sends the request. This is the default value. If the request passes the check, a 2xx HTTP status code is returned and information about the NAT CIDR block is modified.
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. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.
NatIpCidrDescription String No newtest

The new description of the NAT CIDR block.

The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

NatGatewayId String Yes ngw-gw8v16wgvtq26vh59****

The ID of the Virtual Private Cloud (VPC) NAT gateway to which the NAT CIDR block belongs.

NatIpCidr String Yes 172.16.0.0/24

The NAT CIDR block whose name and description you want to modify.

Action String Yes ModifyNatIpCidrAttribute

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

Response parameters

Parameter Type Example Description
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?RegionId=eu-central-1
&NatIpCidrName=newname
&DryRun=false
&ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF3898
&NatIpCidrDescription=newtest
&NatGatewayId=ngw-gw8v16wgvtq26vh59****
&NatIpCidr=172.16.0.0/24
&Action=ModifyNatIpCidrAttribute
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyNatIpCidrAttributeResponse>
    <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
</ModifyNatIpCidrAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}

Error codes

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