Files
doc-exports/docs/css/api-ref/UpdateShrinkCluster.html
zhengxiu d48ac439de css api 25.1.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-05-28 09:20:51 +00:00

197 lines
11 KiB
HTML

<a name="UpdateShrinkCluster"></a><a name="UpdateShrinkCluster"></a>
<h1 class="topictitle1">Scaling In Nodes of a Specific Type</h1>
<div id="body1708331107508"><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to remove instances of specific types and reduce instance storage capacity in a cluster. Yearly/Monthly clusters do not support the removal of specified node types by calling this API.</p>
<div class="note"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody">All mission-critical data has been backed up before a cluster scale-in. This is to prevent data loss.</div></div>
</div>
<div class="section" id="UpdateShrinkCluster__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p>POST /v1.0/extend/{project_id}/clusters/{cluster_id}/role/shrink</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.2.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p><strong>Parameter description</strong>:</p>
<p>The 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>Options</strong>:</p>
<p>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>Default value</strong>:</p>
<p>N/A</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p>cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p><strong>Parameter description</strong>:</p>
<p>Specifies the ID of the cluster to be scaled in. For details, see <a href="css_03_0101.html">Obtaining the Cluster ID</a>.</p>
<p><strong>Constraints</strong>:</p>
<p>N/A</p>
<p><strong>Options</strong>:</p>
<p>For details about how to obtain the cluster ID, see <a href="css_03_0101.html">Obtaining the Cluster ID</a>.</p>
<p><strong>Default value</strong>:</p>
<p>N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateShrinkCluster__request_ShrinkClusterReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>shrink</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>Array of <a href="#UpdateShrinkCluster__request_ShrinkNodeReq">ShrinkNodeReq</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p><strong>Parameter description</strong>:</p>
<p>Type and quantity of nodes you want to scale in.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p>agency_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p><strong>Parameter description</strong>:</p>
<p>Agency name. You can create an agency to allow CSS to call other cloud services.</p>
<p><strong>Constraints</strong>:</p>
<p>This parameter is mandatory when the new IAM plane is connected. This parameter is optional when the old IAM plane is connected.</p>
<p><strong>Options</strong>:</p>
<p>VPC permissions required by the agency: "vpc:subnets:get","vpc:ports:*".</p>
<p><strong>Default value</strong>:</p>
<p>N/A</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="UpdateShrinkCluster__request_ShrinkNodeReq"></a><a name="request_ShrinkNodeReq"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateShrinkCluster__request_ShrinkNodeReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>ShrinkNodeReq</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>reducedNodeNum</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>Integer</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>Number of nodes you want to reduce.</p>
<ul><li><p>After the scale-in, there has to be at least one node in each AZ under each node type.</p>
</li><li><p>In a cross-AZ cluster, the difference between the numbers of same-type nodes in different AZs cannot exceed 1.</p>
</li><li><p>For a cluster with no Master nodes, the number of removed data nodes (including cold data nodes and other types of nodes) in a scale-in must be fewer than half of the number of the original data nodes, and the number of remaining data nodes after a scale-in must be greater than the maximum number of index replicas.</p>
</li></ul>
<p>For a cluster with master nodes, the number of removed master nodes in a scale-in must be fewer than half of the number of the original master nodes. After scale-in, there has to be an odd number of master nodes, and there has to be at least three of them.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p>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>Node type.</p>
<p><strong>Options</strong>:</p>
<ul><li><p><strong>ess</strong>: data node</p>
</li><li><p><strong>ess-cold</strong>: cold data node</p>
</li><li><p><strong>ess-client</strong>: client node</p>
</li><li><p><strong>ess-master</strong>: master node</p>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p>None</p>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>Scale in a cluster by scaling in specified type of nodes.</p>
<pre class="screen">POST /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/role/shrink
{
"shrink" : [ {
"type" : "ess",
"reducedNodeNum" : 1
} ]
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p>None</p>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateShrinkCluster__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p>Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Request succeeded.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>Invalid request.</p>
<p>Modify the request before retry.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>The request could not be completed due to a conflict with the current state of the resource.</p>
<p>The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p>412</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p>The server did not meet one of the preconditions contained in the request.</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>