All Products
Search
Document Center

Tair (Redis® OSS-Compatible):DescribeActiveOperationTask

Last Updated:Oct 30, 2024

Queries the detailed information about O\&M tasks of an ApsaraDB for Redis instance.

Operation description

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

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.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionstringYes

The region ID of the O&M task. You can call the DescribeRegions operation to query the most recent region list.

Note A value of all indicates all region IDs.
all
TaskTypestringYes

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

  • rds_apsaradb_ha: master-replica switchover
  • rds_apsaradb_transfer: instance migration
  • rds_apsaradb_upgrade: minor version update
all
IsHistoryintegerNo

Specifies whether to return the historical tasks. Default value: 0. Valid values:

  • 0: returns the current task.
  • 1: returns the historical tasks.
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 page number of the returned page.

1
RequestIdstring

The ID of the request.

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

The maximum number of entries returned per page.

30
TotalRecordCountinteger

The total number of returned entries.

1
Itemsarray<object>

Details of O&M tasks.

Itemsobject
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 preform the O&M task can be modified. The time in UTC is displayed in the yyyy-MM-ddTHH:mm:ssZ format.

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: master-replica 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 preformed. 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 instance.

r-bp1lgal1sdvxrz****
DbTypestring

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

redis
Regionstring

The region ID of the instance.

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 system performs the switchover operation. 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 messageDescription
400RequiredParam.NotFoundRequired input param is not found.Missing input parameter

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

Change history

Change timeSummary of changesOperation
No change history