Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Version Upgrade/ Upgrading Kernel Version of Instances as Scheduled in Batches
Updated on 2026-07-16 GMT+08:00

Upgrading Kernel Version of Instances as Scheduled in Batches

Function

This API is used to upgrade kernel versions of instances as scheduled in batches. It can only updates hot patches of instances that use the auto-commit upgrade action to fix bugs. During the upgrade, there is no downtime and instance bugs can be fixed.

Debugging

You can debug this API in API Explorer.

URI

POST /v3/{project_id}/instances/db-upgrade/schedule-task

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn: Chinese
  • en-us: English

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

instance_ids

Yes

Array of strings

Definition

Instance IDs for batch upgrade. To obtain the value, see Querying DB Instances.

Constraints

N/A

start_time

Yes

String

Definition

Task start time.

Constraints

The format is YYYY-MM-DDTHH:mm:ss.

Range

N/A

Default Value

N/A

upgrade_type

Yes

String

Definition

Instance upgrade type.

Constraints

The value is case-sensitive.

Range

hotfix: Hot patch update

Default Value

N/A

upgrade_action

Yes

String

Definition

Upgrade action.

Constraints

For the hot patch installation, this parameter can only be set to upgradeAutoCommit.

Range

upgradeAutoCommit: Auto-commit

Default Value

N/A

target_version

Yes

String

Definition

Target version that the instances will be upgraded to. To obtain the value, see Querying Upgrade Types and Versions That Instances Can Be Upgraded to in Batches.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Table 4 Response parameters

Parameter

Type

Description

instance_tasks

Array of Table 5 objects

Definition

Task details.

Table 5 InstanceTaskDetail

Parameter

Type

Description

task_id

String

Definition

Task ID.

Range

N/A

task_name

String

Definition

Task name.

Range

N/A

instance_id

String

Definition

Instance ID.

Range

N/A

Example Request

Updating hot patches of instances that use the auto-commit action
POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/db-upgrade/schedule-task
{ 
  "instance_ids" : [ "cc0ae5c47bf94834bf9e44138f7f995ain14", "aa0ae5c47bf94834bf9e44138f7f995ain14" ], 
  "start_time": "2023-06-06T01:47:20+0800",
  "upgrade_type" : "hotfix", 
  "upgrade_action" : "upgradeAutoCommit" ,
  "target_version" : "3.208.0.6,3.208.0.7" 
}

Example Response

{
    "instance_tasks": [
        {
            "task_id": "07c5880a-cbf0-44ad-91c1-5803a10f11a1",
            "task_name": "HOTFIX_VERSION_UPGRADE",
            "instance_id": "cc0ae5c47bf94834bf9e44138f7f995ain14"
        },
        {
            "task_id": "07c5880a-cbf0-44ad-91c1-5803a10f11a1",
            "task_name": "HOTFIX_VERSION_UPGRADE",
            "instance_id": "aa0ae5c47bf94834bf9e44138f7f995ain14"
        }
    ]
}

Status Codes

Error Codes

For details, see Error Codes.