Queries the status of the tasks that are generated based on API operations, such as the status of instance creation tasks.
Operation description
- You can call this operation to view the details of a task that is generated by a specific API operation or in the console. The system calls the specific API operation when you perform an operation in the console. For example, you can view the details of the task when you call the CreateDBCluster operation or create a cluster in the console.
- You can view the details of tasks that are generated only when you call the CreateDBCluster operation to create a cluster and
CreationOption
is not set toCreateGdnStandby
.
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:
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
polardb:DescribeTasks | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | No | The cluster ID. Note
You must specify DBNodeId or DBClusterId . You can call the DescribeDBClusters operation to query the details of the clusters that belong to your Alibaba Cloud account, such as cluster IDs.
| pc-*************** |
DBNodeId | string | No | The node ID. Note
You must specify DBNodeId or DBClusterId . You can call the DescribeDBClusters operation to query the details of the clusters that belong to your Alibaba Cloud account, such as node IDs.
| pi-*************** |
StartTime | string | Yes | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the | 2020-11-30T00:00Z |
EndTime | string | Yes | The end of the time range to query. Specify the time in the ISO 8601 standard in the | 2020-12-02T03:00Z |
Status | string | No | The state of the tasks that you want to query. Valid values:
Note
| Running |
PageSize | integer | No | The number of entries to return per page. Valid values: 30, 50, and 100. Default value: 30. | 30 |
PageNumber | integer | No | The page number of the page to return. The value is an integer that is greater than 0. Default value: 1. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalRecordCount": 1,
"PageRecordCount": 30,
"Tasks": {
"Task": [
{
"FinishTime": "2020-12-02T02:40:15Z",
"StepsInfo": "[{\\\"remain\\\":0,\\\"name\\\":\\\"init_task\\\",\\\"progress\\\":100},{\\\"remain\\\":1764,\\\"name\\\":\\\"create_instance\\\",\\\"progress\\\":0},{\\\"remain\\\":1,\\\"name\\\":\\\"init_cluster\\\",\\\"progress\\\":0},{\\\"remain\\\":2,\\\"name\\\":\\\"create_backup\\\",\\\"progress\\\":0}]",
"Progress": 100,
"ExpectedFinishTime": "null",
"BeginTime": "2020-12-02T02:39:15Z",
"TaskErrorCode": "null",
"ProgressInfo": "null",
"CurrentStepName": "create_instance",
"StepProgressInfo": "1/4",
"TaskErrorMessage": "null",
"TaskAction": "CreateDBInstance",
"DBName": "test",
"Remain": 1767,
"TaskId": "111111111"
}
]
},
"EndTime": "2020-12-02T03:00Z",
"RequestId": "4352AD99-9FF5-41A6-A319-068089******",
"PageNumber": 1,
"StartTime": "2020-11-30T00:00Z",
"DBClusterId": "pc-***************"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2023-09-12 | The Error code has changed | see changesets | ||||
|