All Products
Search
Document Center

ApsaraDB for Redis:DescribeTasks

Last Updated:Feb 20, 2024

Queries all tasks that are performed on an ApsaraDB for Redis instance within a specified period of time.

Operation description

You can call this operation to query the progress of a task when you perform time-consuming operations. You can also log on to the ApsaraDB for Redis console and click the Tasks icon in the upper-right corner of the Instance Information page to view the progress of the current task.

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
kvstore:DescribeTasksRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance. You can call the DescribeInstances operation to query instance IDs.

r-bp1zxszhcgatnx****
PageSizeintegerNo

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

30
PageNumberintegerNo

The number of the page to return. The value must be an integer that is greater than 0 and does not exceed the maximum value of the Integer data type. Default value: 1.

1
StartTimestringYes

The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

2020-11-20T01:00Z
EndTimestringYes

The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

2020-11-26T01:00Z
StatusstringYes

The status of the task. Separate multiple values with commas (,). Valid values:

  • 0: The task is pending.
  • 1: The task is running.
  • 2: The task is complete.
  • 4: The task is closed.
  • 7: The task is paused.
  • 8: The task is interrupted.
2

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

608FAEC9-485E-4C65-82DE-2E5B955E****
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned on each page.

30
TotalRecordCountinteger

The total number of entries.

2
Itemsobject []

The details of the task.

Statusstring

The status of the task. Valid values:

  • 0: The task is pending.
  • 1: The task is running.
  • 2: The task is complete.
  • 4: The task is closed.
  • 7: The task is paused.
  • 8: The task is interrupted.
2
FinishTimestring

The end time of the task. The time follows the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2020-11-13T06:17:18Z
StepsInfostring

The information about the subtask in the JSON format. This includes the expected remaining duration (remain), the name of the subtask (name), and the task progress (progress).

Note If the subtask does not exist, this parameter is not returned.
[{\"remain\":0,\"name\":\"init_instance\",\"progress\":100},{\"remain\":107,\"name\":\"init_redis\",\"progress\":12.3},{\"remain\":1881,\"name\":\"init_config\",\"progress\":0}]
Progressfloat

The progress of the task. Unit: %.

100
BeginTimestring

The beginning time of the task. The time follows the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2020-11-13T06:16:54Z
Remaininteger

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

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

The name of the subtask.

init_redis
StepProgressInfostring

The progress of the subtask.

Note If the subtask does not exist, this parameter is not returned.
3/3
TaskIdstring

The ID of the task.

32302****
TaskActionstring

The identifier of the task.

ModifyDBInstanceParameter

Examples

Sample success responses

JSONformat

{
  "RequestId": "608FAEC9-485E-4C65-82DE-2E5B955E****",
  "PageNumber": 1,
  "PageSize": 30,
  "TotalRecordCount": 2,
  "Items": [
    {
      "Status": "2",
      "FinishTime": "2020-11-13T06:17:18Z",
      "StepsInfo": "[{\\\"remain\\\":0,\\\"name\\\":\\\"init_instance\\\",\\\"progress\\\":100},{\\\"remain\\\":107,\\\"name\\\":\\\"init_redis\\\",\\\"progress\\\":12.3},{\\\"remain\\\":1881,\\\"name\\\":\\\"init_config\\\",\\\"progress\\\":0}]",
      "Progress": 100,
      "BeginTime": "2020-11-13T06:16:54Z",
      "Remain": 60,
      "CurrentStepName": "init_redis",
      "StepProgressInfo": "3/3",
      "TaskId": "32302****",
      "TaskAction": "ModifyDBInstanceParameter"
    }
  ]
}

Error codes

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