调用DescribeTaskInfo根据任务ID查询任务执行详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求语法
GET /tasks/task_id HTTP/1.1
Content-Type:application/json
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
task_id | String | 是 | T-5faa48fb31b6b8078d00**** |
任务ID。 |
响应体语法
HTTP/1.1 200
Content-Type:application/json
{
"cluster_id" : "String",
"task_id" : "String",
"created" : "String",
"updated" : "String",
"state" : "String",
"task_type" : "String",
"task_result" : [ {
"data" : "String",
"status" : "String"
} ]
}
响应参数
参数名称 | 类型 | 示例 | 说明 |
---|---|---|---|
cluster_id | String | c78592bfe92244365b3c3ad47f1de**** |
集群ID。 |
task_id | String | T-5faa48fb31b6b8078d000006 |
任务ID。 |
created | String | 2020-11-10T16:02:04+08:00 |
任务创建时间。 |
updated | String | 2020-11-10T16:03:06+08:00 |
任务更新时间。 |
state | String | running |
代表任务的运行状态。取值:
|
task_type | String | cluster_scaleout |
任务类型,扩容任务的类型为 |
task_result | Array of task |
任务执行详情。 |
|
data | String | i-xxx |
任务操作的资源,例如:扩容时操作资源是实例,那么此处就是实例ID。 |
status | String | success |
资源扩容的状态。取值:
|
查询任务详情示例
请求示例
GET /tasks/T-5faa48fb31b6b8078d00**** HTTP/1.1
Content-Type:application/json
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<cluster_id>c78592bfe92244365b3c3ad47f1de****</cluster_id>
<task_id>T-5faa48fb31b6b8078d000006</task_id>
<created>2020-11-10T16:02:04+08:00</created>
<updated>2020-11-10T16:03:06+08:00</updated>
<state>running</state>
<task_type>cluster_scaleout</task_type>
<task_result>
<data>i-xxx</data>
<status>success</status>
</task_result>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"cluster_id" : "c78592bfe92244365b3c3ad47f1de****",
"task_id" : "T-5faa48fb31b6b8078d000006",
"created" : "2020-11-10T16:02:04+08:00",
"updated" : "2020-11-10T16:03:06+08:00",
"state" : "running",
"task_type" : "cluster_scaleout",
"task_result" : [ {
"data" : "i-xxx",
"status" : "success"
} ]
}
错误码
访问错误中心查看更多错误码。