Queries the DNAT entries associated with a smart Access Gateway (SAG) instance.

Debug

Use OpenAPI Explorer to perform debug operations and generate SDK code examples.

Request parameters

Parameter Type Required? Example value Description 
RegionId String Yes cn-hangzhou

The ID of the region to which the SAG instance belongs.

SagId String Yes sag-djgd*************

The ID of the SAG instance.

Note Currently, only SAG instances that correspond to SAG devices are supported.
Action String No DescribeDnatEntries

The name of this action.

Value: DescribeDnatEntries

PageNumber Integer No 1

The number of entries per page in the case of a paged query result. Default value: 10. Maximum value: 50

PageSize Integer No 12

The page number of the DNAT entry list. Default value: 1

Type String No Intranet

The type of the DNAT entry. Valid values:

  • Intranet: (default value) indicates intranet DNAT.
  • Internet: indicates Internet DNAT.

Response parameters

Parameter Type Example value Description
DnatEntries

The list of DNAT entries.

DnatEntryId String dnat-jdhg**********

The ID of the DNAT entry.

ExternalIp String 10.10.**. **

The public IP address before the translation.

ExternalPort String 12

The public port.

Value range: 1 to 65535

InternalIp String 192.168.0.1

The destination private IP address after the translation.

InternalPort String 80

The destination private port.

Value range: 1 to 65535

IpProtocol String TCP

The protocol type. Valid values:

  • TCP: Forwards packets of the TCP protocol.
  • UDP: Forwards packets of the UDP protocol.
  • Any: Forwards packets of all protocols.
SagId String sag-jfh********

The ID of the SAG instance.

Type String Intranet

The type of the DNAT entry. Valid values:

  • Intranet: (default value) indicates intranet DNAT.
  • Internet: indicates Internet DNAT.
PageNumber Integer 12

The number of entries per page in the case of a paged query result. Default value: 10. Maximum value: 50

PageSize Integer 1

The page number of the DNAT entry list. Default value: 1

RequestId String 635640CA-2335-4856-A9CB-1CB5C444DC5A

The ID of the request.

TotalCount Integer 50

The total number of DNAT entries.

Examples

Request example


http(s)://[Endpoint]/? Action=DescribeDnatEntries
&RegionId=cn-hangzhou
&SagId=sag-djgd*************
&<CommonParameters>

Response example

XML format

<DescribeDnatEntriesResponse>
      <DnatEntries></DnatEntries>
	  <PageNumber>1</PageNumber>
	  <PageSize>10</PageSize>
	  <RequestId>635640CA-2335-4856-A9CB-1CB5C444DC5A</RequestId>
	  <TotalCount>0</TotalCount>
    </DescribeDnatEntriesResponse>

JSON format

{
	"PageNumber":1,
	"TotalCount":0,
	"PageSize":10,
	"RequestId":"635640CA-2335-4856-A9CB-1CB5C444DC5A",
	"DnatEntries":{
		"DnatEntry":[]
	}
}

Errors

HTTP status code Error code Error message Description
403 Forbidden User not authorized to operate on the specified resource. You are not authorized to operate on this resource.
403 MissingParameter The input parameter is missing, please check your input. One or more required parameters are missing.
403 InvalidParameter The specified parameter is not valid. The specified parameter is invalid.
403 InternalError An internal server error occurred. An internal error occurred.

For a list of error codes, visit the API Error Center.