Updated on 2025-12-09 GMT+08:00

Upgrading the Minor Version of a DB Instance

Function

This API is used to upgrade minor versions of RDS for MySQL or RDS for PostgreSQL instances.

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:upgradeDatabaseVersion

write

instance

g:EnterpriseProjectId

g:ResourceTag/<tag-key>

rds:instance:modify

-

Constraints

  • This API is available to RDS for MySQL and RDS for PostgreSQL only.
  • The minor versions of any RDS for PostgreSQL instances containing abnormal nodes cannot be upgraded.
  • The minor versions of RDS for PostgreSQL 11 instances earlier than 11.2 cannot be upgraded.
  • For RDS for PostgreSQL, minor versions can be upgraded immediately upon request submission only, but not during the specified maintenance window.
  • A minor version upgrade of RDS for PostgreSQL instances can cause a primary/standby switchover.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/db-upgrade

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

is_delayed

No

Boolean

Definition

Whether to delay the upgrade until the maintenance window.

Constraints

N/A

Range

  • true: The upgrade will be delayed. The instance will be upgraded during the specified maintenance window.
  • false: The instance will be upgraded immediately.

Default Value

false

second_switch

No

Boolean

Definition

For a primary/standby instance, the system first upgrades the standby instance, then performs a switchover, and finally upgrades the original primary instance. After the upgrade is complete, if the primary and standby AZs are different, the system performs another switchover.

Constraints

  • This parameter is valid only for RDS for MySQL primary/standby instances.
  • If the primary and standby AZs are the same, this parameter is invalid.

Range

  • true: A second primary/standby switchover is performed during the upgrade to ensure that the AZs of the primary and standby DB instances remain unchanged.
  • false: No second primary/standby switchover is performed during the upgrade. This option is suitable for scenarios where the AZs of the primary and standby DB instances are not a concern, but service continuity is critical.

Default Value

true

Example Request

Upgrade the minor version of a DB instance.

POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/db-upgrade 

{
   "is_delayed" : false 
 }

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    job_id

    String

    Task ID.

  • Example normal response
    {
      "job_id" : "e7a7535b-eb9b-45ac-a83a-020dc5016d94" 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.