All Products
Search
Document Center

AnalyticDB:DescribeHistoryTasksStat

Last Updated:Nov 10, 2025

Queries task statistics.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
adb:DescribeHistoryTasksStatupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the instance resides.

cn-beijing
StatusstringNo

The state of the task. Valid values:

  • Scheduled
  • Running
  • Succeed
  • Failed: The task failed.
  • Cancelling
  • Canceled
  • Waiting

Separate multiple states with commas (,). This parameter is empty by default, which indicates that tasks in all states are queried.

Scheduled
InstanceIdstringNo

Cluster ID.

amv-********
TaskIdstringNo

Task ID.

1564657730
TaskTypestringNo

Task type.

all
FromStartTimestringYes

Query start time.

2023-05-08T07:04:17Z
ToStartTimestringYes

Represents tasks whose start time is before this time.

2023-02-24T10:01:37Z
FromExecTimeintegerNo

Minimum task execution time, used to filter tasks with execution time greater than this value, in seconds. Default 0, meaning no limit

1
ToExecTimeintegerNo

Maximum task execution time, used to filter tasks with execution time not less than this value, in seconds. Default 0, meaning no limit

10
ResourceGroupIdstringNo

Resource group ID.

rg-acfmy*****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

1AD222E9-E606-4A42-BF6D-8A4442913CEF
Itemsarray<object>

The tasks.

Itemsobject

Task information list.

Statusstring

The status of the APS job.

  • Scheduled
  • Running
  • Succeed
  • Failed: The task failed.
  • Cancelling
  • Canceled
  • Waiting
Scheduled
TotalCountinteger

The total number of tasks.

20
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
HttpStatusCodeinteger

The HTTP status code returned.

200
Messagestring

The returned message. Valid values:

  • If the request was successful, an success message is returned.
  • If the request failed, an error message is returned.
SUCCESS
Codestring

API status or POP error code.

200
AccessDeniedDetailobject

The queried information about the request denial.

AuthActionstring

Authorized action

test
AuthPrincipalDisplayNamestring

The display name of the requester.

test
AuthPrincipalOwnerIdstring

The ID of the Alibaba Cloud account to which the authentication principal belongs.

141345906006****
AuthPrincipalTypestring

The requester type.

test
EncodedDiagnosticMessagestring

The encoded diagnostic message.

test
NoPermissionTypestring

The type of the policy denial. Valid values:

  • ImplicitDeny: The resource holder has not configured a policy for the current user. By default, unauthorized operations are denied.
  • ExplicitDeny: The RAM policy configured by the resource holder explicitly denies the current user access to the corresponding resources.
ImplicitDeny
PolicyTypestring

The type of the policy that causes the access denied error.

  • ControlPolicy: control policy
  • SessionPolicy: an additional policy that is added to the temporary token.
  • AssumeRolePolicy: the authorization policy of the RAM role.
  • AccountLevelIdentityBasedPolicy: the principal policies of the account authorization scope, including custom policies and system policies.
  • ResourceGroupLevelIdentityBasedPolicy: the principal policy of the resource group authorization scope, including custom policies and system policies.
ControlPolicy

Examples

Sample success responses

JSONformat

{
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "Items": [
    {
      "Status": "Scheduled",
      "TotalCount": 20
    }
  ],
  "Success": true,
  "HttpStatusCode": 200,
  "Message": "SUCCESS",
  "Code": 200,
  "AccessDeniedDetail": {
    "AuthAction": "test",
    "AuthPrincipalDisplayName": "test",
    "AuthPrincipalOwnerId": "141345906006****",
    "AuthPrincipalType": "test",
    "EncodedDiagnosticMessage": "test\n",
    "NoPermissionType": "ImplicitDeny",
    "PolicyType": "ControlPolicy"
  }
}

Error codes

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