Call DescribeNetworkInterfaces to retrieve a list of network interfaces.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ens:DescribeNetworkInterfaces |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NetworkInterfaceId |
string |
No |
The ID of the elastic network interface (ENI). |
eni-58z57orgmt6d1**** |
| InstanceId |
string |
No |
The ID of the instance. |
i-5t7z99n32gplriv |
| NetworkId |
string |
No |
The ID of the network. |
n-2zeuphj08tt7q3brd**** |
| VSwitchId |
string |
No |
The ID of the vSwitch. |
vsw-12345 |
| EnsRegionId |
string |
No |
The region ID of the instance. |
cn-tianjin-cmcc |
| SecurityGroupId |
string |
No |
The ID of the security group associated with the secondary ENI. Specify this parameter to query secondary ENIs by security group ID. |
sg-5p1fg655nh68xyz9i*** |
| PrimaryIpAddress |
string |
No |
The primary IP address of the ENI. |
10.XXX.XXX.5 |
| Type |
string |
No |
The type of the ENI. Valid values:
If you do not specify this parameter, ENIs of all types are queried. |
Secondary |
| NetworkInterfaceName |
string |
No |
The name of the ENI. |
test-01 |
| Status |
string |
No |
The status of the ENI. Valid values:
If you do not specify this parameter, ENIs in all states are queried. |
Available |
| PageNumber |
string |
No |
The page number. Pages start from 1. The default value is 1. |
1 |
| PageSize |
string |
No |
The number of entries to return on each page. Maximum value: 100. Default value: 50. |
50 |
| Ipv6Address |
array |
No |
The IPv6 addresses of the ENI. You can specify up to 100 addresses. |
|
|
string |
No |
An IPv6 address of the ENI. |
2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6 |
|
| EnsRegionIds |
array |
No |
The IDs of the ENS edge zones. You can specify up to 100 IDs. |
|
|
string |
No |
ENS node ID. |
cn-fuzhou-1 |
|
| NetworkInterfaceIds |
array |
No |
The IDs of the ENIs. You can specify up to 100 IDs. |
|
|
string |
No |
The ID of an ENI. |
eni-5**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The details of the ENIs. |
||
| NetworkInterfaceSets |
object |
||
| NetworkInterfaceSet |
array<object> |
The details of the ENIs. |
|
|
array<object> |
The details of the ENIs. |
||
| CreationTime |
string |
The time when the ENI was created. The time is displayed in UTC and follows the ISO 8601 standard in the `yyyy-MM-ddThh:mmZ` format. |
2022-02-22T03:53:25Z |
| EnsRegionId |
string |
The ID of the ENS edge zone. |
id-jakarta-1 |
| InstanceId |
string |
The ID of the instance to which the ENI is attached. |
i-5siavnr3 |
| MacAddress |
string |
The MAC address of the ENI. |
00:16:XXX:XXX:60:0a |
| NetworkInterfaceId |
string |
The ID of the ENI. |
eni-uf686a5 |
| PrimaryIp |
string |
The primary private IP address. |
10.XXX.XXX.25 |
| PrimaryIpType |
string |
The type of the primary IP address. Valid values:
|
Private |
| Status |
string |
The status of the network interface. Valid values:
|
InUse |
| NetworkId |
string |
The ID of the network. |
n-5w0qd03adw**** |
| VSwitchId |
string |
The ID of the vSwitch. |
vsw-5rqswx1trlsj9 |
| PrivateIpSets |
object |
||
| PrivateIpSet |
array<object> |
A collection of `PrivateIpSet` objects. |
|
|
object |
A collection of `PrivateIpSet` objects. |
||
| PrivateIpAddress |
string |
The private IP address. |
192.XXX.XXX.130 |
| Primary |
boolean |
Indicates whether the IP address is the primary private IP address. Valid values:
|
true |
| PrivateIpStatus |
string |
The status of the private IP address. Valid values:
|
Available |
| NetworkInterfaceName |
string |
The name of the ENI. |
primaryTest |
| Description |
string |
The description of the ENI. |
test-description |
| SecurityGroupIds |
object |
||
| SecurityGroup |
array |
The ID of the security group. |
|
|
string |
The ID of the security group. |
sg-5p1bozeiw711a1*** |
|
| Type |
string |
The type of the ENI. Valid values:
|
Primary |
| Ipv6Sets |
object |
||
| Ipv6Set |
array<object> |
The assigned IPv6 addresses of the ENI. |
|
|
object |
The assigned IPv6 addresses of the ENI. |
||
| Ipv6Address |
string |
The assigned IPv6 address of the ENI. |
2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6 |
| VmncLearn |
boolean |
||
| PageNumber |
integer |
The page number. Pages start from 1. The default value is 1. |
1 |
| PageSize |
integer |
The number of entries returned per page. Maximum value: 50. Default value: 10. |
50 |
| TotalCount |
integer |
The total number of entries. |
49 |
| RequestId |
string |
The ID of the request. |
708AF9CE-FF92-5DF9-93F8-B7754AB1061A |
Examples
Success response
JSON format
{
"NetworkInterfaceSets": {
"NetworkInterfaceSet": [
{
"CreationTime": "2022-02-22T03:53:25Z",
"EnsRegionId": "id-jakarta-1",
"InstanceId": "i-5siavnr3",
"MacAddress": "00:16:XXX:XXX:60:0a",
"NetworkInterfaceId": "eni-uf686a5",
"PrimaryIp": "10.XXX.XXX.25",
"PrimaryIpType": "Private",
"Status": "InUse",
"NetworkId": "n-5w0qd03adw****",
"VSwitchId": "vsw-5rqswx1trlsj9",
"PrivateIpSets": {
"PrivateIpSet": [
{
"PrivateIpAddress": "192.XXX.XXX.130",
"Primary": true,
"PrivateIpStatus": "Available"
}
]
},
"NetworkInterfaceName": "primaryTest",
"Description": "test-description",
"SecurityGroupIds": {
"SecurityGroup": [
"sg-5p1bozeiw711a1***"
]
},
"Type": "Primary",
"Ipv6Sets": {
"Ipv6Set": [
{
"Ipv6Address": "2605:340:cdb1:XXXX:XXXX:XXXX:XXXX:e2d6\n"
}
]
},
"VmncLearn": false
}
]
},
"PageNumber": 1,
"PageSize": 50,
"TotalCount": 49,
"RequestId": "708AF9CE-FF92-5DF9-93F8-B7754AB1061A"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | ens.interface.error | Failed to call API. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.