All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeActiveOperationTasks

Last Updated:Jan 26, 2026

Queries the details of scheduled operations and maintenance (O&M) tasks for a 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:DescribeActiveOperationTasks

list

*Instance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

Region

string

No

The ID of the region where the pending event is located. Call the DescribeRegions operation to obtain the region ID.

Note

A value of all indicates all region IDs.

cn-beijing

TaskType

string

No

The task type. Valid values:

  • rds_apsaradb_ha: primary-secondary node switchover.

  • rds_apsaradb_transfer: instance migration.

  • rds_apsaradb_upgrade: minor version upgrade.

  • rds_apsaradb_maxscale: proxy minor version upgrade.

  • all: all task types.

all

PageSize

integer

No

The number of entries per page. Valid values: 30, 50, and 100. Default value: 30.

30

PageNumber

integer

No

The page number. The value must be greater than 0. Default value: 1.

1

ProductId

string

No

The product name. For MongoDB instances, set this parameter to MongoDB.

MongoDB

DbType

string

No

The database type. Default value: all.

mongoDb

Status

integer

No

The task status. This parameter filters the returned tasks.

  • -1: all tasks.

  • 3: pending tasks.

  • 4: running tasks.

  • 5: successfully completed tasks.

  • 6: failed tasks.

  • 7: canceled tasks.

-1

InsName

string

No

The name of the instance. This parameter is optional. You can specify only one instance name.

dds-bp16aaccfe10****

AllowChange

integer

No

Specifies whether the time can be changed. Valid values:

  • -1 (default): returns all tasks.

  • 0: returns only tasks whose time cannot be changed.

  • 1: returns only tasks whose time can be changed.

-1

AllowCancel

integer

No

Specifies whether the task can be canceled. Valid values:

  • -1 (default): returns all tasks.

  • 0: returns only tasks that cannot be canceled.

  • 1: returns only tasks that can be canceled.

-1

ChangeLevel

string

No

The level of the task. Valid values:

  • all (default): returns all tasks.

  • S0: returns tasks for exception fixing.

  • S1: returns tasks for system O&M.

***

ResourceGroupId

string

No

The resource group ID.

rg-acfmyiu4ekp****

Response elements

Element

Type

Description

Example

object

PageNumber

integer

The page number.

1

RequestId

string

The request ID.

111E7B16-0A87-4CBA-B271-F34AD61E****

PageSize

integer

The number of entries per page.

30

TotalRecordCount

integer

The number of returned task records.

1

Items

array<object>

The list of O&M tasks.

object

The list of O&M tasks.

Status

integer

The task status.

  • 3: pending.

  • 4: running.

  • 5: successful.

  • 6: failed.

  • 7: canceled.

3

ChangeLevelEn

string

The event level in English.

System maintenance

TaskType

string

The task type. Valid values:

  • rds_apsaradb_ha: primary-secondary node switchover.

  • rds_apsaradb_transfer: instance migration.

  • rds_apsaradb_upgrade: minor version upgrade.

  • rds_apsaradb_maxscale: proxy minor version upgrade.

  • all: all task types.

rds_apsaradb_upgrade

InsName

string

The instance name.

dds-bp16aaccfe10****

Region

string

The ID of the region where the pending event is located.

cn-beijing

ImpactZh

string

The impact of the event in Chinese.

实例闪断

CreatedTime

string

The time when the task was created. The time is in the yyyy-mm-ddThh:mm:ssZ format. The time is displayed in UTC.

2023-05-30T14:30:00Z

SwitchTime

string

The time when the switchover was initiated. The time is in the yyyy-mm-ddThh:mm:ssZ format. The time is displayed in UTC.

2023-05-30T14:30:00Z

ChangeLevelZh

string

The event level in Chinese.

系统运维

Deadline

string

The latest time to which the task execution time can be postponed. The time is in the yyyy-mm-ddThh:mm:ssZ format. The time is displayed in UTC.

2023-05-30T23:59:59Z

PrepareInterval

string

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

04:00:00

TaskTypeZh

string

The reason for the task in Chinese.

小版本升级

CurrentAVZ

string

The current zone.

cn-beijing-h

AllowChange

string

Indicates whether the time can be changed.

  • 1: The time can be changed.

  • 0: The time cannot be changed.

1

DbVersion

string

The database engine version number.

5.6

ImpactEn

string

The impact of the event in English.

Transient instance disconnection

InsComment

string

The alias or description of the instance.

test

StartTime

string

The time when the task was executed. The time is in the yyyy-mm-ddThh:mm:ssZ format. The time is displayed in UTC.

2023-05-30T00:00:00Z

ModifiedTime

string

The time when the task was modified. The time is in the yyyy-mm-ddThh:mm:ssZ format. The time is displayed in UTC.

2023-05-30T14:30:00Z

AllowCancel

string

Indicates whether the task can be canceled.

  • 1: The task can be canceled.

  • 0: The task cannot be canceled.

1

DbType

string

The database engine type.

mongoDb

ChangeLevel

string

The code of the event level.

  • S1: system O&M.

  • S0: threat fixing.

S1

TaskTypeEn

string

The reason for the task in English.

Minor version update

ResultInfo

string

The information about the execution result.

userCancel

Id

integer

The task ID.

11111

SubInsNames

array

The list of child instances.

string

The name of the child instance.

sub1369716295573-tes2cy6****.2013052818****

TaskParams

string

The task parameters.

""

Examples

Success response

JSON format

{
  "PageNumber": 1,
  "RequestId": "111E7B16-0A87-4CBA-B271-F34AD61E****",
  "PageSize": 30,
  "TotalRecordCount": 1,
  "Items": [
    {
      "Status": 3,
      "ChangeLevelEn": "System maintenance",
      "TaskType": "rds_apsaradb_upgrade",
      "InsName": "dds-bp16aaccfe10****",
      "Region": "cn-beijing\n",
      "ImpactZh": "实例闪断",
      "CreatedTime": "2023-05-30T14:30:00Z",
      "SwitchTime": "2023-05-30T14:30:00Z",
      "ChangeLevelZh": "系统运维",
      "Deadline": "2023-05-30T23:59:59Z",
      "PrepareInterval": "04:00:00",
      "TaskTypeZh": "小版本升级",
      "CurrentAVZ": "cn-beijing-h",
      "AllowChange": "1",
      "DbVersion": "5.6",
      "ImpactEn": "Transient instance disconnection\n",
      "InsComment": "test",
      "StartTime": "2023-05-30T00:00:00Z",
      "ModifiedTime": "2023-05-30T14:30:00Z\n",
      "AllowCancel": "1",
      "DbType": "mongoDb",
      "ChangeLevel": "S1",
      "TaskTypeEn": "Minor version update\n",
      "ResultInfo": "userCancel",
      "Id": 11111,
      "SubInsNames": [
        "sub1369716295573-tes2cy6****.2013052818****"
      ],
      "TaskParams": "\"\""
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.