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.
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Debugging
You can debug this API in API Explorer.
URI
POST /v3/{project_id}/instances/db-upgrade/schedule-task
| 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
| 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
Default Value en-us |
| 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
| Parameter | Type | Description |
|---|---|---|
| instance_tasks | Array of Table 5 objects | Definition Task details. |
Example Request
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
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot