Files
doc-exports/docs/css/api-ref/ListImages.html
zhengxiu 8f6b8d3664 css api 25.6.0 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: zhengxiu <zhengxiu@huawei.com>
Co-committed-by: zhengxiu <zhengxiu@huawei.com>
2025-11-25 11:21:12 +00:00

294 lines
15 KiB
HTML

<a name="ListImages"></a><a name="ListImages"></a>
<h1 class="topictitle1">Obtaining the ID of the Target Image to Upgrade To</h1>
<div id="body1708331107508"><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to obtain the IDs of target images the current cluster can be upgraded to. The upgrade types are as follows:</p>
<ul><li><p>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.)</p>
</li><li><p>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.)</p>
</li><li><p>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.) This feature is not supported currently.</p>
</li></ul>
</div>
<div class="section" id="ListImages__atuogenerate_1"><h4 class="sectiontitle">Calling Method</h4><p>For details, see <a href="css_03_0077.html">Calling APIs</a>.</p>
</div>
<div class="section" id="ListImages__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p>GET /v1.0/{project_id}/clusters/{cluster_id}/target/{upgrade_type}/images</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p><strong>Definition</strong>:</p>
<p>Project ID. For details about how to obtain the project ID and name, see <a href="css_03_0071.html">Obtaining the Project ID and Name</a>.</p>
<p><strong>Constraints</strong>:</p>
<p>N/A</p>
<p><strong>Value range</strong>:</p>
<p>Project ID of the account.</p>
<p><strong>Default value</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p><strong>Definition</strong>:</p>
<p>ID of the cluster to be upgraded. For details about how to obtain the cluster ID, see <a href="css_03_0101.html">Obtaining the Cluster ID</a>.</p>
<p><strong>Constraints</strong>:</p>
<p>N/A</p>
<p><strong>Value range</strong>:</p>
<p>Cluster ID.</p>
<p><strong>Default value</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>upgrade_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p><strong>Parameter description</strong>:</p>
<p>Upgrade type.</p>
<p><strong>Constraints</strong>:</p>
<p>N/A</p>
<p><strong>Options</strong>:</p>
<ul><li><p><strong>same</strong>: same-version upgrade.</p>
</li><li><p><strong>cross</strong>: cross-version upgrade.</p>
</li><li><p><strong>cross-engine</strong>: cross-engine upgrade.</p>
</li></ul>
<p><strong>Default value</strong>:</p>
<p>N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p>offset</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p><strong>Definition</strong>:</p>
<p>Start value of the query. The default value is 0.</p>
<p><strong>Constraints</strong>:</p>
<p>N/A</p>
<p><strong>Value range</strong>:</p>
<p>0-1000</p>
<p><strong>Default value</strong>:</p>
<p>0</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p>limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p><strong>Definition</strong>:</p>
<p>Number of images to be queried. The default value is <strong>10</strong>, indicating that 10 images are queried at a time.</p>
<p><strong>Constraints</strong>:</p>
<p>N/A</p>
<p><strong>Value range</strong>:</p>
<p>1-1000</p>
<p><strong>Default value</strong>:</p>
<p>10</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Request Parameters</h4><p>None</p>
</div>
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p><strong>Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListImages__response_GetTargetImageId" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.3.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.3.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p>needUploadUpgradePlugin</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p>Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Whether to upload the plug-in of the target version.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p>imageInfoList</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p>Array of <a href="#ListImages__response_GetTargetImageIdDetail">GetTargetImageIdDetail</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Image details.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p>totalSize</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Number of target images.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ListImages__response_GetTargetImageIdDetail"></a><a name="response_GetTargetImageIdDetail"></a><table cellpadding="4" cellspacing="0" summary="" id="ListImages__response_GetTargetImageIdDetail" frame="border" border="1" rules="all"><caption><b>Table 4 </b>GetTargetImageIdDetail</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.4.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.4.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.4.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p>id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>ID of an image that can be upgraded.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p>displayName</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Name of an image that can be upgraded.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p>imageDesc</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Image description.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p>datastoreType</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Cluster engine type.</p>
<p><strong>Value range</strong>:</p>
<ul><li><p>elasticsearch: Cloud Search Service (CSS) provides distributed search capabilities, log analytics, reporting, and semantic search based on open-source Elasticsearch.</p>
</li><li><p>logstash: Provides functions such as data ingestion, transformation, cleaning, and parsing based on open-source Logstash.</p>
</li><li><p>opensearch: Provides distributed search, log analytics, reporting, and semantic search based on open-source OpenSearch. It is the future version of CSS's Elasticsearch clusters.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p>datastoreVersion</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Image engine version.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.1 "><p>priority</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.4.2.4.1.2 "><p>Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.4.2.4.1.3 "><p><strong>Definition</strong>:</p>
<p>Priority of the target image. A larger value indicates a higher priority.</p>
<p><strong>Value range</strong>:</p>
<p>N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>Obtain the target image for a cross-version upgrade of the cluster.</p>
<pre class="screen">GET https://{Endpoint}/v1.0/{project_id}/clusters/ea244205-d641-45d9-9dcb-ab2236bcd07e/target/cross/images</pre>
</div>
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p><strong>Status code: 200</strong></p>
<p>Request succeeded.</p>
<pre class="screen">{
"needUploadUpgradePlugin" : false,
"imageInfoList" : [ ],
"totalSize" : 0
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListImages__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p>Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p>200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p>Request succeeded.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p>400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p>Invalid request.</p>
<p>The client should not repeat the request without modifications.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p>403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p>Request rejected.</p>
<p>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.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Error Codes</h4><p>See <a href="css_03_0076.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cluster_management.html">Cluster Management</a></div>
</div>
</div>