doc-exports/docs/rds/api-ref/en-us_topic_0056890265.html
Wang , Deng Ke 5208dcae7b RDS API 20221104 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2022-11-10 09:55:48 +00:00

141 lines
13 KiB
HTML

<a name="en-us_topic_0056890265"></a><a name="en-us_topic_0056890265"></a>
<h1 class="topictitle1">Adding Custom Parameters</h1>
<div id="body1492603082527"><div class="section" id="en-us_topic_0056890265__section53089284103627"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0056890265__p809099415819">This API is used to add parameter information to a parameter template identified by a specified ID.</p>
</div>
<div class="section" id="en-us_topic_0056890265__section47568069103438"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0056890265__ul27808384103438"><li id="en-us_topic_0056890265__li48948865103438">URI format<p id="en-us_topic_0056890265__p1052915415827"><a name="en-us_topic_0056890265__li48948865103438"></a><a name="li48948865103438"></a>PATH: /v1.0/{project_id}/configurations/{id}</p>
<p id="en-us_topic_0056890265__p5435146103438">Method: PATCH</p>
</li><li id="en-us_topic_0056890265__li48916315103438">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0056890265__table37593651103438" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0056890265__row58913670103438"><th align="left" class="cellrowborder" valign="top" width="21.240000000000002%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="en-us_topic_0056890265__p7277976103438"><strong id="en-us_topic_0056890265__b84235270691445_1">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.96%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="en-us_topic_0056890265__p52645207103438"><strong id="en-us_topic_0056890265__b842352706102346_1">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.8%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="en-us_topic_0056890265__p36403370103438"><strong id="en-us_topic_0056890265__b842352706163417_1">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0056890265__row62991866103438"><td class="cellrowborder" valign="top" width="21.240000000000002%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="en-us_topic_0056890265__p902364145258">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="28.96%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="en-us_topic_0056890265__p5982632145258">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.8%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="en-us_topic_0056890265__p14831209145258">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
<tr id="en-us_topic_0056890265__row12926085103438"><td class="cellrowborder" valign="top" width="21.240000000000002%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="en-us_topic_0056890265__p5797490315835">id</p>
</td>
<td class="cellrowborder" valign="top" width="28.96%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="en-us_topic_0056890265__p6155576815835">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.8%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="en-us_topic_0056890265__p5878971515835">Specifies the parameter template ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0056890265__ul18031397103438"><li id="en-us_topic_0056890265__li28064853103438">Restrictions<ul id="en-us_topic_0056890265__ul66159397195852"><li id="en-us_topic_0056890265__li62190527195851">Currently, the DB engines MySQL and PostgreSQL support modifying parameter templates.</li><li id="en-us_topic_0056890265__li24323513195851">The values of the newly added parameters must be within the default value range of the specified database version. For details about the range of parameter values, see section "Modifying Parameters in a Parameter Template" in the <em id="en-us_topic_0056890265__i842352697205034">Relational Database Service User Guide</em>.</li><li id="en-us_topic_0056890265__li2772628195851">Parameter template modifications will take effect for DB instances to which the parameter template applies. Some modifications take effect only after the DB instance reboots.</li></ul>
</li></ul>
</div>
<div class="section" id="en-us_topic_0056890265__section53891412103438"><h4 class="sectiontitle">Request</h4><ul id="en-us_topic_0056890265__ul27739449175744"><li id="en-us_topic_0056890265__li2773828175744">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0056890265__table3128215103438" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0056890265__row903148103438"><th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="en-us_topic_0056890265__p6046170103438"><strong id="en-us_topic_0056890265__b84235270691445_5">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.82%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="en-us_topic_0056890265__p19977801103438"><strong id="en-us_topic_0056890265__b842352706102346_5">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.62%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="en-us_topic_0056890265__p7589217103438"><strong id="en-us_topic_0056890265__b842352706164541_1">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.13%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="en-us_topic_0056890265__p10746825103438"><strong id="en-us_topic_0056890265__b842352706163417_5">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0056890265__row65186473103438"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="en-us_topic_0056890265__p45612970103438">configuration</p>
</td>
<td class="cellrowborder" valign="top" width="24.82%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="en-us_topic_0056890265__p3663091103438">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="27.62%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="en-us_topic_0056890265__p28274989103438">Dictionary data structure. For details, see <a href="#en-us_topic_0056890265__table23308179103438">Table 3</a>.</p>
</td>
<td class="cellrowborder" valign="top" width="26.13%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="en-us_topic_0056890265__p10046338103438">Specifies the parameter template object.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0056890265__table23308179103438"></a><a name="table23308179103438"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0056890265__table23308179103438" frame="border" border="1" rules="all"><caption><b>Table 3 </b>configuration field data structure description</caption><thead align="left"><tr id="en-us_topic_0056890265__row46775637103438"><th align="left" class="cellrowborder" valign="top" width="21.237876212378758%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="en-us_topic_0056890265__p4159209515175"><strong id="en-us_topic_0056890265__b84235270691445_7">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.817518248175176%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="en-us_topic_0056890265__p3312230415175"><strong id="en-us_topic_0056890265__b842352706102346_7">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.44725527447255%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="en-us_topic_0056890265__p6683254715175"><strong id="en-us_topic_0056890265__b842352706164541_3">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.497350264973495%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="en-us_topic_0056890265__p541855815175"><strong id="en-us_topic_0056890265__b842352706163417_7">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0056890265__row36195986103438"><td class="cellrowborder" valign="top" width="21.237876212378758%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="en-us_topic_0056890265__p1291584615175">values</p>
</td>
<td class="cellrowborder" valign="top" width="24.817518248175176%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="en-us_topic_0056890265__p4230526515175">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.44725527447255%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="en-us_topic_0056890265__p5058006715175">Dictionary data structure. For details, see <a href="#en-us_topic_0056890265__table25655849103438">Table 4</a>.</p>
</td>
<td class="cellrowborder" valign="top" width="26.497350264973495%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="en-us_topic_0056890265__p4038861415175">Specifies the parameter values defined by users based on the default parameter template.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0056890265__table25655849103438"></a><a name="table25655849103438"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0056890265__table25655849103438" frame="border" border="1" rules="all"><caption><b>Table 4 </b>values field data structure description</caption><thead align="left"><tr id="en-us_topic_0056890265__row24203070103438"><th align="left" class="cellrowborder" valign="top" width="21.62%" id="mcps1.3.3.2.1.3.2.5.1.1"><p id="en-us_topic_0056890265__p6440743151716"><strong id="en-us_topic_0056890265__b84235270691445_9">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.060000000000002%" id="mcps1.3.3.2.1.3.2.5.1.2"><p id="en-us_topic_0056890265__p18370235151716"><strong id="en-us_topic_0056890265__b842352706102346_9">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.060000000000002%" id="mcps1.3.3.2.1.3.2.5.1.3"><p id="en-us_topic_0056890265__p18748004151716"><strong id="en-us_topic_0056890265__b842352706164541_5">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.26%" id="mcps1.3.3.2.1.3.2.5.1.4"><p id="en-us_topic_0056890265__p10716837151716"><strong id="en-us_topic_0056890265__b842352706163417_9">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0056890265__row46344255103438"><td class="cellrowborder" valign="top" width="21.62%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="en-us_topic_0056890265__p46777534151716">key</p>
</td>
<td class="cellrowborder" valign="top" width="24.060000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="en-us_topic_0056890265__p6662534810289">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.060000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="en-us_topic_0056890265__p18273526151716">String</p>
</td>
<td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="en-us_topic_0056890265__p45015520202335">Specifies the parameter name. For example, in <strong id="en-us_topic_0056890265__b84235270621563">"max_connections": "10"</strong>, the key is <strong id="en-us_topic_0056890265__b842352706215241">max_connections</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0056890265__row11109234103438"><td class="cellrowborder" valign="top" width="21.62%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="en-us_topic_0056890265__p50431049151716">value</p>
</td>
<td class="cellrowborder" valign="top" width="24.060000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="en-us_topic_0056890265__p5017068210289">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.060000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="en-us_topic_0056890265__p66033168151716">String</p>
</td>
<td class="cellrowborder" valign="top" width="27.26%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="en-us_topic_0056890265__p79653202335">Specifies the parameter value. For example, in <strong id="en-us_topic_0056890265__b953814020215624">"max_connections": "10"</strong>, the value is <strong id="en-us_topic_0056890265__b842352706215633">10</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0056890265__ul45111455103438"><li id="en-us_topic_0056890265__li3349915103438">Request example<pre class="codeblock" id="en-us_topic_0056890265__codeblock38988398103438">{
"configuration": {
"values": {
"max_connections": "10",
"autocommit": "OFF"
}
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0056890265__section15351265103438"><h4 class="sectiontitle">Normal Response</h4><pre class="codeblock" id="en-us_topic_0056890265__codeblock60126205152131">{
"errCode": "RDS.0041",
"externalMessage": "Operation successful."
}</pre>
</div>
<div class="section" id="en-us_topic_0056890265__section51001047103438"><h4 class="sectiontitle">Abnormal Response</h4><p id="en-us_topic_0056890265__p37444118103438">For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_06_0022.html">Parameter Configuration</a></div>
</div>
</div>