Queries SNAT entries.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeSnatTableEntries |
The operation that you want to perform. Set the value to DescribeSnatTableEntries. |
| RegionId | String | Yes | cn-hangzhou |
The region ID of the NAT gateway. You can call the DescribeRegions operation to query the most recent region list. |
| SnatTableId | String | No | stb-8vbczigrhop8x5u3t**** |
The ID of the SNAT table. Note You must set at least one of the SnatTableId and NatGatewayId parameters.
|
| SnatEntryId | String | No | snat-8vbae8uqh7rjpk7d2**** |
The ID of the SNAT entry. |
| SourceVSwitchId | String | No | vsw-3xbjkhjshjdf**** |
The ID of the vSwitch.
|
| SourceCIDR | String | No | 116.22.XX.XX/24 |
The source CIDR block specified in the SNAT entry. |
| SnatIp | String | No | 116.22.XX.XX |
|
| SnatEntryName | String | No | SnatEntry-1 |
The name of the SNAT entry. The name must be 2 to 128 characters in length, and can contain digits, underscores (_), and hyphens (-). The name must start with a letter. |
| PageNumber | Integer | No | 1 |
The number of the page to return. Default value: 1. |
| PageSize | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 50. Default value: 10. |
| NatGatewayId | String | No | ngw-bp1uewa15k4iy5770**** |
The ID of the NAT gateway. Note You must set at least one of the SnatTableId and NatGatewayId parameters.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| PageSize | Integer | 5 |
The number of entries returned per page. |
| RequestId | String | 6D7E89B1-1C5B-412B-8585-4908E222EED5 |
The ID of the request. |
| PageNumber | Integer | 1 |
The page number of the returned page. |
| TotalCount | Integer | 1 |
The number of entries returned. |
| SnatTableEntries | Array of SnatTableEntry |
The details of the SNAT entries. |
|
| SnatTableEntry | |||
| Status | String | Pending |
The status of the SNAT entry. Valid values:
|
| SnatEntryName | String | SnatEntry-1 |
The name of the SNAT entry. |
| SourceVSwitchId | String | vsw-3xbdsffvfgdfds**** |
|
| SourceCIDR | String | 116.22.XX.XX/24 |
The source CIDR block specified in the SNAT entry. |
| SnatEntryId | String | snat-kmd6nv8fy**** |
The ID of the SNAT entry. |
| SnatTableId | String | stb-gz3r3odawdgffde**** |
The ID of the SNAT table to which the SNAT entry belongs. |
| SnatIp | String | 116.22.XX.XX |
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeSnatTableEntries
&RegionId=cn-hangzhou
&SnatTableId=stb-8vbczigrhop8x5u3t****
&SnatEntryId=snat-8vbae8uqh7rjpk7d2****
&SourceVSwitchId=vsw-3xbjkhjshjdf****
&SourceCIDR=116.22.XX.XX/24
&SnatIp=116.22.XX.XX
&SnatEntryName=SnatEntry-1
&PageNumber=1
&PageSize=10
&NatGatewayId=ngw-bp1uewa15k4iy5770****
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeSnatTableEntriesResponse>
<PageSize>5</PageSize>
<RequestId>6D7E89B1-1C5B-412B-8585-4908E222EED5</RequestId>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<SnatTableEntries>
<Status>Pending</Status>
<SnatEntryName>SnatEntry-1</SnatEntryName>
<SourceVSwitchId>vsw-3xbdsffvfgdfds****</SourceVSwitchId>
<SourceCIDR>116.22.XX.XX/24</SourceCIDR>
<SnatEntryId>snat-kmd6nv8fy****</SnatEntryId>
<SnatTableId>stb-gz3r3odawdgffde****</SnatTableId>
<SnatIp>116.22.XX.XX</SnatIp>
</SnatTableEntries>
</DescribeSnatTableEntriesResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : 5,
"RequestId" : "6D7E89B1-1C5B-412B-8585-4908E222EED5",
"PageNumber" : 1,
"TotalCount" : 1,
"SnatTableEntries" : [ {
"Status" : "Pending",
"SnatEntryName" : "SnatEntry-1",
"SourceVSwitchId" : "vsw-3xbdsffvfgdfds****",
"SourceCIDR" : "116.22.XX.XX/24",
"SnatEntryId" : "snat-kmd6nv8fy****",
"SnatTableId" : "stb-gz3r3odawdgffde****",
"SnatIp" : "116.22.XX.XX"
} ]
}
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. |
| 404 | InvalidSnatTableId.NotFound | Specified SNAT table does not exist. | The error message returned because the specified SNAT table does not exist. Check whether the ID of the SNAT table is valid. |
For a list of error codes, visit the Error Center.