Queries the IP addresses on a NAT gateway.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | eu-central-1 |
The ID of the region where the NAT gateway is deployed. You can call the DescribeRegions operation to query the most recent region list. |
NatGatewayId | String | Yes | ngw-gw8v16wgvtq26vh59**** |
The ID of the NAT gateway. |
NatIpCidr | String | No | 192.168.0.0/24 |
The CIDR block to which the IP address belongs. |
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.
|
NatIpStatus | String | No | Available |
The status of the IP address. Valid values:
|
NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd****f84eb48b699f0a4883 |
The token that is used for the next query. Valid values:
|
MaxResults | String | No | 20 |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 20. |
Action | String | Yes | ListNatIps |
The operation that you want to perform. Set the value to ListNatIps. |
NatIpName.N | String | No | test |
The name of the IP address. Valid values of N: 1 to 20. |
NatIpIds.N | String | No | vpcnatcidr-gw8ov42ei6xh1jys2**** |
The ID of the IP address. Valid values of N: 1 to 20. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** |
The token that is used for the next query. Valid values:
|
RequestId | String | 7E78CEEA-BF8F-44D1-9DCD-D9141135B71E |
The ID of the request. |
TotalCount | String | 1 |
The number of IP addresses that are returned. |
NatIps | Array of NatIp |
The list of IP addresses of the NAT gateway. |
|
IsDefault | Boolean | true |
Indicates whether the IP address is the default IP address of the NAT gateway. Valid values:
|
NatIp | String | 192.168.0.126 |
The IP address. |
NatIpCidr | String | 192.168.0.0/24 |
The CIDR block to which the IP address belongs. |
NatIpId | String | vpcnatip-gw8a863sut1zijxh0**** |
The ID of the IP address. |
NatIpDescription | String | default |
The description of the IP address. |
NatGatewayId | String | ngw-gw8v16wgvtq26vh59**** |
The ID of the Virtual Private Cloud (VPC) NAT gateway to which the IP address is assigned. |
NatIpName | String | default |
The name of the IP address. |
NatIpStatus | String | Available |
The status of the IP address. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=eu-central-1
&NatGatewayId=ngw-gw8v16wgvtq26vh59****
&NatIpCidr=192.168.0.0/24
&DryRun=false
&ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF3898
&NatIpStatus=Available
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****f84eb48b699f0a4883
&MaxResults=20
&NatIpName=["test"]
&NatIpIds=["vpcnatcidr-gw8ov42ei6xh1jys2****"]
&Action=ListNatIps
&Common request parameters
Sample responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListNatIpsResponse>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<RequestId>7E78CEEA-BF8F-44D1-9DCD-D9141135B71E</RequestId>
<TotalCount>1</TotalCount>
<NatIps>
<IsDefault>true</IsDefault>
<NatIp>192.168.0.126</NatIp>
<NatIpCidr>192.168.0.0/24</NatIpCidr>
<NatIpId>vpcnatip-gw8a863sut1zijxh0****</NatIpId>
<NatIpDescription>default</NatIpDescription>
<NatGatewayId>ngw-gw8v16wgvtq26vh59****</NatGatewayId>
<NatIpName>default</NatIpName>
<NatIpStatus>Available</NatIpStatus>
</NatIps>
</ListNatIpsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId" : "7E78CEEA-BF8F-44D1-9DCD-D9141135B71E",
"TotalCount" : "1",
"NatIps" : [ {
"IsDefault" : true,
"NatIp" : "192.168.0.126",
"NatIpCidr" : "192.168.0.0/24",
"NatIpId" : "vpcnatip-gw8a863sut1zijxh0****",
"NatIpDescription" : "default",
"NatGatewayId" : "ngw-gw8v16wgvtq26vh59****",
"NatIpName" : "default",
"NatIpStatus" : "Available"
} ]
}
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.