All Products
Search
Document Center

ENS:DescribeSnatAttribute

Last Updated:Mar 27, 2026

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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.

  • Pending: The SNAT entry is being created or modified.

  • Available: The SNAT entry is available.

  • Deleting: The SNAT entry is being deleted.

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

  • Stopping

  • Stopped

  • Starting

  • Releasing

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.

  • Running

  • Stopping

  • Stopped

  • Starting

Stopped

Type

string

The type of the NAT.

  • Empty: symmetric NAT.

  • FullCone: full cone 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:

  • false:Do not open.

  • true:Open.

true

EipAffinity

boolean

Specifies whether to enable IP affinity. Valid values:

  • false

  • true

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.