All Products
Search
Document Center

Elastic High Performance Computing:ListTasks

Last Updated:Sep 10, 2026

Queries the results of asynchronous API operations in a specified cluster.

Operation description

For some asynchronous API operations such as AddNodes, a successful request immediately returns a result without waiting for the node to be created. You can use the TaskId returned by the operation to query the specific task execution result.

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

ehpc:ListTasks

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The ID of the cluster that you want to query.

You can call ListClusters to obtain the cluster ID.

ehpc-hz-FYUr32****

PageNumber

integer

No

The page number to display. The value starts from 1. Valid values: 1 to 999.

1

PageSize

integer

No

The number of entries per page. Valid values: 1 to 50.

Default value: 10.

10

TaskId

string

No

The task ID. You can call the following asynchronous API operations to obtain the corresponding TaskId.

B745C159-3155-4B94-95D0-4B73D4D2****

Archived

boolean

No

Specifies whether to display historical results of completed asynchronous API operations. Valid values:

  • true: Displays results of both running and completed tasks.

  • false: Displays results of only running tasks. If no tasks are running, the task field returns [].

Default value: false.

Note

This parameter does not take effect if you specify the TaskId parameter.

Valid values:

  • false :

    displays results of only running tasks.

  • true :

    displays results of both running and completed tasks.

false

Response elements

Element

Type

Description

Example

object

PageSize

integer

The number of entries per page.

10

RequestId

string

The request ID.

89A1AC0F-4A6C-4F3D-98F9-BEF9A823****

PageNumber

integer

The current page number.

1

TotalCount

integer

The total number of entries in the task list.

10

Tasks

array<object>

The list of task information.

object

The list of task information.

Status

string

The task execution status. Valid values:

  • Processing: running

  • Success: succeeded

  • Fail: failed

  • PartialFail: partially failed

Processing

TaskType

string

The task type. Valid values:

  • CreateCluster: creates a cluster. The corresponding API operation is CreateCluster.

  • StartCluster: starts a cluster. The corresponding API operation is StartCluster.

  • StopCluster: stops a cluster. The corresponding API operation is StopCluster.

  • DeleteCluster: releases a cluster. The corresponding API operation is DeleteCluster.

  • AddComputes: adds nodes to a cluster. The corresponding API operation is AddNodes.

  • StartComputes: starts nodes. The corresponding API operation is StartNodes.

  • ResetComputes: resets nodes. The corresponding API operation is ResetNodes.

  • StopComputes: stops nodes. The corresponding API operation is StopNodes.

  • DeleteComputes: deletes nodes. The corresponding API operation is DeleteNodes.

StopCluster

TotalSteps

integer

The total number of steps in the task.

35

CurrentStep

integer

The current step number of the task.

16

Result

string

The task execution result. Valid values:

  • If TaskType is CreateCluster or AddComputes, the format is {"Instances":[]}, which indicates the information about nodes added to the cluster.

  • If TaskType is any value other than CreateCluster or AddComputes, the format is {}.

{\"Instances\":[{\"InstanceId\":\"i-bp1inb1j2xz8pnoi****\",\"Ip\":\"192.168.*.*\",\"Hostname\":\"login0\",\"role\":\"login\"}]}

Errors

string

The list of task execution error messages.

You can view error messages and corresponding solutions in the Error Center.

[]

TaskId

string

The task ID.

B745C159-3155-4B94-95D0-4B73D4D2****

Request

string

The request parameter information of the task in JSON string format.

{\"requestId\":\"0A6CA33E-BFBF-4F92-BDAE-4E8860DA****\",\"uid\":\"160998252992****\",\"bid\":\"268**\",\"clusterId\":\"ehpc-hz-ysQtcZ****\"}

ClusterId

string

The cluster ID.

ehpc-hz-FYUr32****

Examples

Success response

JSON format

{
  "PageSize": 10,
  "RequestId": "89A1AC0F-4A6C-4F3D-98F9-BEF9A823****",
  "PageNumber": 1,
  "TotalCount": 10,
  "Tasks": [
    {
      "Status": "Processing",
      "TaskType": "StopCluster",
      "TotalSteps": 35,
      "CurrentStep": 16,
      "Result": "{\\\"Instances\\\":[{\\\"InstanceId\\\":\\\"i-bp1inb1j2xz8pnoi****\\\",\\\"Ip\\\":\\\"192.168.*.*\\\",\\\"Hostname\\\":\\\"login0\\\",\\\"role\\\":\\\"login\\\"}]}",
      "Errors": "[]",
      "TaskId": "B745C159-3155-4B94-95D0-4B73D4D2****",
      "Request": "{\\\"requestId\\\":\\\"0A6CA33E-BFBF-4F92-BDAE-4E8860DA****\\\",\\\"uid\\\":\\\"160998252992****\\\",\\\"bid\\\":\\\"268**\\\",\\\"clusterId\\\":\\\"ehpc-hz-ysQtcZ****\\\"}",
      "ClusterId": "ehpc-hz-FYUr32****"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParams The specified parameter %s is invalid. The specified parameter %s is invalid.
400 NotEnabled You have not enabled this service You have not enabled this service
500 UnknownError An unknown error occurred. An unknown error occurred.
404 ClusterNotFound The specified cluster does not exist. The specified instance does not exist.
503 ServiceUnavailable The request has failed due to a temporary failure of the server The request has failed due to a temporary failure of the server.
406 DbError A database service error occurred. Database request failed.
406 RedisError A Redis service error occurred. Redis request failed.
407 NotAuthorized You are not authorized by RAM for this request. The request is not authorized by RAM.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.