Queries DNAT entries.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeForwardTableEntries

The operation that you want to perform. Set the value to DescribeForwardTableEntries.

RegionId String Yes cn-hangzhou

The ID of the region where the NAT gateway is deployed.

You can call the DescribeRegions operation to query the most recent region list.

ForwardTableId String Yes ftb-bp1mbjubq34hlcqpa****

The ID of the DNAT table.

ForwardEntryId String No fwd-8vbn3bc8roygjp0gy****

The ID of the DNAT entry.

ExternalIp String No 116.28.XX.XX
  • The elastic IP addresses (EIPs) that can be accessed over the Internet when you query DNAT entries of Internet NAT gateways.
  • The NAT IP addresses that can be accessed by external networks when you query DNAT entries of Virtual Private Cloud (VPC) NAT gateways.
ExternalPort String No 8080
  • The external port or port range that is used for port forwarding when you query DNAT entries of Internet NAT gateways.
    • Valid values: 1 to 65535.
    • If you want to query a port range, separate the first port and last port with a forward slash (/), such as 10/20.
    • If you set ExternalPort to a port range, you must also set InternalPort to a port range, and the number of ports specified by these parameters must be the same. For example, if you set ExternalPort to 10/20, you can set InternalPor to 80/90.
  • The port that is used when the NAT IP address can be accessed by external networks when you query DNAT entries of VPC NAT gateways. Valid values: 1 to 65535.
InternalIp String No 192.168.XX.XX
  • The private IP address of the ECS instance that uses DNAT entries to communicate with the Internet when you query DNAT entries of Internet NAT gateways.
  • The private IP address that uses DNAT entries for communication when you query DNAT entries of VPC NAT gateways.
InternalPort String No 80
  • The internal port or port range that is used for port forwarding when you query DNAT entries of Internet NAT gateways. Valid values: 1 to 65535.
  • The port of the destination ECS instance to be mapped when you query DNAT entries of VPC NAT gateways. Valid values: 1 to 65535.
IpProtocol String No TCP

The protocol. Valid values:

  • TCP: The NAT gateway forwards TCP packets.
  • UDP: The NAT gateway forwards UDP packets.
  • Any: The NAT gateway forwards packets of all protocols.
ForwardEntryName String No ForwardEntry-1

The name of the DNAT entry.

The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://.

PageNumber Integer No 1

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

PageSize Integer No 10

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

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

RequestId String A6C4A8B1-7561-4509-949C-20DEB40D71E6

The ID of the request.

PageNumber Integer 1

The number of the returned page.

TotalCount Integer 5

The total number of entries returned.

ForwardTableEntries Array of ForwardTableEntry

The details of DNAT entries.

ForwardTableEntry
Status String Available

The status of the DNAT entry. Valid values:

  • Pending: being created or modified
  • Available: available
  • Deleting: being deleted
ForwardEntryId String fwd-119smw5tk****

The ID of the DNAT entry.

InternalIp String 192.168.XX.XX
  • The private IP address of the ECS instance that uses DNAT entries to communicate with the Internet when you query DNAT entries of Internet NAT gateways.
  • The private IP address that uses DNAT entries when you query DNAT entries of VPC NAT gateways.
InternalPort String 25
  • The internal port or port range that is used for port forwarding when you query DNAT entries of Internet NAT gateways.
  • The destination ECS instance port to be mapped when you query DNAT entries of VPC NAT gateways.
ForwardEntryName String ForwardEntry-1

The name of the DNAT entry.

ForwardTableId String ftb-11tc6xgmv****

The ID of the DNAT table to which the DNAT entry belongs.

IpProtocol String TCP

The protocol. Valid values:

  • TCP: The NAT gateway forwards TCP packets.
  • UDP: The NAT gateway forwards UDP packets.
  • Any: The NAT gateway forwards packets of any protocol.
ExternalPort String 80
  • The external port or port range that is used for port forwarding when you query DNAT entries of Internet NAT gateways.
  • The port that is used when the NAT IP address can be accessed by external networks when you query DNAT entries of VPC NAT gateways.
ExternalIp String 139.79.XX.XX
  • The EIPs that can be accessed over the Internet when you query DNAT entries of Internet NAT gateways.
  • The NAT IP addresses that can be accessed by external networks when you query DNAT entries of VPC NAT gateways.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeForwardTableEntries
&ResourceOwnerId=11
&RegionId=cn-hangzhou
&ForwardTableId=ftb-bp1mbjubq34hlcqpa****
&ForwardEntryId=fwd-8vbn3bc8roygjp0gy****
&ExternalIp=116.28.XX.XX
&ExternalPort=8080
&InternalIp=192.168.XX.XX	
&InternalPort=80
&IpProtocol=TCP
&ForwardEntryName=ForwardEntry-1
&PageNumber=1
&PageSize=10
&Common request parameters

Sample responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeForwardTableEntriesResponse>
    <PageSize>10</PageSize>
    <RequestId>A6C4A8B1-7561-4509-949C-20DEB40D71E6</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>5</TotalCount>
    <ForwardTableEntries>
        <Status>Available</Status>
        <ForwardEntryId>fwd-119smw5tk****</ForwardEntryId>
        <InternalIp>192.168.XX.XX</InternalIp>
        <InternalPort>25</InternalPort>
        <ForwardEntryName>ForwardEntry-1</ForwardEntryName>
        <ForwardTableId>ftb-11tc6xgmv****</ForwardTableId>
        <IpProtocol>TCP</IpProtocol>
        <ExternalPort>80</ExternalPort>
        <ExternalIp>139.79.XX.XX</ExternalIp>
    </ForwardTableEntries>
</DescribeForwardTableEntriesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "A6C4A8B1-7561-4509-949C-20DEB40D71E6",
  "PageNumber" : 1,
  "TotalCount" : 5,
  "ForwardTableEntries" : [ {
    "Status" : "Available",
    "ForwardEntryId" : "fwd-119smw5tk****",
    "InternalIp" : "192.168.XX.XX",
    "InternalPort" : "25",
    "ForwardEntryName" : "ForwardEntry-1",
    "ForwardTableId" : "ftb-11tc6xgmv****",
    "IpProtocol" : "TCP",
    "ExternalPort" : "80",
    "ExternalIp" : "139.79.XX.XX"
  } ]
}

Error codes

HttpCode Error code Error message Description
400 IncorretForwardEntryStatus Some Forward entry status blocked this operation.. The error message returned because you are not authorized to perform the specified operation. The error message returned because one or more DNAT entries in the DNAT table are in the Pending or Modifying state.
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.
404 InvalidForwardTableId.NotFound Specified forwardTableId does not exist The error message returned because the specified DNAT table does not exist. Check the parameter value and try again.

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