All Products
Search
Document Center

PolarDB:DescribeScheduleTasks

Last Updated:Mar 01, 2024

Queries the details of all scheduled tasks.

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
polardb:DescribeScheduleTasksREAD
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
  • dbcluster
    acs:polardb:{#regionId}:{#accountId}:dbcluster/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
StatusstringNo

The state of the tasks that you want to query. Valid values:

  • pending: The tasks are pending execution.
  • executing: The tasks are being executed.
  • failure: The tasks failed and need to be run again.
  • finish: The tasks are complete.
  • cancel: The tasks are canceled.
  • expired: The tasks are expired. The tasks are not started within the time periods that are specified to start the tasks.
  • rollback: The tasks are being rolled back.
Note If you do not specify this parameter, all scheduled tasks in all states are queried.
finish
DBClusterIdstringNo

The cluster ID.

Note
  • You can call the DescribeDBClusters operation to query the information of all PolarDB clusters that are deployed in a specific region, such as the cluster IDs.

  • If you do not specify this parameter, all scheduled tasks on your clusters are queried.

pc-**************
RegionIdstringNo

The ID of the region.

Note
  • You can call the DescribeRegions operation to query the region information of all clusters in a specific account.

  • If you do not specify this parameter, scheduled tasks on your clusters that are deployed in all regions are queried.

cn-hangzhou
PageNumberintegerNo

The page number of the page to return. Set this parameter to an integer that is greater than 0. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Valid values: 30, 50, and 100. Default value: 30.

30
TaskActionstringNo

The type of scheduled tasks that you want to query. Valid values:

  • CreateDBNodes
  • ModifyDBNodeClass
  • UpgradeDBClusterVersion
  • ModifyDBClusterPrimaryZone
Note
  • If you specify the PlannedStartTime parameter when you call the four preceding operations, the details of each task are returned. Otherwise, an empty string is returned for the TimerInfos parameter.

  • If you do not specify this parameter, all types of scheduled tasks on you clusters are queried.

CreateDBNodes
DBClusterDescriptionstringNo

The description of the cluster.

testdb
OrderIdstringNo

The ID of the order.

Note The order ID can contain only digits.
20951253014****
PlannedStartTimestringNo

The earliest start time of the task that you specified when you created the scheduled task. The time is displayed in UTC.

2021-01-28T12:00Z
PlannedEndTimestringNo

The latest start time of the task that you specified when you created the scheduled task. The time is displayed in UTC.

2021-01-28T12:30Z
ResourceGroupIdstringNo

The ID of the resource group.

rg-************

Response parameters

ParameterTypeDescriptionExample
object
Messagestring

The message that is returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message such as an error code is returned.
Successful
Dataobject

The result data that is returned.

TimerInfosobject []

The details of the scheduled task.

Statusstring

The state of the scheduled task.

finish
Actionstring

The type of the scheduled tasks.

CreateDBNodes
PlannedEndTimestring

The latest start time of the task that you specified when you created the scheduled task. The time is displayed in UTC.

2021-01-28T12:30Z
PlannedTimestring

The expected start time of the task. The time is displayed in UTC.

2021-01-28T12:16Z
DBClusterIdstring

The cluster ID.

pc-**************
Regionstring

The ID of the region in which the scheduled task runs.

cn-hangzhou
PlannedStartTimestring

The earliest start time of the task that you specified when you created the scheduled task. The time is displayed in UTC.

2021-01-28T12:00Z
TaskIdstring

The ID of the task.

53879cdb-9a00-428e-acaf-ff4cff******
OrderIdstring

The ID of the order.

Note This parameter is returned only when you set the Action parameter to CreateDBNodes or ModifyDBNodeClass.
208161753******
DbClusterStatusstring

The state of the cluster.

Running
DbClusterDescriptionstring

The description of the cluster.

test_cluster
TaskCancelboolean

Indicates whether the scheduled task can be canceled. Valid values:

  • true
  • false
true
TotalRecordCountinteger

The total number of entries returned.

1
PageNumberinteger

The page number of the page returned.

1
PageSizeinteger

The number of entries returned per page.

30
Successboolean

Indicates whether the request is successful.

true
RequestIdstring

The request ID.

936C7025-27A5-4CB1-BB31-540E1F0CCA12

Examples

Sample success responses

JSONformat

{
  "Message": "Successful",
  "Data": {
    "TimerInfos": [
      {
        "Status": "finish",
        "Action": "CreateDBNodes",
        "PlannedEndTime": "2021-01-28T12:30Z",
        "PlannedTime": "2021-01-28T12:16Z",
        "DBClusterId": "pc-**************",
        "Region": "cn-hangzhou",
        "PlannedStartTime": "2021-01-28T12:00Z",
        "TaskId": "53879cdb-9a00-428e-acaf-ff4cff******",
        "OrderId": "208161753******",
        "DbClusterStatus": "Running",
        "DbClusterDescription": "test_cluster",
        "TaskCancel": true
      }
    ],
    "TotalRecordCount": 1,
    "PageNumber": 1,
    "PageSize": 30
  },
  "Success": true,
  "RequestId": "936C7025-27A5-4CB1-BB31-540E1F0CCA12"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-09-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400