Querying Versions That a DB Instance Can be Upgraded to
Function
This API is used to query versions that a DB instance can be upgraded to. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
URI
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/db-upgrade/candidate-versions
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
instance_id |
Yes |
String |
Instance ID, which is compliant with the UUID format. |
Request Parameters
None
Response Parameters
Parameter |
Type |
Description |
---|---|---|
upgrade_type_list |
Array of Table 3 objects |
Upgrade types. |
rollback_enabled |
Boolean |
Whether rollback is supported.
|
source_version |
String |
Source instance version. |
target_version |
String |
Target version. The target version is only returned when the instance is in the rolling upgrade phase, or no information is returned. |
roll_upgrade_progress |
Table 5 object |
DN or AZ information during the rolling upgrade. |
upgrade_candidate_versions |
Array of strings |
Versions that can be upgraded to, including minor and major versions. An empty array is returned during a rolling upgrade. |
hotfix_upgrade_candidate_versions |
Array of strings |
Hot patch versions that can be upgraded. An empty array is returned during a rolling upgrade. |
hotfix_rollback_candidate_versions |
Array of strings |
Hot patch versions that can be rolled back. An empty array is returned during a rolling upgrade. |
hotfix_upgrade_infos |
Table 6 object |
Information about hot patch versions that can be installed. |
hotfix_rollback_infos |
Table 7 object |
Information about hot patch versions that can be rolled back. |
Parameter |
Type |
Description |
---|---|---|
upgrade_type |
String |
Upgrade type.
|
enable |
Boolean |
Whether the upgrade type is available.
|
upgrade_action_list |
Array of Table 4 objects |
Upgrade actions. |
is_parallel_upgrade |
Boolean |
Whether intra-AZ parallel upgrade is supported.
|
Parameter |
Type |
Description |
---|---|---|
upgrade_action |
String |
Upgrade action.
|
enable |
Boolean |
Whether the upgrade action is available.
|
Parameter |
Type |
Description |
---|---|---|
upgraded_dn_group_numbers |
String |
Number of shards that have been upgraded. |
total_dn_group_numbers |
String |
Total number of shards. |
not_fully_upgraded_az |
String |
AZs that have not been upgraded. Multiple AZs are separated by commas (,). For instances in the independent deployment, null is returned. |
already_upgraded_az |
String |
AZs that have upgraded. Multiple AZs are separated by commas (,). For instances in the independent deployment, null is returned. |
az_description_map |
Map<String,String> |
AZ description. |
Example Request
Querying versions that a DB instance can be upgraded to
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/db-upgrade/candidate-versions
Example Response
Target version, shard status, and AZ status in the rolling upgrade returned.
{ "upgrade_type_list": [ { "upgrade_type": "grey", "upgrade_action_list": [ { "upgrade_action": "commit", "enable": false }, { "upgrade_action": "rollback", "enable": false }, { "upgrade_action": "upgrade", "enable": true }, { "upgrade_action": "upgradeAutoCommit", "enable": true } ], "enable": true, "is_parallel_upgrade": null }, { "upgrade_type": "hotfix", "upgrade_action_list": null, "enable": false, "is_parallel_upgrade": null }, { "upgrade_type": "inplace", "upgrade_action_list": [ { "upgrade_action": "upgradeAutoCommit", "enable": true } ], "enable": true, "is_parallel_upgrade": null } ], "rollback_enabled": false, "source_version": "8.102.0", "target_version": null, "roll_upgrade_progress": { "not_fully_upgraded_az": "cn-southwest-244a,cn-southwest-244b,cn-southwest-244c", "already_upgraded_az": "", "az_description_map": { "cn-southwest-244c": "az3", "cn-southwest-244b": "az2", "cn-southwest-244a": "az1" } }, "upgrade_candidate_versions": [ "8.300.0", "8.103.0" ], "hotfix_upgrade_candidate_versions": [], "hotfix_rollback_candidate_versions": [], "hotfix_upgrade_infos": [], "hotfix_rollback_infos": [] }
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
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