doc-exports/docs/opengauss/api-ref/opengauss_api_1019.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

176 lines
19 KiB
HTML

<a name="EN-US_TOPIC_0000001947569549"></a><a name="EN-US_TOPIC_0000001947569549"></a>
<h1 class="topictitle1">Adding CNs</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_section2161131714317"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p1779463834710">This API is used to add CNs.</p>
<ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0128427213_ul12259155218373"><li id="EN-US_TOPIC_0000001947569549__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_0000001947569549__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_0000001947569549__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>
<div class="section" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_section11726173915271"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_ul43911954192719"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li8391954112710">The CN growth increment ranges from 1 to 9.</li><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li6884191216712">The maximum number of CNs is 256.</li><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li890581415511">If you choose the single-AZ deployment during instance creation, add CNs in the same AZ.</li><li id="EN-US_TOPIC_0000001947569549__li9502451256">The number of CNs of a DB instance cannot exceed twice the number of shards.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_section1832017411437"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_ul1794193834712"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li7794173834713">URI format<p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p8795103874717"><a name="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li7794173834713"></a><a name="en-us_topic_0248254027_li7794173834713"></a>POST https://{<em id="EN-US_TOPIC_0000001947569549__en-us_topic_0128427213_i1958383021511">Endpoint</em>}/opengauss/v3/{<em id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_i8287192519110">project_id</em>}/instances/{<em id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_i575217298119">instance_id</em>}/action</p>
</li><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li4411135064210">Example<p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p1454414211213"><a name="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li4411135064210"></a><a name="en-us_topic_0248254027_li4411135064210"></a>https://gaussdb.eu-de.otc.t-systems.com/opengauss/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action</p>
</li><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li1879517384479">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table1850440194515" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row250519074511"><th align="left" class="cellrowborder" valign="top" width="23.102310231023104%" id="mcps1.3.3.2.3.1.2.4.1.1"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p1797102511451"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b208661051125315">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.602660266026607%" id="mcps1.3.3.2.3.1.2.4.1.2"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p18800202517459"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b15587105220532">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.29502950295029%" id="mcps1.3.3.2.3.1.2.4.1.3"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p2080172515455"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b0205653125317">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row1750516054517"><td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.3.2.3.1.2.4.1.1 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p58122251454">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.602660266026607%" headers="mcps1.3.3.2.3.1.2.4.1.2 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p98132025104516">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.29502950295029%" headers="mcps1.3.3.2.3.1.2.4.1.3 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p881412255459">Project ID of a tenant in a region.</p>
<p id="EN-US_TOPIC_0000001947569549__p8544202712219">To obtain this value, see <a href="opengauss_api_0034.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row050530174516"><td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.3.2.3.1.2.4.1.1 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p198191825124514">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.602660266026607%" headers="mcps1.3.3.2.3.1.2.4.1.2 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p14819162594516">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.29502950295029%" headers="mcps1.3.3.2.3.1.2.4.1.3 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p981962520456">DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_section174174216613"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_ul1879693854713"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li157964386476">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table1192517281714" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row992517283713"><th align="left" class="cellrowborder" valign="top" width="17.87%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p86417391376"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b627713565419">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.37%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p96753916711"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b86866125413">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.59%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p268239878"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b1577616615549">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.17%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p769133918716"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b18335117135416">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row9925162812714"><td class="cellrowborder" valign="top" width="17.87%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p187053911714">expand_cluster</p>
</td>
<td class="cellrowborder" valign="top" width="16.37%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p871539878">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.59%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_a9a9492e05cb648e885d1e747a339d04d">Object</p>
</td>
<td class="cellrowborder" valign="top" width="44.17%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p1672139273">For details, see <a href="#EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table68501959278">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table68501959278"></a><a name="en-us_topic_0248254027_table68501959278"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table68501959278" frame="border" border="1" rules="all"><caption><b>Table 3 </b>expand_cluster field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row9851859278"><th align="left" class="cellrowborder" valign="top" width="18.39%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p1471161120810"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b195808295549">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.14%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p97133113812"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b332573017544">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.86%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p671491117810"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b188313115544">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.61%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p12716171118817"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b5752731155411">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row128514591678"><td class="cellrowborder" valign="top" width="18.39%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p197182111783">coordinators</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p6719311086">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.86%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p27205111485">Array</p>
</td>
<td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p57226111189">For details, see <a href="#EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table968519176105">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table968519176105"></a><a name="en-us_topic_0248254027_table968519176105"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table968519176105" frame="border" border="1" rules="all"><caption><b>Table 4 </b>azCode field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row3685517111018"><th align="left" class="cellrowborder" valign="top" width="18.39%" id="mcps1.3.4.2.1.3.2.5.1.1"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p16854171102"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b17427184725414">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.08%" id="mcps1.3.4.2.1.3.2.5.1.2"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p136859175100"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b16684825413">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.92%" id="mcps1.3.4.2.1.3.2.5.1.3"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p16685191731010"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b1157344825416">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.61%" id="mcps1.3.4.2.1.3.2.5.1.4"><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p136859172104"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b135081349205416">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_row6685111751020"><td class="cellrowborder" valign="top" width="18.39%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p1968501711106">az_code</p>
</td>
<td class="cellrowborder" valign="top" width="16.08%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p46851117171012">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.92%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p368581713102">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_p11685121716108">AZs to which CNs are to be added.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_ul17798138184717"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li779813854716">Example request (adding a single CN)<pre class="codeblock" id="EN-US_TOPIC_0000001947569549__codeblock2057595111145">{
"expand_cluster": {
"coordinators": [
{
"az_code":"eu-de-01"
}
]
}
}</pre>
</li><li id="EN-US_TOPIC_0000001947569549__li433854121314">Example request (adding multiple CNs)<pre class="codeblock" id="EN-US_TOPIC_0000001947569549__codeblock10637134171514">{
"expand_cluster": {
"coordinators": [
{
"az_code":"eu-de-01"
},
{
"az_code":"eu-de-01"
},
{
"az_code":"eu-de-01"
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_section415313301118"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_ul187991238144718"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li10799193816479">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_table668693854710" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_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_0000001947569549__en-us_topic_0248254027_p11799738114718"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b191754418552">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_0000001947569549__en-us_topic_0248254027_p879983818477"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b166811445557">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_0000001947569549__en-us_topic_0248254027_p1799538174710"><strong id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_b16216134512555">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_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_0000001947569549__en-us_topic_0248254027_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_0000001947569549__en-us_topic_0248254027_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_0000001947569549__en-us_topic_0248254027_p177991438194711">Task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_ul1135712981319"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li735719919138">Example normal response<ul id="EN-US_TOPIC_0000001947569549__ul529617146413"><li id="EN-US_TOPIC_0000001947569549__li1441412110419">Example response <pre class="codeblock" id="EN-US_TOPIC_0000001947569549__codeblock1156072617490">{
"job_id": "2b414788a6004883a02390e2eb0ea227"
}</pre>
</li></ul>
</li><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li2072718551485">Abnormal response<p id="EN-US_TOPIC_0000001947569549__en-us_topic_0000001704033841_en-us_topic_0128427213_p29415884"><a name="EN-US_TOPIC_0000001947569549__en-us_topic_0248254027_li2072718551485"></a><a name="en-us_topic_0248254027_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_0000001947569549__en-us_topic_0248254027_section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="EN-US_TOPIC_0000001947569549__en-us_topic_0000001704033841_en-us_topic_0110967248_ul7858132212142"><li id="EN-US_TOPIC_0000001947569549__en-us_topic_0000001704033841_en-us_topic_0110967248_li58581622171411">Normal<p id="EN-US_TOPIC_0000001947569549__en-us_topic_0000001704033841_en-us_topic_0110967248_p1040982941020"><a name="EN-US_TOPIC_0000001947569549__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_0000001947569549__en-us_topic_0000001704033841_en-us_topic_0110967248_li11583183218149">Abnormal<p id="EN-US_TOPIC_0000001947569549__en-us_topic_0000001704033841_en-us_topic_0110967248_p65078394148"><a name="EN-US_TOPIC_0000001947569549__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_0000001947569549__en-us_topic_0248254027_section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="EN-US_TOPIC_0000001947569549__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>