Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Upgrading a Major Version/ Querying the Major Version Check Status or Upgrade Status of a DB Instance (RDS for PostgreSQL)
Updated on 2024-06-07 GMT+08:00

Querying the Major Version Check Status or Upgrade Status of a DB Instance (RDS for PostgreSQL)

Function

This API is used to query the major version check status or upgrade status.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

This API is available to RDS for PostgreSQL only.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/major-version/status?action={current_action}

  • Parameters
    Table 1 Parameters

    Parameter

    Type

    Mandatory

    Description

    project_id

    String

    Yes

    Project ID of a tenant in a region.

    To obtain it, refer to Obtaining a Project ID.

    instance_id

    String

    Yes

    Instance ID.

    action

    String

    Yes

    The status to be queried.

    • check: Check the pre-upgrade check status.
    • upgrade: Check the major version upgrade status.

Request

  • Request parameters

    None

  • URI example
    https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/3aa441c4c98a4b36b100a7e3e87d17cein03/major-version/status?action=upgrade

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    status

    String

    Major version upgrade status of the instance

    • running: The pre-check or major version upgrade is in progress.
    • success: The pre-check or major version upgrade is successful.
    • failed: The pre-check or major version upgrade fails.

    target_version

    String

    Target version.

    start_time

    String

    Start time in the "yyyy-mm-ddThh:mm:ssZ" format.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

    check_expiration_time

    String

    Time when a check report expires. The format is yyyy-mm-ddThh:mm:ssZ.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.

    detail

    String

    Details about the pre-check or upgrade report.

  • Example normal response
    { 
         "status": "success", 
         "target_version": "14.4.1", 
         "start_time": "2023-03-06T02:33:49+0800",  
         "check_expiration_time": "2023-03-13T02:33:49+0800",
         "detail": "2023-03-06 18:33:26 --- pg_upgrade check task                                       begin\n2023-03-06 18:34:40 --- pg_upgrade check on master:                            [user_check_report]User check success " 
     }

Status Code

Error Code

For details, see Error Codes.