Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Version Upgrade/ Upgrading Kernel Version of Instances as Scheduled in Batches
Updated on 2025-08-11 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.

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 body parameters

Parameter

Mandatory

Type

Description

instance_ids

Yes

Array of strings

Definition

Instance IDs for batch upgrade.

Constraints

N/A

start_time

Yes

String

Definition

Task start time.

Constraints

N/A

Range

N/A

Default Value

N/A

upgrade_type

Yes

String

Definition

Instance upgrade type. The value is case-sensitive.

Constraints

N/A

Range

hotfix: Hot patch update

Default Value

N/A

upgrade_action

Yes

String

Definition

Instance upgrade action. Currently, only the auto-commit action in hot patch update is supported.

Constraints

N/A

Range

upgradeAutoCommit: Auto-commit

Default Value

N/A

target_version

Yes

String

Definition

Target version that the instances will be upgraded to.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Table 3 Response parameters

Parameter

Type

Description

instance_tasks

Array of Table 4 objects

Definition

Task details.

Table 4 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.