doc-exports/docs/opengauss/api-ref/opengauss_api_1020.html
Ru, Li Yi d97aea4dd2 opengauss_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-09-06 09:04:21 +00:00

135 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0000001947569473"></a><a name="EN-US_TOPIC_0000001947569473"></a>
<h1 class="topictitle1">Adding Shards</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section2161131714317"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1779463834710">This API is used to add shards.</p>
<ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0128427213_ul12259155218373"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001917290508_en-us_topic_0000001791349281_li3231171417412">Learn how to <a href="opengauss_api_0010.html">authenticate</a> this API.</li><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001917290508_en-us_topic_0000001791349281_li41227910453">Understand the API in <a href="opengauss_api_0012.html">Using APIs</a>.</li><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001917290508_en-us_topic_0000001791349281_en-us_topic_0110967248_li1991981933613">Obtain the required <a href="https://docs.otc.t-systems.com/regions-and-endpoints/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
<div class="note" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_note41076154715"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p41118674718">Intermittent disconnection occurs when shards are being added. Exercise caution when performing this operation.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section11726173915271"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_ul43911954192719"><li id="EN-US_TOPIC_0000001947569473__li0314244162320">The shard growth increment ranges from 1 to 64.</li><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li890581415511">The maximum number of shards is 256.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section1832017411437"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_ul1794193834712"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li7794173834713">URI format<p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p8795103874717"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li7794173834713"></a><a name="en-us_topic_0248254028_li7794173834713"></a>POST https://{<em id="EN-US_TOPIC_0000001947569473__en-us_topic_0128427213_i1958383021511">Endpoint</em>}/opengauss/v3/{<em id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_i8287192519110">project_id</em>}/instances/{<em id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_i575217298119">instance_id</em>}/action</p>
</li><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li4411135064210">Example<p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1454414211213"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li4411135064210"></a><a name="en-us_topic_0248254028_li4411135064210"></a>https://gaussdb.eu-de.otc.t-systems.com/opengauss/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action</p>
<ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_ul5863648181412"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li19863114841416">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table1986313483146" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row158631348151416"><th align="left" class="cellrowborder" valign="top" width="17.87%" id="mcps1.3.3.2.2.2.1.1.2.5.1.1"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p178635485145"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b19172183524">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.37%" id="mcps1.3.3.2.2.2.1.1.2.5.1.2"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p586384819144"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b351315194528">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.59%" id="mcps1.3.3.2.2.2.1.1.2.5.1.3"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p386374814140"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b81371205526">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.17%" id="mcps1.3.3.2.2.2.1.1.2.5.1.4"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p3863164871419"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b68074205529">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row2863104871419"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.3.2.2.2.1.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p118631948131413">expand_cluster</p>
</td>
<td class="cellrowborder" valign="top" width="16.37%" headers="mcps1.3.3.2.2.2.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1286314820148">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.59%" headers="mcps1.3.3.2.2.2.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1686344851413">Object</p>
</td>
<td class="cellrowborder" valign="top" width="44.17%" headers="mcps1.3.3.2.2.2.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p586417484144">For details, see <a href="#EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table15864348201411">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table15864348201411"></a><a name="en-us_topic_0248254028_table15864348201411"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table15864348201411" frame="border" border="1" rules="all"><caption><b>Table 2 </b>expand_cluster field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row886464812140"><th align="left" class="cellrowborder" valign="top" width="18.39%" id="mcps1.3.3.2.2.2.1.2.2.5.1.1"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p13864184841419"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b9659193513525">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.08%" id="mcps1.3.3.2.2.2.1.2.2.5.1.2"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p686484851413"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b19298143617524">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.92%" id="mcps1.3.3.2.2.2.1.2.2.5.1.3"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p17864174814142"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b1292483619525">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.61%" id="mcps1.3.3.2.2.2.1.2.2.5.1.4"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p5864348201411"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b647516379522">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row286420483141"><td class="cellrowborder" valign="top" width="18.39%" headers="mcps1.3.3.2.2.2.1.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1386474871415">shard</p>
</td>
<td class="cellrowborder" valign="top" width="16.08%" headers="mcps1.3.3.2.2.2.1.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1486420483147">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.92%" headers="mcps1.3.3.2.2.2.1.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p2086414851419">Object</p>
</td>
<td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.3.2.2.2.1.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p128649481149">For details, see <a href="#EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table968519176105">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table968519176105"></a><a name="en-us_topic_0248254028_table968519176105"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table968519176105" frame="border" border="1" rules="all"><caption><b>Table 3 </b>count field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row3685517111018"><th align="left" class="cellrowborder" valign="top" width="18.39%" id="mcps1.3.3.2.2.2.1.3.2.5.1.1"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p16854171102"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b92398245312">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.08%" id="mcps1.3.3.2.2.2.1.3.2.5.1.2"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p136859175100"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b1881721532">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.92%" id="mcps1.3.3.2.2.2.1.3.2.5.1.3"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p16685191731010"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b1147573175313">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.61%" id="mcps1.3.3.2.2.2.1.3.2.5.1.4"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p136859172104"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b74119475316">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row6685111751020"><td class="cellrowborder" valign="top" width="18.39%" headers="mcps1.3.3.2.2.2.1.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1968501711106">count</p>
</td>
<td class="cellrowborder" valign="top" width="16.08%" headers="mcps1.3.3.2.2.2.1.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p46851117171012">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.92%" headers="mcps1.3.3.2.2.2.1.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p368581713102">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.3.2.2.2.1.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p11685121716108">Number of shards to be added.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section174174216613"><ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_ul66972122155"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li569761214151">Example request<pre class="codeblock" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_codeblock176979127152">{
"expand_cluster": {
"shard":{
"count":1
}
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section415313301118"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_ul187991238144718"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li10799193816479">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_table668693854710" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row579917386473"><th align="left" class="cellrowborder" valign="top" width="33.68%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p11799738114718"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b941053895312">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.47%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p879983818477"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b189951738205318">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.85%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p1799538174710"><strong id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_b4610173916534">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_row1379923812473"><td class="cellrowborder" valign="top" width="33.68%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p5799103874712">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.47%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p879983854715">String</p>
</td>
<td class="cellrowborder" valign="top" width="32.85%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_p177991438194711">Task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_ul1135712981319"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li735719919138">Example normal response<ul id="EN-US_TOPIC_0000001947569473__ul1737513127527"><li id="EN-US_TOPIC_0000001947569473__li1560126194916">Example response <pre class="codeblock" id="EN-US_TOPIC_0000001947569473__codeblock1156072617490">{
"job_id": "2b414788a6004883a02390e2eb0ea227"
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li2072718551485">Abnormal response<p id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0128427213_p29415884"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_li2072718551485"></a><a name="en-us_topic_0248254028_li2072718551485"></a>For details, see <a href="opengauss_api_0031.html">Abnormal Request Results</a>.</p>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_ul7858132212142"><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_li58581622171411">Normal<p id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_p1040982941020"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_li58581622171411"></a><a name="en-us_topic_0000001704033841_en-us_topic_0110967248_li58581622171411"></a>202</p>
</li><li id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_li11583183218149">Abnormal<p id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_p65078394148"><a name="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_li11583183218149"></a><a name="en-us_topic_0000001704033841_en-us_topic_0110967248_li11583183218149"></a>For details, see <a href="opengauss_api_0032.html">Status Codes</a>.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569473__en-us_topic_0248254028_section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="EN-US_TOPIC_0000001947569473__en-us_topic_0000001704033841_en-us_topic_0110967248_p19357163913406">For details, see <a href="opengauss_api_0033.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="opengauss_api_1014.html">DB Instance Management</a></div>
</div>
</div>