查询集群列表
更新时间:2024-09-25
接口描述
查询集群列表。
请求结构
Bash
1GET /v{version}/clusters HTTP/1.1
2Host: chpc.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其他特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
---|---|---|---|---|
version | Integer | 是 | URL参数 | OpenAPI版本号 |
pageNo | Integer | 否 | Query参数 | 显示页码,默认1 |
pageSize | Integer | 否 | Query参数 | 页大小,默认10,最大100 |
响应头域
除公共头域,无其他特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
requestId | String | 请求ID |
pageNo | Integer | 当前页码 |
pageSize | Integer | 当前页大小 |
totalCount | Integer | 总大小 |
clusters | List | 集群列表 |
请求示例
Shell
1GET /v1/clusters HTTP/1.1
2Host: chpc.bj.baidubce.com
3Authorization: bce-auth-v1/ALTAKfdDegfDEgedgyhted54dg/2023-08-22T09:39:29Z/1800/host/8d23cd789b287ecce02c230bb8f181887fef8d0c32846b09ce76248f0c3adf5e
响应示例
Shell
1{
2 "requestId": "c0e995a0-f82c-43f0-8629-ef1b26d48b48",
3 "pageNo": 1,
4 "pageSize": 3,
5 "totalCount": 3,
6 "clusters": [
7 {
8 "clusterId": "c-Nht2ISy2",
9 "clusterName": "test_chpc_bddwd",
10 "description": "testchpc",
11 "status": "active",
12 "createdTime": "2023-08-22T09:27:14Z",
13 "chargeType": "Postpaid",
14 "imageId": "m-3GFgXfwI",
15 "schedulerType": "slurm",
16 "zoneName": "cn-bj-g"
17 },
18 {
19 "clusterId": "c-pLmIYRvJ",
20 "clusterName": "test_chpc_bddwd",
21 "description": "testchpc",
22 "status": "creating",
23 "createdTime": "2023-08-22T09:35:11Z",
24 "chargeType": "Postpaid",
25 "imageId": "m-3GFgXfwI",
26 "schedulerType": "slurm",
27 "zoneName": "cn-bj-g"
28 },
29 {
30 "clusterId": "c-epQVMT6E",
31 "clusterName": "bddwd_prepaid",
32 "description": "testchpc",
33 "status": "creating",
34 "createdTime": "2023-08-22T09:35:43Z",
35 "chargeType": "Prepaid",
36 "imageId": "m-3GFgXfwI",
37 "schedulerType": "slurm",
38 "zoneName": "cn-bj-g"
39 }
40 ]
41}