Querying the Target Version That a Cluster Can Be Upgraded To
Function
This API is used to query the target version that a cluster can be upgraded to.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/clusters/{cluster_id}/upgrade-management/avail-versions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. To obtain the value, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| cluster_id | Yes | String | Definition Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID. Constraints The value must be a valid DWS cluster ID. Range It is a 36-digit UUID. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Definition Page offset, which starts from 0 (page number minus 1). Constraints N/A Range Greater than or equal to 0 Default Value 0 |
| limit | No | Integer | Definition Size of a single page. Constraints N/A Range Greater than 0 Default Value 10 |
| type | No | String | Definition Upgrade type. Constraints N/A Range cluster hotfix Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Definition Total number of cluster upgrade paths. Range N/A |
| items | Array of UpdateItemResp objects | Definition List of cluster upgrade paths. Range N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Upgrade item ID. Range N/A |
| from | String | Definition Source version. Range N/A |
| to | String | Definition Target version. Range N/A |
| status | String | Definition: Status of the upgrade path Range: |
| process | String | Definition Upgrade progress. Range N/A |
| start_time | String | Definition Start time. Range N/A |
| end_time | String | Definition End time. Range N/A |
| job_id | String | Definition Upgrade task ID. Range N/A |
| failed_reason | String | Definition Failure cause. Range N/A |
Example Requests
Query the target version that a cluster can be upgraded to.
GET https://{Endpoint}/v1/0536cdee2200d5912f7cc00b877980f1/clusters/c719b1a7-c85c-4cb5-a721-7694908c2c11/upgrade-management/avail-versions?type=cluster Example Responses
Status code: 200
{
"items" : [ {
"id" : "930d2820-fc17-4a42-9a50-eb695bf05e83",
"from" : "8.2.0",
"to" : "8.2.0.100",
"status" : "Update_Success",
"process" : "0",
"start_time" : "2023-08-04T06:54:52",
"end_time" : "",
"job_id" : "2c90804789bf441e0189bf4c78fd0001",
"failed_reason" : null
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Query succeeded. |
| 400 | Request error. |
| 401 | Authentication failed. |
| 403 | You do not have required permissions. |
| 500 | Internal server error. |
| 503 | Service unavailable. |