Files
doc-exports/docs/rds/api-ref/rds_11_0026.html
wangdengke2 1ddaec1a62 rds_api
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>
2026-01-29 11:28:26 +00:00

131 lines
14 KiB
HTML

<a name="rds_11_0026"></a><a name="rds_11_0026"></a>
<h1 class="topictitle1">Updating an Extension</h1>
<div id="body0000002462551241"><div class="section" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_section1199461810230"><h4 class="sectiontitle">Function</h4><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p13231319142310">This API is used to update an extension on a specified database.</p>
<ul id="rds_11_0026__ul10163594121"><li id="rds_11_0026__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_11_0026__en-us_topic_0240111818_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_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_section7996151810239"><h4 class="sectiontitle">Constraints</h4><p id="rds_11_0026__p1884975962810">This operation cannot be performed when the DB instance is in any of the following statuses: creating, changing instance class, changing port, or abnormal.</p>
</div>
<div class="section" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_section18129193419"><h4 class="sectiontitle">URI</h4><ul id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_ul16391217184115"><li id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_li363951734111">URI format<p id="rds_11_0026__en-us_topic_0000001802445978_p9497943202019"><a name="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_li363951734111"></a><a name="en-us_topic_0000001802445978_en-us_topic_0000001376011761_li363951734111"></a>PUT https://{<em id="rds_11_0026__en-us_topic_0000001802445978_i6958115272010">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/extensions</p>
</li></ul>
<ul id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_ul49831254144655"><li id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_row60083059"><th align="left" class="cellrowborder" valign="top" width="21.59%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p34889605"><strong id="rds_11_0026__b3359325121514">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.25%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p7485743"><strong id="rds_11_0026__b15723122916153">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.160000000000004%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p2365466"><strong id="rds_11_0026__b54512031181511">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_row57385070"><td class="cellrowborder" valign="top" width="21.59%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p17679057">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.25%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p22717550">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="60.160000000000004%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_11_0026__en-us_topic_0285677743_en-us_topic_0144420999_p28182251">Specifies the project ID of a tenant in a region.</p>
<p id="rds_11_0026__en-us_topic_0285677743_en-us_topic_0144420999_p27281110194">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_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_row2864326155157"><td class="cellrowborder" valign="top" width="21.59%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p41557789155220">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.25%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="60.160000000000004%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_11_0026__en-us_topic_0285677743_en-us_topic_0144420999_p64450739155220">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_section3074340117316"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_11_0026__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_11_0026__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.4.2.2.5.1.1"><p id="rds_11_0026__p95111733143318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.4.2.2.5.1.2"><p id="rds_11_0026__p13511123373311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.4.2.2.5.1.3"><p id="rds_11_0026__p125111433133312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.4.2.2.5.1.4"><p id="rds_11_0026__p551110331335">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rds_11_0026__row353717218338"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rds_11_0026__p18511533163317">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rds_11_0026__p13511153333312">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rds_11_0026__p55111833183319">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rds_11_0026__p35111331332">The content type.</p>
<p id="rds_11_0026__p1351133311330">The default value is <strong id="rds_11_0026__b105111133143310">application/json</strong>.</p>
</td>
</tr>
<tr id="rds_11_0026__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.2.5.1.1 "><p id="rds_11_0026__p1163015550331">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.2.5.1.2 "><p id="rds_11_0026__p1963035563316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.2.5.1.3 "><p id="rds_11_0026__p1630105520331">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.2.5.1.4 "><p id="rds_11_0026__p1086851153317">Specifies the user token.</p>
<p id="rds_11_0026__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_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_table52869820" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters</caption><thead align="left"><tr id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_row50931783"><th align="left" class="cellrowborder" valign="top" width="22.13%" id="mcps1.3.4.3.2.5.1.1"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_p31833731"><strong id="rds_11_0026__b1073111552151">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.629999999999999%" id="mcps1.3.4.3.2.5.1.2"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_p1218491020110"><strong id="rds_11_0026__b151971857151517">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.05%" id="mcps1.3.4.3.2.5.1.3"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_p28395444"><strong id="rds_11_0026__b89282585156">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46.19%" id="mcps1.3.4.3.2.5.1.4"><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_p18329666"><strong id="rds_11_0026__b53641401168">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_row8307988"><td class="cellrowborder" valign="top" width="22.13%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_11_0026__en-us_topic_0000001802445978_p1295011488214">database_name</p>
</td>
<td class="cellrowborder" valign="top" width="15.629999999999999%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_11_0026__en-us_topic_0000001802445978_p495015489210">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.05%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_11_0026__en-us_topic_0000001802445978_p995124819216">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.19%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_11_0026__p1696872815332">The name of the specific database created inside the RDS instance. This is the logical database name, not the RDS instance identifier.</p>
</td>
</tr>
<tr id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_en-us_topic_0245436637_row15972204015312"><td class="cellrowborder" valign="top" width="22.13%" headers="mcps1.3.4.3.2.5.1.1 "><p id="rds_11_0026__en-us_topic_0000001802445978_p2095115481218">extension_name</p>
</td>
<td class="cellrowborder" valign="top" width="15.629999999999999%" headers="mcps1.3.4.3.2.5.1.2 "><p id="rds_11_0026__en-us_topic_0000001802445978_p1795154812219">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.05%" headers="mcps1.3.4.3.2.5.1.3 "><p id="rds_11_0026__en-us_topic_0000001802445978_p89516483214">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.19%" headers="mcps1.3.4.3.2.5.1.4 "><p id="rds_11_0026__en-us_topic_0000001802445978_p17951124810214">Extension name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_section8217183132417"><h4 class="sectiontitle">Example Request</h4><p id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_p626411732413">Update the extension <strong id="rds_11_0026__b1220311254161">pg_stat_statements</strong> for database <strong id="rds_11_0026__b4203825111611">db1</strong>.</p>
<pre class="screen" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_screen73779343252">PUT https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in03/extensions
{
"database_name" : "db1",
"extension_name" : "pg_stat_statements"
}</pre>
</div>
<div class="section" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_section28521534113742"><h4 class="sectiontitle">Response</h4><ul id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_ul16665627"><li id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_li15772917">Example normal response<pre class="screen" id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_screen19847172905415">{}</pre>
</li><li id="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_li3577205319311">Abnormal response<p id="rds_11_0026__p46896054"><a name="rds_11_0026__en-us_topic_0000001802445978_en-us_topic_0000001376011761_li3577205319311"></a><a name="en-us_topic_0000001802445978_en-us_topic_0000001376011761_li3577205319311"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_11_0026__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_11_0026__en-us_topic_0032347778_ul7858132212142"><li id="rds_11_0026__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_11_0026__en-us_topic_0032347778_p1040982941020"><a name="rds_11_0026__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_11_0026__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_11_0026__en-us_topic_0032347778_p0723374409"><a name="rds_11_0026__en-us_topic_0032347778_li11583183218149"></a><a name="en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_11_0026__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_11_0026__en-us_topic_0032347778_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_11_0025.html">Extension Management (RDS for PostgreSQL)</a></div>
</div>
</div>