forked from docs/doc-exports
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>
128 lines
13 KiB
HTML
128 lines
13 KiB
HTML
<a name="rds_05_0011"></a><a name="rds_05_0011"></a>
|
|
|
|
<h1 class="topictitle1">Resetting the Password for User Root</h1>
|
|
<div id="body32001227"><div class="section" id="rds_05_0011__en-us_topic_0226370615_section10502114133410"><h4 class="sectiontitle">Function</h4><p id="rds_05_0011__en-us_topic_0226370615_p19142153232816">This API is used to reset the password if you forget the password of your database account when using RDS. If an error occurs on the root account, for example, the root account is lost or deleted, you can restore the root account rights through resetting the password.</p>
|
|
<ul id="rds_05_0011__en-us_topic_0226370615_ul12259155218373"><li id="rds_05_0011__en-us_topic_0226370615_en-us_topic_0110967248_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_05_0011__en-us_topic_0226370615_en-us_topic_0110967248_li1991981933613">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="rds_05_0011__en-us_topic_0226370615_section9207631102915"><h4 class="sectiontitle">Constraints</h4><p id="rds_05_0011__en-us_topic_0226370615_p231193123811">The password cannot be reset if the DB instance is in any of the following statuses: creating, rebooting, upgrading, changing instance class, creating users, or deleting users.</p>
|
|
</div>
|
|
<div class="section" id="rds_05_0011__en-us_topic_0226370615_section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="rds_05_0011__en-us_topic_0226370615_ul53354139141429"><li id="rds_05_0011__en-us_topic_0226370615_li1270098217262">URI format<p id="rds_05_0011__en-us_topic_0226370615_p30251930154721"><a name="rds_05_0011__en-us_topic_0226370615_li1270098217262"></a><a name="en-us_topic_0226370615_li1270098217262"></a>POST https://{<em id="rds_05_0011__en-us_topic_0226370615_i2475051121512">Endpoint</em>}/v3/{<em id="rds_05_0011__en-us_topic_0226370615_i148911057155316">project_id</em>}/instances/{<em id="rds_05_0011__en-us_topic_0226370615_i923712547">instance_id</em>}/password</p>
|
|
</li></ul>
|
|
<ul id="rds_05_0011__en-us_topic_0226370615_ul49831254144655"><li id="rds_05_0011__en-us_topic_0226370615_li15430535">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0011__en-us_topic_0226370615_table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI Parameters</caption><thead align="left"><tr id="rds_05_0011__en-us_topic_0226370615_row60083059"><th align="left" class="cellrowborder" valign="top" width="20.93%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="rds_05_0011__en-us_topic_0226370615_p34889605"><strong id="rds_05_0011__en-us_topic_0226370615_b055214481509">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.6%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="rds_05_0011__en-us_topic_0226370615_p7485743"><strong id="rds_05_0011__en-us_topic_0226370615_b12107114975014">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.470000000000006%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="rds_05_0011__en-us_topic_0226370615_p2365466"><strong id="rds_05_0011__en-us_topic_0226370615_b29048495504">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0011__en-us_topic_0226370615_row57385070"><td class="cellrowborder" valign="top" width="20.93%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_05_0011__en-us_topic_0226370615_p17679057">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_05_0011__en-us_topic_0226370615_p22717550">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.470000000000006%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_05_0011__en-us_topic_0226370615_p28182251">Specifies the project ID of a tenant in a region.</p>
|
|
<p id="rds_05_0011__en-us_topic_0226370615_p14611855135510">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0011__en-us_topic_0226370615_row2864326155157"><td class="cellrowborder" valign="top" width="20.93%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_05_0011__en-us_topic_0226370615_p41557789155220">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_05_0011__en-us_topic_0226370615_p10737742155220">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.470000000000006%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_05_0011__en-us_topic_0226370615_p64450739155220">Specifies the DB instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_05_0011__en-us_topic_0226370615_section3074340117316"><h4 class="sectiontitle">Request</h4><ul id="rds_05_0011__en-us_topic_0226370615_ul5099287616954"><li id="rds_05_0011__en-us_topic_0226370615_li5628270116954">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0011__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_05_0011__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="rds_05_0011__p95111733143318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="rds_05_0011__p13511123373311">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="rds_05_0011__p125111433133312">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="rds_05_0011__p551110331335">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0011__row353717218338"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="rds_05_0011__p18511533163317">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="rds_05_0011__p13511153333312">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="rds_05_0011__p55111833183319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="rds_05_0011__p35111331332">The content type.</p>
|
|
<p id="rds_05_0011__p1351133311330">The default value is <strong id="rds_05_0011__b105111133143310">application/json</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0011__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="rds_05_0011__p1163015550331">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="rds_05_0011__p1963035563316">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="rds_05_0011__p1630105520331">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="rds_05_0011__p1086851153317">Specifies the user token.</p>
|
|
<p id="rds_05_0011__p1057635831">The user token is a response to the API used to <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html" target="_blank" rel="noopener noreferrer">obtain a user token</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0011__en-us_topic_0226370615_table11236435" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="rds_05_0011__en-us_topic_0226370615_row61525259"><th align="left" class="cellrowborder" valign="top" width="18.110000000000003%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="rds_05_0011__en-us_topic_0226370615_p17490046"><strong id="rds_05_0011__en-us_topic_0226370615_b10107191723">Name</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.500000000000004%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="rds_05_0011__en-us_topic_0226370615_p7407659"><strong id="rds_05_0011__en-us_topic_0226370615_b126951711220">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.71%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="rds_05_0011__en-us_topic_0226370615_p63149496"><strong id="rds_05_0011__en-us_topic_0226370615_b1041918212219">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.68%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="rds_05_0011__en-us_topic_0226370615_p14835533"><strong id="rds_05_0011__en-us_topic_0226370615_b899517218217">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0011__en-us_topic_0226370615_row60827539"><td class="cellrowborder" valign="top" width="18.110000000000003%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="rds_05_0011__en-us_topic_0226370615_p28083633">db_user_pwd</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.500000000000004%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="rds_05_0011__en-us_topic_0226370615_p60181840">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.71%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="rds_05_0011__en-us_topic_0226370615_p42890904">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.68%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="rds_05_0011__p14969447172617">Specifies the database password. Valid value (for all RDS engines):</p>
|
|
<p id="rds_05_0011__p71221655192616">The value must be 8 to 32 characters long and contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters (``~!@#$%^*-_=+?,()&``).</p>
|
|
<div class="notice" id="rds_05_0011__note158662118274"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="rds_05_0011__p14866131115271">You are advised to enter a strong password to improve security, preventing security risks such as brute force cracking.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_05_0011__section134961507540"><h4 class="sectiontitle">Example Request</h4><div class="p" id="rds_05_0011__p28754545555">Reset the password for user <strong id="rds_05_0011__b10953195223814">root</strong>.<pre class="screen" id="rds_05_0011__screen955981810550">POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/password
|
|
|
|
{
|
|
"db_user_pwd": "******"
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="rds_05_0011__en-us_topic_0226370615_section28521534113742"><h4 class="sectiontitle">Response</h4><ul id="rds_05_0011__en-us_topic_0226370615_ul12573920"><li id="rds_05_0011__en-us_topic_0226370615_li46056421">Normal response<p id="rds_05_0011__en-us_topic_0226370615_p4989115420592"><a name="rds_05_0011__en-us_topic_0226370615_li46056421"></a><a name="en-us_topic_0226370615_li46056421"></a>None</p>
|
|
</li></ul>
|
|
<ul id="rds_05_0011__en-us_topic_0226370615_ul16665627"><li id="rds_05_0011__en-us_topic_0226370615_li15772917">Example normal response<pre class="screen" id="rds_05_0011__screen626716385237">{}</pre>
|
|
</li><li id="rds_05_0011__en-us_topic_0226370615_li68218279114">Abnormal response<p id="rds_05_0011__en-us_topic_0226370615_p28475059"><a name="rds_05_0011__en-us_topic_0226370615_li68218279114"></a><a name="en-us_topic_0226370615_li68218279114"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_05_0011__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_05_0011__ul1411813317716"><li id="rds_05_0011__en-us_topic_0110967248_li58581622171411">Normal<p id="rds_05_0011__en-us_topic_0110967248_p1040982941020"><a name="rds_05_0011__en-us_topic_0110967248_li58581622171411"></a><a name="en-us_topic_0110967248_li58581622171411"></a>200</p>
|
|
</li><li id="rds_05_0011__li192946421272">Abnormal<p id="rds_05_0011__en-us_topic_0224329858_p0723374409"><a name="rds_05_0011__li192946421272"></a><a name="li192946421272"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_05_0011__section946032144017"><h4 class="sectiontitle">Error Code</h4><p id="rds_05_0011__en-us_topic_0224329858_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_07_0000.html">Database Security</a></div>
|
|
</div>
|
|
</div>
|
|
|