释放集群
更新时间:2026-10-09
接口描述
根据用户指定集群ID,释放特定集群。
请求结构
Bash
1DELETE /v{version}/cluster/{clusterId} HTTP/1.1
2Host: chpc.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其他特殊头域。
请求参数
| 参数名称 | 类型 | 是否必须 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | Integer | 是 | URL参数 | OpenApi参数 |
| clusterId | String | 是 | URL参数 | 集群ID |
响应头域
除公共头域,无其他特殊头域。
响应参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| requestId | String | 请求 ID。 |
| clusterName | String | 集群名称,删除成功时可能返回。 |
| message | String | 删除结果说明,删除成功时可能返回。 |
| clusterId | String | 集群 ID。 |
| status | String | 集群状态。调用成功后通常返回 deleting。 |
错误码
| 错误码 | 错误描述 | HTTP 状态码 | 中文解释 |
|---|---|---|---|
| NoSuchObject | The specified object is not found or resource do not exist. | 404 | 资源不存在。 |
| BadRequest | cluster c-xxxxxxxx cannot delete with xxx status. | 400 | 集群当前状态不允许删除。 |
| BadRequest | cluster c-xxxxxxxx contains queue queueName with xxx status. | 400 | 集群中存在非 active 状态的队列,无法删除集群。 |
| BadRequest | cluster c-xxxxxxxx contains instance i-xxxxxxxx with xxx status. | 400 | 集群中存在非 started 状态的虚机,无法删除集群。 |
请求示例
JSON
1DELETE /v1/cluster/c-ZVI0GZot HTTP/1.1
2Host: chpc.bj.baidubce.com
3Authorization: authorization string
响应示例
JSON
1{
2 "requestId": "fd635427-d166-44d8-b5ee-b3e9097cfb47",
3 "clusterName": "testflowhpc03",
4 "message": "成功删除testflowhpc03集群(ID:c-ZVI0GZot)",
5 "clusterId": "c-ZVI0GZot",
6 "status": "deleting"
7}
评价此篇文章
