Updated on 2026-02-04 GMT+08:00

Upgrading a Major Version of a DB Instance (RDS for PostgreSQL)

Function

This API is used to upgrade a major version.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

rds:instance:update

write

-

-

rds:instance:modify

-

Constraints

  • This API is available to RDS for PostgreSQL only.
  • This operation cannot be performed when the DB instance is in any of the following statuses: creating, changing instance specifications, changing port, frozen, or abnormal.
  • Before an upgrade, ensure that a valid upgrade check report is available. In the check report, the source version is the current instance version, the target version is the one contained in the request body, the check is performed within seven days, and the check result is successful.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/major-version/upgrade

  • Parameter description
    Table 1 Parameters

    Parameter

    Type

    Mandatory

    Description

    project_id

    String

    Yes

    Definition

    Project ID of a tenant in a region.

    Constraints

    The value cannot be empty.

    Range

    To obtain the value, see Obtaining a Project ID.

    Default Value

    N/A

    instance_id

    String

    Yes

    Definition

    Instance ID.

    Constraints

    The value cannot be empty.

    Range

    You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.

    Default Value

    N/A

Request

  • Request parameters

    Parameter

    Type

    Mandatory

    Description

    target_version

    String

    Yes

    Definition

    Target version.

    Constraints

    N/A

    Range

    It must be later than the current major version of the instance. For example, if the current major version is 12, the target version must be 13 or 14.

    Default Value

    N/A

    is_change_private_ip

    Boolean

    Yes

    Definition

    Whether to switch the floating IP address of the source instance to the target instance.

    Constraints

    N/A

    Range

    • true: After the upgrade, the floating IP address is switched to the target instance.
    • false: After the upgrade, the floating IP address of the source instance remains unchanged, and the target instance uses a new floating IP address.

    Default Value

    N/A

    statistics_collection_mode

    String

    No

    Definition

    Mode of collecting statistics.

    Constraints

    It is mandatory if is_change_private_ip is set to true.

    Range

    • before_change_private_ip: Statistics are collected before the floating IP address of the source instance is switched to the target instance.
    • after_change_private_ip: Statistics are collected after the floating IP address of the source instance is switched to the target instance.

    Default Value

    N/A

  • Example request
    https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/3aa441c4c98a4b36b100a7e3e87d17cein03/major-version/upgrade
    {
       "target_version":  "14.6.1",
       "is_change_private_ip":  true,
       "statistics_collection_mode":  "before_change_private_ip"
    }

Response

  • Normal response
    Table 2 Parameters

    Parameter

    Type

    Description

    job_id

    String

    Definition

    Task ID.

    Range

    N/A

  • Example normal response
    {
       "job_id": "3afe25b7-4523-4d3b-8236-7121be922691"
    }

Status Code

Error Code

For details, see Error Codes.