All Products
Search
Document Center

Smart Access Gateway:DescribeDnatEntries

Last Updated:Mar 27, 2026

Queries DNAT entries that are associated with a Smart Access Gateway (SAG) instance.

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

smartag:DescribeDnatEntries

get

*SmartAccessGateway

acs:smartag:{#regionId}:{#accountId}:smartag/{#SmartAGId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the SAG instance.

cn-hangzhou

SagId

string

Yes

The ID of the SAG instance.

Note

Only SAG customer-premises equipment (CPE) instances are supported.

sag-djgd*************

Type

string

No

The type of the DNAT entry. Valid values:

  • Intranet: translates the IP address to a specific internal IP address. This is the default value.

  • Internet: translates the IP address to a specific public IP address.

Intranet

PageSize

integer

No

The number of entries to return on each page. Default value: 10. Maximum value: 50.

12

PageNumber

integer

No

The number of the page to return. Default value: 1.

1

Response elements

Element

Type

Description

Example

object

TotalCount

integer

The total number of entries returned.

50

PageSize

integer

The number of entries returned per page. Default value: 10. Maximum value: 50.

1

RequestId

string

The ID of the request.

635640CA-2335-4856-A9CB-1CB5C444DC5A

PageNumber

integer

The page number of the returned page. Default value: 1.

12

DnatEntries

object

DnatEntry

array<object>

The list of DNAT entries.

object

Type

string

The type of the DNAT entry. Valid values:

  • Intranet: the IP address was translated to a specific internal IP address. This is the default value.

  • Internet: the IP address was translated to a specific public IP address.

Intranet

SagId

string

The ID of the SAG instance.

sag-jfh********

InternalIp

string

The destination private IP address.

192.168.0.1

InternalPort

string

The destination private port.

Valid values: 1 to 65535 and any. The value any indicates all ports.

80

IpProtocol

string

The protocol used in DNAT. Valid values:

  • tcp.

  • udp.

  • any: all protocols.

tcp

ExternalPort

string

The public port.

Valid values: 1 to 65535 and any. The value any indicates all ports.

12

DnatEntryId

string

The ID of the DNAT entry.

fwd-kxe4fq3xuzczze****

ExternalIp

string

The public IP address.

10.10.**.**

Examples

Success response

JSON format

{
  "TotalCount": 50,
  "PageSize": 1,
  "RequestId": "635640CA-2335-4856-A9CB-1CB5C444DC5A",
  "PageNumber": 12,
  "DnatEntries": {
    "DnatEntry": [
      {
        "Type": "Intranet",
        "SagId": "sag-jfh********",
        "InternalIp": "192.168.0.1",
        "InternalPort": "80",
        "IpProtocol": "tcp",
        "ExternalPort": "12",
        "DnatEntryId": "fwd-kxe4fq3xuzczze****",
        "ExternalIp": "10.10.**.**"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

403 Forbidden User not authorized to operate on the specified resource. You do not have permissions to manage the specified resource.
403 MissingParameter The input parameter is missing, please check your input. Missing parameters. Check whether all required parameters are set.
403 InvalidParameter The specified parameter is invalid. Invalid parameters.
403 InternalError An internal server error occurred. An internal server error occurred.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.