查询实例详情
更新时间:2024-09-25
接口描述
查询BCI实例详情
请求结构
Plain Text
1GET /v{version}/instance/{instanceId} HTTP/1.1
2Host: bci.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号,当前取值2 |
instanceId | String | 是 | URL参数 | BCI实例ID |
响应头域
除公共头域外,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
instance | InstanceDetailModel | BCI实例详细信息 |
请求示例
Plain Text
1GET /v{version}/instance/p-rpjlzbuu HTTP/1.1
2Host: bci.bj.baidubce.com
3ContentType: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
响应示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tue, 06 Sep 2016 10:08:44 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6
7{
8 "instance": {
9 "instanceId": "p-rpjlzbuu",
10 "instanceName": "default-eni-test-558cfc6dfc-st8sg-1",
11 "status": "Running",
12 "zoneName": "",
13 "cpuType": "intel",
14 "gpuType": "",
15 "cpu": 0.25,
16 "memory": 0.5,
17 "bandwidthInMbps": 0,
18 "publicIp": "",
19 "internalIp": "192.168.64.157",
20 "createTime": "2023-03-02T05:55:43Z",
21 "updateTime": "2023-03-02T14:19:45Z",
22 "deleteTime": null,
23 "restartPolicy": "Always",
24 "tags": null,
25 "volume": {
26 "nfs": [],
27 "emptyDir": [],
28 "configFile": [],
29 "podVolumes": null,
30 "flexVolume": []
31 },
32 "containers": [
33 {
34 "name": "security-group",
35 "image": "registry.baidubce.com/cce-plugin-dev/netperf:v1.0.0",
36 "cpu": 0.25,
37 "memory": 0.5,
38 "gpu": 0.0,
39 "workingDir": "",
40 "imagePullPolicy": "Always",
41 "commands": [
42 "/bin/sh",
43 "-c",
44 "sleep 3600"
45 ],
46 "args": [],
47 "ports": [],
48 "volumeMounts": [],
49 "envs": [
50 {
51 "key": "SERVICE_ZHTEST_PORT",
52 "value": "tcp://172.16.52.63:80",
53 "valueFrom": null
54 }
55 ],
56 "createTime": "2023-03-02T05:55:43Z",
57 "updateTime": "2023-03-02T14:19:45Z",
58 "deleteTime": null,
59 "currentState": null,
60 "previousState": {
61 "state": "Succeeded",
62 "reason": null,
63 "message": null,
64 "startTime": "2023-03-02T12:56:16Z",
65 "finishTime": "2023-03-02T13:56:16Z",
66 "detailStatus": "Completed",
67 "exitCode": 0
68 },
69 "ready": true,
70 "restartCount": 8
71 }
72 ],
73 "initContainers": [],
74 "securityGroups": [
75 {
76 "securityGroupId": "g-59gf44p4jmwe",
77 "name": "默认安全组",
78 "description": "default",
79 "vpcId": "7cfef2de-e17b-4362-885e-4c291e3a9163"
80 }
81 ],
82 "vpc": {
83 "vpcId": "vpc-rfjkdgxphqcm",
84 "name": "zhanghong-vpc",
85 "cidr": "192.168.0.0/16",
86 "createTime": "Wed Mar 16 08:40:43 UTC 2022",
87 "description": "",
88 "isDefault": false
89 },
90 "subnet": {
91 "subnetId": "sbn-kbmujmezgzyd",
92 "name": "zrq-eni",
93 "cidr": "192.168.64.0/24",
94 "vpcId": "vpc-rfjkdgxphqcm",
95 "subnetType": "BCC",
96 "description": "",
97 "createTime": "Wed Sep 14 09:51:08 UTC 2022"
98 },
99 "terminationGracePeriodSeconds": null
100 }
101}