1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_api_0022.html
Wang , Deng Ke a96a12ecf1 openGauss API 20221109 version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-14 16:40:26 +00:00

106 lines
10 KiB
HTML

<a name="opengauss_api_0022"></a><a name="opengauss_api_0022"></a>
<h1 class="topictitle1">Modifying a DB Instance Name</h1>
<div id="body1601295215233"><div class="section" id="opengauss_api_0022__sd612792150ae4b208a688aaf2ea8373a"><h4 class="sectiontitle">Function</h4><p id="opengauss_api_0022__a2cdf56d7b7d34086ae869e51663009e1">This API is used to change a DB instance name.</p>
<ul id="opengauss_api_0022__u7bce3f5bbe93412f846d251a70fcf7c0"><li id="opengauss_api_0022__en-us_topic_0256709922_li41227910453">Before calling an API, you need to understand the API in <a href="opengauss_api_0012.html">Using APIs</a>.</li><li id="opengauss_api_0022__lb5b27d5b1c7e4fb6aa975d2581fcbcf8">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="opengauss_api_0022__s57208d65eff64f4b9f470411f0f50f52"><h4 class="sectiontitle">URI</h4><ul id="opengauss_api_0022__uef1f19e4b9f14b85a3f328139ea8aa70"><li id="opengauss_api_0022__l096c3afe8cf74f1486544604422ea030">URI format<p id="opengauss_api_0022__aa15754bfe17c4b2984693497a7f3aeea"><a name="opengauss_api_0022__l096c3afe8cf74f1486544604422ea030"></a><a name="l096c3afe8cf74f1486544604422ea030"></a>PUT https://{<em id="opengauss_api_0022__a1e43346df0ec495a8184551b098f4628">Endpoint</em>}/opengauss/v3/{<em id="opengauss_api_0022__a2fd015359cac444ea0026c3d20ffd724">project_id</em>}/instances/{<em id="opengauss_api_0022__en-us_topic_0248254028_i575217298119">instance_id</em>}/name</p>
</li><li id="opengauss_api_0022__l84fb22ebad954a54bf08e6046394c43e">Example<p id="opengauss_api_0022__a4c6544bdeb964ef093db66e55e14c237"><a name="opengauss_api_0022__l84fb22ebad954a54bf08e6046394c43e"></a><a name="l84fb22ebad954a54bf08e6046394c43e"></a>https://gaussdb.eu-de.otc.t-systems.com/opengauss/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/name</p>
<ul id="opengauss_api_0022__u39da8dea28a742b6b8d554eecd99bc75"><li id="opengauss_api_0022__l471ae50f867640f9822e271930628a8a">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="opengauss_api_0022__tc2d8e97cd5444a20a6efb33c9e1fb44e" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="opengauss_api_0022__r3a1c61c293b84172b5588ac6b5017979"><th align="left" class="cellrowborder" valign="top" width="22.79%" id="mcps1.3.2.2.2.2.1.1.2.4.1.1"><p id="opengauss_api_0022__en-us_topic_0248254028_p178635485145">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.880000000000003%" id="mcps1.3.2.2.2.2.1.1.2.4.1.2"><p id="opengauss_api_0022__en-us_topic_0248254028_p586384819144">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.330000000000005%" id="mcps1.3.2.2.2.2.1.1.2.4.1.3"><p id="opengauss_api_0022__a1b9905b948ee49b3b33c1092030cc2ac">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="opengauss_api_0022__row153821619455"><td class="cellrowborder" valign="top" width="22.79%" headers="mcps1.3.2.2.2.2.1.1.2.4.1.1 "><p id="opengauss_api_0022__en-us_topic_0128427214_p49532829">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20.880000000000003%" headers="mcps1.3.2.2.2.2.1.1.2.4.1.2 "><p id="opengauss_api_0022__en-us_topic_0128427214_p52736237">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="56.330000000000005%" headers="mcps1.3.2.2.2.2.1.1.2.4.1.3 "><p id="opengauss_api_0022__p19528455451">Specifies the project ID of a tenant in a region.</p>
<p id="opengauss_api_0022__p95284517457">For details about how to obtain the project ID, see <a href="opengauss_api_0034.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="opengauss_api_0022__row103812684518"><td class="cellrowborder" valign="top" width="22.79%" headers="mcps1.3.2.2.2.2.1.1.2.4.1.1 "><p id="opengauss_api_0022__abe634873bf7340eeb9dde5363fb0ac9e">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20.880000000000003%" headers="mcps1.3.2.2.2.2.1.1.2.4.1.2 "><p id="opengauss_api_0022__en-us_topic_0128427214_p246284104619">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="56.330000000000005%" headers="mcps1.3.2.2.2.2.1.1.2.4.1.3 "><p id="opengauss_api_0022__p2201242204518">Specifies the DB instance ID, which is compliant with the UUID format.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</li></ul>
</div>
<div class="section" id="opengauss_api_0022__s625a3eaa41884791aa8e5cd0fc4e3eaf"><h4 class="sectiontitle">Request</h4><ul id="opengauss_api_0022__u0969f7afa0f842f5b55521f926a419e1"><li id="opengauss_api_0022__l2513b8d78fa34005ae91425c7a160a89">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="opengauss_api_0022__tb5b832857b0e4b3bb4b0f8601734bfaa" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="opengauss_api_0022__r18b7413528d74c7fab0b5a469e746e81"><th align="left" class="cellrowborder" valign="top" width="24.81%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="opengauss_api_0022__a96f959b310dd437780e1a91e2a840b80">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.68%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="opengauss_api_0022__en-us_topic_0151958051_p287512375212">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.75%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="opengauss_api_0022__ae1f9236ee14d45dc8dc6606d77f08ad3">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.76%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="opengauss_api_0022__en-us_topic_0151958051_p198753239523">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="opengauss_api_0022__rca8aff89e9dc4c42a3a9547bc749ba0f"><td class="cellrowborder" valign="top" width="24.81%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="opengauss_api_0022__a20c26b7441c949b2a71e27cd828b4f43">name</p>
</td>
<td class="cellrowborder" valign="top" width="18.68%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="opengauss_api_0022__a51c26efa248d4d3a9fc2e2c6ccccdad2">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.75%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="opengauss_api_0022__af932a46aaba3432ebb596eef47bbc28b">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.76%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="opengauss_api_0022__p23411412333">Specifies the DB instance name. DB instances of the same type can have same names under the same tenant.</p>
<p id="opengauss_api_0022__p61847473">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>
</li></ul>
</div>
<ul id="opengauss_api_0022__en-us_topic_0248254028_ul66972122155"><li id="opengauss_api_0022__lb17f4a22d1e94d31ae18810fd1cf12e9">Example request<pre class="codeblock" id="opengauss_api_0022__c25293e07ffac4b2289a9efac18d75ae1">{
"name": "instance-name"
}</pre>
</li></ul>
<div class="section" id="opengauss_api_0022__s67fed9781e924497857c485097160728"><h4 class="sectiontitle">Response</h4><ul id="opengauss_api_0022__u10832b6b560844cfa82974970df78c43"><li id="opengauss_api_0022__l55a43a11f18849b5b586211627ba0d5a">Normal responses
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="opengauss_api_0022__t56b2b9b74b614fe1a778adc5bc3a766b" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="opengauss_api_0022__r84b7bb9f3d4c4865880de5ad415e5a3c"><th align="left" class="cellrowborder" valign="top" width="33.68%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="opengauss_api_0022__a578ff2bb8c384509b6408490b13d83f1">Name</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="opengauss_api_0022__en-us_topic_0248254028_p879983818477">Type</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="opengauss_api_0022__aa9ffb28316a34f49976e9bea13fe9c68">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="opengauss_api_0022__r401d854c2b13427f9b9ad8fc193c2af1"><td class="cellrowborder" valign="top" width="33.68%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="opengauss_api_0022__ab4bad7cb03e74f0f802ff4d3cbf5ba2d">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="opengauss_api_0022__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="opengauss_api_0022__a7ec0ee1ecc42490380d852304a3cb50a">Indicates the ID of the task for changing a DB instance name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="opengauss_api_0022__u9b17118ea46c4441bf032c0b300a6afb"><li id="opengauss_api_0022__l955079fe6db94181944e6e3cbf57b680">Example normal response<pre class="codeblock" id="opengauss_api_0022__ce7379f06d8514be5b81c9046234d8299">{
"job_id": "2b414788a6004883a02390e2eb0ea227"
}</pre>
</li><li id="opengauss_api_0022__l25fe8471f81d48b189d63d284e126372">Abnormal response<p id="opengauss_api_0022__a72740c637ef6476e9c3c6e424dbe5aa7"><a name="opengauss_api_0022__l25fe8471f81d48b189d63d284e126372"></a><a name="l25fe8471f81d48b189d63d284e126372"></a>For details, see <a href="opengauss_api_0031.html">Abnormal Request Results</a>.</p>
</li></ul>
<div class="section" id="opengauss_api_0022__sc7e09a4eab74431784d4cdf1918d05c1"><h4 class="sectiontitle">Status Codes</h4><p id="opengauss_api_0022__ad6824e04527a4a76a14f3ecaae2eb642">For details, see <a href="opengauss_api_0032.html">Status Codes</a>.</p>
</div>
<div class="section" id="opengauss_api_0022__sc1d8131c0dbe4ced837139a22ed27c8b"><h4 class="sectiontitle">Error Codes</h4><p id="opengauss_api_0022__a478f17fa76dc42f792612496f9e1fdba">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_0014.html">DB Instance Management</a></div>
</div>
</div>