Queries a specific source network address translation (SNAT) entry.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DescribeSnatAttribute |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SnatEntryId |
string |
Yes |
The ID of the SNAT entry. |
snat-5tc08qfj5ecblfdn2rqr9**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The ID of the request. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| NatGatewayId |
string |
The ID of the Network Address Translation (NAT) gateway. |
nat-5t7nh1cfm6kxiszlttr38**** |
| SnatEntryId |
string |
The ID of the SNAT entry. |
snat-5tfi6f8gds82mjmlofeym**** |
| SnatIp |
string |
The EIP specified in the SNAT entry. Multiple EIPs are separated by commas (,). |
120. XXX. XXX.71 |
| SourceCIDR |
string |
The source CIDR block specified in the SNAT entry. |
10. XXX. XXX.0/24 |
| SnatEntryName |
string |
The name of the SNAT entry. |
test0 |
| Status |
string |
The status of the SNAT entry.
|
Available |
| CreationTime |
string |
The time when the entry was created. The time is displayed in UTC. |
2020-04-26T15:38:27Z |
| SnatIps |
array<object> |
The information about the EIP specified in the SNAT entry. |
|
|
object |
The information about the EIP specified in the SNAT entry. |
||
| Ip |
string |
The IP address. |
203. XXX. XXX.139 |
| Status |
string |
The status of the IP address.
|
Running |
| CreationTime |
string |
The time when the IP address was created. The time is displayed in UTC. |
2020-04-26T15:38:27Z |
| StandbySnatIp |
string |
The secondary EIP specified in the SNAT entry. Multiple secondary EIPs are separated by commas (,). |
101. XXX. XXX.4 |
| StandbyStatus |
string |
The status of the secondary EIP.
|
Stopped |
| Type |
string |
The type of the NAT.
|
FullCone |
| IdleTimeout |
integer |
The timeout period. Unit: seconds. |
10 |
| DestCIDR |
string |
The destination CIDR block. The rule takes effect only on requests that access the destination CIDR block. |
101. XXX. XXX.0/24 |
| IspAffinity |
boolean |
Whether to enable operator affinity. Value taking:
|
true |
| EipAffinity |
boolean |
Specifies whether to enable IP affinity. Valid values:
Note
After you enable IP affinity, if multiple EIPs are associated with an SNAT entry, one client uses the same EIP to for communication. If IP affinity is disabled, the client uses a random EIP for communication. |
false |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"NatGatewayId": "nat-5t7nh1cfm6kxiszlttr38****",
"SnatEntryId": "snat-5tfi6f8gds82mjmlofeym****",
"SnatIp": "120. XXX. XXX.71",
"SourceCIDR": "10. XXX. XXX.0/24",
"SnatEntryName": "test0",
"Status": "Available",
"CreationTime": "2020-04-26T15:38:27Z",
"SnatIps": [
{
"Ip": "203. XXX. XXX.139",
"Status": "Running",
"CreationTime": "2020-04-26T15:38:27Z"
}
],
"StandbySnatIp": "101. XXX. XXX.4",
"StandbyStatus": "Stopped",
"Type": "FullCone",
"IdleTimeout": 10,
"DestCIDR": "101. XXX. XXX.0/24",
"IspAffinity": true,
"EipAffinity": false
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | InvalidParameter.SnatNotFound | The specified snat is not found. | The specified DNAT rule does not exist. |
| 400 | ens.interface.error | Failed to call API. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.