Query elastic network interface list
Updated at:2025-10-16
Description
Retrieve the list of elastic network interfaces.
Request structure
Plain Text
1GET /v{version}/eni?vpcId={vpcId}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | For API version No., the current value is 1 |
| vpcId | String | Yes | Query | ID of VPC to which the elastic network interface belongs |
| instanceId | String | No | Query | ID of host to which the elastic network interface is mounted |
| name | String | No | Query | Name of elastic network interface |
| privateIpAddress | List |
No | Query | Intranet IP (IPv4) address of the elastic network interface, which supports single IP or multiple IP queries (multiple IPs to be separated by commas); fuzzy match for single IP suffix, exact match for multiple IPs |
| marker | String | No | Query | The starting position of the batch list query is a system-generated string |
| maxKeys | Integer | No | Query | Maximum number of items per page is 1,000, with a default value of 1000. |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| enis | List<[Eni](VPC/API Reference/Appendix.md#Eni)> | List of elastic network interfaces |
| marker | String | Marker indicating the starting position of the query. If the result list is empty, this field does not exist. |
| isTruncated | Boolean | true indicates there is more data later, false indicates it is the last page |
| nextMarker | String | Obtain the marker value required for retrieving the next page; this field will not appear when isTruncated is false |
| maxKeys | Integer | Maximum number of items included per page |
Request example
Plain Text
1GET /v1/eni?vpcId=vpc-r625rqw3wuer&instanceId=i-FodWXDUY&name=eni&maxKeys=1 HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 7e789a40-adac-414a-8bd4-916d6be61112
3Date: Mon, 02 Apr 2019 08:14:25 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "enis":[
8 {
9 "zoneName":"zoneA",
10 "createdTime":"2019-04-12 18:53:07.0",
11 "description":"",
12 "instanceId":"i-Z2iJfB90",
13 "eniId":"eni-w2d4kgc3x0y1",
14 "privateIpSet":[
15 {
16 "publicIpAddress":"180.76.245.166",
17 "primary":true,
18 "privateIpAddress":"192.168.1.221"
19 }
20 ],
21 "ipv6PrivateIpSet":[
22 {
23 "publicIpAddress": "240c:409f::5:0:49",
24 "primary":false,
25 "privateIpAddress":"2400:da00:e003:0:1d2:100:0:f"
26 }
27 ],
28 "macAddress":"fa:16:3e:c0:e4:3d",
29 "name":"test_eni",
30 "status":"available",
31 "subnetId":"sbn-i4d47zb73ztx",
32 "vpcId":"vpc-r625rqw3wuer"
33 }
34 ],
35 "marker":"eni-w2d4kgc3x0y1",
36 "isTruncated": true,
37 "nextMarker": "eni-wcd4jgc3x0y1",
38 "maxKeys": 1
39}
