All Products
Search
Document Center

Elastic Compute Service:DescribeNetworkInterfaceAttribute

Last Updated:Nov 14, 2024

Queries the details of an elastic network interface (ENI). When you call this operation, you can set the NetworkInterfaceId parameter to specify an ENI.

Operation description

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:
    • 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
ecs:DescribeNetworkInterfaceAttributeget
*NetworkInterface
acs:ecs:{#regionId}:{#accountId}:eni/{#eniId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the ENI. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
Tagarray<object>No
Note This parameter is unavailable.
objectNo
Note This parameter is unavailable.
KeystringNo
Note This parameter is unavailable.
TestKey
ValuestringNo
Note This parameter is unavailable.
TestValue
NetworkInterfaceIdstringYes

The ID of the ENI.

eni-bp67acfmxazb4p****
AttributestringNo

The attribute of the ENI. Valid value:

attachment: attachment information about the ENI

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

Response parameters

ParameterTypeDescriptionExample
object

Details of the ENI.

CreationTimestring

The time when the ENI was created.

2019-12-25T12:31:31Z
VpcIdstring

The ID of the virtual private cloud (VPC) to which the ENI belongs.

vpc-bp67acfmxazb4p****
Typestring

The type of the ENI. Valid values:

  • Primary
  • Secondary
Secondary
Statusstring

The state of the ENI. Valid values:

  • Available: The ENI is not attached to an instance.
  • 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.

This parameter is empty by default, which indicates that all states are queried.

Available
NetworkInterfaceTrafficModestring

The communication mode of the ENI. Valid values:

  • Standard: The TCP communication mode is used.
  • HighPerformance: The Elastic RDMA Interface (ERI) feature is enabled and the remote direct memory access (RDMA) communication mode is used.
Note This parameter can have a value of HighPerformance only when the ENI is attached to a c7re RDMA-enhanced instance.
Standard
NetworkInterfaceNamestring

The name of the ENI.

my-eni-name
MacAddressstring

The media access control (MAC) address of the ENI.

00:16:3e:12:**:**
QueuePairNumberinteger
Note This parameter is in invitational preview and unavailable for general users.
22
NetworkInterfaceIdstring

The ID of the ENI.

eni-bp125p95hhdhn3ot****
ServiceIDlong

The ID of the distributor to which the ENI belongs.

12345678910
InstanceIdstring

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

Note If the ENI is managed and controlled by other Alibaba Cloud services, no instance ID is returned.
i-bp1e2l6djkndyuli****
OwnerIdstring

The ID of the account to which the ENI belongs.

123456****
ServiceManagedboolean

Indicates whether the user of the ENI is an Alibaba Cloud service or a distributor.

true
VSwitchIdstring

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

vsw-bp1s5fnvk4gn2tws0****
RequestIdstring

The ID of the request.

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

The description of the ENI.

testDescription
ResourceGroupIdstring

The ID of the resource group to which the instance belongs. If this parameter is specified to query ENIs, up to 1,000 ENIs that belong to the specified resource group can be displayed in the response.

Note ENIs in the default resource group are displayed in the response regardless of how this parameter is set.
rg-bp67acfmxazb4p****
ZoneIdstring

The zone ID of the ENI.

cn-hangzhou-g
PrivateIpAddressstring

The private IP address of the ENI.

10.1.**.**
QueueNumberinteger

The number of queues supported by the ENI.

  • For a primary ENI: The default number of queues that the instance type supports for the ENI is returned.

  • For a secondary ENI:

    • When the ENI is in the InUse state, the following situations occur for the QueueNumber parameter:

      • If the number of queues supported by the ENI has not been modified, the default number of queues that the instance type supports for the ENI is returned.
      • If the number of queues supported by the ENI has been modified, the new number of queues is returned.
    • When the ENI is in the Available state, the following situations occur for the QueueNumber parameter:

      • If the number of queues supported by the ENI has not been modified, the return value is empty.
      • If the number of queues supported by the ENI has been modified, the new number of queues is returned.
8
SecurityGroupIdsarray

The IDs of the security groups to which the ENI belongs.

SecurityGroupIdstring

The IDs of the security groups to which the ENI belongs.

sg-bp18kz60mefsicfg****
AssociatedPublicIpobject

Details about the elastic IP address (EIP) that is associated with the secondary private IP address of the ENI.

PublicIpAddressstring

The EIP.

116.62.**.**
AllocationIdstring

The ID of the EIP.

null
Attachmentobject
Note This parameter is in invitational preview and unavailable for general users.
DeviceIndexinteger
Note This parameter is in invitational preview and unavailable for general users.
hide
InstanceIdstring
Note This parameter is in invitational preview and unavailable for general users.
hide
TrunkNetworkInterfaceIdstring
Note This parameter is in invitational preview and unavailable for general users.
hide
MemberNetworkInterfaceIdsarray
Note This parameter is in invitational preview and unavailable for general users.
MemberNetworkInterfaceIdstring
Note This parameter is in invitational preview and unavailable for general users.
hide
NetworkCardIndexinteger

The index of the network interface controller (NIC).

  • If the ENI is in the Available state or if no NIC index was specified when the ENI was attached, this parameter has no value.
  • If the ENI is in the InUse state and an NIC index was specified when the ENI was attached, the specified NIC index is returned as the value of this parameter.
0
PrivateIpSetsarray<object>

The private IP addresses of the ENI.

PrivateIpSetobject
PrivateIpAddressstring

The private IP address of the ENI.

172.17.**.**
Primaryboolean

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
AssociatedPublicIpobject

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

PublicIpAddressstring

The EIP.

116.62.**.**
AllocationIdstring
Note This parameter is in invitational preview and is not publicly available.
null
Ipv6Setsarray<object>

The IPv6 addresses of the ENI.

Ipv6Setobject

The IPv6 addresses of the ENI.

Ipv6Addressstring

The IPv6 address of the ENI.

2001:db8:1234:1a00::****
Ipv4PrefixSetsarray<object>

The IPv4 prefixes of the ENI.

Ipv4PrefixSetobject
Note This parameter is in invitational preview and unavailable for general users.
Ipv4Prefixstring

The IPv4 prefix of the ENI.

192.168.**.0/28
Ipv6PrefixSetsarray<object>

The IPv6 prefixes of the ENI.

Ipv6PrefixSetobject
Note This parameter is in invitational preview and unavailable for general users.
Ipv6Prefixstring

The IPv6 prefix of the ENI.

2001:db8:1234:1a00:****::/80
Tagsarray<object>

The tags of the ENI.

Tagobject

The tags of the ENI.

TagValuestring

The tag value of the ENI.

TestValue
TagKeystring

The tag key of the ENI.

TestKey
BondInterfaceSpecificationobject
Note This parameter is in invitational preview and unavailable for general users.
BondModestring
Note This parameter is in invitational preview and unavailable for general users.
null
SlaveInterfaceSpecificationarray<object>
Note This parameter is in invitational preview and unavailable for general users.
SlaveInterfaceSpecificationSetobject
Note This parameter is in invitational preview and unavailable for general users.
SlaveNetworkInterfaceIdstring
Note This parameter is in invitational preview and is not publicly available.
null
WorkStatestring
Note This parameter is in invitational preview and is not publicly available.
null
BondNetworkInterfaceIdstring
Note This parameter is in invitational preview and is not publicly available.
null
SlaveInterfaceSpecificationobject
Note This parameter is in invitational preview and unavailable for general users.
SlaveNetworkInterfaceIdstring
Note This parameter is in invitational preview and unavailable for general users.
null
WorkStatestring
Note This parameter is in invitational preview and unavailable for general users.
null
BondNetworkInterfaceIdstring
Note This parameter is in invitational preview and unavailable for general users.
null
DeleteOnReleaseboolean

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

  • true
  • false
true
TcpOptionAddressEnabledstring
Note This parameter is in invitational preview and is not publicly available.
null
NetworkInterfaceTrafficConfigobject

The communication settings of the ENI.

NetworkInterfaceTrafficModestring

The communication mode of the ENI.

HighPerformance
QueueNumberinteger

The number of queues supported by the ENI.

8
QueuePairNumberinteger

The number of queues supported by the ERI.

8
ConnectionTrackingConfigurationobject
Note This parameter is not publicly available.
TcpEstablishedTimeoutinteger
Note This parameter is not publicly available.
910
TcpClosedAndTimeWaitTimeoutinteger
Note This parameter is not publicly available.
3
UdpTimeoutinteger
Note This parameter is not publicly available.
30
SourceDestCheckboolean

This parameter is not publicly available.

false
EnhancedNetworkobject

This parameter is not publicly available.

EnableSriovboolean

This parameter is not publicly available.

false

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter%sA parameter is not specified.
400UnsupportedParameter%sThe parameter is not supported.
400InvalidParameter%sThe specified parameter is invalid.
400InvalidInstanceID.Malformed%sThe specified InstanceId parameter is invalid.
400Forbidden.RegionId%sThe service is unavailable in the current region.
400InvalidRegionId.MalFormedThe specified parameter RegionId is not valid.The specified RegionId parameter is invalid.
403InvalidUserType.NotSupported%sYour account does not support this operation.
403Abs.InvalidAccount.NotFound%sYour Alibaba Cloud account does not exist or your AccessKey pair has expired.
403Forbidden.NotSupportRAM%sRAM users are not authorized to perform this operation.
403Forbidden.SubUser%sYou are not authorized to manage this resource. Contact the owner of the Alibaba Cloud account for authorization.
404InvalidEniId.NotFound%sThe specified ENI ID does not exist.

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

Change history

Change timeSummary of changesOperation
2024-09-14The Error code has changed. The response structure of the API has changedView Change Details
2024-07-03The Error code has changed. The response structure of the API has changedView Change Details
2024-05-17The Error code has changed. The response structure of the API has changedView Change Details
2024-05-07The Error code has changed. The response structure of the API has changedView Change Details
2024-02-01The Error code has changed. The response structure of the API has changedView Change Details
2023-10-09The Error code has changed. The response structure of the API has changedView Change Details
2023-01-04The Error code has changed. The response structure of the API has changedView Change Details