Baidu AI Cloud
中国站

百度智能云

Virtual Private Cloud

Query ENIC List

Query ENIC List

Description

Query the ENIC list.

Request Structure

GET /v{version}/eni?vpcId={vpcId}&marker={marker}&maxKeys={maxKeys}   HTTP/1.1   
Host: bcc.bj.baidubce.com      
Authorization: authorization string

Request Header Field

No other special header fields are available except for the public header fields.

Request Parameters

Parameter Name Type Required? Parameter Position Description
version String Yes URL parameter API version number
vpcId String Yes Query parameter The “vpcId” of the ENIC.
marker String No Query parameters The start position of querying the list in batches, which is a string generated by the system.
maxKeys int No Query parameters The maximum number of keys contained on every page should not exceed 1000. The default value is 1000.

Return Header Field

No other special header fields are available except for the public header fields.

Return Parameter

Parameter Name Type Description
enis List<ENI> ENIC list
marker String Mark the starting position of the query. If the result list is empty, this option does not exist.
isTruncated boolean “True” means there is still data behind, and “false” means the current page is already the last page.
nextMarker String Gets the “marker” value to be passed on the next page. This field does not appear when “isTruncated” is “false”.
maxKeys int Maximum number of keys contained on each page.

Request Example

GET /v1/eni?vpcId=vpc-r625rqw3wuer?maxKeys=1  HTTP/1.1
Host: bcc.bj.baidubce.com
authorization: bce-auth-v1/c3119080364d11e8912505e5e0ae9978/2018-04-02T08:14:25Z/3600/host;x-bce-account;x-bce-client-ip;x-bce-date;x-bce-request-id;x-bce-security-token/6b93bfd5ca2328fcb5560fa57f56253d80a629f6aac9c9cb74adf9a055fceb53

Return Example

HTTP/1.1 200 OK
x-bce-request-id: 7e789a40-adac-414a-8bd4-916d6be61112
Date: Mon, 02 Apr 2019 08:14:25 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
    "enis":[
        {
            "zoneName":"zoneA",
            "createdTime":"2019-04-12 18:53:07.0",
            "description":"",
            "instanceId":"i-Z2iJfB90",
            "eniId":"eni-w2d4kgc3x0y1",
            "privateIpSet":[
                {
                    "publicIpAddress":"180.76.245.166",
                    "primary":true,
                    "privateIpAddress":"192.168.1.221"
                }
            ],
            "macAddress":"fa:16:3e:c0:e4:3d",
            "name":"test_eni",
            "status":"available",
            "subnetId":"sbn-i4d47zb73ztx",
            "vpcId":"vpc-r625rqw3wuer"
        }
    ],
   "marker":"eni-w2d4kgc3x0y1",
   "isTruncated": true,
   "nextMarker": "eni-wcd4jgc3x0y1",
   "maxKeys": 1
}
Previous
Detach ENIC from CVM Server
Next
Query Specified ENIC