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

113 lines
11 KiB
HTML

<a name="EN-US_TOPIC_0000001917290616"></a><a name="EN-US_TOPIC_0000001917290616"></a>
<h1 class="topictitle1">Changing the Port Number of a Specified DB Instance</h1>
<div id="body0000001848039098"><div class="section" id="EN-US_TOPIC_0000001917290616__section8751157191"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001917290616__p4950828195416">This API is used to change the port number of a specified DB instance. Before calling this API:</p>
<ul id="EN-US_TOPIC_0000001917290616__en-us_topic_0128427213_ul12259155218373"><li id="EN-US_TOPIC_0000001917290616__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_0000001917290616__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_0000001917290616__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_0000001917290616__section1770014618124"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0000001917290616__ul15127102718127"><li id="EN-US_TOPIC_0000001917290616__li2012742711214">URI format</li></ul>
<p id="EN-US_TOPIC_0000001917290616__p204mcpsimp">PUT https://{<em id="EN-US_TOPIC_0000001917290616__en-us_topic_0128427213_i1958383021511">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/port</p>
<ul id="EN-US_TOPIC_0000001917290616__ul23761135173713"><li id="EN-US_TOPIC_0000001917290616__li73767353371">Example<p id="EN-US_TOPIC_0000001917290616__en-us_topic_0128427213_p1454414211213"><a name="EN-US_TOPIC_0000001917290616__li73767353371"></a><a name="li73767353371"></a>https://gaussdb.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/port</p>
</li><li id="EN-US_TOPIC_0000001917290616__li4240163111511">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001917290616__table205mcpsimp" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001917290616__row213mcpsimp"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.1.2.5.1.1"><p id="EN-US_TOPIC_0000001917290616__p215mcpsimp">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.1.2.5.1.2"><p id="EN-US_TOPIC_0000001917290616__p217mcpsimp">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.98%" id="mcps1.3.2.4.2.1.2.5.1.3"><p id="EN-US_TOPIC_0000001917290616__p219mcpsimp">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.02%" id="mcps1.3.2.4.2.1.2.5.1.4"><p id="EN-US_TOPIC_0000001917290616__p221mcpsimp">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001917290616__row223mcpsimp"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001917290616__p225mcpsimp">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001917290616__p227mcpsimp">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.2.4.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001917290616__p229mcpsimp">String</p>
</td>
<td class="cellrowborder" valign="top" width="40.02%" headers="mcps1.3.2.4.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001917290616__en-us_topic_0128427213_p43776822">Project ID of a tenant in a region.</p>
<p id="EN-US_TOPIC_0000001917290616__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_0000001917290616__row233mcpsimp"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001917290616__p235mcpsimp">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001917290616__p237mcpsimp">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.2.4.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001917290616__p239mcpsimp">String</p>
</td>
<td class="cellrowborder" valign="top" width="40.02%" headers="mcps1.3.2.4.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001917290616__p241mcpsimp">Instance ID, which is compliant with the UUID format.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001917290616__en-us_topic_0151958051_section1265133172714"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001917290616__en-us_topic_0151958051_ul1387512325219"><li id="EN-US_TOPIC_0000001917290616__en-us_topic_0151958051_li387592375220">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001917290616__table989242214713" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001917290616__row2892202215713"><th align="left" class="cellrowborder" valign="top" width="24.81%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="EN-US_TOPIC_0000001917290616__p1489219224710">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="EN-US_TOPIC_0000001917290616__p68922221077">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="EN-US_TOPIC_0000001917290616__p1989262214720">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="EN-US_TOPIC_0000001917290616__p689214221719">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001917290616__row168935224719"><td class="cellrowborder" valign="top" width="24.81%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001917290616__p433510598587">port</p>
</td>
<td class="cellrowborder" valign="top" width="18.68%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001917290616__p93351859165818">No</p>
</td>
<td class="cellrowborder" valign="top" width="19.75%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001917290616__p23351559155813">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="36.76%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001917290616__p5335145905814">Instance port. Value range: <strong id="EN-US_TOPIC_0000001917290616__b51291662520">1024</strong> to <strong id="EN-US_TOPIC_0000001917290616__b1417719142514">39998</strong> (excluding the following which are occupied by the system and cannot be used: 2378, 2379, 2380, 4999, 5000, 5999, 6000, 60001, 8097, 8098, 12016, 12017, 20049, 20050, 21731, 21732, 32122, 32123, and 32124).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="EN-US_TOPIC_0000001917290616__ul10190321"><li id="EN-US_TOPIC_0000001917290616__li24604028">Example request<pre class="screen" id="EN-US_TOPIC_0000001917290616__screen498120452318">{
"port" : 8001
}</pre>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001917290616__en-us_topic_0248254028_section415313301118"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001917290616__ul31923327101549"><li id="EN-US_TOPIC_0000001917290616__li18874490101549">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001917290616__response_ConfigurationDetailForInstance" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001917290616__row967417395415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0000001917290616__p106741836543">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0000001917290616__p156741355410">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0000001917290616__p4674533542">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001917290616__row8393177162613"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="EN-US_TOPIC_0000001917290616__p6924143675917">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="EN-US_TOPIC_0000001917290616__p139241536165916">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="EN-US_TOPIC_0000001917290616__p092410368598">ID of the task for modifying the port.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0000001917290616__li198542524205">Example response<pre class="screen" id="EN-US_TOPIC_0000001917290616__screen1729563644710">{
"job_id" : "5cbb8a90-2253-4cff-8a13-49aa8f31dfb5"
}</pre>
</li></ul>
<ul id="EN-US_TOPIC_0000001917290616__ul9141639121918"><li id="EN-US_TOPIC_0000001917290616__li5811133003820">Abnormal response<p id="EN-US_TOPIC_0000001917290616__en-us_topic_0000001704033841_en-us_topic_0128427213_p29415884"><a name="EN-US_TOPIC_0000001917290616__li5811133003820"></a><a name="li5811133003820"></a>For details, see <a href="opengauss_api_0031.html">Abnormal Request Results</a>.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001917290616__en-us_topic_0128427213_section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_ul7858132212142"><li id="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_li58581622171411">Normal<p id="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_p1040982941020"><a name="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_li58581622171411"></a><a name="en-us_topic_0110967248_li58581622171411"></a>202</p>
</li><li id="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_li11583183218149">Abnormal<p id="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_p65078394148"><a name="EN-US_TOPIC_0000001917290616__en-us_topic_0110967248_li11583183218149"></a><a name="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_0000001917290616__en-us_topic_0248254028_section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="EN-US_TOPIC_0000001917290616__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_0014.html">Instance Management</a></div>
</div>
</div>