All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeHistoryTasksStat

Last Updated:Sep 03, 2024

Queries the overview of a task in the task center.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the pending event. You can call the DescribeRegions operation to query the most recent region list.

cn-beijing
StatusstringNo

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 states with commas (,). This parameter is empty by default, which indicates that tasks in all states are queried.

Succeed
InstanceIdstringNo

The instance ID. Separate multiple instance IDs with commas (,). You can specify up to 30 instance IDs. This parameter is empty by default, which indicates that the tasks of all instances are queried.

dds-8vb38f0e7933xxxx
TaskIdstringNo

The task ID. Separate multiple task IDs with commas (,). You can specify up to 30 task IDs. This parameter is empty by default, which indicates that all tasks are queried.

t-0mq1yyhm3ffl2bxxxx
TaskTypestringNo

The task type. This parameter is left empty by default, which indicates that all types of tasks 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
FromStartTimestringYes

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
ToStartTimestringYes

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
FromExecTimeintegerNo

The minimum execution duration of the task. This parameter is used to filter tasks whose execution duration is longer than the minimum execution duration. Unit: seconds. The default value is 0, which indicates that no limit is imposed for the query.

0
ToExecTimeintegerNo

The maximum execution duration of the task. This parameter is used to filter tasks whose execution duration is shorter than or equal to the maximum execution duration. Unit: seconds. The default value is 0, which indicates that no limit is imposed for the query.

0

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

FC724D23-XXXX-XXXX-ABB1-606C935AE7FD
Itemsarray<object>

The task objects.

object
Statusstring

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
TotalCountinteger

The number of tasks in a specified state.

2

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400Param.InvalidParam invalid
400Param.Invalid.TimeEndBeforeStartParam invalid. End time before start time

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