All Products
Search
Document Center

:DescribeNetworkInterfaceAttribute

更新時間:Dec 18, 2023

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeNetworkInterfaceAttribute

The operation that you want to perform. Set the value to DescribeNetworkInterfaceAttribute.

RegionId String Yes cn-hangzhou

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

Tag.N.Key String No TestKey
Note This parameter is not publicly available.
Tag.N.Value String No TestValue
Note This parameter is not publicly available.
NetworkInterfaceId String Yes eni-bp67acfmxazb4p****

The ID of the ENI.

Attribute String No test

The attribute of the ENI.

Response parameters

Parameter

Type

Example

Description

CreationTime String 2019-12-25T12:31:31Z

The time when the ENI was created.

VpcId String vpc-bp67acfmxazb4p****

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

Type String Secondary

The type of the ENI. Valid values:

  • Primary
  • Secondary
Status String Available

The state of the ENI. Valid values:

  • Available: The ENI is not attached to any 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 ENIs in all states are queried.

NetworkInterfaceTrafficMode String Standard

The communication mode of the ENI. Valid values:

  • Standard: uses the TCP communication mode.
  • HighPerformance: uses the remote direct memory access (RDMA) communication mode with Elastic RDMA Interface (ERI) enabled.
Note The 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.
NetworkInterfaceName String my-eni-name

The name of the ENI.

MacAddress String 00:16:3e:12:**:**

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

QueuePairNumber Integer 22
Note This parameter is in invitational preview and is not publicly available.
NetworkInterfaceId String eni-bp125p95hhdhn3ot****

The ID of the ENI.

ServiceID Long 12345678910

The ID of the distributor to which the ENI belongs.

InstanceId String i-bp1e2l6djkndyuli****

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.
OwnerId String 123456****

The ID of the account to which the ENI belongs.

ServiceManaged Boolean true

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

VSwitchId String vsw-bp1s5fnvk4gn2tws0****

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

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

The ID of the request.

Description String testDescription

The description of the ENI.

ResourceGroupId String rg-bp67acfmxazb4p****

The ID of the resource group to which the associated instance belongs. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group are returned.

Note Resources in the default resource group are displayed in the response regardless of how this parameter is set.
ZoneId String cn-hangzhou-g

The zone ID of the ENI.

PrivateIpAddress String 10.1.**.**

The private IP address of the ENI.

QueueNumber Integer 8

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:
    • If the ENI is in the InUse state, the following situations occur:
      • If the number of queues supported by the ENI was not 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 was modified, the new number of queues is returned.
    • If the ENI is in the Available state, the following situations occur:
      • If the number of queues supported by the ENI was not modified, the return value is empty.
      • If the number of queues supported by the ENI was modified, the new number of queues is returned.
SecurityGroupIds Array of String sg-bp18kz60mefsicfg****

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

AssociatedPublicIp Object

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

PublicIpAddress String 116.62.**.**

The EIP of the ENI.

AllocationId String null

The ID of the EIP.

Attachment Object
Note This parameter is in invitational preview and is not publicly available.
DeviceIndex Integer hide
Note This parameter is in invitational preview and is not publicly available.
InstanceId String hide
Note This parameter is in invitational preview and is not publicly available.
TrunkNetworkInterfaceId String hide
Note This parameter is in invitational preview and is not publicly available.
MemberNetworkInterfaceIds Array of String hide
Note This parameter is in invitational preview and is not publicly available.
NetworkCardIndex Integer 0

The index of the network card.

  • If the ENI is in the Available state or if no network card index was specified when the ENI was attached, this parameter is empty.
  • If the ENI is in the InUse state and a network card index was specified when the ENI was attached, the specified network card index is returned as the value of this parameter.
PrivateIpSets Array of PrivateIpSet

The private IP addresses.

PrivateIpSet
PrivateIpAddress String 172.17.**.**

The private IP address of the ENI.

Primary Boolean true

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

  • true: the primary private IP address
  • false: a secondary private IP address
AssociatedPublicIp Object

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

PublicIpAddress String 116.62.**.**

The EIP.

AllocationId String null
Note This parameter is in invitational preview and is not publicly available.
Ipv6Sets Array of Ipv6Set

The IPv6 addresses of the ENI.

Ipv6Set
Ipv6Address String 2001:db8:1234:1a00::****

The IPv6 address assigned to the ENI.

Ipv4PrefixSets Array of Ipv4PrefixSet

The IPv4 prefixes of the ENI.

Ipv4PrefixSet
Ipv4Prefix String 192.168.**.0/28

The IPv4 prefix assigned to the ENI.

Ipv6PrefixSets Array of Ipv6PrefixSet

The IPv6 prefixes of the ENI.

Ipv6PrefixSet
Ipv6Prefix String 2001:db8:1234:1a00:****::/80

The IPv6 prefix assigned to the ENI.

Tags Array of Tag

The tags of the ENI.

Tag
TagValue String TestValue

The tag value of the ENI.

TagKey String TestKey

The tag key of the ENI.

BondInterfaceSpecification Object
Note This parameter is in invitational preview and is not publicly available.
BondMode String null
Note This parameter is in invitational preview and is not publicly available.
SlaveInterfaceSpecification Array of SlaveInterfaceSpecificationSet
Note This parameter is in invitational preview and is not publicly available.
SlaveInterfaceSpecificationSet
SlaveNetworkInterfaceId String null
Note This parameter is in invitational preview and is not publicly available.
WorkState String null
Note This parameter is in invitational preview and is not publicly available.
BondNetworkInterfaceId String null
Note This parameter is in invitational preview and is not publicly available.
SlaveInterfaceSpecification Object
Note This parameter is in invitational preview and is not publicly available.
SlaveNetworkInterfaceId String null
Note This parameter is in invitational preview and is not publicly available.
WorkState String null
Note This parameter is in invitational preview and is not publicly available.
BondNetworkInterfaceId String null
Note This parameter is in invitational preview and is not publicly available.
DeleteOnRelease Boolean true

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

  • true
  • false

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=DescribeNetworkInterfaceAttribute
&RegionId=cn-hangzhou
&NetworkInterfaceId=eni-bp67acfmxazb4p****
&Attribute=test
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeNetworkInterfaceAttributeResponse>
    <CreationTime>2019-12-25T12:31:31Z</CreationTime>
    <VpcId>vpc-bp67acfmxazb4p****</VpcId>
    <Type>Secondary</Type>
    <Status>Available</Status>
    <NetworkInterfaceTrafficMode>Standard</NetworkInterfaceTrafficMode>
    <NetworkInterfaceName>my-eni-name</NetworkInterfaceName>
    <MacAddress>00:16:3e:12:**:**</MacAddress>
    <QueuePairNumber>22</QueuePairNumber>
    <NetworkInterfaceId>eni-bp125p95hhdhn3ot****</NetworkInterfaceId>
    <ServiceID>12345678910</ServiceID>
    <InstanceId>i-bp1e2l6djkndyuli****</InstanceId>
    <OwnerId>123456****</OwnerId>
    <ServiceManaged>true</ServiceManaged>
    <VSwitchId>vsw-bp1s5fnvk4gn2tws0****</VSwitchId>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
    <Description>testDescription</Description>
    <ResourceGroupId>rg-bp67acfmxazb4p****</ResourceGroupId>
    <ZoneId>cn-hangzhou-g</ZoneId>
    <PrivateIpAddress>10.1.**.**</PrivateIpAddress>
    <QueueNumber>8</QueueNumber>
    <SecurityGroupIds>sg-bp18kz60mefsicfg****</SecurityGroupIds>
    <AssociatedPublicIp>
        <PublicIpAddress>116.62.**.**</PublicIpAddress>
        <AllocationId>null</AllocationId>
    </AssociatedPublicIp>
    <Attachment>
        <InstanceId>hide</InstanceId>
        <TrunkNetworkInterfaceId>hide</TrunkNetworkInterfaceId>
        <MemberNetworkInterfaceIds>hide</MemberNetworkInterfaceIds>
        <NetworkCardIndex>0</NetworkCardIndex>
    </Attachment>
    <PrivateIpSets>
        <PrivateIpAddress>172.17.**.**</PrivateIpAddress>
        <Primary>true</Primary>
        <AssociatedPublicIp>
            <PublicIpAddress>116.62.**.**</PublicIpAddress>
            <AllocationId>null</AllocationId>
        </AssociatedPublicIp>
    </PrivateIpSets>
    <Ipv6Sets>
        <Ipv6Address>2001:db8:1234:1a00::****</Ipv6Address>
    </Ipv6Sets>
    <Ipv4PrefixSets>
        <Ipv4Prefix>192.168.**.0/28</Ipv4Prefix>
    </Ipv4PrefixSets>
    <Ipv6PrefixSets>
        <Ipv6Prefix>2001:db8:1234:1a00:****::/80</Ipv6Prefix>
    </Ipv6PrefixSets>
    <Tags>
        <TagValue>TestValue</TagValue>
        <TagKey>TestKey</TagKey>
    </Tags>
    <BondInterfaceSpecification>
        <BondMode>null</BondMode>
        <SlaveInterfaceSpecification>
            <SlaveNetworkInterfaceId>null</SlaveNetworkInterfaceId>
            <WorkState>null</WorkState>
            <BondNetworkInterfaceId>null</BondNetworkInterfaceId>
        </SlaveInterfaceSpecification>
    </BondInterfaceSpecification>
    <SlaveInterfaceSpecification>
        <SlaveNetworkInterfaceId>null</SlaveNetworkInterfaceId>
        <WorkState>null</WorkState>
        <BondNetworkInterfaceId>null</BondNetworkInterfaceId>
        <DeleteOnRelease>true</DeleteOnRelease>
    </SlaveInterfaceSpecification>
</DescribeNetworkInterfaceAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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" : [ "sg-bp18kz60mefsicfg****" ],
  "AssociatedPublicIp" : {
    "PublicIpAddress" : "116.62.**.**",
    "AllocationId" : "null"
  },
  "Attachment" : {
    "InstanceId" : "hide",
    "TrunkNetworkInterfaceId" : "hide",
    "MemberNetworkInterfaceIds" : [ "hide" ],
    "NetworkCardIndex" : 0
  },
  "PrivateIpSets" : [ {
    "PrivateIpAddress" : "172.17.**.**",
    "Primary" : true,
    "AssociatedPublicIp" : {
      "PublicIpAddress" : "116.62.**.**",
      "AllocationId" : "null"
    }
  } ],
  "Ipv6Sets" : [ {
    "Ipv6Address" : "2001:db8:1234:1a00::****"
  } ],
  "Ipv4PrefixSets" : [ {
    "Ipv4Prefix" : "192.168.**.0/28"
  } ],
  "Ipv6PrefixSets" : [ {
    "Ipv6Prefix" : "2001:db8:1234:1a00:****::/80"
  } ],
  "Tags" : [ {
    "TagValue" : "TestValue",
    "TagKey" : "TestKey"
  } ],
  "BondInterfaceSpecification" : {
    "BondMode" : "null",
    "SlaveInterfaceSpecification" : [ {
      "SlaveNetworkInterfaceId" : "null",
      "WorkState" : "null",
      "BondNetworkInterfaceId" : "null"
    } ]
  },
  "SlaveInterfaceSpecification" : {
    "SlaveNetworkInterfaceId" : "null",
    "WorkState" : "null",
    "BondNetworkInterfaceId" : "null",
    "DeleteOnRelease" : "true"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter %s A required parameter is not specified.
400 UnsupportedParameter %s A specified parameter is not supported.
400 InvalidParameter %s Invalid parameter value.
400 InvalidInstanceID.Malformed %s Invalid InstanceId format.
400 Forbidden.RegionId %s The service is unavailable in the region for the moment.
400 InvalidRegionId.MalFormed The specified parameter RegionId is not valid. Invalid RegionId value.
403 InvalidUserType.NotSupported %s The account does not support this operation.
403 Abs.InvalidAccount.NotFound %s Your Alibaba Cloud account is not found, or your AccessKey pair has expired.
403 Forbidden.NotSupportRAM %s Resource Access Management (RAM) users do not have the permissions to perform this operation.
403 Forbidden.SubUser %s You have no access to the resource. Contact the owner of the Alibaba Cloud account.
404 InvalidEniId.NotFound %s The ENI ID is not found.

For a list of error codes, see Service error codes.