查询指定的弹性网卡
更新时间:2025-04-30
描述
查询指定的弹性网卡。
请求结构
Plain Text
1GET /v{version}/eni/{eniId} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号,当前取值为1 |
eniId | String | 是 | URL参数 | 弹性网卡的ID |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
eniId | String | 弹性网卡的ID |
name | String | 弹性网卡的名称 |
description | String | 弹性网卡的描述 |
vpcId | String | 弹性网卡所属的VPC的ID |
subnetId | String | 弹性网卡所属子网的ID |
macAddress | String | 网卡的MAC地址 |
status | String | 弹性网卡的状态: available:未挂载 inuse:已挂载 attaching:挂载中 detaching:卸载中 |
zoneName | String | 弹性网卡所属的可用区 |
instanceId | String | 弹性网卡挂载的虚机ID |
privateIpSet | List<PrivateIP> | 弹性网卡的IPv4 IP |
ipv6PrivateIpSet | List<PrivateIP> | 弹性网卡的IPv6 IP |
securityGroupIds | List<String> | 弹性网卡绑定的普通安全组ID列表 |
enterpriseSecurityGroupIds | List<String> | 弹性网卡绑定的企业安全组ID列表 |
createdTime | String | 创建时间 |
tags | List<TagModel> | 标签 |
请求示例
Plain Text
1GET /v1/eni/eni-w2d4kgc3x0y1 HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
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 "zoneName":"zoneA",
8 "createdTime":"2019-04-12 18:53:07.0",
9 "description":"",
10 "instanceId":"i-Z2iJfB90",
11 "eniId":"eni-9kewqunek5sc",
12 "privateIpSet":[
13 {
14 "publicIpAddress":"180.76.245.166",
15 "primary":true,
16 "privateIpAddress":"192.168.1.221"
17 }
18 ],
19 "ipv6PrivateIpSet":[
20 {
21 "primary":false,
22 "privateIpAddress":"2400:da00:e003:0:1d2:100:0:f"
23 }
24 ],
25 "macAddress":"fa:16:3e:c0:e4:3d",
26 "name":"test",
27 "securityGroupIds":[
28 "g-SY5smEG9"
29 ],
30 "tags": [
31 {
32 "tagKey": "hikwnf",
33 "tagValue": "nwklwmflk"
34 }
35 ],
36 "status":"available",
37 "subnetId":"sbn-053m53r01z3h",
38 "vpcId":"vpc-7hueyu2089wf"
39}