All Products
Search
Document Center

ApsaraDB RDS:DescribeTasks

Last Updated:Sep 13, 2024

You can call the DescribeTasks operation to query the tasks that are running on an instance.

Operation description

This operation is phased out.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DescribeTasksget
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

rm-uf6wjk5xxxxxxxxxx
StartTimestringNo

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.

2020-11-20T01:00Z
EndTimestringNo

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.

2020-11-20T02:00Z
PageSizeintegerNo

The number of entries to return on each page. Valid values: 30 to 100. Default value: 30.

30
PageNumberintegerNo

The number of the page to return. Valid values: any non-zero positive integer. Default value: 1.

1
StatusstringNo

The status of the task. This parameter is invalid.

2
TaskActionstringNo

The operation that is used by the task.

CreateInstance

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

A103039D-B1B2-4C57-B989-7D7C0DA95426
PageNumberinteger

The page number of the returned page.

1
PageRecordCountinteger

The number of entries on the current page.

30
TotalRecordCountinteger

The total number of returned entries.

40
Itemsarray<object>

The details of the task execution.

object
Statusstring

The status of the task.

2
FinishTimestring

The end time of the task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

2020-11-20T02:00Z
Progressstring

The progress of the task in percentage.

100
StepsInfostring

The details of the subtasks.

null
BeginTimestring

The start time of the task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC .

2020-11-20T01:00Z
ExpectedFinishTimestring

The estimated end time of the task.

Note In most cases, this parameter is empty.
null
TaskErrorCodestring

The error code that is returned when an error occurs.

Note This parameter is returned only when an error occurs.
null
CurrentStepNamestring

The name of the subtask.

create_instance
ProgressInfostring

The description of the task progress.

Note If no progress description is provided for the task, this parameter is empty.
null
StepProgressInfostring

The progress of the subtask. For example, a value of 1/4 indicates that the task consists of four subtasks and the first subtask is in progress.

1/4
TaskErrorMessagestring

The error message that is returned when an error occurs.

Note This parameter is returned only when an error occurs.
null
TaskActionstring

The operation that is used by the task, such as CreateDBInstance.

CreateDBInstance
Remaininteger

The estimated remaining time of the task. Unit: seconds.

Note If the task is not running, this parameter is not returned or the returned value is 0.
60
DBNamestring

The name of the database. If the task involves a database, the database name is returned.

DBtest
TaskIdstring

The ID of the task.

3472xxxxx

Examples

Sample success responses

JSONformat

{
  "RequestId": "A103039D-B1B2-4C57-B989-7D7C0DA95426",
  "PageNumber": 1,
  "PageRecordCount": 30,
  "TotalRecordCount": 40,
  "Items": {
    "TaskProgressInfo": [
      {
        "Status": "2",
        "FinishTime": "2020-11-20T02:00Z",
        "Progress": "100",
        "StepsInfo": "null",
        "BeginTime": "2020-11-20T01:00Z",
        "ExpectedFinishTime": "null",
        "TaskErrorCode": "null",
        "CurrentStepName": "create_instance",
        "ProgressInfo": "null",
        "StepProgressInfo": "1/4",
        "TaskErrorMessage": "null",
        "TaskAction": "CreateDBInstance",
        "Remain": 60,
        "DBName": "DBtest",
        "TaskId": "3472xxxxx"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400IO.ExceptionIO exception, retry later.An I/O error occurred.
400InvokeServiceFailedInvoke service failed, retry later.A request error occurred. Please try again later.

For a list of error codes, visit the Service error codes.