You can call the DescribeTasks operation to query the tasks that are running on an instance.
Operation Description
The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.
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 |
---|---|---|---|---|
rds:DescribeTasks | READ |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. | rm-uf6wjk5xxxxxxxxxx |
StartTime | string | No | The number of entries to return on each page. Valid values: 30 to 100. Default value: 30. | 2020-11-20T01:00Z |
EndTime | string | No | The number of the page to return. Valid values: any non-zero positive integer. Default value: 1. | 2020-11-20T02:00Z |
PageSize | integer | No | The status of the task. This parameter is invalid. | 30 |
PageNumber | integer | No | The operation that is used by the task. | 1 |
Status | string | No | The ID of the request. | 2 |
TaskAction | string | No | The page number of the returned page. | CreateInstance |
Response parameters
Examples
Sample success responses
JSON
format
{"TotalRecordCount":"40","PageRecordCount":"30","RequestId":"A103039D-B1B2-4C57-B989-7D7C0DA95426","PageNumber":"1","Items":{"TaskProgressInfo":[{"Status":"2","ExpectedFinishTime":"null","Progress":"100","Remain":"60","TaskId":"3472xxxxx","TaskAction":"CreateDBInstance","BeginTime":"2020-11-20T01:00Z","TaskErrorMessage":"null","StepProgressInfo":"1/4","FinishTime":"2020-11-20T02:00Z","CurrentStepName":"create_instance","StepsInfo":"null","ProgressInfo":"null","DBName":"DBtest","TaskErrorCode":"null"}]}}
XML
format
<TotalRecordCount>40</TotalRecordCount>
<PageRecordCount>30</PageRecordCount>
<RequestId>A103039D-B1B2-4C57-B989-7D7C0DA95426</RequestId>
<PageNumber>1</PageNumber>
<Items>
<TaskProgressInfo>
<Status>2</Status>
<ExpectedFinishTime>null</ExpectedFinishTime>
<Progress>100</Progress>
<Remain>60</Remain>
<TaskId>3472xxxxx</TaskId>
<TaskAction>CreateDBInstance</TaskAction>
<BeginTime>2020-11-20T01:00Z</BeginTime>
<TaskErrorMessage>null</TaskErrorMessage>
<StepProgressInfo>1/4</StepProgressInfo>
<FinishTime>2020-11-20T02:00Z</FinishTime>
<CurrentStepName>create_instance</CurrentStepName>
<StepsInfo>null</StepsInfo>
<ProgressInfo>null</ProgressInfo>
<DBName>DBtest</DBName>
<TaskErrorCode>null</TaskErrorCode>
</TaskProgressInfo>
</Items>
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IO.Exception | IO exception, retry later. | An I/O error occurred. |
400 | InvokeServiceFailed | Invoke service failed, retry later. | A request error occurred. Please try again later. |
For a list of error codes, visit the Service error codes.