Creates a NAT CIDR block.
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 digits, periods (.),
underscores (_), and hyphens (-). It must start with a letter. It cannot start with
|
NatIpCidrDescription | String | Yes | mycidr |
The description of the 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 only precheck the request. 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 token can contain only ASCII characters and cannot exceed 64 characters in length. Note If you do not set this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.
|
NatIpCidr | String | No | 172.16.0.0/24 |
The CIDR block that you want to associate with the NAT gateway. The CIDR block of the NAT gateway 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 CIDR block that is associated with the NAT gateway. |
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 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 specified region ID does not exist. |
For a list of error codes, visit the API Error Center.