DescribeActiveOperationTask

Updated at:

Queries the details of O&M tasks.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dds:DescribeActiveOperationTask

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Region

string

Yes

The ID of the region to which the pending events belong. You can call the DescribeRegions operation to query region IDs. If you set this parameter to all, all tasks under the current account are queried, and the TaskType parameter must also be set to all.

cn-shanghai

TaskType

string

Yes

The task type. Valid values:

  • rds_apsaradb_ha: primary/secondary node switch.

  • rds_apsaradb_transfer: instance migration.

  • rds_apsaradb_upgrade: minor version update.

You can obtain the valid values from the DescribeHistoryTasks operation.

If you set this parameter to all, all tasks under the current account are queried, and the Region parameter must also be set to all.

rds_apsaradb_ha

IsHistory

integer

No

Specifies whether to return historical tasks. Valid values:

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

  • 1: returns historical tasks.

0

PageSize

integer

No

The maximum number of entries to return on each page. The value must be greater than 10. Default value: 30.

30

PageNumber

integer

No

The page number. The value must be greater than 0 and not exceed the maximum value of the Integer data type. Default value: 1.

1

ProductId

string

No

The product ID.

MongoDB

Response elements

Element

Type

Description

Example

object

TotalRecordCount

integer

The total number of entries.

0

RequestId

string

The request ID.

6FD47DC4-0750-5524-A89E-E7D559Cxxxxx

PageSize

integer

The number of entries returned per page. Default value: 30.

30

PageNumber

integer

The page number. Default value: 1.

1

Items

array<object>

The list of tasks.

object

Status

integer

The task status. Valid values:

  • 2: Waiting for the user to specify a time.

  • 3: Waiting to be processed.

  • 4: Processing. After the task enters this state, the scheduled switchover time cannot be modified.

  • 5: Succeeded.

  • 6: Failed.

  • 7: Canceled.

2

TaskParams

string

The task parameters.

""

PrepareInterval

string

The preparation time required between the start time and the switchover time of the O&M task. The format is HH:mm:ss.

14:00:00

Deadline

string

The latest time within the adjustable range for the execution time of the O&M task. The format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

2023-03-29T13:59:59Z

StartTime

string

The execution time of the O&M task. The format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

2023-03-20T02:40:00Z

TaskType

string

The task type. Valid values:

  • rds_apsaradb_ha: primary/secondary node switch.

  • rds_apsaradb_transfer: instance migration.

  • rds_apsaradb_upgrade: minor version update.

rds_apsaradb_ha

ModifiedTime

string

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

2023-02-24T08:18:53Z

InsName

string

The instance ID.

dds-bp12721xxxx9b914

DbType

string

The database type.

mongodb

Region

string

The region ID.

cn-beijing

ResultInfo

string

The execution result information.

""

CreatedTime

string

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

2024-11-06T13:11:08Z

Id

integer

The task ID.

50xx

SwitchTime

string

The switchover time of the O&M task. The format is yyyy-MM-ddTHH:mm:ssZ (UTC time).

2024-11-06T14:11:08Z

Examples

Success response

JSON format

{
  "TotalRecordCount": 0,
  "RequestId": "6FD47DC4-0750-5524-A89E-E7D559Cxxxxx",
  "PageSize": 30,
  "PageNumber": 1,
  "Items": [
    {
      "Status": 2,
      "TaskParams": "\"\"",
      "PrepareInterval": "14:00:00",
      "Deadline": "2023-03-29T13:59:59Z",
      "StartTime": "2023-03-20T02:40:00Z",
      "TaskType": "rds_apsaradb_ha",
      "ModifiedTime": "2023-02-24T08:18:53Z",
      "InsName": "dds-bp12721xxxx9b914",
      "DbType": "mongodb",
      "Region": "cn-beijing",
      "ResultInfo": "\"\"",
      "CreatedTime": "2024-11-06T13:11:08Z",
      "Id": 0,
      "SwitchTime": "2024-11-06T14:11:08Z\n"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 RequiredParam.NotFound Required input param is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.