Tous les produits
Search
Centre de documentation

Elastic Compute Service:DescribeNetworkInterfaces

Dernière mise à jour :Aug 18, 2026

Consulte les détails d'une ou plusieurs interfaces réseau élastiques (ENI).

Description de l'opération

Description de l'opération.

Testez maintenant

Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.

Test

Autorisation RAM

Le tableau ci-dessous décrit les autorisations nécessaires pour appeler cette API. Vous pouvez les définir dans une politique Resource Access Management (RAM). Les colonnes du tableau sont détaillées ci-dessous :

  • Action : les actions peuvent être utilisées dans l'élément Action des instructions de politique de permissions RAM pour accorder les autorisations nécessaires à l'exécution de l'opération.

  • API : l'API que vous pouvez appeler pour exécuter l'action.

  • Niveau d'accès : le niveau d'accès prédéfini accordé pour chaque API. Valeurs valides : create, list, get, update et delete.

  • Type de ressource : le type de ressource qui prend en charge l'autorisation pour exécuter l'action. Il indique si l'action prend en charge les permissions au niveau de la ressource. La ressource spécifiée doit être compatible avec l'action. Sinon, la politique sera inefficace.

    • Pour les API avec permissions au niveau de la ressource, les types de ressource requis sont marqués d'un astérisque (*). Spécifiez l'Alibaba Cloud Resource Name (ARN) correspondant dans l'élément Resource de la politique.

    • Pour les API sans permissions au niveau de la ressource, la valeur All Resources est affichée. Utilisez un astérisque (*) dans l'élément Resource de la politique.

  • Clé de condition : les clés de condition définies par le service. La clé permet un contrôle granulaire, applicable aux actions seules ou aux actions associées à des ressources spécifiques. En plus des clés de condition propres au service, Alibaba Cloud fournit un ensemble de clés de condition communes applicables à tous les services pris en charge par RAM.

  • Action dépendante : les actions dépendantes requises pour exécuter l'action. Pour mener à bien l'opération, l'utilisateur RAM ou le rôle RAM doit disposer des permissions pour toutes les actions dépendantes.

ecs:DescribeNetworkInterfaces

get

NetworkInterface

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

Aucune Aucune

Paramètres de requête

Paramètre

Type

Requis

Description

Exemple

RegionId

string

Oui

L'identifiant de la région. Vous pouvez appeler DescribeRegions pour obtenir la liste des régions la plus récente.

cn-hangzhou

Tag

array<object>

Non

Les balises.

object

Non

Key

string

Non

La clé de balise de la carte réseau (NIC). Valeurs valides de N : 1 à 20.

TestKey

Value

string

Non

La valeur de balise de la carte réseau (NIC). Valeurs valides de N : 1 à 20.

TestValue

ResourceGroupId

string

Non

L'identifiant du groupe de ressources. Lorsque vous utilisez ce paramètre pour filtrer les ressources, le nombre de ressources ne peut pas dépasser 1 000.

rg-bp67acfmxazb4p****

VSwitchId

string

Non

L'identifiant du vSwitch de la carte réseau (NIC).

vsw-bp16usj2p27htro3****

VpcId

string

Non

L'identifiant du cloud privé virtuel (VPC) de la carte réseau (NIC).

vpc-bp1j7w3gc1cexjqd****

PrimaryIpAddress

string

Non

L'adresse IP privée principale de la carte réseau (NIC).

192.168.**.**

SecurityGroupId

string

Non

L'identifiant du groupe de sécurité associé à l'ENI secondaire.

sg-bp144yr32sx6ndw****

NetworkInterfaceName

string

Non

Le nom de la carte réseau (NIC). Le nom doit comporter de 2 à 128 caractères et peut contenir des caractères de la catégorisation des lettres Unicode (y compris les lettres anglaises, les caractères chinois et les chiffres). Il peut également contenir des deux-points (:), des traits de soulignement (_), des points (.) et des traits d'union (-).

test-eni-name

Type

string

Non

Le type de la carte réseau (NIC). Valeurs valides :

Secondary

InstanceId

string

Non

L'identifiant de l'instance à laquelle la carte réseau (NIC) est attachée.

i-bp1e2l6djkndyuli****

ServiceManaged

boolean

Non

Indique si l'utilisateur de la carte réseau (NIC) est un service Alibaba Cloud ou un opérateur de réseau virtuel (VNO).

true

Status

string

Non

L'état de la carte réseau (NIC). Valeurs valides :

Available

PageNumber deprecated

integer

Non

[Obsolète] Utilisez plutôt MaxResults ou NextToken pour la pagination.

1

PageSize deprecated

integer

Non

[Obsolète] Utilisez plutôt MaxResults ou NextToken pour la pagination.

100

NextToken

string

Non

Le jeton de pagination. Définissez ce paramètre sur la valeur NextToken renvoyée lors de l'appel d'API précédent.

AAAAAdDWBF2****

MaxResults

integer

Non

Le nombre maximal d'entrées par page pour la requête paginée. Valeurs valides : 10 à 500.

50

PrivateIpAddress

array

Non

L'adresse IP privée secondaire de la carte réseau (NIC). Valeurs valides de N : 1 à 100.

192.168.**.**

string

Non

L'adresse IP privée secondaire de la carte réseau (NIC). Valeurs valides de N : 1 à 100.

192.168.**.**

NetworkInterfaceId

array

Non

L'identifiant de la carte réseau (NIC). Valeurs valides de N : 1 à 100.

eni-bp125p95hhdhn3ot****

string

Non

L'identifiant de la carte réseau (NIC). Valeurs valides de N : 1 à 100.

eni-bp125p95hhdhn3ot****

Ipv6Address

array

Non

L'adresse IPv6 de la carte réseau (NIC). N indique que vous pouvez configurer plusieurs adresses IPv6. Valeurs valides de N : 1 à 100.

2408:4321:180:1701:94c7:bc38:3bfa:****

string

Non

L'adresse IPv6 de la carte réseau (NIC). N indique que vous pouvez configurer plusieurs adresses IPv6. Valeurs valides de N : 1 à 100.

2408:4321:180:1701:94c7:bc38:3bfa:****

Éléments de réponse

Élément

Type

Description

Exemple

object

NextToken

string

Le jeton de pagination renvoyé lors de cet appel.

AAAAAdDWBF2****

PageSize

integer

Le paramètre de requête paginée.

1

PageNumber

integer

Le paramètre de requête paginée.

1

RequestId

string

L'identifiant de la requête.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

Le nombre total d'interfaces réseau élastiques (ENI) renvoyées.

2

NetworkInterfaceSets

object

NetworkInterfaceSet

array<object>

Les informations de la carte réseau (NIC).

array<object>

CreationTime

string

The creation time. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-12-25T12:31:31Z

VpcId

string

The VPC ID of the network interface controller (NIC).

vpc-bp1j7w3gc1cexjqd****

Type

string

The type of the Elastic Network Interface (ENI). Valid values:

  • Primary: primary network interface controller (NIC).

  • Secondary: secondary ENI.

Secondary

Status

string

The status of the network interface controller (NIC). Valid values:

  • Available: available.

  • Attaching: being attached.

  • InUse: attached.

  • Detaching: being detached.

  • Deleting: being deleted.

Available

NetworkInterfaceTrafficMode

string

The communication mode of the network interface controller (NIC). Valid values:

  • Standard: TCP communication mode.

  • HighPerformance: Elastic RDMA Interface (ERI) is enabled and the RDMA communication mode is used.

Remarque

The HighPerformance parameter value is supported only by the c7re RDMA enhanced instance family. Currently, this parameter value can be set only in zone K of the China (Beijing) region.

Standard

NetworkInterfaceName

string

The name of the network interface controller (NIC).

my-eni-name

MacAddress

string

The MAC address of the network interface controller (NIC).

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

QueuePairNumber

integer

Remarque

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

0

NetworkInterfaceId

string

The network interface controller (NIC) ID.

eni-bp125p95hhdhn3ot****

ServiceID

integer

The Virtual Network Operator (VNO) ID of the network interface controller (NIC).

12345678910

InstanceId

string

The ID of the instance to which the network interface controller (NIC) is attached.

Remarque

NICs that are managed and controlled by other Alibaba Cloud services do not return an instance ID.

i-bp1e2l6djkndyuli****

OwnerId

string

The ID of the account that owns the network interface controller (NIC).

123456****

ServiceManaged

boolean

Indicates whether the user of the network interface controller (NIC) is an Alibaba Cloud service or a Virtual Network Operator (VNO).

true

VSwitchId

string

The vSwitch ID of the VPC.

vsw-bp16usj2p27htro3****

Description

string

The description.

DescriptionTest

ResourceGroupId

string

The resource group ID.

rg-2ze88m67qx5z****

ZoneId

string

The zone ID.

cn-hangzhou-e

PrivateIpAddress

string

The private IP address of the network interface controller (NIC).

172.17.**.**

QueueNumber

integer

The number of queues for the Elastic Network Interface (ENI).

  • If the secondary ENI is in the attached (InUse) state and the queue number has not been modified, the default queue number for the secondary ENI of the instance type is returned.

  • If the secondary ENI has a modified queue number, the modified queue number is returned.

  • If the secondary ENI is in the not attached (Available) state and the queue number has not been modified, an empty value is returned.

  • For a primary network interface controller (NIC), the default queue number for the primary NIC of the instance type is returned.

8

PrivateIpSets

object

PrivateIpSet

array<object>

The private IP addresses.

array<object>

PrivateIpAddress

string

The private IP address of the instance.

172.17.**.**

Primary

boolean

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

  • true: primary private IP address.

  • false: secondary private IP address.

true

AssociatedPublicIp

object

The Elastic IP Address (EIP) associated with the network interface controller (NIC) on the Internet.

PublicIpAddress

string

The EIP address.

116.62.**.**

AllocationId

string

Remarque

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

null

PrivateDnsName

string

The private domain name of the instance.

Remarque

This value is returned only when the hostname type HostnameType of the instance is set to IP or InstanceId format.

DnsTestName

Ipv6Sets

object

Ipv6Set

array<object>

The IPv6 addresses allocated to the network interface controller (NIC).

object

Ipv6Address

string

The IPv6 address allocated to the network interface controller (NIC).

2408:4321:180:1701:94c7:bc38:3bfa:****

Primary

boolean

Ipv4PrefixSets

object

Ipv4PrefixSet

array<object>

The IPv4 prefixes allocated to the network interface controller (NIC).

object

Ipv4Prefix

string

The IPv4 prefix allocated to the network interface controller (NIC).

192.168.**.0/28

Ipv6PrefixSets

object

Ipv6PrefixSet

array<object>

The IPv6 prefixes allocated to the network interface controller (NIC).

object

Ipv6Prefix

string

The IPv6 prefix allocated to the network interface controller (NIC).

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

Tags

object

Tag

array<object>

The tags.

object

TagValue

string

The tag value.

TestValue

TagKey

string

The tag key.

TestKey

SecurityGroupIds

object

SecurityGroupId

array

The security groups to which the ENI belongs.

string

The security group ID.

sg-bp18kz60mefsicfg****

AssociatedPublicIp

object

The Elastic IP Address (EIP) associated with the secondary private IP address of the network interface controller (NIC) on the Internet.

PublicIpAddress

string

The EIP address.

116.62.**.**

AllocationId

string

Remarque

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

null

Attachment

object

Remarque

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

DeviceIndex

integer

Remarque

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

0

InstanceId

string

Remarque

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

null

TrunkNetworkInterfaceId

string

Remarque

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

null

NetworkCardIndex

integer

The index of the network card to which the ENI is attached.

  • If the ENI is in the Available state or the index was not specified during attachment, this value is not returned.

  • If the ENI is in the InUse state and the index was specified during attachment, this value indicates the index of the network card to which the ENI is attached.

0

DeleteOnRelease

boolean

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

  • true: The ENI is not retained.

  • false: The ENI is retained.

true

SourceDestCheck

boolean

Indicates whether source/destination checking is enabled. We recommend that you enable this feature to enhance network security. Valid values:

  • true: enabled.

  • false: disabled.

Default value: false.

Remarque

Before you use this parameter, read Source/destination checking.

false

Exemples

JSON format

{
  "NextToken": "AAAAAdDWBF2****",
  "PageSize": 1,
  "PageNumber": 1,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 2,
  "NetworkInterfaceSets": {
    "NetworkInterfaceSet": [
      {
        "CreationTime": "2019-12-25T12:31:31Z",
        "VpcId": "vpc-bp1j7w3gc1cexjqd****",
        "Type": "Secondary",
        "Status": "Available",
        "NetworkInterfaceTrafficMode": "Standard",
        "NetworkInterfaceName": "my-eni-name",
        "MacAddress": "00:16:3e:12:**:**",
        "QueuePairNumber": 0,
        "NetworkInterfaceId": "eni-bp125p95hhdhn3ot****",
        "ServiceID": 12345678910,
        "InstanceId": "i-bp1e2l6djkndyuli****",
        "OwnerId": "123456****",
        "ServiceManaged": true,
        "VSwitchId": "vsw-bp16usj2p27htro3****",
        "Description": "DescriptionTest",
        "ResourceGroupId": "rg-2ze88m67qx5z****",
        "ZoneId": "cn-hangzhou-e",
        "PrivateIpAddress": "172.17.**.**",
        "QueueNumber": 8,
        "PrivateIpSets": {
          "PrivateIpSet": [
            {
              "PrivateIpAddress": "172.17.**.**",
              "Primary": true,
              "AssociatedPublicIp": {
                "PublicIpAddress": "116.62.**.**",
                "AllocationId": "null"
              },
              "PrivateDnsName": "DnsTestName"
            }
          ]
        },
        "Ipv6Sets": {
          "Ipv6Set": [
            {
              "Ipv6Address": "2408:4321:180:1701:94c7:bc38:3bfa:****",
              "Primary": false
            }
          ]
        },
        "Ipv4PrefixSets": {
          "Ipv4PrefixSet": [
            {
              "Ipv4Prefix": "192.168.**.0/28"
            }
          ]
        },
        "Ipv6PrefixSets": {
          "Ipv6PrefixSet": [
            {
              "Ipv6Prefix": "2001:db8:1234:1a00:****::/80"
            }
          ]
        },
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "SecurityGroupIds": {
          "SecurityGroupId": [
            "sg-bp18kz60mefsicfg****"
          ]
        },
        "AssociatedPublicIp": {
          "PublicIpAddress": "116.62.**.**",
          "AllocationId": "null"
        },
        "Attachment": {
          "DeviceIndex": 0,
          "InstanceId": "null",
          "TrunkNetworkInterfaceId": "null",
          "NetworkCardIndex": 0
        },
        "DeleteOnRelease": true,
        "SourceDestCheck": false
      }
    ]
  }
}

Codes d'erreur

Code de statut HTTP

Code d'erreur

Message d'erreur

Description

400 MissingParameter %s
400 UnsupportedParameter %s
400 InvalidParameter %s
400 InvalidInstanceID.Malformed %s
400 InvalidOperation.InvalidEcsState %s
400 InvalidOperation.InvalidEniState %s
400 InvalidOperation.DetachPrimaryEniNotAllowed %s
400 Forbidden.RegionId %s
400 InvalidRegionId.MalFormed The specified parameter RegionId is not valid.
403 InvalidUserType.NotSupported %s
403 Abs.InvalidAccount.NotFound %s
403 Forbidden.NotSupportRAM %s
403 Forbidden.SubUser %s
403 InvalidParameter %s
403 MaxEniCountExceeded %s
403 EniPerInstanceLimitExceeded %s
403 InvalidOperation.AvailabilityZoneMismatch %s
403 InvalidOperation.VpcMismatch %s
403 SecurityGroupInstanceLimitExceed %s
403 InvalidSecurityGroupId.NotVpc %s
403 InvalidOperation.InvalidEniType %s
403 InvalidVpc.Empty %s
403 Forbidden.RegionId %s
403 InvalidOperation.InvalidEniPageNumber %s
403 InvalidVpc.Indeterminacy %s
404 InvalidEcsId.NotFound %s
404 InvalidEniId.NotFound %s
404 InvalidVSwitchId.NotFound %s
404 InvalidSecurityGroupId.NotFound %s

Consultez Codes d'erreur pour la liste complète.

Notes de version

Consultez Notes de version pour la liste complète.