Queries information about all or specified scheduled tasks that you can access.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeScheduleTasks

The operation that you want to perform. Set the value to DescribeScheduleTasks.

Status String No finish

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.
DBClusterId String No pc-**************

The ID of the cluster.

Note
  • You can call the DescribeDBClusters operation to query information about all your PolarDB clusters that are deployed in a specified region. The returned information includes the ID of each cluster.
  • If you do not specify this parameter, all scheduled tasks that you can access are queried.
RegionId String No cn-hangzhou

The region ID of the cluster.

Note
  • You can call the DescribeRegions operation to query the region information about all clusters within a specified account.
  • If you do not specify this parameter, scheduled tasks on your clusters that are deployed in all regions are queried.
PageNumber Integer No 1

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

PageSize Integer No 30

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

TaskAction String No CreateDBNodes

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 that you can access are queried.
DBClusterDescription String No testdb

The description of the cluster on which you want to query scheduled tasks.

OrderId String No 20951253014****

The ID of the order.

Note The order ID can contain only digits.
PlannedStartTime String No 2021-01-28T12:00Z

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

PlannedEndTime String No 2021-01-28T12:30Z

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

ResourceGroupId String No rg-************

The ID of the resource group.

Response parameters

Parameter Type Example Description
Message String Successful

The message that is returned for the request.

Note If the request is successful, Successful is returned. If the request fails, an error message that contains information such as an error code is returned.
Data Object

The result data that is returned.

TimerInfos Array of timerInfos

The details of the scheduled task.

Status String finish

The state of the scheduled task.

Action String CreateDBNodes

The type of the task.

PlannedEndTime String 2021-01-28T12:30Z

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

PlannedTime String 2021-01-28T12:16Z

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

DBClusterId String pc-**************

The ID of the cluster.

Region String cn-hangzhou

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

PlannedStartTime String 2021-01-28T12:00Z

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

TaskId String 53879cdb-9a00-428e-acaf-ff4cff******

The ID of the task.

OrderId String 208161753******

The ID of the order.

Note This parameter is returned only when you set the Action parameter to CreateDBNodes or ModifyDBNodeClass.
DbClusterStatus String Running

The state of the cluster.

DbClusterDescription String test_cluster

The description of the cluster on which you want to query scheduled tasks.

TaskCancel Boolean true

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

  • true: The task can be canceled.
  • false: The task cannot be canceled.
TotalRecordCount Integer 1

The total number of entries.

PageNumber Integer 1

The number of the returned page.

PageSize Integer 30

The number of entries returned per page.

Success Boolean true

The result of the request.

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

The ID of the request.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribeScheduleTasks
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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 Error Center.