Queries the response of an asynchronous API operation for a cluster.
Operation description
For some asynchronous API operations such as AddNodes, the system immediately returns a result without waiting for the node to be created if the request succeeds. In this case, you can use the TaskId returned by the asynchronous API operation to query the result of the task.
Debugging
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:
- For mandatory resource types, indicate with a prefix of * .
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ehpc:ListTasks | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. You can call the ListClusters operation to query the cluster ID. | ehpc-hz-FYUr32**** |
PageNumber | integer | No | The page number. Pages start from page 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 task ID. | B745C159-3155-4B94-95D0-4B73D4D2**** |
Archived | boolean | No | Specifies whether to display the response history of the asynchronous API operation. Valid values:
Default value: false. Note
If you specify the TaskId parameter, the Archived parameter is invalid.
| false |
Response parameters
Examples
Sample success responses
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 |
404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
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. |
500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|