Queries the information about operations and maintenance (O&M) tasks for an ApsaraDB for Redis instance.

After you have called this API operation and queried the information about a specific O&M task, you can also call the ModifyActiveOperationTask operation to modify the scheduled switchover time of the O&M task.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeActiveOperationTask

The operation that you want to perform. Set the value to DescribeActiveOperationTask.

Region String Yes all

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.
TaskType String Yes all

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

  • rds_apsaradb_ha: switchover between a master node and a replica node.
  • rds_apsaradb_transfer: instance migration task.
  • rds_apsaradb_upgrade: minor version upgrade.
  • all: all task types.
RegionId String No cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query the region IDs.

IsHistory Integer No 1

Specifies whether to return the historical tasks. Valid values:

  • 0: returns the current task. This is the default value.
  • 1: returns the historical tasks.
PageSize Integer No 30

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

PageNumber Integer No 1

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.

Response parameters

Parameter Type Example Description
Items Array of Items

The list of O&M tasks.

CreatedTime String 2018-07-15 23:59:59

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

DbType String redis

The database type of the instance. The returned value is Redis.

Deadline String 2018-07-19 23:59:59

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

Id Integer 114111

The ID of the O&M task.

InsName String r-bp1lgal1sdvxrz****

The ID of the ApsaraDB for Redis instance.

ModifiedTime String 2018-07-19 14:00:00

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

PrepareInterval String 14:00:00

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

Region String cn-hanghzou

The ID of the region.

StartTime String 2018-07-19 10:00:00

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

Status Integer 5

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

  • 2: The O&M task is waiting until the specified time.
  • 3: The O&M task is waiting to be handled.
  • 4: The O&M task is being executed. You cannot call the ModifyActiveOperationTask operation to modify the time if the task is in this state.
  • 5: The O&M task succeeded
  • 6: The O&M task failed
  • 7: The O&M task is canceled.
SwitchTime String 2018-07-19 14:00:00

The time when the system performs the switchover operation. The time in UTC is displayed in the yyyy-MM-ddTHH:mm:ssZ format.

TaskType String rds_apsaradb_upgrade

The type of the task. Valid values:

  • rds_apsaradb_ha: switchover between a master node and a replica node.
  • rds_apsaradb_transfer: instance migration task.
  • rds_apsaradb_upgrade: minor version upgrade.
  • all: all task types.
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 30

The maximum number of entries that were returned per page.

RequestId String 2E1FF0CC-F42A-4B6F-A1F4-A17B1451****

The ID of the request.

TotalRecordCount Integer 1

The total number of entries.

Examples

Sample requests

http(s)://https://r-kvstore.aliyuncs.com/?Action=DescribeActiveOperationTask
&Region=all
&TaskType=all
&<Common request parameters>

Sample success responses

XML format

<DescribeActiveOperationTaskResponse>
      <TotalRecordCount>1</TotalRecordCount>
      <RequestId>2E1FF0CC-F42A-4B6F-A1F4-A17B1451****</RequestId>
      <PageSize>30</PageSize>
      <PageNumber>1</PageNumber>
      <Items>
            <Status>5</Status>
            <CreatedTime>2019-10-17T20:28:31Z</CreatedTime>
            <Deadline>2019-10-21T15:59:59Z</Deadline>
            <StartTime>2019-10-17T17:50:00Z</StartTime>
            <InsName>r-bp1lgal1sdvxrz****</InsName>
            <DbType>redis</DbType>
            <ModifiedTime>2019-10-17T20:28:31Z</ModifiedTime>
            <TaskType>rds_apsaradb_upgrade</TaskType>
            <PrepareInterval>01:00:00</PrepareInterval>
            <Region>cn-hangzhou</Region>
            <Id>114111</Id>
            <SwitchTime>2019-10-17T18:50:00Z</SwitchTime>
      </Items>
</DescribeActiveOperationTaskResponse>

JSON format

{
    "TotalRecordCount": 1,
    "RequestId": "2E1FF0CC-F42A-4B6F-A1F4-A17B1451****",
    "PageSize": 30,
    "PageNumber": 1,
    "Items": [
        {
            "Status": 5,
            "CreatedTime": "2019-10-17T20:28:31Z",
            "Deadline": "2019-10-21T15:59:59Z",
            "StartTime": "2019-10-17T17:50:00Z",
            "InsName": "r-bp1lgal1sdvxrz****",
            "DbType": "redis",
            "ModifiedTime": "2019-10-17T20:28:31Z",
            "TaskType": "rds_apsaradb_upgrade",
            "PrepareInterval": "01:00:00",
            "Region": "cn-hangzhou",
            "Id": 114111,
            "SwitchTime": "2019-10-17T18:50:00Z"
        }
    ]
}

Error codes

For a list of error codes, visit the API Error Center.