Queries the response of an asynchronous API operation for a cluster.
Operation description
If you succeed in calling an asynchronous API operation, a response is generated before a resulting task is completed. Therefore, to query the result of the task, you can use the TaskId parameter returned by the API operation.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The ID of the cluster. You can call the ListClusters operation to obtain the cluster ID. | ehpc-hz-FYUr32**** |
PageNumber | integer | No | The number of the page to return. Pages start from page 1. Valid values: 1 to 999. | 1 |
PageSize | integer | No | The number of entries to return on each page. Valid values: 1 to 50. Default value: 10 | 10 |
TaskId | string | No | The ID of the task. 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 | Invalid param: %s | - |
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.