All Products
Search
Document Center

Container Service for Kubernetes:DescribeTaskInfo

Last Updated:May 12, 2026

Use the DescribeTaskInfo operation to query details about a cluster task, such as its task type, running state, and running stage.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cs:DescribeTaskInfo

get

*All Resource

*

None None

Request syntax

GET /tasks/{task_id} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

task_id

string

Yes

The task ID.

T-5faa48fb31b6b8078d00****

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response body.

task_id

string

The task ID.

T-5faa48fb31b6b8078d000006

cluster_id

string

The cluster ID.

c78592bfe92244365b3c3ad47f1de****

task_type

string

The type of the task. For a scale-out task, the value is cluster_scaleout.

cluster_scaleout

state

string

The state of the task. Valid values:

  • running: The task is in progress.

  • fail: The task failed.

  • success: The task succeeded.

running

created

string

The time the task was created.

2020-11-10T16:02:04+08:00

updated

string

The time the task was last updated.

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

target

object

The target of the task.

id

string

The ID of the task target.

c78592bfe92244365b3c3ad47f1de****

type

string

The type of the task target.

cluster

parameters

object

The task parameters.

stages

array<object>

The task stages.

array<object>

A task stage.

state

string

The state of the task stage.

running

start_time

string

The start time of the task stage.

2022-12-15 23:00:00

end_time

string

The end time of the task stage.

2022-12-15 23:00:00

message

string

The message for the task stage.

success to xxxxx

outputs

object

The output of the task stage.

current_stage

string

The current stage of the task.

DrainNodes

events

array<object>

Events generated by the task.

object

The event details.

action

string

The event action.

start

level

string

The event level.

Normal

message

string

The event message.

start to xxx

reason

string

The reason for the event.

NodePoolUpgradeStart

source

string

The source of the event.

ACK

timestamp

string

The time the event was generated.

1669706229286

task_result

array<object>

The details of the task execution.

object

The result for a specific resource.

data

string

The resource that the task operates on. For example, for a scale-out task that operates on an instance, this field is the instance ID.

i-xxx

status

string

The scale-out state of the resource. Valid values:

  • success: The scale-out succeeded.

  • failed: The scale-out failed.

  • initial: The resource is initializing.

success

error

object

Error information for the task.

code

string

The error code.

400

message

string

The error message.

failed to xxx

outputs

object

Examples

Success response

JSON format

{
  "task_id": "T-5faa48fb31b6b8078d000006",
  "cluster_id": "c78592bfe92244365b3c3ad47f1de****",
  "task_type": "cluster_scaleout",
  "state": "running",
  "created": "2020-11-10T16:02:04+08:00",
  "updated": "2020-11-10T16:03:06+08:00",
  "target": {
    "id": "c78592bfe92244365b3c3ad47f1de****\n",
    "type": "cluster"
  },
  "parameters": {
    "test": "test",
    "test2": 1
  },
  "stages": [
    {
      "state": "running",
      "start_time": "2022-12-15 23:00:00",
      "end_time": "2022-12-15 23:00:00",
      "message": "success to xxxxx",
      "outputs": {
        "test": "test",
        "test2": 1
      }
    }
  ],
  "current_stage": "DrainNodes",
  "events": [
    {
      "action": "start",
      "level": "Normal",
      "message": "start to xxx",
      "reason": "NodePoolUpgradeStart",
      "source": "ACK",
      "timestamp": "1669706229286"
    }
  ],
  "task_result": [
    {
      "data": "i-xxx",
      "status": "success"
    }
  ],
  "error": {
    "code": "400",
    "message": "failed to xxx"
  },
  "outputs": {
    "test": "test",
    "test2": 1
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.