获取实例网卡信息
更新时间:2024-07-02
该接口用于获取实例网卡信息,包括主网卡和弹性网卡。
请求结构
GET /v{version}/eni/{instanceId}?clientToken={clientToken} HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号。 |
clientToken | String | 是 | Query参数 | 幂等性Token,是一个长度不超过64位的ASCII字符串,详见 幂等性。 |
instanceId | String | 是 | Query参数 | 网卡挂载的虚机ID |
响应头域
除公共头域外,无其它特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
enis | List<EniInfo> | 网卡信息列表,具体参数参见 EniInfo |
请求示例
GET http://bcc.bj.baidubce.com/v2/eni/i-ofsX9WtN?clientToken=3A8d84403d-a94b-40ce-9d6a-f6225dd26676
Host: bcc.bj.baidubce.com
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Wed, 08 Jul 2015 03:28:11 GMT
x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
Server: BWS
{
"enis": [
{
"eniId": "eni-531s8c7f45rs",
"name": "test",
"vpcId": "vpc-vv3xw6d9970b",
"subnetId": "sbn-2escuever5fi",
"zoneName": "cn-bj-a",
"description": "",
"createdTime": "2022-10-20T06:31:42Z",
"macAddress": "fa:f6:00:14:05:1e",
"status": "inuse",
"securityGroupIds": [
"g-6uwn49bxhbvj"
],
"privateIpSet": [
{
"primary": true,
"privateIpAddress": "192.168.48.8"
}
]
},
{
"eniId": "eni-wwi3mdqp6f5j",
"name": "eth0",
"vpcId": "vpc-vv3xw6d9970b",
"subnetId": "sbn-2escuever5fi",
"zoneName": "cn-bj-a",
"description": "",
"createdTime": "2023-03-21T02:09:03Z",
"macAddress": "fa:f6:00:01:83:03",
"status": "inuse",
"securityGroupIds": [
"g-6uwn49bxhbvj"
],
"privateIpSet": [
{
"primary": true,
"privateIpAddress": "192.168.48.5"
},
{
"primary": false,
"privateIpAddress": "192.168.48.3"
}
]
}
]
}