All Products
Search
Document Center

Smart Access Gateway:DescribeDnatEntries

Last Updated:Mar 29, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
smartag:DescribeDnatEntriesRead
  • SmartAccessGateway
    acs:smartag:{#regionId}:{#accountId}:smartag/{#SmartAGId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the SAG instance.

cn-hangzhou
SagIdstringYes

The ID of the SAG instance.

Note Only SAG customer-premises equipment (CPE) instances are supported.
sag-djgd*************
TypestringNo

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
PageSizeintegerNo

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

12
PageNumberintegerNo

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

1

Response parameters

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of entries returned.

50
PageSizeinteger

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

1
RequestIdstring

The ID of the request.

635640CA-2335-4856-A9CB-1CB5C444DC5A
PageNumberinteger

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

12
DnatEntriesobject []

The list of DNAT entries.

Typestring

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
SagIdstring

The ID of the SAG instance.

sag-jfh********
InternalIpstring

The destination private IP address.

192.168.0.1
InternalPortstring

The destination private port.

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

80
IpProtocolstring

The protocol used in DNAT. Valid values:

  • tcp.
  • udp.
  • any: all protocols.
tcp
ExternalPortstring

The public port.

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

12
DnatEntryIdstring

The ID of the DNAT entry.

fwd-kxe4fq3xuzczze****
ExternalIpstring

The public IP address.

10.10.**.**

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
403ForbiddenUser not authorized to operate on the specified resource.You do not have permissions to manage the specified resource.
403MissingParameterThe input parameter is missing, please check your input.Missing parameters. Check whether all required parameters are set.
403InvalidParameterThe specified parameter is invalid.Invalid parameters.
403InternalErrorAn internal server error occurred.An internal server error occurred.

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