Queries the details of a pending event.

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 DescribePendingMaintenanceAction

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

Region String Yes all

The region ID of the pending event. You can call the DescribeRegions operation to query the regions and zones that are supported by PolarDB.

Note
  • You can set this parameter to all to view all pending events within your account.
  • If the Region parameter is set to all, the TaskType parameter must be set to all.
TaskType String Yes all

The task type of pending events. Valid values:

  • DatabaseSoftwareUpgrading: database software upgrades
  • DatabaseHardwareMaintenance: hardware maintenance and upgrades
  • DatabaseStorageUpgrading: database storage upgrades
  • DatabaseProxyUpgrading: minor version upgrades of the proxy
  • all: queries the details of the pending events of all preceding types.
Note If the Region parameter is set to all, the TaskType parameter must be set to all.
IsHistory Integer No 0

Specifies whether to return the historical tasks. Valid values:

  • 0: returns the current task.
  • 1: returns the historical tasks.

Default value: 0.

PageSize Integer No 30

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

Default value: 30.

PageNumber Integer No 1

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

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

The ID of the resource group.

Response parameters

Parameter Type Example Description
TotalRecordCount Integer 1

The total number of entries.

RequestId String 2F029645-FED9-4FE8-A6D3-488954******

The ID of the request.

PageSize Integer 30

The number of entries returned per page.

PageNumber Integer 1

The number of the returned page.

Items Array of Items

Details about tasks.

Status Integer 3

The status of the task.

  • If you set the IsHistory parameter to 0, the status of the pending task is returned. Valid values:
    • 2: The start time of the task is to be specified.
    • 3: The task is pending.
    • 4: The task is running. In this case, you cannot modify the execution time.
  • If you set the IsHistory parameter to 1, the details of the historical tasks are returned. Valid values:
    • 5: The task is completed and executed.
    • 6: The task is completed but fails to be executed.
    • 7: The task is canceled.
PrepareInterval String 04:00:00

The preparation time that is required before the pending event is switched. The time follows the HH:mm:ss format.

Deadline String 2020-06-11T15:59:59Z

The deadline before which the task can be executed. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

DBType String MySQL

The type of the database engine. Valid values:

  • MySQL
  • PostgreSQL
  • Oracle
TaskType String DatabaseSoftwareUpgrading

The type of the pending event.

StartTime String 2020-06-09T18:00:00Z

The time when the task was executed in the background. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

DBVersion String 8.0

The version of the database engine.

  • Valid values for the MySQL database engine:
    • 5.6
    • 5.7
    • 8.0
  • Valid value for the PostgreSQL database engine: 11 and 14
  • Valid value for the Oracle database engine: 11
ModifiedTime String 2020-06-09T22:00:42Z

The time when the parameter was modified. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

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

The ID of the cluster.

Region String cn-hangzhou

The region ID of the pending event.

ResultInfo String manualCancel

The execution result of the task. Valid values:

  • manualCancel: The task is manually canceled.
  • paramCheckNotPass: The task fails to pass the parameter check.
Note This parameter is returned only when the value of the Status parameter is 6 or 7. The value 6 indicates that the task is completed but fails to be executed. The value 7 indicates that the task is canceled.
CreatedTime String 2020-06-09T22:00:42Z

The time when the task was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Id Integer 111111

The ID of the task.

SwitchTime String 2020-06-09T22:00:00Z

The time when the pending event was switched. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Examples

Sample requests

http(s)://polardb.aliyuncs.com/?Action=DescribePendingMaintenanceAction
&Region=all
&TaskType=all
&<Common request parameters>

Sample success response

XML format

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

<DescribePendingMaintenanceActionResponse>
<TotalRecordCount>1</TotalRecordCount>
<PageSize>30</PageSize>
<RequestId>2F029645-FED9-4FE8-A6D3-488954******</RequestId>
<PageNumber>1</PageNumber>
<Items>
    <Status>3</Status>
    <CreatedTime>2020-06-09T22:00:42Z</CreatedTime>
    <Deadline>2020-06-11T15:59:59Z</Deadline>
    <StartTime>2020-06-09T18:00:00Z</StartTime>
    <DBClusterId>pc-************</DBClusterId>
    <DBType>MySQL</DBType>
    <DBVersion>8.0</DBVersion>
    <ModifiedTime>2020-06-09T22:00:42Z</ModifiedTime>
    <TaskType>DatabaseSoftwareUpgrading</TaskType>
    <Region>cn-hangzhou</Region>
    <PrepareInterval>04:00:00</PrepareInterval>
    <Id>111111</Id>
    <SwitchTime>2020-06-09T22:00:00Z</SwitchTime>
</Items>
</DescribePendingMaintenanceActionResponse>

JSON format

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

{
  "TotalRecordCount" : "1",
  "PageSize" : "30",
  "RequestId" : "2F029645-FED9-4FE8-A6D3-488954******",
  "PageNumber" : "1",
  "Items" : [ {
    "Status" : "3",
    "CreatedTime" : "2020-06-09T22:00:42Z",
    "Deadline" : "2020-06-11T15:59:59Z",
    "StartTime" : "2020-06-09T18:00:00Z",
    "DBClusterId" : "pc-************",
    "DBType" : "MySQL",
    "DBVersion" : "8.0",
    "ModifiedTime" : "2020-06-09T22:00:42Z",
    "TaskType" : "DatabaseSoftwareUpgrading",
    "Region" : "cn-hangzhou",
    "PrepareInterval" : "04:00:00",
    "Id" : "111111",
    "SwitchTime" : "2020-06-09T22:00:00Z"
  } ]
}

Error codes

HttpCode Error code Error message Description
400 RequiredParam.NotFound Required input param is not found. The error message returned because the specified parameter does not exist.

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