Obtaining the ID of the Target Image to Upgrade To
Function
This API is used to obtain the IDs of target images the current Elasticsearch or OpenSearch cluster can be upgraded to. The upgrade types are as follows:
-
During a same-version upgrade, kernel patches are updated for a cluster. The cluster is upgraded to the latest image of the current version to fix known issues or optimize performance. For example, if the current cluster version is 7.10.2(7.10.2_24.3.3_0102), upon a same-version upgrade, the cluster will be upgraded to the latest image 7.10.2(7.10.2_24.3.4_0109) of version 7.10.2. (The version numbers used here are examples only.)
-
Cross-version upgrade: Upgrade the cluster version. The cluster will be upgraded to the latest image of the target version to enhance functions or incorporate versions. For example, if the current cluster version is 7.6.2(7.6.2_24.3.3_1224), upon a cross-version upgrade, the cluster will be upgraded to the latest image 7.10.2(7.10.2_24.3.4_0109) of version 7.10.2. (The version numbers used here are examples only.)
-
Cross-engine upgrade: Change an Elasticsearch cluster to an OpenSearch cluster. Cross-engine upgrade means to upgrade an Elasticsearch cluster to the latest image of the target OpenSearch version. For example, if the Elasticsearch cluster version is 7.10.2(7.10.2_24.3.3_0102), upon a cross-engine upgrade, the Elasticsearch cluster will be upgraded to the latest image 1.3.6(1.3.6_24.3.4_0109) of OpenSearch 1.3.6. (The version numbers used here are examples only.) The function is not supported currently.
Calling Method
For details, see Calling APIs.
URI
GET /v1.0/{project_id}/clusters/{cluster_id}/target/{upgrade_type}/images
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Constraints N/A Range Project ID of an account. The value contains 32 characters, consisting of lowercase letters and digits. Default Value N/A |
| cluster_id | Yes | String | Definition ID of the cluster to be upgraded. For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints N/A Range The value is a UUID containing 36 characters. Default Value N/A |
| upgrade_type | Yes | String | Definition: Cluster/image upgrade type. Constraints: N/A Value range: Default value: N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Definition: Start value of the query. The default value is 0. Constraints: N/A Value range: Greater than or equal to 0. Default value: 0 |
| limit | No | Integer | Definition: Number of images to be queried. The default value is 10, indicating that 10 images are queried at a time. Constraints: N/A Value range: 1-1000 Default value: 10 |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| needUploadUpgradePlugin | Boolean | Definition: Whether to upload the plug-in of the target version. Value range: |
| imageInfoList | Array of GetTargetImageIdDetail objects | Definition: Image details. Value range: N/A |
| totalSize | Integer | Definition: Number of target images. Value range: N/A |
Example Requests
Obtain the target image for a cross-version upgrade of the cluster.
GET https://{Endpoint}/v1.0/{project_id}/clusters/ea244205-d641-45d9-9dcb-ab2236bcd07e/target/cross/images Example Responses
Status code: 200
Request succeeded.
{
"needUploadUpgradePlugin" : false,
"imageInfoList" : [ ],
"totalSize" : 0
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. The client should not repeat the request without modifications. |
| 403 | Request rejected. The server has received the request and understood it, but the server refuses to respond to it. The client should not repeat the request without modifications. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank 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