All Products
Search
Document Center

Elastic Compute Service:DescribeNetworkInterfaceAttribute

Last Updated:Apr 11, 2024

Queries the details of an elastic network interface (ENI).

Operation description

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

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
Tagobject []No
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 values:

attachment: attachment information about the ENI

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

Response parameters

ParameterTypeDescriptionExample
object
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 model of the ENI. Valid values:

  • Standard: The TCP communication mode is used.
  • HighPerformance: The Elastic RDMA Interface (ERI) 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 that resides in Beijing Zone K.
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.

string

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.
string
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
PrivateIpSetsobject []

The private IP addresses of the ENI.

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 elastic IP address (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
Ipv6Setsobject []

The IPv6 addresses of the ENI.

Ipv6Addressstring

The IPv6 address of the ENI.

2001:db8:1234:1a00::****
Ipv4PrefixSetsobject []

The IPv4 prefixes of the ENI.

Ipv4Prefixstring

The IPv4 prefix of the ENI.

192.168.**.0/28
Ipv6PrefixSetsobject []

The IPv6 prefixes of the ENI.

Ipv6Prefixstring

The IPv6 prefix of the ENI.

2001:db8:1234:1a00:****::/80
Tagsobject []

The tag value of the ENI.

TagValuestring

The value of the tag.

TestValue
TagKeystring

The key of the tag.

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
SlaveInterfaceSpecificationobject []
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 unavailable for general users.
null

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

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-02-01The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2023-10-09The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.
2023-01-04The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
Output ParametersThe response structure of the API has changed.