获取节点详情
更新时间:2026-09-09
- 查询BCI实例详情。
OpenAPI Explorer
去调试
您可以在 OpenAPI Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer 可以自动生成 SDK 代码示例。
请求结构
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 |
返回状态码
成功返回200,失败返回见错误码
返回头域
除公共头域外,无其他特殊头域
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| instance | InstanceDetailModel | BCI实例详细信息 |
请求示例
Plain Text
1GET /v2/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
5
6{
7 "instance": {
8 "instanceId": "p-rpjlzbuu",
9 "instanceName": "default-eni-test-558cfc6dfc-st8sg-1",
10 "status": "Running",
11 "zoneName": "",
12 "cpuType": "intel",
13 "gpuType": "",
14 "cpu": 0.25,
15 "memory": 0.5,
16 "bandwidthInMbps": 0,
17 "publicIp": "",
18 "internalIp": "192.168.64.157",
19 "createTime": "2023-03-02T05:55:43Z",
20 "updateTime": "2023-03-02T14:19:45Z",
21 "deleteTime": null,
22 "restartPolicy": "Always",
23 "tags": null,
24 "volume": {
25 "nfs": [],
26 "emptyDir": [],
27 "configFile": [],
28 "podVolumes": null,
29 "flexVolume": []
30 },
31 "containers": [
32 {
33 "name": "security-group",
34 "image": "registry.baidubce.com/cce-plugin-dev/netperf:v1.0.0",
35 "cpu": 0.25,
36 "memory": 0.5,
37 "gpu": 0.0,
38 "workingDir": "",
39 "imagePullPolicy": "Always",
40 "commands": ["/bin/sh", "-c", "sleep 3600"],
41 "args": [],
42 "ports": [],
43 "volumeMounts": [],
44 "envs": [
45 {
46 "key": "SERVICE_ZHTEST_PORT",
47 "value": "tcp://172.16.52.63:80",
48 "valueFrom": null
49 }
50 ],
51 "createTime": "2023-03-02T05:55:43Z",
52 "updateTime": "2023-03-02T14:19:45Z",
53 "deleteTime": null,
54 "currentState": null,
55 "previousState": {
56 "state": "Succeeded",
57 "reason": null,
58 "message": null,
59 "startTime": "2023-03-02T12:56:16Z",
60 "finishTime": "2023-03-02T13:56:16Z",
61 "detailStatus": "Completed",
62 "exitCode": 0
63 },
64 "ready": true,
65 "restartCount": 8
66 }
67 ],
68 "initContainers": [],
69 "securityGroups": [
70 {
71 "securityGroupId": "g-59gf44p4jmwe",
72 "name": "默认安全组",
73 "description": "default",
74 "vpcId": "7cfef2de-e17b-4362-885e-4c291e3a9163"
75 }
76 ],
77 "vpc": {
78 "vpcId": "vpc-rfjkdgxphqcm",
79 "name": "zhanghong-vpc",
80 "cidr": "192.168.0.0/16",
81 "createTime": "Wed Mar 16 08:40:43 UTC 2022",
82 "description": "",
83 "isDefault": false
84 },
85 "subnet": {
86 "subnetId": "sbn-kbmujmezgzyd",
87 "name": "zrq-eni",
88 "cidr": "192.168.64.0/24",
89 "vpcId": "vpc-rfjkdgxphqcm",
90 "subnetType": "BCC",
91 "description": "",
92 "createTime": "Wed Sep 14 09:51:08 UTC 2022"
93 },
94 "terminationGracePeriodSeconds": null
95 }
96}
评价此篇文章
