All Products
Search
Document Center

ApsaraDB for Redis:DescribeActiveOperationTask

Last Updated:Nov 03, 2023

The list of O\\\&M tasks.

Operation Description

Specifies whether to return the historical tasks. Valid values:

  • 0: returns the current task. This is the default value.
  • 1: returns the historical tasks.

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionstringYes

The ID of the O&M task.

all
TaskTypestringYes

The ID of the region.

all
IsHistoryintegerNo

The time when the O&M task was created. The time in UTC is displayed in the yyyy-MM-ddTHH:mm:ssZ format.

1
PageSizeintegerNo

The number of entries to return on each page. Specify a value greater than 10. Default value: 30.

30
PageNumberintegerNo

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object
PageNumberinteger

The number of the page to return. It must be an integer that is greater than 0 and less than or equal to the maximum value supported by the integer data type. Default value: 1.

1
RequestIdstring

The time when the O&M task was executed. The time in UTC is displayed in the yyyy-MM-ddTHH:mm:ssZ format.

2E1FF0CC-F42A-4B6F-A1F4-A17B1451****
PageSizeinteger

The total number of entries.

30
TotalRecordCountinteger

The ID of the region to which pending events belong. You can call the DescribeRegions operation to query the region IDs.

Note A value of all indicates all region IDs.
1
Itemsobject []

The O&M tasks of the instance.

Statusinteger

The state of the O&M task. Valid values:

  • 2: The task is waiting for users to specify a switchover time.
  • 3: The task is waiting to be performed.
  • 4: The task is being performed. If the task is in this state, the ModifyActiveOperationTask operation cannot be called to modify the scheduled switchover time.
  • 5: The task is performed.
  • 6: The task fails.
  • 7: The task is canceled.
5
Deadlinestring

The deadline before which the time to perform the O&M task can be modified. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-07-19 23:59:59
PrepareIntervalstring

The required preparation period between the task start time and the switchover time. The time is displayed in the HH:mm:ss format.

14:00:00
TaskTypestring

The type of the task. Valid values:

  • rds_apsaradb_ha: primary/secondary switchover
  • rds_apsaradb_transfer: instance migration
  • rds_apsaradb_upgrade: minor version update
  • all: all types
rds_apsaradb_upgrade
StartTimestring

The time when the O&M task was performed. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-07-19 10:00:00
ModifiedTimestring

The time when the O&M task was modified. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-07-19 14:00:00
InsNamestring

The ID of the ApsaraDB for Redis instance.

r-bp1lgal1sdvxrz****
DbTypestring

The engine type of the instance. The return value is Redis.

redis
Regionstring

The region ID.

cn-hanghzou
CreatedTimestring

The time when the O&M task was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-07-15 23:59:59
Idinteger

The ID of the O&M task.

114111
SwitchTimestring

The time when the switchover operation was performed. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-07-19 14:00:00

Examples

Sample success responses

JSONformat

{
  "PageNumber": 1,
  "RequestId": "2E1FF0CC-F42A-4B6F-A1F4-A17B1451****",
  "PageSize": 30,
  "TotalRecordCount": 1,
  "Items": [
    {
      "Status": 5,
      "Deadline": "2018-07-19 23:59:59",
      "PrepareInterval": "14:00:00",
      "TaskType": "rds_apsaradb_upgrade",
      "StartTime": "2018-07-19 10:00:00",
      "ModifiedTime": "2018-07-19 14:00:00",
      "InsName": "r-bp1lgal1sdvxrz****",
      "DbType": "redis",
      "Region": "cn-hanghzou",
      "CreatedTime": "2018-07-15 23:59:59",
      "Id": 114111,
      "SwitchTime": "2018-07-19 14:00:00"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400RequiredParam.NotFoundRequired input param is not found.

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