forked from docs/doc-exports
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
175 lines
12 KiB
HTML
175 lines
12 KiB
HTML
<a name="gaussdb_04_0019"></a><a name="gaussdb_04_0019"></a>
|
|
|
|
<h1 class="topictitle1">Resetting a Database Password</h1>
|
|
<div id="body1597396343822"><div class="section" id="gaussdb_04_0019__section44230431101549"><h4 class="sectiontitle">Function</h4><p id="gaussdb_04_0019__p1350220403353">This API is used to reset a database password. Before using this API:</p>
|
|
<ul id="gaussdb_04_0019__ul924420236520"><li id="gaussdb_04_0019__li136356359522">Learn how to <a href="gaussdb_03_0001.html">authorize and authenticate</a> it.</li><li id="gaussdb_04_0019__li1991981933613">Obtain the required <a href="gaussdb_00_0003.html">region and endpoint</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section3909145913139"><h4 class="sectiontitle">URI</h4><p id="gaussdb_04_0019__p11909205920138">POST /v3/{project_id}/instances/{instance_id}/password</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0019__table14909185914136" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="gaussdb_04_0019__row17909165910132"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="gaussdb_04_0019__p2910175915135">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_0019__p1991065991310">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_0019__p149101059131317">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_0019__p2910115931320">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_04_0019__row09091559191319"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="gaussdb_04_0019__p491016596136">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="gaussdb_04_0019__p291055915138">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="gaussdb_04_0019__p11910205912134">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="gaussdb_04_0019__p12164162918152">Project ID of a tenant in a region.</p>
|
|
<p id="gaussdb_04_0019__p2164129111518">To obtain this value, see <a href="gaussdb_10_0004.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_04_0019__row09091559191314"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="gaussdb_04_0019__p4911105915138">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="gaussdb_04_0019__p149114599131">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="gaussdb_04_0019__p99111959161320">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="gaussdb_04_0019__p2091114598135">DB instance ID, which is compliant with the UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section1991105919131"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0019__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="gaussdb_04_0019__row199111259151319"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="gaussdb_04_0019__p691215593138">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_0019__p491235913133">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_0019__p19912159111318">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_0019__p4912959161315">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_04_0019__row2911205919136"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_04_0019__p17912165916131">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_0019__p89121659141319">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_04_0019__p49128591133">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_04_0019__p109137596134">User token.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_04_0019__row13911759161311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="gaussdb_04_0019__p0913185919135">X-Language</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="gaussdb_04_0019__p159131359151311">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="gaussdb_04_0019__p109133595133">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="gaussdb_04_0019__p591312598136">Language.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0019__request_MysqlResetPasswordRequest" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="gaussdb_04_0019__row791355941316"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="gaussdb_04_0019__p149141759171317">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_0019__p1991413594139">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_0019__p59141059171310">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_0019__p79151159131318">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_04_0019__row189131759201313"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="gaussdb_04_0019__p1915145910132">password</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="gaussdb_04_0019__p189156594132">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="gaussdb_04_0019__p6915165913130">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="gaussdb_04_0019__p12915165941310">Database password. The password consists of 8 to 32 characters and contains at least three types of the following: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^*-_=+?,()&). You are advised to enter a strong password to improve security and prevent security risks such as brute force cracking. If you enter a weak password, the system automatically determines that the password is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section79151059131315"><h4 class="sectiontitle">Response Parameters</h4><p id="gaussdb_04_0019__p99151659151312"><strong id="gaussdb_04_0019__b178390889725229">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0019__response_MysqlErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_04_0019__row1891612599133"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="gaussdb_04_0019__p17916155911130">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_0019__p79169598139">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_0019__p1791655916135">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_04_0019__row1916459181311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="gaussdb_04_0019__p15916145914135">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="gaussdb_04_0019__p591655911135">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="gaussdb_04_0019__p191665971310">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_04_0019__row1491645911133"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="gaussdb_04_0019__p991719596136">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="gaussdb_04_0019__p3917759181316">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="gaussdb_04_0019__p99171059151318">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="gaussdb_04_0019__p691715911318"><strong id="gaussdb_04_0019__b1391765914139">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="gaussdb_04_0019__table119174594139" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="gaussdb_04_0019__row129171359121316"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="gaussdb_04_0019__p3917155981311">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_0019__p129181659161313">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_0019__p991813597137">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="gaussdb_04_0019__row491755971320"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="gaussdb_04_0019__p29182593136">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="gaussdb_04_0019__p19918559141318">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="gaussdb_04_0019__p14918195917131">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="gaussdb_04_0019__row15917559151311"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="gaussdb_04_0019__p491813595136">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="gaussdb_04_0019__p691835901317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="gaussdb_04_0019__p10918185981318">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section591815919136"><h4 class="sectiontitle">Example Request</h4><p id="gaussdb_04_0019__p191816591139">Resetting a database password</p>
|
|
<pre class="screen" id="gaussdb_04_0019__screen1491916593134">
|
|
POST https://gaussdb-mysql.eu-de.otc.t-systems.com/instances/ba62a0b83a1b42bfab275829d86ac0fdin07/password
|
|
{
|
|
"password" : "Test_345612"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section16919175921320"><h4 class="sectiontitle">Example Response</h4><p id="gaussdb_04_0019__p1776122093514"><strong id="gaussdb_04_0019__b8799123242613">Status code: 200</strong></p>
|
|
<p id="gaussdb_04_0019__p47611120193511">Success.</p>
|
|
<p id="gaussdb_04_0019__p39191759111310">None</p>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section4778540915440"><h4 class="sectiontitle">Status Code</h4><p id="gaussdb_04_0019__p0723374409">For details, see <a href="gaussdb_10_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="gaussdb_04_0019__section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="gaussdb_04_0019__p19357163913406">For details, see <a href="gaussdb_10_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
</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>
|
|
|