Creates a NAT CIDR block.
Usage notes
You cannot repeatedly call the CreateNatIpCidr operation to create a NAT CIDR block within the specified period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | eu-central-1 |
The region ID of the NAT gateway with which you want to associate the CIDR block. You can call the DescribeRegions operation to query the most recent region list. |
NatGatewayId | String | Yes | ngw-gw8v16wgvtq26vh59**** |
The ID of the Virtual Private Cloud (VPC) NAT gateway with which you want to associate the CIDR block. |
NatIpCidrName | String | Yes | newcidr |
The name of the CIDR block. The name must be 2 to 128 characters in length, and can contain letters, digits, periods
(.), underscores (_), and hyphens (-). It must start with a letter. It cannot start
with |
NatIpCidrDescription | String | Yes | mycidr |
The 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 |
DryRun | Boolean | No | false |
Specifies whether to check the request without performing the operation. Valid values:
|
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, the system automatically uses RequestId as ClientToken. RequestId of each API request may be different.
|
NatIpCidr | String | Yes | 172.16.0.0/24 |
The NAT CIDR block that you want to associate with the NAT gateway. The NAT CIDR block must meet the following conditions:
|
Action | String | Yes | CreateNatIpCidr |
The operation that you want to perform. Set the value to CreateNatIpCidr. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NatIpCidrId | String | vpcnatcidr-gw8lhqtvdn4qnea**** |
The ID of the NAT CIDR block. |
RequestId | String | 7021BEB1-210F-48A9-AB82-BE9A9110BB89 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=eu-central-1
&NatGatewayId=ngw-gw8v16wgvtq26vh59****
&NatIpCidrName=newcidr
&NatIpCidrDescription=mycidr
&DryRun=false
&ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF3898
&NatIpCidr=172.16.0.0/24
&Action=CreateNatIpCidr
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateNatIpCidrResponse>
<NatIpCidrId>vpcnatcidr-gw8lhqtvdn4qnea****</NatIpCidrId>
<RequestId>7021BEB1-210F-48A9-AB82-BE9A9110BB89</RequestId>
</CreateNatIpCidrResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"NatIpCidrId" : "vpcnatcidr-gw8lhqtvdn4qnea****",
"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 ID of the specified region does not exist. |
For a list of error codes, visit the API Error Center.