All Products
Search
Document Center

Container Service for Kubernetes:DescribeTaskInfo

Last Updated:May 12, 2026

Call DescribeTaskInfo to get details about a cluster task, such as the task type, running status, and running phase.

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 data returned in the response.

task_id

string

The ID of the task.

T-5faa48fb31b6b8078d000006

cluster_id

string

The ID of the cluster.

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 completed successfully.

running

created

string

The time when the task was created.

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

updated

string

The time when the task was last updated.

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

target

object

The object targeted by the task.

id

string

The ID of the target object.

c78592bfe92244365b3c3ad47f1de****

type

string

The type of the target object.

cluster

parameters

object

The parameters of the task.

stages

array<object>

The stages of the task.

array<object>

A stage of the task.

state

string

The state of the task stage.

running

start_time

string

The time when the task stage started.

2022-12-15 23:00:00

end_time

string

The time when the task stage ended.

2022-12-15 23:00:00

message

string

Information about 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>

The events generated by the task.

object

The details of an event.

action

string

The action of the event.

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. The value ACK indicates Container Service for Kubernetes (ACK).

ACK

timestamp

string

The timestamp of the event.

1669706229286

task_result

array<object>

The execution details of the task.

object

The execution result for a specific resource.

data

string

The resource targeted by the task. For example, if the task scales out an instance, this parameter returns the ID of the instance.

i-xxx

status

string

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

  • success: The scale-out completed successfully.

  • failed: The scale-out failed.

  • initial: The resource is initializing.

success

error

object

Information about the task error.

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.