Queries SNAT entries.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where you want to create the NAT gateway. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
SnatTableId | string | No | The ID of the SNAT table. Note
You must specify at least one of SnatTableId and NatGatewayId.
| stb-8vbczigrhop8x5u3t**** |
SnatEntryId | string | No | The ID of the SNAT entry. | snat-8vbae8uqh7rjpk7d2**** |
SourceVSwitchId | string | No | The ID of the vSwitch.
| vsw-3xbjkhjshjdf**** |
SourceCIDR | string | No | The source CIDR block specified in the SNAT entry. | 116.22.XX.XX/24 |
SnatIp | string | No |
| 116.22.XX.XX |
SnatEntryName | string | No | 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. | SnatEntry-1 |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Maximum value: 50. Default value: 10. | 10 |
NatGatewayId | string | No | The ID of the NAT gateway. Note
You must specify at least one of SnatTableId and NatGatewayId.
| ngw-bp1uewa15k4iy5770**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageSize": 5,
"RequestId": "6D7E89B1-1C5B-412B-8585-4908E222EED5",
"PageNumber": 1,
"TotalCount": 1,
"SnatTableEntries": {
"SnatTableEntry": [
{
"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",
"NatGatewayId": "ngw-bp1uewa15k4iy5770****"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidName.Malformed | The specified Name is not valid. | The Name parameter is set to an invalid value. |
400 | DESCRIBE_SNAT_PARAM_INVALID | SnatTableId and natGatewayId can not both be null | - |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The specified region ID does not exist. |
404 | InvalidSnatTableId.NotFound | Specified SNAT table does not exist. | The specified SNAT table does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-06 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |
2023-08-09 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-03-01 | The Error code has changed | View Change Details |