All Products
Search
Document Center

PolarDB:DescribePendingMaintenanceAction

最終更新日:Jun 17, 2024

Queries the information about a pending event.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionstringYes

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 you set Region to all, you must set TaskType to all.
  • all
    TaskTypestringYes

    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.
    all
    IsHistoryintegerNo

    Specifies whether to return the historical tasks. Valid values:

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

    Default value: 0.

    0
    PageSizeintegerNo

    The number of entries per page. Valid values: 30, 50, or 100.

    Default value: 30.

    30
    PageNumberintegerNo

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

    1
    ResourceGroupIdstringNo

    The ID of the resource group.

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

    Response parameters

    ParameterTypeDescriptionExample
    object
    TotalRecordCountinteger

    The total number of returned entries.

    1
    RequestIdstring

    The ID of the request.

    2F029645-FED9-4FE8-A6D3-488954******
    PageSizeinteger

    The number of entries per page.

    30
    PageNumberinteger

    The page number.

    1
    Itemsobject []

    Details about tasks.

    Statusinteger

    The status of the pending 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.
    3
    PrepareIntervalstring

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

    04:00:00
    Deadlinestring

    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.

    2020-06-11T15:59:59Z
    DBTypestring

    The type of the database engine. Valid values:

    • MySQL
    • PostgreSQL
    • Oracle
    MySQL
    TaskTypestring

    The type of the pending event.

    DatabaseSoftwareUpgrading
    StartTimestring

    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.

    2020-06-09T18:00:00Z
    DBVersionstring

    The version of the database engine.

    • Valid values for the MySQL database engine:

      • 5.6
      • 5.7
      • 8.0
    • Valid values for the PostgreSQL database engine:

      • 11
      • 14
    • Valid value for the Oracle database engine: 11

    8.0
    ModifiedTimestring

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

    2020-06-09T22:00:42Z
    DBClusterIdstring

    The ID of the cluster.

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

    The region ID of the pending event.

    cn-hangzhou
    ResultInfostring

    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.
    manualCancel
    CreatedTimestring

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

    2020-06-09T22:00:42Z
    Idinteger

    The ID of the task.

    111111
    SwitchTimestring

    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.

    2020-06-09T22:00:00Z

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    HTTP status codeError codeError messageDescription
    400RequiredParam.NotFoundRequired input param is not found.The specified parameter does not exist.

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