doc-exports/docs/rds/api-ref/rds_01_0103.html
Ru, Li Yi 9457035d64 rds_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-03 08:42:51 +00:00

143 lines
12 KiB
HTML

<a name="rds_01_0103"></a><a name="rds_01_0103"></a>
<h1 class="topictitle1">Changing a Single DB Instance to Primary/Standby DB Instances</h1>
<div id="body1548399097866"><div class="section" id="rds_01_0103__section4347141443619"><h4 class="sectiontitle">Function</h4><p id="rds_01_0103__p0377114714241">This API is used to change a single DB instance to primary/standby DB instances.</p>
<ul id="rds_01_0103__ul12259155218373"><li id="rds_01_0103__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_01_0103__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="rds_01_0103__section141115479403"><h4 class="sectiontitle">URI</h4><ul id="rds_01_0103__ul17377164719245"><li id="rds_01_0103__li7377134782414">URI format<p id="rds_01_0103__p39991158587"><a name="rds_01_0103__li7377134782414"></a><a name="li7377134782414"></a>POST https://{<em id="rds_01_0103__i4279104617158">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/action</p>
</li><li id="rds_01_0103__li63771247122414">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0103__table1722624711242" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_01_0103__row113771478241"><th align="left" class="cellrowborder" valign="top" width="23.69%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="rds_01_0103__p8377647162410"><strong id="rds_01_0103__b135383818811">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.8%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="rds_01_0103__p15377347112411"><strong id="rds_01_0103__b477533815818">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.510000000000005%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="rds_01_0103__p133778478248"><strong id="rds_01_0103__b1843814394814">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0103__row43771447192411"><td class="cellrowborder" valign="top" width="23.69%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="rds_01_0103__p18377184716242">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.8%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="rds_01_0103__p13377164712415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="54.510000000000005%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="rds_01_0103__p1437794711246">Specifies the project ID of a tenant in a region.</p>
<p id="rds_01_0103__p587911805216">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="rds_01_0103__row14377174713244"><td class="cellrowborder" valign="top" width="23.69%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="rds_01_0103__p12377194715246">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.8%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="rds_01_0103__p12377124752411">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="54.510000000000005%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="rds_01_0103__p1337818471248">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_01_0103__section7982125194512"><h4 class="sectiontitle">Request</h4><ul id="rds_01_0103__ul8378124717249"><li id="rds_01_0103__li183789479247">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0103__table10237144762417" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_01_0103__row8378194702410"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="rds_01_0103__p037854722412"><strong id="rds_01_0103__b75999481598">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="rds_01_0103__p1378184718243"><strong id="rds_01_0103__b033711496918">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="rds_01_0103__p1437884782417"><strong id="rds_01_0103__b955419502910">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="rds_01_0103__p103785475246"><strong id="rds_01_0103__b1498716501296">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0103__row14378947162414"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="rds_01_0103__p1937814772416">single_to_ha</p>
<p id="rds_01_0103__p237894732416"></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="rds_01_0103__p1437810472247">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="rds_01_0103__a9a9492e05cb648e885d1e747a339d04d">Object</p>
</td>
<td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="rds_01_0103__p7378154702413">For details, see <a href="#rds_01_0103__table724844712247">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rds_01_0103__table724844712247"></a><a name="table724844712247"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0103__table724844712247" frame="border" border="1" rules="all"><caption><b>Table 3 </b>single_to_ha field data structure description</caption><thead align="left"><tr id="rds_01_0103__row1378174752416"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="rds_01_0103__p203801947132417"><strong id="rds_01_0103__b19302145113128">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="rds_01_0103__p16380154717240"><strong id="rds_01_0103__b1544325214129">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.999999999999996%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="rds_01_0103__p2038014711241"><strong id="rds_01_0103__b5733125371220">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="rds_01_0103__p7380447132415"><strong id="rds_01_0103__b12320757141211">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0103__row1380174782410"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_01_0103__p1070112015404">az_code_new_node</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_01_0103__p17380174752410">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="28.999999999999996%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_01_0103__p14380747142416">String</p>
</td>
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_01_0103__p5380174702410">Specifies the AZ code of the DB instance node.</p>
</td>
</tr>
<tr id="rds_01_0103__row153801547112418"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="rds_01_0103__p11380124713240">password</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="rds_01_0103__p438011474242">No</p>
</td>
<td class="cellrowborder" valign="top" width="28.999999999999996%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="rds_01_0103__p2038014472246">String</p>
</td>
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="rds_01_0103__p6380194714248">This parameter is mandatory only when a Microsoft SQL Server DB instance type is changed from single to primary/standby.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="rds_01_0103__ul176751052277"><li id="rds_01_0103__li4411135064210">Example<p id="rds_01_0103__p1454414211213"><a name="rds_01_0103__li4411135064210"></a><a name="li4411135064210"></a>POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action</p>
</li></ul>
<ul id="rds_01_0103__ul63801747142417"><li id="rds_01_0103__li12380947102415">Request example<pre class="codeblock" id="rds_01_0103__codeblock14912026154811">{
"single_to_ha": {
"az_code_new_node": "az2xahz",
"password": "Test@1234567"
}
}</pre>
</li></ul>
<div class="section" id="rds_01_0103__section1743185854817"><h4 class="sectiontitle">Response</h4><ul id="rds_01_0103__ul938004752419"><li id="rds_01_0103__li8380134713247">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0103__table8260144712417" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameter description</caption><thead align="left"><tr id="rds_01_0103__row183811472249"><th align="left" class="cellrowborder" valign="top" width="33.68%" id="mcps1.3.6.2.1.1.2.4.1.1"><p id="rds_01_0103__p15381174742414"><strong id="rds_01_0103__b3533111321519">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.47%" id="mcps1.3.6.2.1.1.2.4.1.2"><p id="rds_01_0103__p2381184762415"><strong id="rds_01_0103__b0527214191518">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.85%" id="mcps1.3.6.2.1.1.2.4.1.3"><p id="rds_01_0103__p2381747192410"><strong id="rds_01_0103__b11337161561515">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0103__row53813477240"><td class="cellrowborder" valign="top" width="33.68%" headers="mcps1.3.6.2.1.1.2.4.1.1 "><p id="rds_01_0103__p738144712412">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.47%" headers="mcps1.3.6.2.1.1.2.4.1.2 "><p id="rds_01_0103__p17381164712247">String</p>
</td>
<td class="cellrowborder" valign="top" width="32.85%" headers="mcps1.3.6.2.1.1.2.4.1.3 "><p id="rds_01_0103__p5381104711241">Indicates the task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="rds_01_0103__ul1652854497"><li id="rds_01_0103__li10652255499">Example normal response<pre class="codeblock" id="rds_01_0103__codeblock12252313493">{
"job_id": "2b414788a6004883a02390e2eb0ea227"
}</pre>
</li><li id="rds_01_0103__li4238948101011">Abnormal Response<p id="rds_01_0103__p1138134710247"><a name="rds_01_0103__li4238948101011"></a><a name="li4238948101011"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
<div class="section" id="rds_01_0103__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_01_0103__rds_01_0002_en-us_topic_0032347778_ul7858132212142"><li id="rds_01_0103__rds_01_0002_en-us_topic_0032347778_li58581622171411">Normal<p id="rds_01_0103__rds_01_0002_en-us_topic_0032347778_p1040982941020"><a name="rds_01_0103__rds_01_0002_en-us_topic_0032347778_li58581622171411"></a><a name="rds_01_0002_en-us_topic_0032347778_li58581622171411"></a>202</p>
</li><li id="rds_01_0103__rds_01_0002_en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_01_0103__rds_01_0002_en-us_topic_0032347778_p0723374409"><a name="rds_01_0103__rds_01_0002_en-us_topic_0032347778_li11583183218149"></a><a name="rds_01_0002_en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_01_0103__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_01_0103__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0056887470.html">DB Instance Management</a></div>
</div>
</div>