All Products
Search
Document Center

ENS:DescribeNetworkInterfaces

Last Updated:Feb 03, 2026

Call DescribeNetworkInterfaces to retrieve a list of network interfaces.

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

ens:DescribeNetworkInterfaces

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

NetworkInterfaceId

string

No

The ID of the elastic network interface (ENI).

eni-58z57orgmt6d1****

InstanceId

string

No

The ID of the instance.

i-5t7z99n32gplriv

NetworkId

string

No

The ID of the network.

n-2zeuphj08tt7q3brd****

VSwitchId

string

No

The ID of the vSwitch.

vsw-12345

EnsRegionId

string

No

The region ID of the instance.

cn-tianjin-cmcc

SecurityGroupId

string

No

The ID of the security group associated with the secondary ENI. Specify this parameter to query secondary ENIs by security group ID.

sg-5p1fg655nh68xyz9i***

PrimaryIpAddress

string

No

The primary IP address of the ENI.

10.XXX.XXX.5

Type

string

No

The type of the ENI. Valid values:

  • Primary: primary network interface.

  • Secondary: secondary ENI.

If you do not specify this parameter, ENIs of all types are queried.

Secondary

NetworkInterfaceName

string

No

The name of the ENI.

test-01

Status

string

No

The status of the ENI. Valid values:

  • Available: available.

  • Attaching: being attached.

  • InUse: in use.

  • Detaching: being detached.

  • Deleting: being deleted.

If you do not specify this parameter, ENIs in all states are queried.

Available

PageNumber

string

No

The page number. Pages start from 1. The default value is 1.

1

PageSize

string

No

The number of entries to return on each page. Maximum value: 100. Default value: 50.

50

Ipv6Address

array

No

The IPv6 addresses of the ENI. You can specify up to 100 addresses.

string

No

An IPv6 address of the ENI.

2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6

EnsRegionIds

array

No

The IDs of the ENS edge zones. You can specify up to 100 IDs.

string

No

ENS node ID.

cn-fuzhou-1

NetworkInterfaceIds

array

No

The IDs of the ENIs. You can specify up to 100 IDs.

string

No

The ID of an ENI.

eni-5****

Response elements

Element

Type

Description

Example

object

The details of the ENIs.

NetworkInterfaceSets

object

NetworkInterfaceSet

array<object>

The details of the ENIs.

array<object>

The details of the ENIs.

CreationTime

string

The time when the ENI was created. The time is displayed in UTC and follows the ISO 8601 standard in the `yyyy-MM-ddThh:mmZ` format.

2022-02-22T03:53:25Z

EnsRegionId

string

The ID of the ENS edge zone.

id-jakarta-1

InstanceId

string

The ID of the instance to which the ENI is attached.

i-5siavnr3

MacAddress

string

The MAC address of the ENI.

00:16:XXX:XXX:60:0a

NetworkInterfaceId

string

The ID of the ENI.

eni-uf686a5

PrimaryIp

string

The primary private IP address.

10.XXX.XXX.25

PrimaryIpType

string

The type of the primary IP address. Valid values:

  • Public: A public IP address.

  • Private: A private IP address.

Private

Status

string

The status of the network interface. Valid values:

  • Available: available.

  • Attaching: being attached.

  • InUse: in use.

  • Detaching: being detached.

  • Deleting: being deleted.

InUse

NetworkId

string

The ID of the network.

n-5w0qd03adw****

VSwitchId

string

The ID of the vSwitch.

vsw-5rqswx1trlsj9

PrivateIpSets

object

PrivateIpSet

array<object>

A collection of `PrivateIpSet` objects.

object

A collection of `PrivateIpSet` objects.

PrivateIpAddress

string

The private IP address.

192.XXX.XXX.130

Primary

boolean

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

  • true: The IP address is the primary private IP address.

  • false: The IP address is a secondary private IP address.

true

PrivateIpStatus

string

The status of the private IP address. Valid values:

  • Available: available.

  • Creating: being created.

  • Deleting: being deleted.

Available

NetworkInterfaceName

string

The name of the ENI.

primaryTest

Description

string

The description of the ENI.

test-description

SecurityGroupIds

object

SecurityGroup

array

The ID of the security group.

string

The ID of the security group.

sg-5p1bozeiw711a1***

Type

string

The type of the ENI. Valid values:

  • Primary: The primary network interface.

  • Secondary: The secondary ENI.

Primary

Ipv6Sets

object

Ipv6Set

array<object>

The assigned IPv6 addresses of the ENI.

object

The assigned IPv6 addresses of the ENI.

Ipv6Address

string

The assigned IPv6 address of the ENI.

2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6

VmncLearn

boolean

PageNumber

integer

The page number. Pages start from 1. The default value is 1.

1

PageSize

integer

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

50

TotalCount

integer

The total number of entries.

49

RequestId

string

The ID of the request.

708AF9CE-FF92-5DF9-93F8-B7754AB1061A

Examples

Success response

JSON format

{
  "NetworkInterfaceSets": {
    "NetworkInterfaceSet": [
      {
        "CreationTime": "2022-02-22T03:53:25Z",
        "EnsRegionId": "id-jakarta-1",
        "InstanceId": "i-5siavnr3",
        "MacAddress": "00:16:XXX:XXX:60:0a",
        "NetworkInterfaceId": "eni-uf686a5",
        "PrimaryIp": "10.XXX.XXX.25",
        "PrimaryIpType": "Private",
        "Status": "InUse",
        "NetworkId": "n-5w0qd03adw****",
        "VSwitchId": "vsw-5rqswx1trlsj9",
        "PrivateIpSets": {
          "PrivateIpSet": [
            {
              "PrivateIpAddress": "192.XXX.XXX.130",
              "Primary": true,
              "PrivateIpStatus": "Available"
            }
          ]
        },
        "NetworkInterfaceName": "primaryTest",
        "Description": "test-description",
        "SecurityGroupIds": {
          "SecurityGroup": [
            "sg-5p1bozeiw711a1***"
          ]
        },
        "Type": "Primary",
        "Ipv6Sets": {
          "Ipv6Set": [
            {
              "Ipv6Address": "2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6\n"
            }
          ]
        },
        "VmncLearn": false
      }
    ]
  },
  "PageNumber": 1,
  "PageSize": 50,
  "TotalCount": 49,
  "RequestId": "708AF9CE-FF92-5DF9-93F8-B7754AB1061A"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Missing%s You must specify the parameter %s.
400 Invalid%s The specified parameter %s is invalid.
400 ens.interface.error Failed to call API.
400 NoPermission Permission denied.
400 InvalidParameter.%s The specified field %s invalid. Please check it again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.