All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeActiveOperationTask

Last Updated:Jan 26, 2026

Queries the detailed information about tasks of an ApsaraDB for MongoDB instance.

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 region ID of the instance.

Note

If you set the Region parameter to all, all tasks created within your Alibaba Cloud account are queried. In this case, you must set the taskType parameter to all.

cn-shanghai

TaskType

string

Yes

The type of the task. Valid values:

  • rds_apsaradb_ha: master-replica switchover

  • rds_apsaradb_transfer: instance migration

  • rds_apsaradb_upgrade: minor version update

rds_apsaradb_ha

IsHistory

integer

No

Specifies whether to return the historical tasks.

Default value: 0. Valid values:

  • 0: returns the current task.

  • 1: returns the historical tasks.

0

PageSize

integer

No

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

30

PageNumber

integer

No

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

1

ProductId

string

No

The ID of the product.

MongoDB

Response elements

Element

Type

Description

Example

object

TotalRecordCount

integer

The total number of returned entries.

0

RequestId

string

The request ID.

6FD47DC4-0750-5524-A89E-E7D559Cxxxxx

PageSize

integer

The number of entries returned per page.

30

PageNumber

integer

The page number of the returned page.

1

Items

array<object>

The list of tasks.

object

Status

integer

The state of the 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.

2

TaskParams

string

The task parameters.

""

PrepareInterval

string

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

Deadline

string

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

2023-03-29T13:59:59Z

StartTime

string

The time when the task was preformed. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.

2023-03-20T02:40:00Z

TaskType

string

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_ha

ModifiedTime

string

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

2023-02-24T08:18:53Z

InsName

string

The instance ID.

dds-bp12721xxxx9b914

DbType

string

The database type of the instance.

mongodb

Region

string

The region of the instance.

cn-beijing

ResultInfo

string

The result information.

""

CreatedTime

string

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

2024-11-06T13:11:08Z

Id

integer

The task ID.

50xx

SwitchTime

string

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.

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.