Queries the IP addresses on a NAT gateway.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the NAT gateway is deployed. You can call the DescribeRegions operation to query the most recent region list. |
eu-central-1 |
| NatGatewayId |
string |
Yes |
The ID of the NAT gateway. |
ngw-gw8v16wgvtq26vh59**** |
| NatIpCidr |
string |
No |
The CIDR block to which the IP address belongs. |
192.168.0.0/24 |
| DryRun |
boolean |
No |
Whether to only precheck the request. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that ensures the idempotence of the request. You can use the client to generate the token, but it must be unique across 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. |
5A2CFF0E-5718-45B5-9D4D-70B3FF3898 |
| NatIpStatus |
string |
No |
The status of the IP address. Valid values:
|
Available |
| NextToken |
string |
No |
The token that is used for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd****f84eb48b699f0a4883 |
| MaxResults |
string |
No |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 20. |
20 |
| NatIpName |
array |
No |
The name of the IP address. Valid values of N: 1 to 20. |
test |
|
string |
No |
The name of the IP address. Valid values of N: 1 to 20. |
test |
|
| NatIpIds |
array |
No |
The ID of the IP address. Valid values of N: 1 to 20. |
vpcnatip-gw8a863sut1zijxh0**** |
|
string |
No |
The ID of the IP address. Valid values of N: 1 to 20. |
vpcnatcidr-gw8ov42ei6xh1jys2**** |
|
| RegionId |
string |
Yes |
The ID of the region where the NAT gateway is deployed. You can call the DescribeRegions operation to query the most recent region list. |
eu-central-1 |
| IpOrigin |
string |
No |
The source type of the NAT IP address. A value of Prefix indicates an IP address that belongs to an IPv4Prefix. A value of cidr indicates a standalone NAT IP address. A value of control indicates all NAT IP addresses. |
cidr |
| Ipv4Prefix |
string |
No |
The IP prefix address range. |
192.168.0.0/28 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The token that is used for the next query. Valid values:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
The ID of the request. |
7E78CEEA-BF8F-44D1-9DCD-D9141135B71E |
| TotalCount |
string |
The number of IP addresses that are returned. |
1 |
| NatIps |
array<object> |
The list of IP addresses of the NAT gateway. |
|
|
object |
|||
| IsDefault |
boolean |
Whether the IP address is the default IP address of the NAT gateway. Valid values:
|
true |
| NatIp |
string |
The IP address. |
192.168.0.126 |
| Ipv4Prefix |
string |
The IPv4 prefix range to which the NAT IP address belongs. |
192.168.0.0/28 |
| NatIpCidr |
string |
The CIDR block to which the IP address belongs. |
192.168.0.0/24 |
| NatIpId |
string |
The ID of the IP address. |
vpcnatip-gw8a863sut1zijxh0**** |
| NatIpDescription |
string |
The description of the IP address. |
default |
| NatGatewayId |
string |
The ID of the VPC NAT gateway to which the IP address is assigned. |
ngw-gw8v16wgvtq26vh59**** |
| NatIpName |
string |
The name of the IP address. |
default |
| NatIpStatus |
string |
The status of the IP address. Valid values:
|
Available |
Examples
Success response
JSON format
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "7E78CEEA-BF8F-44D1-9DCD-D9141135B71E",
"TotalCount": "1",
"NatIps": [
{
"IsDefault": true,
"NatIp": "192.168.0.126",
"Ipv4Prefix": "192.168.0.0/28",
"NatIpCidr": "192.168.0.0/24",
"NatIpId": "vpcnatip-gw8a863sut1zijxh0****",
"NatIpDescription": "default",
"NatGatewayId": "ngw-gw8v16wgvtq26vh59****",
"NatIpName": "default",
"NatIpStatus": "Available"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.