All Products
Search
Document Center

Container Service for Kubernetes:DescribeClusterTasks

Last Updated:Nov 07, 2024

Queries tasks in a Container Service for Kubernetes (ACK) cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cs:DescribeClusterTasksget
  • Cluster
    acs:cs:{#regionId}:{#accountId}:cluster/{#cluster_id}
    none
none

Request syntax

GET /clusters/{cluster_id}/tasks HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
cluster_idstringNo

The ID of the cluster.

c23421cfa74454bc8b37163fd19af****
page_sizeintegerNo

The number of entries per page.

20
page_numberintegerNo

The page number.

1

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

page_infoobject

The pagination information.

page_sizelong

The number of entries per page.

10
page_numberlong

The number of the page returned.

1
total_countlong

The total number of entries returned.

10
tasksarray<object>

The information about the tasks.

taskobject
task_idstring

The task ID.

install-addons-c3xxxxxx
task_typestring

The type of task.

cluster_addon_install
statestring

The status of the task.

success
createdstring

The time when the task was created.

2022-08-03T10:11:33+08:00
updatedstring

The time when the task was updated.

2022-08-03T10:12:03.482+08:00
errorobject

The error returned for the task.

messagestring

The error message returned.

Addon status not match
codestring

The error code returned.

BadRequest
requestIdstring

The request ID.

0527ac9a-c899-4341-a21a-xxxxxxxxx

Examples

Sample success responses

JSONformat

{
  "page_info": {
    "page_size": 10,
    "page_number": 1,
    "total_count": 10
  },
  "tasks": [
    {
      "task_id": "install-addons-c3xxxxxx",
      "task_type": "cluster_addon_install",
      "state": "success",
      "created": "2022-08-03T10:11:33+08:00",
      "updated": "2022-08-03T10:12:03.482+08:00",
      "error": {
        "message": "Addon status not match",
        "code": "BadRequest"
      }
    }
  ],
  "requestId": "0527ac9a-c899-4341-a21a-xxxxxxxxx"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-23The request parameters of the API has changedView Change Details
2022-08-03Add OperationView Change Details