All Products
Search
Document Center

NAT Gateway:DescribeNatGatewayAssociateNetworkInterfaces

Last Updated:Jun 26, 2026

Queries the list of elastic network interfaces (ENIs) associated with a VPC NAT gateway when the VPC NAT gateway is referenced as an EPS resource by PrivateLink. This feature is currently unavailable.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:DescribeNatGatewayAssociateNetworkInterfaces

list

NatGateway

acs:vpc:{#regionId}:{#accountId}:natgateway/{#NatGatewayId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the NAT gateway.

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

cn-hangzhou

NatGatewayId

string

Yes

The ID of the NAT gateway to query.

ngw-bp1uewa15k4iy5770****

ResourceGroupId

string

No

The resource group ID.

rg-acfmxazdjdhd****

Tag

array<object>

No

The list of resource tags.

object

No

The list of tags.

Key

string

No

The tag key of the instance. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceDept

Value

string

No

The tag key of the instance. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://.

FinanceJoshua

ClientToken

string

No

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request.

5A2CFF0E-5718-45B5-9D4D-70B3FF****

RegionId

string

Yes

The region ID of the NAT gateway.

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

cn-hangzhou

Filter

array<object>

No

The filter information. You can specify key-value pairs to filter the query results.

object

No

The filter information.

Key

string

No

The key of the filter. Valid values:

  • ResourceId

Note

Set Value to the ID of the EPS resource that you want to query.

  • NetworkInterfaceId

Note

Set Value to the ID of the elastic network interface (ENI), which is a network interface controller (NIC), that you want to query.

  • ResourceOwnerId

Note

Set Value to the UID of the user to whom the EPS resource belongs for resource ownership query.

ResourceId

Value

string

No

The filter value. You can specify multiple values separated by commas (,).

ep-8psre8c8936596cd****

NextToken

string

No

The pagination token. Valid values:

  • If this is the first query or no subsequent query is required, leave this parameter empty.

  • If a subsequent query is required, set the value to the NextToken value returned in the previous API call.

caeba0bbb2be03f84eb48b699f0a****

MaxResults

integer

No

The number of entries per page for a paged query. Valid values: 1 to 100. Default value: 20.

20

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

2315DEB7-5E92-423A-91F7-4C1EC9AD****

NextToken

string

The pagination token. Valid values:

  • If NextToken is empty, no subsequent query exists.

  • If NextToken is returned, the value indicates the token for the next query.

caeba0bbb2be03f84eb48b699f0a****

MaxResults

integer

The number of entries per page for a paged query. Valid values: 1 to 100. Default value: 20.

20

NatGatewayId

string

The instance ID of the VPC NAT gateway.

ngw-bp1uewa15k4iy5770****

TotalCount

integer

The total number of entries returned.

1

AssociateNetworkInterfaces

object

AssociateNetworkInterface

array<object>

The list of elastic network interfaces (ENIs) associated with the VPC NAT gateway. An ENI is a network interface controller (NIC).

array<object>

The details of the associate with ENI operation. An elastic network interface (ENI) is a network interface controller (NIC).

NetworkInterfaceId

string

The elastic network interface (ENI) ID.

eni-gw8g131ef2dnbu3k****

ResourceId

string

The EPS resource ID.

ep-8psre8c8936596cd****

ResourceType

string

The EPS resource type.

PrivateLink

ResourceOwnerId

string

The UID of the user who has resource ownership of the EPS resource.

138859086900****

IPv4Sets

object

IPv4Set

array<object>

The collection of IPv4 addresses of the elastic network interface (ENI).

object

The IPv4 address information of the elastic network interface (ENI).

IPv4Address

string

The private IP address of the elastic network interface (ENI).

172.17.**.**

Primary

boolean

Indicates whether this is the primary private IP address. Valid values:

  • true: primary private IP address

  • false: secondary private IP address.

true

TunnelIndex

string

The tunnel index ID.

41a5489ea2a0****

ResourceVpcId

string

The VPC ID of the EPS resource.

vpc-bp1di7uewzmtvfuq8****

Count

integer

The number of associated ENIs.

0

Examples

Success response

JSON format

{
  "RequestId": "2315DEB7-5E92-423A-91F7-4C1EC9AD****",
  "NextToken": "caeba0bbb2be03f84eb48b699f0a****",
  "MaxResults": 20,
  "NatGatewayId": "ngw-bp1uewa15k4iy5770****",
  "TotalCount": 1,
  "AssociateNetworkInterfaces": {
    "AssociateNetworkInterface": [
      {
        "NetworkInterfaceId": "eni-gw8g131ef2dnbu3k****",
        "ResourceId": "ep-8psre8c8936596cd****",
        "ResourceType": "PrivateLink",
        "ResourceOwnerId": "138859086900****",
        "IPv4Sets": {
          "IPv4Set": [
            {
              "IPv4Address": "172.17.**.**",
              "Primary": true
            }
          ]
        },
        "TunnelIndex": "41a5489ea2a0****",
        "ResourceVpcId": "vpc-bp1di7uewzmtvfuq8****"
      }
    ]
  },
  "Count": 0
}

Error codes

HTTP status code

Error code

Error message

Description

400 InstanceNotExist.NatGatewayId The NAT gateway instance is not exist. The NAT Gateway instance does not exist.
400 IllegalParam.ResourceOwnerId The param of resource owner ID is illegal. The parameter of resource owner ID is illegal.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.