All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeHistoryTasksStat

Last Updated:Aug 28, 2026

Queries the overview of tasks in the task center.

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:DescribeHistoryTasksStat

list

*Instance

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the pending event. You can call the DescribeRegions operation to query available regions.

cn-beijing

Status

string

No

The task status. Valid values:

  • Scheduled: The task is waiting to be executed.

  • Running: The task is running.

  • Succeed: The task is successful.

  • Failed: The task failed.

  • Cancelling: The task is being terminated.

  • Canceled: The task has been terminated.

  • Waiting: The task is waiting for scheduled time.

Separate multiple values with commas (,). Default value: empty, indicating that tasks in all states are queried.

Succeed

InstanceId

string

No

The instance ID. Separate multiple instance IDs with commas (,). You can specify up to 30 instance IDs. Default value: empty, indicating that tasks of all instances are queried.

dds-8vb38f0e7933xxxx

TaskId

string

No

The task ID. Separate multiple task IDs with commas (,). You can specify up to 30 task IDs. Default value: empty, indicating that all tasks are queried.

t-0mq1yyhm3ffl2bxxxx

TaskType

string

No

The task type. Default value: empty, indicating that all task types are queried. Valid values:

  • CreateIns: Create an instance.

  • DeleteIns: Delete an instance.

  • ChangeVariable: Modify parameter settings for an instance.

  • ModifyInsConfig: Change the configurations of an instance.

  • RestartIns: Restart an instance.

  • HaSwitch: Perform a primary/secondary switchover on an instance.

  • CloneIns: Clone an instance.

  • KernelVersionUpgrade: Update the minor version of an instance.

  • ProxyVersionUpgrade: Upgrade the agent version of an instance.

  • ModifyAccount: Change the account of an instance.

  • ModifyInsSpec: Change the specifications of an instance or perform a data migration on the instance.

  • CreateReadIns: Create a read-only instance.

  • StartIns: Start an instance.

  • StopIns: Stop an instance.

  • ModifyNetwork: Modify the network type for an instance.

  • LockIns: Lock an instance.

  • UnlockIns: Unlock an instance.

  • DiskOnlineExpansion: Scale out the disks of an instance online.

  • StorageOnlineExpansion: Expend the storage capacity of an instance online.

  • AddInsNode: Add a node to an instance.

  • DeleteInsNode: Delete a node from an instance.

  • ManualBackupIns: Manually back up an instance.

  • ModifyInsStorageType: Modify the storage type for an instance.

DeleteIns

FromStartTime

string

Yes

The start time of the O&M task to perform. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. You can query data within the last 30 days.

2023-04-16T02:46:21Z

ToStartTime

string

Yes

The end time of the O&M task to perform. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. You can query data within the last 30 days.

2023-05-16T02:15:52Z

FromExecTime

integer

No

The minimum execution duration. Tasks whose execution duration exceeds this value are returned. Unit: seconds. Default value: 0, indicating no limit.

0

ToExecTime

integer

No

The maximum execution duration. Tasks whose execution duration is shorter than or equal to this value are returned. Unit: seconds. Default value: 0, indicating no limit.

0

ResourceGroupId

string

No

The ID of the resource group.

rg-acfmyiu4ekp****

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

FC724D23-XXXX-XXXX-ABB1-606C935AE7FD

Items

array<object>

The task objects.

object

Status

string

The task status. Valid values:

  • Scheduled: The task is waiting to be executed.

  • Running: The task is running.

  • Succeed: The task is successful.

  • Failed: The task failed.

  • Cancelling: The task is being terminated.

  • Canceled: The task has been terminated.

  • Waiting: The task is waiting for scheduled time.

Succeed

TotalCount

integer

The number of tasks in the specified state.

2

Examples

Success response

JSON format

{
  "RequestId": "FC724D23-XXXX-XXXX-ABB1-606C935AE7FD",
  "Items": [
    {
      "Status": "Succeed",
      "TotalCount": 2
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Param.Invalid Param invalid
400 Param.Invalid.TimeEndBeforeStart Param invalid. End time before start time

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.