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 automatically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribePendingMaintenanceAction

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

Region String Yes all

The ID of the region to which the pending event belongs. 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.
RegionId String Yes cn-hangzhou

The ID of the region.

TaskType String Yes all

The type of the pending event. 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, and 100.

Default value: 30

PageNumber Integer No 1

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

Response parameters

Parameter Type Example Description
Items Array of Items

The list of tasks.

CreatedTime String 2020-06-09T22:00:42Z

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

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

The ID of the cluster.

DBType String MySQL

The type of the database engine. Valid values:

  • MySQL
  • PostgreSQL
  • Oracle
DBVersion String 8.0

The version number of the database engine. Valid values:

  • MySQL:
    • 5.6
    • 5.7
    • 8.0
  • PostgreSQL: 11.
  • Oracle: 11.
Deadline String 2020-06-11T15:59:59Z

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

Id Integer 111111

The ID of the task.

ModifiedTime String 2020-06-09T22:00:42Z

The time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

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.

Region String cn-hangzhou

The ID of the region to which the task belongs.

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.
StartTime String 2020-06-09T18:00:00Z

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

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.
SwitchTime String 2020-06-09T22:00:00Z

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

TaskType String DatabaseSoftwareUpgrading

The type of the pending event.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 30

The number of entries returned per page.

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

The ID of the request.

TotalRecordCount Integer 1

The total number of entries.

Examples

Sample requests

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

Sample success responses

XML format

<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

{
	"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

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