All Products
Search
Document Center

NAT Gateway:DescribeForwardTableEntries

Last Updated:Nov 28, 2024

Queries DNAT entries.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
vpc:DescribeForwardTableEntriesget
*ForwardTable
acs:vpc:{#regionId}:{#accountId}:forwardtable/{#ForwardTableId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where you want to create the NAT gateway.

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

cn-hangzhou
ForwardTableIdstringNo

The ID of the DNAT table.

**

Description You must specify at least one of ForwardTableId and NatGatewayId.

ftb-bp1mbjubq34hlcqpa****
ForwardEntryIdstringNo

The ID of the DNAT entry.

fwd-8vbn3bc8roygjp0gy****
ExternalIpstringNo
  • 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.
116.28.XX.XX
ExternalPortstringNo
  • 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 InternalPort 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.

8080
InternalIpstringNo

The private IP address.

  • 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.
192.168.XX.XX
InternalPortstringNo
  • 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.
80
IpProtocolstringNo

The protocol. Valid values:

  • TCP
  • UDP
  • Any
TCP
ForwardEntryNamestringNo

The name of the DNAT entry.

The name must be 2 to 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.

ForwardEntry-1
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

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

10
NatGatewayIdstringNo

The ID of the NAT gateway.

**

Description You must specify at least one of ForwardTableId and NatGatewayId.

ngw-bp1uewa15k4iy5770****

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

A6C4A8B1-7561-4509-949C-20DEB40D71E6
PageNumberinteger

The page number.

1
TotalCountinteger

The number of entries returned.

5
ForwardTableEntriesarray<object>

The details of DNAT entries.

ForwardTableEntryobject
Statusstring

The status of the DNAT entry. Valid values:

  • Pending
  • Available
  • Deleting
Available
ForwardEntryIdstring

The ID of the DNAT entry.

fwd-119smw5tk****
InternalIpstring

The private IP address.

  • 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.
192.168.XX.XX
InternalPortstring
  • 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.
25
ForwardEntryNamestring

The name of the DNAT entry.

ForwardEntry-1
ForwardTableIdstring

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

ftb-11tc6xgmv****
IpProtocolstring

The protocol. Valid values:

  • TCP
  • UDP
  • Any
TCP
ExternalPortstring
  • 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.
80
ExternalIpstring
  • 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.
139.79.XX.XX
NatGatewayIdstring

The ID of the NAT gateway to which the DNAT entry belongs.

ngw-bp1uewa15k4iy5770****

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "A6C4A8B1-7561-4509-949C-20DEB40D71E6",
  "PageNumber": 1,
  "TotalCount": 5,
  "ForwardTableEntries": {
    "ForwardTableEntry": [
      {
        "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",
        "NatGatewayId": "ngw-bp1uewa15k4iy5770****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400IncorretForwardEntryStatusSome Forward entry status blocked this operation..The operation is not supported because one or more DNAT entries in the DNAT table are in the Pending or Modifying state.
400DESCRIBE_FORWARD_PARAM_INVALIDForwardTableId and natGatewayId can not both be null-
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.The specified region ID does not exist.
404InvalidForwardTableId.NotFoundSpecified forwardTableId does not existThe specified DNAT table does not exist. Check the parameter and try again.

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

Change history

Change timeSummary of changesOperation
2023-08-09The Error code has changed. The response structure of the API has changedView Change Details
2023-03-01The Error code has changedView Change Details