All Products
Search
Document Center

:Query node details

更新时间:Nov 13, 2023

You can call the DescribeTaskInfo operation to query the execution details about a task by task ID.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request syntax

GET /tasks/{task_id} HTTP/1.1

Request parameters

Parameter

Type

Position

Required

Example

Description

task_id String Path Yes T-5faa48fb31b6b8078d00****

The ID of the task.

Response parameters

Parameter

Type

Example

Description

task_id String T-5faa48fb31b6b8078d000006

The ID of the task.

cluster_id String c78592bfe92244365b3c3ad47f1de****

The cluster ID.

task_type String cluster_scaleout

The task type. A value of cluster_scaleout indicates a scale-out task.

state String running

The status of the task. Valid values:

  • running: The task is running.
  • failed: The task failed.
  • success: The task is completed.
created String 2020-11-10T16:02:04+08:00

The time when the task was created.

updated String 2020-11-10T16:03:06+08:00

The time when the task was updated.

target Object

The object of the task.

id String c78592bfe92244365b3c3ad47f1de****

The ID of the object.

type String cluster

The type of the object.

parameters Map

The task parameters.

stages Array of stages

Detailed information about the stage of the task.

state String running

The status of the stage.

start_time String 2022-12-15 23:00:00

The start time of the stage.

end_time String 2022-12-15 23:00:00

The end time of the stage.

message String success to xxxxx

The message about the stage.

outputs Map

The output generated at the stage.

current_stage String DrainNodes

The current stage of the task.

events Array of events

The event generated by the task.

action String start

The action of the event.

level String Normal

The severity level of the event.

message String start to xxx

The message about the event.

reason String NodePoolUpgradeStart

The cause of the event.

source String ACK

The source of the event.

timestamp String 1669706229286

The timestamp when the event was generated.

task_result Array of task

The execution result of the task.

data String i-xxx

The resources that are managed by the task. For a scale-out task, the value of this parameter is the ID of the instance that is added by the task.

status String success

The scaling status of the resource. Valid values:

  • success: The scale-out task is successful.
  • success: The scale-out task failed.
  • initial: The scale-out task is being initialized.
error Object

The error returned for the task.

code String 400

The error code.

message String failed to xxx

The error message that is returned.

Examples

Sample requests

GET /tasks/T-5faa48fb31b6b8078d00**** HTTP/1.1 
Content-Type:application/json

Sample success responses

XML format

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 format

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"
  } ]
}

Error codes

For a list of error codes, see Service error codes.