doc-exports/docs/geminidb/api-ref/nosql_05_0052.html
Ru, Li Yi 37b97ffc06 geminidb_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-07-04 11:26:33 +00:00

149 lines
12 KiB
HTML

<a name="nosql_05_0052"></a><a name="nosql_05_0052"></a>
<h1 class="topictitle1">Deleting Nodes from a Specified Instance</h1>
<div id="body119379121344"><div class="section" id="nosql_05_0052__section1893861283413"><h4 class="sectiontitle">Function</h4><p id="nosql_05_0052__p1194114127347">This API is used to delete nodes from a specified instance.</p>
</div>
<div class="section" id="nosql_05_0052__section1945191263414"><h4 class="sectiontitle">Constraints</h4><p id="nosql_05_0052__p096814127347">This API supports GeminiDB Cassandra instances.</p>
</div>
<div class="section" id="nosql_05_0052__section998251215347"><h4 class="sectiontitle">URI</h4><p id="nosql_05_0052__p6985101220341">POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/reduce-node</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0052__table20990131253413" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="nosql_05_0052__row15987112173410"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="nosql_05_0052__p99931212113410">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="nosql_05_0052__p099541223412">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="nosql_05_0052__p149981012203420">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="nosql_05_0052__p11181393411">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0052__row209875126348"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_05_0052__p4351333410">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_05_0052__p176113153418">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_05_0052__p1495135341">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_05_0052__p513161353410">Project ID of a tenant in a region. To obtain this value, see <a href="nosql_projectid.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="nosql_05_0052__row8987812183413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_05_0052__p101581316349">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_05_0052__p15181413183415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_05_0052__p22111139345">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_05_0052__p92411316342">Instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_05_0052__section52714137347"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0052__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="nosql_05_0052__row130151303411"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="nosql_05_0052__p83481393415">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="nosql_05_0052__p183781310343">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="nosql_05_0052__p539191353418">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="nosql_05_0052__p143201320349">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0052__row7301313193418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="nosql_05_0052__p88961341963">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="nosql_05_0052__p1248131316346">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="nosql_05_0052__p135141323419">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="nosql_05_0052__p14542013143412">User token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0052__request_ShrinkInstanceNodeRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="nosql_05_0052__row165741310349"><th align="left" class="cellrowborder" valign="top" width="19.98%" id="mcps1.3.4.3.2.5.1.1"><p id="nosql_05_0052__p161181312342">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.02%" id="mcps1.3.4.3.2.5.1.2"><p id="nosql_05_0052__p26417134341">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="nosql_05_0052__p1867161318341">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="nosql_05_0052__p269181353411">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0052__row1857151333412"><td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_05_0052__p472161311342">num</p>
</td>
<td class="cellrowborder" valign="top" width="20.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_05_0052__p1875113173413">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_05_0052__p1378313103415">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_05_0052__p282113113415">Number of nodes to be deleted randomly.</p>
<p id="nosql_05_0052__p25672295316">For <span id="nosql_05_0052__text972403313236">GeminiDB Cassandra</span> instances, the value ranges from <strong id="nosql_05_0052__b1655041401920">1</strong> to <strong id="nosql_05_0052__b18562141417191">10</strong>.</p>
<div class="note" id="nosql_05_0052__note1294813133419"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="nosql_05_0052__p598181312347">If users connect to nodes using the client, do no choose to delete node randomly.</p>
</div></div>
</td>
</tr>
<tr id="nosql_05_0052__row165761383417"><td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_05_0052__p161021013133410">node_list</p>
</td>
<td class="cellrowborder" valign="top" width="20.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_05_0052__p610431333417">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_05_0052__p51094139341">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_05_0052__p3112613113417">ID of the node to be deleted. Make sure that the node can be deleted. If this parameter is not transferred, the number of nodes to be deleted is based on the internal policy of the system.</p>
<div class="note" id="nosql_05_0052__note111751311349"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="nosql_05_0052__ul1912113133344"><li id="nosql_05_0052__li1512216137349">Either <strong id="nosql_05_0052__b1981273019229">num</strong> or <strong id="nosql_05_0052__b3821330162216">node_list</strong> must be set.<ul id="nosql_05_0052__ul4851213161515"><li id="nosql_05_0052__li25211018125512">If <strong id="nosql_05_0052__b887634910211">node_list</strong> is transferred, its value can contain 1 to 10 characters for GeminiDB Cassandra.</li><li id="nosql_05_0052__li19520201015153">If <strong id="nosql_05_0052__b123611630192510">num</strong> and <strong id="nosql_05_0052__b2362143011254">node_list</strong> are both transferred, the value of <strong id="nosql_05_0052__b11362113042512">node_list</strong> takes effect.</li></ul>
</li><li id="nosql_05_0052__li13138413153418">If <strong id="nosql_05_0052__b1881133811251">node_list</strong> is empty, instance nodes are deleted randomly. If <strong id="nosql_05_0052__b118812387253">node_list</strong> is not empty, only the node whose ID is specified is deleted.</li><li id="nosql_05_0052__li3141181313419">Before a node is deleted, do not connect to the node directly to avoid service interruptions.</li></ul>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_05_0052__section20145121313410"><h4 class="sectiontitle">Response Parameters</h4><p id="nosql_05_0052__p1714971318344"><strong id="nosql_05_0052__b3899184815173">Status code: 202</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0052__response_ShrinkInstanceNodeResponseBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="nosql_05_0052__row161512013133410"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="nosql_05_0052__p0155151383415">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.3.2.4.1.2"><p id="nosql_05_0052__p315871318344">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p id="nosql_05_0052__p13161181317349">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0052__row8151171313419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="nosql_05_0052__p816313137348">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.3.2.4.1.2 "><p id="nosql_05_0052__p6166101363419">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="nosql_05_0052__p21691013163413">Task ID. This parameter is returned only for pay-per-use instances.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_05_0052__section19180113123415"><h4 class="sectiontitle">Example Requests</h4><ul id="nosql_05_0052__ul1618401316346"><li id="nosql_05_0052__li323702618269">URI example<pre class="screen" id="nosql_05_0052__screen3237626102617">POST https://{Endpoint}/v3/375d8d8fad1f43039e23d3b6c0f60a19/instances/9136fd2a9fcd405ea4674276ce36dae8in06/reduce-node</pre>
</li><li id="nosql_05_0052__li519816136341">Deleting a node<pre class="screen" id="nosql_05_0052__screen1620514132347">{
"num" : 1,
"node_list" : [ "116ba14da34a42d28ecd83a38c218907no12" ]
}</pre>
</li></ul>
</div>
<div class="section" id="nosql_05_0052__section13221101313413"><h4 class="sectiontitle">Example Responses</h4><p id="nosql_05_0052__p1422461313414"><strong id="nosql_05_0052__b3291632180">Status code: 202</strong></p>
<p id="nosql_05_0052__p522781393414">Accepted</p>
<pre class="screen" id="nosql_05_0052__screen9231131343412">{
"job_id" : "04efe8e2-9255-44ae-a98b-d87cae411890"
}</pre>
</div>
<div class="section" id="nosql_05_0052__section19107202213585"><h4 class="sectiontitle">Status Codes</h4><p id="nosql_05_0052__listapiversion_p201216122353">For details, see <a href="nosql_status_code.html">Status Codes</a>.</p>
</div>
<div class="section" id="nosql_05_0052__section21121922155813"><h4 class="sectiontitle">Error Codes</h4><p id="nosql_05_0052__listapiversion_p1265915205719">For details, see <a href="nosql_error_code.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000002.html">Instances</a></div>
</div>
</div>