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