Queries the details of all or specified scheduled tasks that belong to the current account.

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 No DescribeScheduleTasks

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

Status String No finish

The status of the task. Valid values:

  • pending: The task is pending.
  • executing: The task is being executed.
  • failure: The task fails and is waiting for a retry.
  • finish: The task is complete.
  • cancel: The task is canceled.
  • expired: The task is expired. The task is not started within the scheduled time period.
  • rollback: The task is being rolled back.
Note If this parameter is not specified, all scheduled tasks are returned.
DBClusterId String No pc-**************

The ID of the cluster.

Note
  • You can call the DescribeDBClusters operation to query information about all clusters that are deployed in a specified region, such as the cluster ID.
  • If this parameter is not specified, all scheduled tasks that belong to the current account are returned.
RegionId String No cn-hangzhou

The ID of the region.

Note
  • You can call the DescribeRegions operation to query the region information about all clusters that belong to a specified account.
  • If this parameter is not specified, all scheduled tasks that belong to the current account are returned.
PageNumber Integer No 1

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

PageSize Integer No 30

The number of entries to return on each page. Valid values: 30 (default), 50, and 100.

TaskAction String No CreateDBNodes

The type of task. Valid values:

  • CreateDBNodes
  • ModifyDBNodeClass
  • UpgradeDBClusterVersion
  • ModifyDBClusterPrimaryZone
Note
  • The details of the specified tasks are returned only if the PlannedStartTime parameter is specified when you call the preceding operations. Otherwise, the TimerInfos parameter is not returned.
  • If this parameter is not specified, all scheduled tasks that belong to the current account are returned.

Response parameters

Parameter Type Example Description
Data Struct

The returned result set.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 30

The number of entries returned per page.

TimerInfos Array of timerInfos

The details of the scheduled task.

Action String CreateDBNodes

The type of the task.

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

The ID of the cluster.

DbClusterDescription String test_cluster

The description of the cluster.

DbClusterStatus String Running

The status of the cluster.

OrderId String 208161753******

The ID of the order.

Note This parameter is returned only when Action is set to CreateDBNodes or ModifyDBNodeClass.
PlannedEndTime String 2021-01-28T12:30Z

The latest end time that is scheduled for the task. The time is displayed in UTC.

PlannedStartTime String 2021-01-28T12:00Z

The start time that is scheduled for the 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.

Region String cn-hangzhou

The ID of the region to which the scheduled task belongs.

Status String finish

The status of the scheduled task.

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

The ID of the scheduled task.

TotalRecordCount Integer 1

The total number of the returned tasks.

Message String Successful

The returned message for the request.

Note If the request is successful, Successful is returned. If the request fails, an exception that contains an error code is returned.
RequestId String 936C7025-27A5-4CB1-BB31-540E1F0CCA12

The ID of the request.

Success Boolean true

The result of the request.

Examples

Sample requests

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

Sample success responses

XML format

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

JSON format


                "PlannedStartTime": "2021-01-28T12:00Z",
                "DBClusterId": "pc-**************",
                "Region": "cn-hangzhou",
                "OrderId": "208161753******",
                "PlannedEndTime": "2021-01-28T12:30Z",
                "DbClusterStatus": "Running"
            }
        ],
        "PageSize": 30,
        "PageNumber": 1
    },
    "Code": "200",
    "Success": true
} "2021-01-28T12:00Z",
                "DBClusterId": "pc-**************",
                "Region": "cn-hangzhou",
                "OrderId": "208161753******",
                "PlannedEndTime": "2021-01-28T12:30Z",
                "DbClusterStatus": "Running"
            }
        ],
        "PageSize": 30,
        "PageNumber": 1
    },
    "Code": "200",
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.