查询集群列表
更新时间:2024-09-25
接口描述
查询集群列表。
请求结构
GET /v{version}/clusters HTTP/1.1
Host: chpc.bj.baidubce.com
Authorization: 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 | 集群列表 |
请求示例
GET /v1/clusters HTTP/1.1
Host: chpc.bj.baidubce.com
Authorization: bce-auth-v1/ALTAKfdDegfDEgedgyhted54dg/2023-08-22T09:39:29Z/1800/host/8d23cd789b287ecce02c230bb8f181887fef8d0c32846b09ce76248f0c3adf5e
响应示例
{
"requestId": "c0e995a0-f82c-43f0-8629-ef1b26d48b48",
"pageNo": 1,
"pageSize": 3,
"totalCount": 3,
"clusters": [
{
"clusterId": "c-Nht2ISy2",
"clusterName": "test_chpc_bddwd",
"description": "testchpc",
"status": "active",
"createdTime": "2023-08-22T09:27:14Z",
"chargeType": "Postpaid",
"imageId": "m-3GFgXfwI",
"schedulerType": "slurm",
"zoneName": "cn-bj-g"
},
{
"clusterId": "c-pLmIYRvJ",
"clusterName": "test_chpc_bddwd",
"description": "testchpc",
"status": "creating",
"createdTime": "2023-08-22T09:35:11Z",
"chargeType": "Postpaid",
"imageId": "m-3GFgXfwI",
"schedulerType": "slurm",
"zoneName": "cn-bj-g"
},
{
"clusterId": "c-epQVMT6E",
"clusterName": "bddwd_prepaid",
"description": "testchpc",
"status": "creating",
"createdTime": "2023-08-22T09:35:43Z",
"chargeType": "Prepaid",
"imageId": "m-3GFgXfwI",
"schedulerType": "slurm",
"zoneName": "cn-bj-g"
}
]
}