Files
doc-exports/docs/taurusdb/api-ref/gaussdb_04_0018.html
wangdengke2 1aae9268b0 taurusdb_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2025-06-17 09:00:31 +00:00

198 lines
14 KiB
HTML

<a name="gaussdb_04_0018"></a><a name="gaussdb_04_0018"></a>
<h1 class="topictitle1">Changing a DB Instance Name</h1>
<div id="body1597396343821"><div class="section" id="gaussdb_04_0018__section44230431101549"><h4 class="sectiontitle">Function</h4><p id="gaussdb_04_0018__p1350220403353">This API is used to change a DB instance name. Before using this API:</p>
<ul id="gaussdb_04_0018__ul924420236520"><li id="gaussdb_04_0018__li136356359522">Learn how to <a href="gaussdb_03_0001.html">authorize and authenticate</a> it.</li><li id="gaussdb_04_0018__li1991981933613">Obtain the required <a href="gaussdb_00_0003.html">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="gaussdb_04_0018__section2058111148101"><h4 class="sectiontitle">URI</h4><p id="gaussdb_04_0018__p1458115146108">PUT /v3/{project_id}/instances/{instance_id}/name</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0018__table3582191431011" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="gaussdb_04_0018__row1358261441012"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="gaussdb_04_0018__p12582121410102">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="gaussdb_04_0018__p158314144102">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="gaussdb_04_0018__p1758361491014">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="gaussdb_04_0018__p16583141461010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_04_0018__row35821414181011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="gaussdb_04_0018__p95843149106">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="gaussdb_04_0018__p1358491419102">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="gaussdb_04_0018__p17584214191017">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="gaussdb_04_0018__p67212267135">Project ID of a tenant in a region.</p>
<p id="gaussdb_04_0018__p472182619137">To obtain this value, see <a href="gaussdb_10_0004.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="gaussdb_04_0018__row1258215140104"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="gaussdb_04_0018__p17585191416107">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="gaussdb_04_0018__p1958581481018">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="gaussdb_04_0018__p858521441020">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="gaussdb_04_0018__p158613148103">DB instance ID, which is compliant with the UUID format.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_04_0018__section18586114161015"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0018__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="gaussdb_04_0018__row12586171412105"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="gaussdb_04_0018__p658741419102">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="gaussdb_04_0018__p058731419101">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="gaussdb_04_0018__p1058831410103">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="gaussdb_04_0018__p958815143109">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_04_0018__row16586131441015"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_04_0018__p18588111441011">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_04_0018__p185881814181015">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_04_0018__p15589131416105">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_04_0018__p145899147104">User token.</p>
</td>
</tr>
<tr id="gaussdb_04_0018__row1758616144101"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_04_0018__p15589141419103">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_04_0018__p8590171416109">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_04_0018__p1590161418102">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_04_0018__p20590514151018">Language.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0018__request_MysqlUpdateInstanceNameRequest" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="gaussdb_04_0018__row1859171417106"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="gaussdb_04_0018__p85912014111012">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="gaussdb_04_0018__p459281413109">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="gaussdb_04_0018__p13592161414106">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="gaussdb_04_0018__p115921214151015">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_04_0018__row1159119148104"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="gaussdb_04_0018__p11592191481020">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="gaussdb_04_0018__p05931514121014">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="gaussdb_04_0018__p35931914181020">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="gaussdb_04_0018__p8593171431012">DB instance name. DB instances of the same type can have same names under the same tenant. The name consists of 4 to 64 characters and starts with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_04_0018__section65941914111017"><h4 class="sectiontitle">Response Parameters</h4><p id="gaussdb_04_0018__p125943141106"><strong id="gaussdb_04_0018__b102341582525038">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0018__response_MysqlUpdateInstanceNameResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_04_0018__row145947141108"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="gaussdb_04_0018__p195957149105">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="gaussdb_04_0018__p2595514121016">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="gaussdb_04_0018__p195969144105">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_04_0018__row4594614161013"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="gaussdb_04_0018__p5596121451012">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="gaussdb_04_0018__p65962143107">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="gaussdb_04_0018__p145967143108">Task ID for changing a DB instance name.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="gaussdb_04_0018__p1159711411017"><strong id="gaussdb_04_0018__b80199606725228">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0018__response_MysqlErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_04_0018__row205971814191015"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="gaussdb_04_0018__p155989147107">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="gaussdb_04_0018__p16598201411101">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="gaussdb_04_0018__p159861412105">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_04_0018__row13597161461015"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="gaussdb_04_0018__p125981814131011">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="gaussdb_04_0018__p5599111418109">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="gaussdb_04_0018__p17599131412101">Error code.</p>
</td>
</tr>
<tr id="gaussdb_04_0018__row19597714171011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="gaussdb_04_0018__p1959901461012">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="gaussdb_04_0018__p2600181416105">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="gaussdb_04_0018__p1760015144101">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="gaussdb_04_0018__p36001814151018"><strong id="gaussdb_04_0018__b1860011431019">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0018__table156001414141012" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_04_0018__row16601131417107"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p id="gaussdb_04_0018__p1360113149106">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p id="gaussdb_04_0018__p206011014151010">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p id="gaussdb_04_0018__p15602314171013">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="gaussdb_04_0018__row5601141416102"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="gaussdb_04_0018__p1602141414102">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="gaussdb_04_0018__p1160221410102">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="gaussdb_04_0018__p4603151471014">Error code.</p>
</td>
</tr>
<tr id="gaussdb_04_0018__row16011914191013"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="gaussdb_04_0018__p5603121417106">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="gaussdb_04_0018__p14603131431014">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="gaussdb_04_0018__p760411451011">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="gaussdb_04_0018__section19604201414103"><h4 class="sectiontitle">Example Request</h4><p id="gaussdb_04_0018__p360461441016">Changing a DB Instance Name</p>
<pre class="screen" id="gaussdb_04_0018__screen8605141414101">
PUT https://gaussdb-mysql.eu-de.otc.t-systems.com/v3/054e292c9880d4992f02c0196d3ea468/instances/ba62a0b83a1b42bfab275829d86ac0fdin07/name
{
"name" : "taurusdb-name"
}</pre>
</div>
<div class="section" id="gaussdb_04_0018__section860651471019"><h4 class="sectiontitle">Example Response</h4><p id="gaussdb_04_0018__p186061114181012"><strong id="gaussdb_04_0018__b103410045625038">Status code: 200</strong></p>
<p id="gaussdb_04_0018__p3606121461019">Success.</p>
<pre class="screen" id="gaussdb_04_0018__screen660711461013">{
"job_id" : "0f6b6a9e-bd39-4e95-9374-e4d134e5a3d1"
}</pre>
</div>
<div class="section" id="gaussdb_04_0018__section4778540915440"><h4 class="sectiontitle">Status Code</h4><p id="gaussdb_04_0018__p0723374409">For details, see <a href="gaussdb_10_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="gaussdb_04_0018__section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="gaussdb_04_0018__p19357163913406">For details, see <a href="gaussdb_10_0003.html">Error Codes</a>.</p>
</div>
<p id="gaussdb_04_0018__p8060118"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="gaussdb_04_0003.html">Managing DB Instances</a></div>
</div>
</div>