doc-exports/docs/drs/api-ref/drs_03_0131.html
Wang , Deng Ke 231618c804 DRS API 2.0.38SP23 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-24 16:49:13 +00:00

246 lines
16 KiB
HTML

<a name="drs_03_0131"></a><a name="drs_03_0131"></a>
<h1 class="topictitle1">Modifying Database Parameters</h1>
<div id="body8842235310"><div class="section" id="drs_03_0131__section1584723531"><h4 class="sectiontitle">Function</h4><p id="drs_03_0131__p9855285316">This API is to modify database parameters.</p>
</div>
<div class="section" id="drs_03_0131__section58542185312"><h4 class="sectiontitle">Constraints</h4><p id="drs_03_0131__p138518235315">You need to call the API for obtaining database parameters for MySQL migration and MySQL DR tasks. This API can be called only when <strong id="drs_03_0131__b62990232524">job_direction</strong> is set to <strong id="drs_03_0131__b177321128135218">up</strong> and the task status is <strong id="drs_03_0131__b192988334527">CONFIGURATION</strong>. In dual-active DR mode, the parent task does not support this operation.</p>
</div>
<div class="section" id="drs_03_0131__section1685192125311"><h4 class="sectiontitle">URI</h4><p id="drs_03_0131__p10861528535">POST /v3/{project_id}/jobs/{job_id}/params</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0131__table58712210537" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="drs_03_0131__row188732115317"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="drs_03_0131__p178818225316">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="drs_03_0131__p158813245319">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="drs_03_0131__p3881285318">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="drs_03_0131__p18911215537">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0131__row12871229539"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0131__p1891245317">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0131__p19898285312">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0131__p6897214539">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0131__p1892211539">Task ID.</p>
</td>
</tr>
<tr id="drs_03_0131__row28716215312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0131__p49022165311">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0131__p1090132115312">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0131__p149062125314">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0131__p1290123533">Project ID of a tenant in a region</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0131__section2903275310"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0131__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="drs_03_0131__row1791142155311"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="drs_03_0131__p7917211531">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="drs_03_0131__p9924219535">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="drs_03_0131__p292142105311">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="drs_03_0131__p69220210539">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0131__row291182175319"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0131__p16929216531">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0131__p9921622538">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0131__p1693202115310">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0131__p17931320539">The content type.</p>
<p id="drs_03_0131__p38676569591">The default value is <strong id="drs_03_0131__b198673561593">application/json</strong>.</p>
</td>
</tr>
<tr id="drs_03_0131__row129113217532"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0131__p9931128534">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0131__p159312115314">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0131__p159412195312">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0131__p094192125312">User token obtained from IAM.</p>
</td>
</tr>
<tr id="drs_03_0131__row09142115315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0131__p2949213539">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0131__p109413225312">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0131__p189552195315">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0131__p4869125616598">Request language type</p>
<p id="drs_03_0131__p68691956125917">Default value: <strong id="drs_03_0131__b1786912566599">en-us</strong></p>
<p id="drs_03_0131__p1386915625912">Values:</p>
<ul id="drs_03_0131__ul1586965613591"><li id="drs_03_0131__li1886915655910"><strong id="drs_03_0131__b158691656145912">en-us</strong></li><li id="drs_03_0131__li17869125685916"><strong id="drs_03_0131__b12869175615914">zh-cn</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0131__requestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="drs_03_0131__row295162115316"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="drs_03_0131__p89612215531">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="drs_03_0131__p29712145318">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="drs_03_0131__p49713217539">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="drs_03_0131__p12971122530">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0131__row19961723533"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="drs_03_0131__p10977285310">group</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="drs_03_0131__p1698224537">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="drs_03_0131__p10981526535">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="drs_03_0131__p698182155314">Parameter Groups Values:</p>
<ul id="drs_03_0131__ul169932165319"><li id="drs_03_0131__li9990218537"><strong id="drs_03_0131__b10993245317">common</strong></li><li id="drs_03_0131__li899122125318"><strong id="drs_03_0131__b99913215530">performance</strong></li></ul>
</td>
</tr>
<tr id="drs_03_0131__row196227537"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="drs_03_0131__p799724536">params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="drs_03_0131__p181001021531">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="drs_03_0131__p10100162155311">Array of <a href="#drs_03_0131__request_ParamsReqBean">ParamsReqBean</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="drs_03_0131__p18100112205320">Information about the parameters to be modified.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="drs_03_0131__request_ParamsReqBean"></a><a name="request_ParamsReqBean"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0131__request_ParamsReqBean" frame="border" border="1" rules="all"><caption><b>Table 4 </b>ParamsReqBean</caption><thead align="left"><tr id="drs_03_0131__row121016215530"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="drs_03_0131__p161011428534">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="drs_03_0131__p610213245313">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="drs_03_0131__p1410210225312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="drs_03_0131__p710292205312">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0131__row131011214537"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0131__p21023217534">key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0131__p1810242125310">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0131__p11034255310">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0131__p1510314205313">Database parameter name.</p>
</td>
</tr>
<tr id="drs_03_0131__row11011224531"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0131__p17103192145310">target_value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0131__p171038265319">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0131__p1710312216538">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0131__p610414212536">Parameter value of the destination database.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0131__section1410414214534"><h4 class="sectiontitle">Response Parameters</h4><p id="drs_03_0131__p71042212535"><strong id="drs_03_0131__b11041921532">Status code: 202</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0131__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="drs_03_0131__row710417213536"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="drs_03_0131__p210562195310">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="drs_03_0131__p1110572145314">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="drs_03_0131__p1610512175316">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0131__row9104142135312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0131__p121069215315">success</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0131__p13106627539">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0131__p151064235313">Whether the parameters are modified.</p>
</td>
</tr>
<tr id="drs_03_0131__row1610432195315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0131__p1810622195310">should_restart</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0131__p91061924533">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0131__p101072215536">Whether the instance needs to be restarted. Values:</p>
<ul id="drs_03_0131__ul810719210539"><li id="drs_03_0131__li41072255315"><strong id="drs_03_0131__b1710752145310">true</strong></li><li id="drs_03_0131__li18107122165314"><strong id="drs_03_0131__b101076218538">false</strong></li></ul>
</td>
</tr>
<tr id="drs_03_0131__row1710432195312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0131__p9107224538">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0131__p81071222531">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0131__p191081265312">Error code, which is optional and indicates the returned information about the failure status.</p>
</td>
</tr>
<tr id="drs_03_0131__row01051025539"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0131__p1410832145319">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0131__p91085245314">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0131__p141089218536">Error message, which is optional and indicates the returned information about the failure status.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0131__section111089219536"><h4 class="sectiontitle">Example Request</h4><p id="drs_03_0131__p61091628530">Example of modifying database parameters:</p>
<pre class="screen" id="drs_03_0131__screen8310955586">https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/140b5236-88ad-43c8-811c-1268453jb101/params</pre>
<pre class="screen" id="drs_03_0131__screen1383594910">{
"group" : "performance",
"params" : [ {
"key" : "binlog_stmt_cache_size",
"target_value" : "32678"
}, {
"key" : "bulk_insert_buffer_size",
"target_value" : "8388608"
} ]
}</pre>
</div>
<div class="section" id="drs_03_0131__section9111182165320"><h4 class="sectiontitle">Example Response</h4><p id="drs_03_0131__p1611182205317"><strong id="drs_03_0131__b31111328538">Status code: 202</strong></p>
<p id="drs_03_0131__p81111205313">Accepted</p>
<pre class="screen" id="drs_03_0131__screen1011215215532">{
"success" : true,
"should_restart" : "false"
}</pre>
</div>
<div class="section" id="drs_03_0131__section191129215533"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0131__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="drs_03_0131__row91135205319"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="drs_03_0131__p131137275316">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="drs_03_0131__p211314205311">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0131__row411352195311"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0131__p111139285318">202</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0131__p81661510131518">Accepted</p>
</td>
</tr>
<tr id="drs_03_0131__row0113625531"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0131__p711411265315">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0131__p13114722537">Bad Request</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0131__section1311414295311"><h4 class="sectiontitle">Error Code</h4><p id="drs_03_0131__p181141429538">For details, see <a href="drs_05_0004.html">Error Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="drs_03_0101.html">Public API Management</a></div>
</div>
</div>