All Products
Search
Document Center

ENS:DescribeNatGateways

Last Updated:Jul 26, 2024

Queries created Network Address Translation (NAT) gateways.

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
ens:DescribeNatGateways
  • 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
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>

Details about the NAT gateways.

object
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

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"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400ens.interface.errorAn error occurred while call the API.
400Invalid%sThe specified parameter %s is invalid.
400Missing%sYou must specify the parameter %s.
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
No change history