All Products
Search
Document Center

ENS:DescribeNatGateways

Last Updated:Dec 23, 2025

Queries created Network Address Translation (NAT) gateways.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
ens:DescribeNatGatewayslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnsRegionIdstringNo

The ID of the Edge Node Service (ENS) node.

cn-wuxi-9
NatGatewayIdstringNo

The ID of the NAT gateway.

nat-5t7nh1cfm6kxiszlttr38****
NetworkIdstringNo

The ID of the network.

n-2zeuphj08tt7q3brd****
VSwitchIdstringNo

The ID of the vSwitch.

vsw-5rllcjb3ol6duzjdnbm1o****
NamestringNo

The name of the NAT gateway.

test0
NatGatewayIdsarrayNo

The IDs of the NAT gateways. You can specify 1 to 100 IDs.

stringNo

The ID of the NAT gateway.

nat-5****4ik
EnsRegionIdsarrayNo

The IDs of edge nodes. You can specify 1 to 100 IDs.

stringNo

The ID of the edge node.

cn-chengdu-telecom-4
PageNumberintegerNo

The page number. Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page. The maximum value is 100.

Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

2818A8F4-5E2B-5611-8732-5ACF7B677059
PageNumberinteger

The page number.

1
TotalCountinteger

The number of NAT gateways that are returned.

49
PageSizeinteger

The number of entries per page.

10
NatGatewaysarray<object>

The details of the NAT gateways.

NatGatewayobject

The details of the NAT gateway.

EnsRegionIdstring

The ID of the ENS node.

cn-xiangyang-5
NatGatewayIdstring

The ID of the NAT gateway.

nat-5t7nh1cfm6kxiszlttr38****
NetworkIdstring

The ID of the network.

n-5s2ml1olj0kzaws9n1yrj****
VSwitchIdstring

The ID of the vSwitch.

vsw-5szpp1os9m55myirbflfw****
Namestring

The name of the NAT gateway.

test0
CreationTimestring

The time when the NAT gateway was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.

2021-11-22T07:03:32Z
Specstring

The type of the NAT gateway.

enat.default
Statusstring

The status of the NAT gateway. Valid values:

  • Creating: After you send a request to create a NAT gateway, the system creates the NAT gateway in the background. The NAT gateway remains in the Creating state until the operation is completed.
  • Available: The NAT gateway is in the Available state after the creation is complete.
  • Deleting: After you send a request to delete a NAT gateway, the system deletes the NAT gateway in the background. The NAT gateway remains in the Deleting state until the operation is completed.
Available
IpListsarray<object>

The EIPs that are associated with the NAT gateway.

IpListobject

The EIP that is associated with the NAT gateway.

UsingStatusstring

The association between the EIP and the Internet NAT gateway. Valid values:

  • UsedByForwardTable: The EIP is specified in a DNAT entry.
  • UsedBySnatTable: The EIP is specified in an SNAT entry.
  • Idle: The EIP is not specified in an SNAT entry or a DNAT entry.
Idle
IpAddressstring

The EIP.

8.XX.XX.162
AllocationIdstring

The ID of the EIP.

eip-50g****

Examples

Sample success responses

JSONformat

{
  "RequestId": "2818A8F4-5E2B-5611-8732-5ACF7B677059",
  "PageNumber": 1,
  "TotalCount": 49,
  "PageSize": 10,
  "NatGateways": [
    {
      "EnsRegionId": "cn-xiangyang-5",
      "NatGatewayId": "nat-5t7nh1cfm6kxiszlttr38****",
      "NetworkId": "n-5s2ml1olj0kzaws9n1yrj****",
      "VSwitchId": "vsw-5szpp1os9m55myirbflfw****",
      "Name": "test0",
      "CreationTime": "2021-11-22T07:03:32Z",
      "Spec": "enat.default",
      "Status": "Available",
      "IpLists": [
        {
          "UsingStatus": "Idle",
          "IpAddress": "8.XX.XX.162",
          "AllocationId": "eip-50g****"
        }
      ],
      "Tags": [
        {
          "Value": "TestValue",
          "Key": "TestKey",
          "TagKey": "TestKey",
          "TagValue": "TestValue"
        }
      ]
    }
  ]
}

Error codes

HTTP status codeError codeError message
400Invalid%sThe specified parameter %s is invalid.
400Missing%sYou must specify the parameter %s.
400ens.interface.errorFailed to call API.
400NoPermissionPermission denied.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.

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

Change history

Change timeSummary of changesOperation
2025-03-13The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details