All Products
Search
Document Center

Elastic Compute Service:DescribeNetworkInterfaceAttribute

Last Updated:Apr 04, 2026

Retrieves the details of a specified elastic network interface.

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

ecs:DescribeNetworkInterfaceAttribute

get

*NetworkInterface

acs:ecs:{#regionId}:{#accountId}:eni/{#eniId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the elastic network interface is located. You can call DescribeRegions to obtain the latest list of Alibaba Cloud regions.

cn-hangzhou

Tag

array<object>

No

Note

This parameter is not yet available.

object

No

Note

This parameter is not yet available.

Key

string

No

Note

This parameter is not yet available.

TestKey

Value

string

No

Note

This parameter is not yet available.

TestValue

RegionId

string

Yes

The ID of the region where the elastic network interface is located. You can call DescribeRegions to obtain the latest list of Alibaba Cloud regions.

cn-hangzhou

NetworkInterfaceId

string

Yes

The ID of the elastic network interface.

eni-bp67acfmxazb4p****

Attribute

string

No

The attribute of the elastic network interface to query. Valid values:

attachment: Queries the attachment information of member network interfaces that are attached to a trunk network interface. This value is available by invitation only.

connectionTrackingConfiguration: The connection tracking configuration.

attachment

Response elements

Element

Type

Description

Example

object

The details of the elastic network interface (ENI).

CreationTime

string

The time the ENI was created.

2019-12-25T12:31:31Z

VpcId

string

The ID of the Virtual Private Cloud (VPC) that contains the ENI.

vpc-bp67acfmxazb4p****

Type

string

The type of the ENI. Valid values:

  • Primary: the primary ENI.

  • Secondary: the secondary ENI.

Secondary

Status

string

The status of the ENI. Valid values:

  • Available: The ENI is available.

  • Attaching: The ENI is being attached to an instance.

  • InUse: The ENI is attached to an instance.

  • Detaching: The ENI is being detached from an instance.

  • Deleting: The ENI is being deleted.

Default value: null, which indicates that ENIs in all states are queried.

Available

NetworkInterfaceTrafficMode

string

The traffic mode of the ENI. Valid values:

  • Standard: The ENI uses the TCP traffic mode.

  • HighPerformance: The ENI uses the remote direct memory access (RDMA) traffic mode with the Elastic RDMA Interface (ERI) feature enabled.

Note

This feature is supported only by the c7re instance type family of RDMA-enhanced instances.

Standard

NetworkInterfaceName

string

The name of the ENI.

my-eni-name

MacAddress

string

The MAC address of the ENI.

00:16:3e:12:**:**

QueuePairNumber

integer

Note

This parameter is in invitational preview and is not publicly available.

22

NetworkInterfaceId

string

The ID of the ENI.

eni-bp125p95hhdhn3ot****

ServiceID

integer

The ID of the distributor that corresponds to the ENI.

12345678910

InstanceId

string

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

Note

The instance ID is not returned for ENIs that are managed and controlled by other Alibaba Cloud services.

i-bp1e2l6djkndyuli****

OwnerId

string

The ID of the account to which the ENI belongs.

123456****

ServiceManaged

boolean

Indicates whether the ENI is used by an Alibaba Cloud service or a distributor.

true

VSwitchId

string

The ID of the vSwitch to which the ENI is connected.

vsw-bp1s5fnvk4gn2tws0****

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Description

string

The description of the ENI.

testDescription

ResourceGroupId

string

The ID of the resource group to which the instance belongs. If you use this parameter to filter resources, the number of resources cannot exceed 1,000.

Note

Resources in the default resource group cannot be filtered.

rg-bp67acfmxazb4p****

ZoneId

string

The ID of the zone.

cn-hangzhou-g

PrivateIpAddress

string

The private IP address of the ENI.

10.1.**.**

QueueNumber

integer

The number of queues for the ENI.

  • If the ENI is the primary ENI, the default number of queues for the primary ENI of the instance type is returned.

  • If the ENI is a secondary ENI:

    • If the secondary ENI is in the InUse state:
      • If the number of queues for the secondary ENI has not been changed, the default number of queues for the secondary ENI of the instance type is returned.

      • If the number of queues for the secondary ENI has been changed, the new value is returned.

    • If the secondary ENI is in the Available state:
      • If the number of queues for the secondary ENI has not been changed, this parameter is empty.

      • If the number of queues for the secondary ENI has been changed, the new value is returned.

8

SecurityGroupIds

object

SecurityGroupId

array

The security groups to which the ENI belongs.

string

The ID of a security group to which the ENI belongs.

sg-bp18kz60mefsicfg****

AssociatedPublicIp

object

The EIP that is associated with the secondary private IP address of the ENI.

PublicIpAddress

string

The EIP.

116.62.**.**

AllocationId

string

The ID of the EIP.

null

Attachment

object

Note

This parameter is in invitational preview and is not publicly available.

DeviceIndex

integer

Note

This parameter is in invitational preview and is not publicly available.

hide

InstanceId

string

Note

This parameter is in invitational preview and is not publicly available.

hide

TrunkNetworkInterfaceId

string

Note

This parameter is in invitational preview and is not publicly available.

hide

MemberNetworkInterfaceIds

object

MemberNetworkInterfaceId

array

Note

This parameter is in invitational preview and is not publicly available.

string

Note

This parameter is in invitational preview and is not publicly available.

hide

NetworkCardIndex

integer

The index of the network interface controller (NIC) to which the ENI is attached.

  • If the ENI is in the Available state or if no index was specified when the ENI was attached, this parameter is not returned.

  • If the ENI is in the InUse state and an index was specified when the ENI was attached, the value of this parameter indicates the index of the NIC.

0

PrivateIpSets

object

PrivateIpSet

array<object>

The private IP addresses of the ENI.

array<object>

The information about the private IP address of the ENI.

PrivateIpAddress

string

The private IP address of the ENI.

172.17.**.**

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

AssociatedPublicIp

object

The EIP that is associated with the secondary private IP address of the ENI.

PublicIpAddress

string

The EIP.

116.62.**.**

AllocationId

string

Note

This parameter is in invitational preview and is not publicly available.

null

Ipv6Sets

object

Ipv6Set

array<object>

The IPv6 addresses assigned to the ENI.

object

The IPv6 address assigned to the ENI.

Ipv6Address

string

The IPv6 address assigned to the ENI.

2001:db8:1234:1a00::****

Ipv4PrefixSets

object

Ipv4PrefixSet

array<object>

The IPv4 prefixes assigned to the ENI.

object

The assigned IPv4 prefix.

Ipv4Prefix

string

The IPv4 prefix assigned to the ENI.

192.168.**.0/28

Ipv6PrefixSets

object

Ipv6PrefixSet

array<object>

The IPv6 prefixes assigned to the ENI.

object

The assigned IPv6 prefix.

Ipv6Prefix

string

The IPv6 prefix assigned to the ENI.

2001:db8:1234:1a00:****::/80

Tags

object

Tag

array<object>

The tags of the ENI.

object

The information about a tag of the ENI.

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

BondInterfaceSpecification

object

Note

This parameter is in invitational preview and is not publicly available.

BondMode

string

Note

This parameter is in invitational preview and is not publicly available.

null

SlaveInterfaceSpecification

object

SlaveInterfaceSpecificationSet

array<object>

Note

This parameter is in invitational preview and is not publicly available.

object

Note

This parameter is in invitational preview and is not publicly available.

SlaveNetworkInterfaceId

string

Note

This parameter is in invitational preview and is not publicly available.

null

WorkState

string

Note

This parameter is in invitational preview and is not publicly available.

null

BondNetworkInterfaceId

string

Note

This parameter is in invitational preview and is not publicly available.

null

SlaveInterfaceSpecification

object

Note

This parameter is in invitational preview and is not publicly available.

SlaveNetworkInterfaceId

string

Note

This parameter is in invitational preview and is not publicly available.

null

WorkState

string

Note

This parameter is in invitational preview and is not publicly available.

null

BondNetworkInterfaceId

string

Note

This parameter is in invitational preview and is not publicly available.

null

DeleteOnRelease

boolean

Indicates whether to retain the ENI when the instance is released. Valid values:

  • true: The ENI is not retained.

  • false: The ENI is retained.

true

TcpOptionAddressEnabled

string

Note

This parameter is in invitational preview and is not publicly available.

null

NetworkInterfaceTrafficConfig

object

The communication parameters of the ENI.

NetworkInterfaceTrafficMode

string

The traffic mode of the ENI.

HighPerformance

QueueNumber

integer

The number of queues for the ENI.

8

QueuePairNumber

integer

The number of queues for the RDMA-enabled ENI.

8

ConnectionTrackingConfiguration

object

The connection tracking configurations.

Before you use this parameter, read Connection Timeout.

Note

This parameter is returned only when Attribute is set to connectionTrackingConfiguration.

TcpEstablishedTimeout

integer

The timeout period for TCP connections in the ESTABLISHED state. Unit: seconds. Valid values: 30 to 910.

910

TcpClosedAndTimeWaitTimeout

integer

The timeout period for TCP connections in the FIN-WAIT and TIME-WAIT states. Unit: seconds. Valid values: 3 to 15.

Note

If your ECS instance is used with a Network Load Balancer (NLB) or Classic Load Balancer (CLB) instance, the default timeout period for connections in the TIME_WAIT state is 15 seconds.

3

UdpTimeout

integer

The timeout period for UDP streams. Unit: seconds. Valid values: 10 to 100.

Note

If your ECS instance is used with an NLB or CLB instance, the default timeout period is 100 seconds.

30

SourceDestCheck

boolean

This parameter is not publicly available.

false

EnhancedNetwork

object

This parameter is not publicly available.

EnableSriov

boolean

This parameter is not publicly available.

false

EnableRss

boolean

Note

This parameter is not publicly available.

true

VirtualFunctionTotalQueueNumber

integer

VirtualFunctionQuantity

integer

QoSConfig

object

The Quality of Service (QoS) configurations.

EnableQoS

boolean

Indicates whether QoS is enabled.

QoS

object

The QoS configurations.

BandwidthTx

integer

The maximum outbound bandwidth from the intranet.

50000

BandwidthRx

integer

The maximum inbound bandwidth to the intranet.

50000

PpsTx

integer

The outbound packet forwarding rate on the intranet.

50000

PpsRx

integer

The inbound packet forwarding rate on the intranet.

50000

ConcurrentConnections

integer

The maximum number of concurrent connections.

50000

Examples

Success response

JSON format

{
  "CreationTime": "2019-12-25T12:31:31Z",
  "VpcId": "vpc-bp67acfmxazb4p****",
  "Type": "Secondary",
  "Status": "Available",
  "NetworkInterfaceTrafficMode": "Standard",
  "NetworkInterfaceName": "my-eni-name",
  "MacAddress": "00:16:3e:12:**:**",
  "QueuePairNumber": 22,
  "NetworkInterfaceId": "eni-bp125p95hhdhn3ot****",
  "ServiceID": 12345678910,
  "InstanceId": "i-bp1e2l6djkndyuli****",
  "OwnerId": "123456****",
  "ServiceManaged": true,
  "VSwitchId": "vsw-bp1s5fnvk4gn2tws0****",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "Description": "testDescription",
  "ResourceGroupId": "rg-bp67acfmxazb4p****",
  "ZoneId": "cn-hangzhou-g",
  "PrivateIpAddress": "10.1.**.**",
  "QueueNumber": 8,
  "SecurityGroupIds": {
    "SecurityGroupId": [
      "sg-bp18kz60mefsicfg****"
    ]
  },
  "AssociatedPublicIp": {
    "PublicIpAddress": "116.62.**.**",
    "AllocationId": "null"
  },
  "Attachment": {
    "DeviceIndex": 0,
    "InstanceId": "hide",
    "TrunkNetworkInterfaceId": "hide",
    "MemberNetworkInterfaceIds": {
      "MemberNetworkInterfaceId": [
        "hide"
      ]
    },
    "NetworkCardIndex": 0
  },
  "PrivateIpSets": {
    "PrivateIpSet": [
      {
        "PrivateIpAddress": "172.17.**.**",
        "Primary": true,
        "AssociatedPublicIp": {
          "PublicIpAddress": "116.62.**.**",
          "AllocationId": "null"
        }
      }
    ]
  },
  "Ipv6Sets": {
    "Ipv6Set": [
      {
        "Ipv6Address": "2001:db8:1234:1a00::****"
      }
    ]
  },
  "Ipv4PrefixSets": {
    "Ipv4PrefixSet": [
      {
        "Ipv4Prefix": "192.168.**.0/28"
      }
    ]
  },
  "Ipv6PrefixSets": {
    "Ipv6PrefixSet": [
      {
        "Ipv6Prefix": "2001:db8:1234:1a00:****::/80"
      }
    ]
  },
  "Tags": {
    "Tag": [
      {
        "TagValue": "TestValue",
        "TagKey": "TestKey"
      }
    ]
  },
  "BondInterfaceSpecification": {
    "BondMode": "null",
    "SlaveInterfaceSpecification": {
      "SlaveInterfaceSpecificationSet": [
        {
          "SlaveNetworkInterfaceId": "null",
          "WorkState": "null",
          "BondNetworkInterfaceId": "null"
        }
      ]
    }
  },
  "SlaveInterfaceSpecification": {
    "SlaveNetworkInterfaceId": "null",
    "WorkState": "null",
    "BondNetworkInterfaceId": "null"
  },
  "DeleteOnRelease": true,
  "TcpOptionAddressEnabled": "null",
  "NetworkInterfaceTrafficConfig": {
    "NetworkInterfaceTrafficMode": "HighPerformance",
    "QueueNumber": 8,
    "QueuePairNumber": 8
  },
  "ConnectionTrackingConfiguration": {
    "TcpEstablishedTimeout": 910,
    "TcpClosedAndTimeWaitTimeout": 3,
    "UdpTimeout": 30
  },
  "SourceDestCheck": false,
  "EnhancedNetwork": {
    "EnableSriov": false,
    "EnableRss": true,
    "VirtualFunctionTotalQueueNumber": 0,
    "VirtualFunctionQuantity": 0
  },
  "QoSConfig": {
    "EnableQoS": false,
    "QoS": {
      "BandwidthTx": 50000,
      "BandwidthRx": 50000,
      "PpsTx": 50000,
      "PpsRx": 50000,
      "ConcurrentConnections": 50000
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter %s A parameter is not specified.
400 UnsupportedParameter %s The parameter is not supported.
400 InvalidParameter %s The specified parameter is invalid.
400 InvalidInstanceID.Malformed %s The specified InstanceId parameter is invalid.
400 Forbidden.RegionId %s The service is unavailable in the current region.
400 InvalidRegionId.MalFormed The specified parameter RegionId is not valid. The specified RegionId parameter is invalid.
403 InvalidUserType.NotSupported %s Your account does not support this operation.
403 Abs.InvalidAccount.NotFound %s Your Alibaba Cloud account does not exist or your AccessKey pair has expired.
403 Forbidden.NotSupportRAM %s RAM users are not authorized to perform this operation.
403 Forbidden.SubUser %s You are not authorized to manage this resource. Contact the owner of the Alibaba Cloud account for authorization.
403 InvalidParameter %s
404 InvalidEniId.NotFound %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.