查询实例详情
更新时间:2024-09-25
接口描述
查询BCI实例详情
请求结构
GET /v{version}/instance/{instanceId} HTTP/1.1
Host: bci.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号,当前取值2 |
instanceId | String | 是 | URL参数 | BCI实例ID |
响应头域
除公共头域外,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
instance | InstanceDetailModel | BCI实例详细信息 |
请求示例
GET /v{version}/instance/p-rpjlzbuu HTTP/1.1
Host: bci.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Tue, 06 Sep 2016 10:08:44 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"instance": {
"instanceId": "p-rpjlzbuu",
"instanceName": "default-eni-test-558cfc6dfc-st8sg-1",
"status": "Running",
"zoneName": "",
"cpuType": "intel",
"gpuType": "",
"cpu": 0.25,
"memory": 0.5,
"bandwidthInMbps": 0,
"publicIp": "",
"internalIp": "192.168.64.157",
"createTime": "2023-03-02T05:55:43Z",
"updateTime": "2023-03-02T14:19:45Z",
"deleteTime": null,
"restartPolicy": "Always",
"tags": null,
"volume": {
"nfs": [],
"emptyDir": [],
"configFile": [],
"podVolumes": null,
"flexVolume": []
},
"containers": [
{
"name": "security-group",
"image": "registry.baidubce.com/cce-plugin-dev/netperf:v1.0.0",
"cpu": 0.25,
"memory": 0.5,
"gpu": 0.0,
"workingDir": "",
"imagePullPolicy": "Always",
"commands": [
"/bin/sh",
"-c",
"sleep 3600"
],
"args": [],
"ports": [],
"volumeMounts": [],
"envs": [
{
"key": "SERVICE_ZHTEST_PORT",
"value": "tcp://172.16.52.63:80",
"valueFrom": null
}
],
"createTime": "2023-03-02T05:55:43Z",
"updateTime": "2023-03-02T14:19:45Z",
"deleteTime": null,
"currentState": null,
"previousState": {
"state": "Succeeded",
"reason": null,
"message": null,
"startTime": "2023-03-02T12:56:16Z",
"finishTime": "2023-03-02T13:56:16Z",
"detailStatus": "Completed",
"exitCode": 0
},
"ready": true,
"restartCount": 8
}
],
"initContainers": [],
"securityGroups": [
{
"securityGroupId": "g-59gf44p4jmwe",
"name": "默认安全组",
"description": "default",
"vpcId": "7cfef2de-e17b-4362-885e-4c291e3a9163"
}
],
"vpc": {
"vpcId": "vpc-rfjkdgxphqcm",
"name": "zhanghong-vpc",
"cidr": "192.168.0.0/16",
"createTime": "Wed Mar 16 08:40:43 UTC 2022",
"description": "",
"isDefault": false
},
"subnet": {
"subnetId": "sbn-kbmujmezgzyd",
"name": "zrq-eni",
"cidr": "192.168.64.0/24",
"vpcId": "vpc-rfjkdgxphqcm",
"subnetType": "BCC",
"description": "",
"createTime": "Wed Sep 14 09:51:08 UTC 2022"
},
"terminationGracePeriodSeconds": null
}
}