Files
doc-exports/docs/taurusdb/api-ref/gaussdb_11_0018.html
wangdengke2 ee9f8aa0b6 taurusdb_api
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2025-10-30 15:48:33 +00:00

212 lines
16 KiB
HTML

<a name="gaussdb_11_0018"></a><a name="gaussdb_11_0018"></a>
<h1 class="topictitle1">Changing a DB Instance Name</h1>
<div id="body8662426"><div class="section" id="gaussdb_11_0018__en-us_topic_0000001250985338_section44230431101549"><h4 class="sectiontitle">Function</h4><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p1350220403353">This API is used to change a DB instance name. Before calling this API:</p>
<ul id="gaussdb_11_0018__en-us_topic_0000001250985338_ul924420236520"><li id="gaussdb_11_0018__en-us_topic_0000001267522832_en-us_topic_0000001250985350_li136356359522">Learn how to <a href="gaussdb_03_0001.html">authorize and authenticate</a> it.</li><li id="gaussdb_11_0018__en-us_topic_0000001267522832_en-us_topic_0000001250985350_li1991981933613">Obtain the required <a href="gaussdb_00_0003.html">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="gaussdb_11_0018__en-us_topic_0000001250985338_section31729879101549"><h4 class="sectiontitle">URI</h4><ul id="gaussdb_11_0018__en-us_topic_0000001250985338_ul19983374101549"><li id="gaussdb_11_0018__en-us_topic_0000001250985338_li45632644101549">URI format<p id="gaussdb_11_0018__en-us_topic_0000001250985338_p8040618101549"><a name="gaussdb_11_0018__en-us_topic_0000001250985338_li45632644101549"></a><a name="en-us_topic_0000001250985338_li45632644101549"></a>PUT https://{endpoint}/mysql/v3/{project_id}/instances/{instance_id}/name</p>
</li><li id="gaussdb_11_0018__en-us_topic_0000001250985338_li54691335131412">URI example<p id="gaussdb_11_0018__p135916465414"><a name="gaussdb_11_0018__en-us_topic_0000001250985338_li54691335131412"></a><a name="en-us_topic_0000001250985338_li54691335131412"></a>PUT https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/c3ec2c6148ad4d71b1a8411a62df0d3cin07/name</p>
</li><li id="gaussdb_11_0018__en-us_topic_0000001250985338_li47310355101549">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0018__en-us_topic_0000001250985338_table23140016101549" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="gaussdb_11_0018__en-us_topic_0000001250985338_row27795795101549"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.2.3.1.2.5.1.1"><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p36866898101549"><strong id="gaussdb_11_0018__en-us_topic_0000001250985338_b478518251911">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.2.2.3.1.2.5.1.2"><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p156174610411">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11%" id="mcps1.3.2.2.3.1.2.5.1.3"><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p33428750101549">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59%" id="mcps1.3.2.2.3.1.2.5.1.4"><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p23374190101549"><strong id="gaussdb_11_0018__en-us_topic_0000001250985338_b13150933314">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_11_0018__en-us_topic_0000001250985338_row14261210101549"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.2.3.1.2.5.1.1 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p104922035165518">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.2.3.1.2.5.1.2 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p1956194615414">String</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.2.2.3.1.2.5.1.3 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p18047737101549">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.2.2.3.1.2.5.1.4 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p52580603101549">Project ID of a tenant in a region.</p>
<p id="gaussdb_11_0018__en-us_topic_0000001250985338_p16476914175718">To obtain this value, see <a href="gaussdb_10_0004.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="gaussdb_11_0018__en-us_topic_0000001250985338_row197844933113"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.2.3.1.2.5.1.1 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p2153719152911">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.2.3.1.2.5.1.2 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p8572046164115">String</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.2.2.3.1.2.5.1.3 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p346994410599">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.2.2.3.1.2.5.1.4 "><p id="gaussdb_11_0018__en-us_topic_0000001250985338_p84691144145915">DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="gaussdb_11_0018__section1799102153613"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0018__table9991521203611" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="gaussdb_11_0018__row1399112119363"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="gaussdb_11_0018__p1990211363">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="gaussdb_11_0018__p199142173615">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="gaussdb_11_0018__p20991921173617">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="gaussdb_11_0018__p1099192118366">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_11_0018__row109932183614"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_11_0018__p8991621173616">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_11_0018__p0100142183618">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_11_0018__p51001521113618">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_11_0018__p5100162119365">User token.</p>
</td>
</tr>
<tr id="gaussdb_11_0018__row81001321193611"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_11_0018__p610062183612">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_11_0018__p13100102153620">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_11_0018__p19100132143611">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_11_0018__p121009213364">Language.</p>
</td>
</tr>
<tr id="gaussdb_11_0018__row10100142115368"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_11_0018__p1910012214369">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_11_0018__p1910012218365">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_11_0018__p6100521143617">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_11_0018__p191001821203617">MIME type of the request body. You are advised to use the default value <strong id="gaussdb_11_0018__b61475049573544">application/json</strong>. For APIs used to upload objects or images, the value can vary depending on the flow type.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0018__table16100122117367" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="gaussdb_11_0018__row11100121133617"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="gaussdb_11_0018__p121011121153611">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="gaussdb_11_0018__p101011221103612">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="gaussdb_11_0018__p13101421163611">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="gaussdb_11_0018__p1110122133610">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_11_0018__row31015218362"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="gaussdb_11_0018__p1010114211363">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="gaussdb_11_0018__p141021721143610">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="gaussdb_11_0018__p3102221193616">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="gaussdb_11_0018__p1310212119369">Instance name.</p>
<p id="gaussdb_11_0018__p6102142173614">Instances of the same type can have same names under the same tenant.</p>
<p id="gaussdb_11_0018__p41029211369">The value consists of 4 to 64 characters and starts with a letter. It is case-sensitive and contains only letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_11_0018__section16126301186"><h4 class="sectiontitle">Response Parameters</h4><p id="gaussdb_11_0018__p181268081817"><strong id="gaussdb_11_0018__b6126800183">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0018__en-us_topic_0000001226563877_response_MysqlUpdateInstanceNameResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameter</caption><thead align="left"><tr id="gaussdb_11_0018__row1126709189"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="gaussdb_11_0018__p20126905189">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="gaussdb_11_0018__p181261502181">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="gaussdb_11_0018__p51273021814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_11_0018__row131268019189"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="gaussdb_11_0018__p1712716041815">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="gaussdb_11_0018__p2012715010180">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="gaussdb_11_0018__p11273041817">ID of the task for changing a DB instance name.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="gaussdb_11_0018__p1912710020188"><strong id="gaussdb_11_0018__b10814436767250">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0018__en-us_topic_0000001226563877_response_MysqlErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_11_0018__row41279010181"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="gaussdb_11_0018__p1112710171816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="gaussdb_11_0018__p2012811014185">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="gaussdb_11_0018__p6128190121814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_11_0018__row20127901184"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="gaussdb_11_0018__p4128130161818">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="gaussdb_11_0018__p412870141816">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="gaussdb_11_0018__p15128401188">Error code.</p>
</td>
</tr>
<tr id="gaussdb_11_0018__row5127105185"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="gaussdb_11_0018__p91281405186">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="gaussdb_11_0018__p1212812021812">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="gaussdb_11_0018__p412815019183">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="gaussdb_11_0018__p3128110171810"><strong id="gaussdb_11_0018__b13293348886408">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_11_0018__table71283091811" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_11_0018__row1912817001815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p id="gaussdb_11_0018__p1112918015180">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p id="gaussdb_11_0018__p1612980111814">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p id="gaussdb_11_0018__p11291603181">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_11_0018__row18128809186"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="gaussdb_11_0018__p1712914041811">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="gaussdb_11_0018__p4129170131817">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="gaussdb_11_0018__p16129500184">Error code.</p>
</td>
</tr>
<tr id="gaussdb_11_0018__row17129601184"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="gaussdb_11_0018__p41291408186">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="gaussdb_11_0018__p1412917013185">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="gaussdb_11_0018__p513070101819">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_11_0018__section113040151818"><h4 class="sectiontitle">Example Request</h4><p id="gaussdb_11_0018__p1813019010188">Changing a DB instance name</p>
<pre class="screen" id="gaussdb_11_0018__screen41301708188">
POST https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/ba62a0b83a1b42bfab275829d86ac0fdin07/name
{
"name" : "taurusdb-name"
}</pre>
</div>
<div class="section" id="gaussdb_11_0018__section1513080141820"><h4 class="sectiontitle">Example Response</h4><p id="gaussdb_11_0018__p12130501180"><strong id="gaussdb_11_0018__b1113010012185">Status code: 200</strong></p>
<p id="gaussdb_11_0018__p31301106187">Success.</p>
<pre class="screen" id="gaussdb_11_0018__screen6130180111811">{
"job_id" : "0f6b6a9e-bd39-4e95-9374-e4d134e5a3d1"
}</pre>
</div>
<div class="section" id="gaussdb_11_0018__section4778540915440"><h4 class="sectiontitle">Status Code</h4><p id="gaussdb_11_0018__p0723374409">For details, see <a href="gaussdb_10_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="gaussdb_11_0018__section2557116171718"><h4 class="sectiontitle">Error Code</h4><p id="gaussdb_11_0018__p855716160178">For details, see <a href="gaussdb_10_0003.html">Error Codes</a>.</p>
</div>
<p id="gaussdb_11_0018__en-us_topic_0000001250985338_p8060118"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="gaussdb_11_0003.html">Instance Management</a></div>
</div>
</div>