All Products
Search
Document Center

ENS:DescribeSnatAttribute

Last Updated:Nov 18, 2024

Queries the details of a specific source network address translation (SNAT) entry.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:DescribeSnatAttributeget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
SnatEntryIdstringYes

The ID of the SNAT entry.

snat-5tc08qfj5ecblfdn2rqr9****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
NatGatewayIdstring

The ID of the Network Address Translation (NAT) gateway.

nat-5t7nh1cfm6kxiszlttr38****
SnatEntryIdstring

The ID of the SNAT entry.

snat-5tfi6f8gds82mjmlofeym****
SnatIpstring

The EIP specified in the SNAT entry. Multiple EIPs are separated by commas (,).

120.72.XX.XX
SourceCIDRstring

The source CIDR block specified in the SNAT entry.

10.0.XX.XX/24
SnatEntryNamestring

The name of the SNAT entry.

test0
Statusstring

The status of the SNAT entry.

  • Pending: The SNAT entry is being created or modified.
  • Available: The SNAT entry is available.
  • Deleting: The SNAT entry is being deleted.
Available
CreationTimestring

The time when the entry was created. The time is displayed in UTC.

2020-04-26T15:38:27Z
SnatIpsarray<object>

The information about the EIP specified in the SNAT entry.

snatipobject
Ipstring

The IP address.

203.132.XX.XX
Statusstring

The status of the IP address.

  • Running
  • Stopping
  • Stopped
  • Starting
  • Releasing
Running
CreationTimestring

The time when the IP address was created. The time is displayed in UTC.

2020-04-26T15:38:27Z
StandbySnatIpstring

The secondary EIP specified in the SNAT entry. Multiple secondary EIPs are separated by commas (,).

101.23. XX.XX
StandbyStatusstring

The status of the secondary EIP.

  • Running
  • Stopping
  • Stopped
  • Starting
Stopped
Typestring

The type of the NAT.

  • Empty: symmetric NAT.
  • FullCone: full cone NAT.
FullCone
IdleTimeoutinteger

The timeout period. Unit: seconds.

10
DestCIDRstring

The destination CIDR block. The rule takes effect only on requests that access the destination CIDR block.

101.10. XX.XX/24

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "NatGatewayId": "nat-5t7nh1cfm6kxiszlttr38****",
  "SnatEntryId": "snat-5tfi6f8gds82mjmlofeym****",
  "SnatIp": "120.72.XX.XX",
  "SourceCIDR": "10.0.XX.XX/24",
  "SnatEntryName": "test0",
  "Status": "Available",
  "CreationTime": "2020-04-26T15:38:27Z",
  "SnatIps": [
    {
      "Ip": "203.132.XX.XX",
      "Status": "Running",
      "CreationTime": "2020-04-26T15:38:27Z"
    }
  ],
  "StandbySnatIp": "101.23. XX.XX",
  "StandbyStatus": "Stopped",
  "Type": "FullCone",
  "IdleTimeout": 10,
  "DestCIDR": "101.10. XX.XX/24"
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid%sThe specified parameter %s is invalid.-
400Missing%sYou must specify the parameter %s.-
400InvalidParameter.SnatNotFoundThe specified snat is not found.The specified DNAT rule does not exist.
400ens.interface.errorFailed to call API.-
400NoPermissionPermission denied.-
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-24The Error code has changedView Change Details
2023-10-19The Error code has changed. The response structure of the API has changedView Change Details
2023-07-18The Error code has changed. The response structure of the API has changedView Change Details