Updated on 2025-10-24 GMT+08:00

Upgrading the Database Patch

Function

This API is used to upgrade the database patch version.

Constraints

  • This API is not available to frozen or abnormal instances.
  • This API is not available if there are abnormal instance nodes.
  • View field patch_available in the result returned by the API for querying instance details and check whether a minor version upgrade is supported.
  • Perform an upgrade during off-peak hours.

URI

  • URI format

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

  • URI example
    https://dds.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/054e292c9880d4992f02c0196d3ein02/db-upgrade
    Table 1 Path parameters

    Name

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    String

    Definition

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request Parameters

Table 2 Request header parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details, see Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Name

Mandatory

Type

Description

upgrade_mode

No

String

Definition

Upgrade mode.

Constraints

N/A

Range

  • minimized_interrupt_time: The upgrade with the shortest interruption time is preferred. In this mode, the upgrade has little impact on services.
  • minimized_upgrade_time: The upgrade with the shortest upgrade time is preferred.

Default Value

minimized_interrupt_time

is_delayed

No

Boolean

Definition

Whether the instance is automatically upgraded during the maintenance window.

Constraints

N/A

Range

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

Default Value

false

Response Parameters

Table 4 Response body parameters

Name

Type

Description

job_id

String

Definition

Task ID.

Range

N/A

Example Requests

  • Upgrading the database patch version of a replica set instance
    { 
      "upgrade_mode" : "minimized_interrupt_time" 
    }
  • Upgrading the database patch version during the maintenance window for a DB instance
    { 
       "is_delayed" : true 
     }

Example Responses

{ 
  "job_id" : "55e166d2-83ad-425f-b887-3503de03dc9b" 
}

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.