Describes the list of elastic network interfaces (ENI).


  • You can filter the results by specifying the parameters.
  • If no parameter is specified, a list containing all ENIs is returned.
  • You can view a maximum of 100 ENIs at a time.

Request parameters

Name Type Required Description
Action String Yes The name of this interface. Value: DescribeNetworkInterfaces
RegionId String Yes Region ID. For more information, call DescribeRegions to obtain the latest region list.
VSwitchId String No Virtual Switch ID for the VPC.
PrimaryIpAddress String No The primary private IP address of the ENI.
SecurityGroupId String No Security group ID.
NetworkInterfaceName String No ENI name.
Type String No ENI type. Value range:
  • Primary
  • Secondary
InstanceId String No ID of the instance currently associated with the ENI.
NetworkInterfaceId.N String No ENI ID. You can view a maximum of 100 ENIs at a time.
PageNumber Integer No Page number of the query result. The value is a positive integer.

Default value: 1.

PageSize Integer No Page size of the query result.  Value range: [1, 100].

Default value: 10.

Response parameters

Name Type Description
NetworkInterfaceSet NetworkInterfaceSet Information about a network interface
TotalCount Integer Total number of instances
PageNumber Integer Page number of the instance list
PageSize Integer Number of lines per page set during input


Request example
&<Common Request Parameters>
Response example

XML format

            <AssociatedPublicIp />
            XXX. XXX. xx. xx
                    <AssociatedPublicIp />
JSON format
    "NetworkInterfaceSets": {
        "NetworkInterfaceSet": [
                "AssociatedPublicIp": {
                "CreationTime": "2017-11-24T06:14:22Z",
                "InstanceId": "AY121018033933eaxxxxx",
                "MacAddress": "00:16:3e:0f:XX:XX",
                "NetworkInterfaceId": "eni-bp17pdijfczaxZZZZxxxxx",
                "PrivateIpAddress": "XXX.XXX.XX.XX",
                "PrivateIpSets": {
                    "PrivateIpSet": [
                            "AssociatedPublicIp": {
                            "Primary": true,
                            "PrivateIpAddress": "XXX.XXX.XX.XX"
                "SecurityGroupIds": {
                    "SecurityGroupId": [
                "Status": "Available",
                "Type": "Secondary",
                "VpcId": "vpc-bp1j7w3gc1cexjqdxxxxx",
                "VSwitchId": "vsw-bp16usj2p27htro3xxxxx",
                "ZoneId": "cn-hangzhou-e"
    "PageNumber": 1,
    "PageSize": 100,
    "RequestId": "CEE5C347-0B64-4535-A061-95BE95Axxxxx",
    "TotalCount": 1

Error codes

Error codes specific to this interface are as follows. For more error codes, visit the API error center.

Error code Error message HTTP status code Description
Abs.InvalidAccount.NotFound The Account is not found or AK is expired. 403 The specified Alibaba Cloud account does not exist. Alternatively, your AccessKey expired.
UnsupportedParameter The parameters is unsupported. 400 The specified parameter does not exist. Alternatively, the specified parameter is not supported.
MissingParameter The input parameter that is mandatory for processing this request is not supplied. 400 You must specify the required parameter.
InvalidEcsId.NotFound The specified EcsId is not found. 404 The specified instance ID does not exist.
InvalidVSwitchId.NotFound The specified VSwitchId is not found. 404 The specified VSwitch ID does not exist.
InvalidSecurityGroupId.NotFound The specified SecurityGroupId is not found. 404 The specified security group ID does not exist.
InvalidOperation.AvailabilityZoneMismatch The VPC VSwitch of the specified ENI and ECS instance are not in the same availability zone. 403 The specified VPC VSwitch ID, ENI and instance ID are not in the same availability zone.
InvalidOperation.VpcMismatch The VPC of the specified ENI and security group are not in the same VPC. 403 The specified ENI and security group ID are not in the same VPC.
InvalidSecurityGroupId.NotVpc The specified SecurityGroupId not in VPC. 403 The specified security group ID is not of Type VPC.