doc-exports/docs/rds/api-ref/rds_01_0101.html
Ru, Li Yi 9457035d64 rds_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-07-03 08:42:51 +00:00

136 lines
13 KiB
HTML

<a name="rds_01_0101"></a><a name="rds_01_0101"></a>
<h1 class="topictitle1">Changing DB Instance Specifications</h1>
<div id="body1548399097866"><div class="section" id="rds_01_0101__section2161131714317"><h4 class="sectiontitle">Function</h4><p id="rds_01_0101__p1779463834710">This API is used to change DB instance specifications.</p>
<ul id="rds_01_0101__ul12259155218373"><li id="rds_01_0101__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_01_0101__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 class="note" id="rds_01_0101__note41076154715"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="rds_01_0101__p41118674718">Services will be interrupted for 5 to 10 minutes when you change DB instance specifications. Exercise caution when performing this operation.</p>
</div></div>
</div>
<div class="section" id="rds_01_0101__section11726173915271"><h4 class="sectiontitle">Constraints</h4><ul id="rds_01_0101__ul43911954192719"><li id="rds_01_0101__li8391954112710">The new DB instance specifications must be different from the original DB instance specifications.</li><li id="rds_01_0101__li193917544272">The instance class can be modified only for DB instances whose status is <strong id="rds_01_0101__b842352706978">Available</strong>.</li><li id="rds_01_0101__li133911054182715">The specifications of a DB instance can be changed only to the specifications of the same DB instance type. (For example, the specifications of a single DB instance cannot be changed to those of primary/standby DB instances.)</li></ul>
</div>
<div class="section" id="rds_01_0101__section1832017411437"><h4 class="sectiontitle">URI</h4><ul id="rds_01_0101__ul1794193834712"><li id="rds_01_0101__li7794173834713">URI format<p id="rds_01_0101__p8795103874717"><a name="rds_01_0101__li7794173834713"></a><a name="li7794173834713"></a>POST https://{<em id="rds_01_0101__i2096815331154">Endpoint</em>}/v3/{<em id="rds_01_0101__i8287192519110">project_id</em>}/instances/{<em id="rds_01_0101__i575217298119">instance_id</em>}/action</p>
</li><li id="rds_01_0101__li1879517384479">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0101__table1850440194515" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_01_0101__row250519074511"><th align="left" class="cellrowborder" valign="top" width="23.102310231023104%" id="mcps1.3.3.2.2.1.2.4.1.1"><p id="rds_01_0101__p1797102511451"><strong id="rds_01_0101__b15413122719441">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.602660266026607%" id="mcps1.3.3.2.2.1.2.4.1.2"><p id="rds_01_0101__p18800202517459"><strong id="rds_01_0101__b7356192819449">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.29502950295029%" id="mcps1.3.3.2.2.1.2.4.1.3"><p id="rds_01_0101__p2080172515455"><strong id="rds_01_0101__b1214410294443">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0101__row1750516054517"><td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="rds_01_0101__p58122251454">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.602660266026607%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="rds_01_0101__p98132025104516">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.29502950295029%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="rds_01_0101__p881412255459">Specifies the project ID of a tenant in a region.</p>
<p id="rds_01_0101__p23751829104117">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_01_0101__row050530174516"><td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="rds_01_0101__p198191825124514">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.602660266026607%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="rds_01_0101__p14819162594516">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.29502950295029%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="rds_01_0101__p981962520456">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_01_0101__section174174216613"><h4 class="sectiontitle">Request</h4><ul id="rds_01_0101__ul1879693854713"><li id="rds_01_0101__li157964386476">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0101__table1192517281714" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_01_0101__row992517283713"><th align="left" class="cellrowborder" valign="top" width="17.82178217821782%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="rds_01_0101__p86417391376"><strong id="rds_01_0101__b2035144411245">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.742574257425744%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="rds_01_0101__p96753916711"><strong id="rds_01_0101__b14714154442412">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.762376237623762%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="rds_01_0101__p268239878"><strong id="rds_01_0101__b186551945182414">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.67326732673268%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="rds_01_0101__p769133918716"><strong id="rds_01_0101__b6298114642415">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0101__row9925162812714"><td class="cellrowborder" valign="top" width="17.82178217821782%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="rds_01_0101__p187053911714">resize_flavor</p>
</td>
<td class="cellrowborder" valign="top" width="25.742574257425744%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="rds_01_0101__p871539878">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="23.762376237623762%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="rds_01_0101__a9a9492e05cb648e885d1e747a339d04d">Object</p>
</td>
<td class="cellrowborder" valign="top" width="32.67326732673268%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="rds_01_0101__p1672139273">For details, see <a href="#rds_01_0101__table68501959278">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rds_01_0101__table68501959278"></a><a name="table68501959278"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0101__table68501959278" frame="border" border="1" rules="all"><caption><b>Table 3 </b>resize_flavor field data structure description</caption><thead align="left"><tr id="rds_01_0101__row9851859278"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="rds_01_0101__p1471161120810"><strong id="rds_01_0101__b324519614255">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="rds_01_0101__p97133113812"><strong id="rds_01_0101__b4862166162520">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="rds_01_0101__p671491117810"><strong id="rds_01_0101__b6953168192511">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="rds_01_0101__p12716171118817"><strong id="rds_01_0101__b03311114172517">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0101__row128514591678"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="rds_01_0101__p197182111783">spec_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="rds_01_0101__p6719311086">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="rds_01_0101__p27205111485">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="rds_01_0101__p57226111189">Specifies the resource specification code. Use <strong id="rds_01_0101__b842352706171033">rds.mysql.n1.xlarge</strong> as an example. <strong id="rds_01_0101__b842352706163930">rds</strong> indicates RDS, <strong id="rds_01_0101__b842352706163952">mysql</strong> indicates the DB engine, and <strong id="rds_01_0101__b84235270616408">n1.xlarge</strong> indicates the performance specification (large-memory). The parameter containing <strong id="rds_01_0101__b18961135810253">rr</strong> indicates the read replica specifications. The parameter not containing <strong id="rds_01_0101__b7963105818258">rr</strong> indicates the single or primary/standby DB instance specifications.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_01_0101__ul1381411352249"><li id="rds_01_0101__li4411135064210">Example<p id="rds_01_0101__p1454414211213"><a name="rds_01_0101__li4411135064210"></a><a name="li4411135064210"></a>POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action</p>
</li></ul>
<ul id="rds_01_0101__ul17798138184717"><li id="rds_01_0101__li779813854716">Request example<pre class="codeblock" id="rds_01_0101__codeblock18885491117">{
"resize_flavor": {
"spec_code": "rds.pg.c2.medium"
}
}</pre>
</li></ul>
</div>
<div class="section" id="rds_01_0101__section415313301118"><h4 class="sectiontitle">Response</h4><ul id="rds_01_0101__ul187991238144718"><li id="rds_01_0101__li10799193816479">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_01_0101__table668693854710" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameter description</caption><thead align="left"><tr id="rds_01_0101__row579917386473"><th align="left" class="cellrowborder" valign="top" width="33.68%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="rds_01_0101__p11799738114718"><strong id="rds_01_0101__b844712462811">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.47%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="rds_01_0101__p879983818477"><strong id="rds_01_0101__b7301195152818">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.85%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="rds_01_0101__p1799538174710"><strong id="rds_01_0101__b1432126152812">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_01_0101__row1379923812473"><td class="cellrowborder" valign="top" width="33.68%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_01_0101__p5799103874712">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.47%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_01_0101__p879983854715">String</p>
</td>
<td class="cellrowborder" valign="top" width="32.85%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_01_0101__p177991438194711">Indicates the task ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<ul id="rds_01_0101__ul1135712981319"><li id="rds_01_0101__li735719919138">Example normal response<pre class="codeblock" id="rds_01_0101__codeblock053262517133">{
"job_id": "2b414788a6004883a02390e2eb0ea227"
}</pre>
</li><li id="rds_01_0101__li2072718551485">Abnormal Response<p id="rds_01_0101__p187991538114712"><a name="rds_01_0101__li2072718551485"></a><a name="li2072718551485"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
<div class="section" id="rds_01_0101__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_01_0101__rds_01_0002_en-us_topic_0032347778_ul7858132212142"><li id="rds_01_0101__rds_01_0002_en-us_topic_0032347778_li58581622171411">Normal<p id="rds_01_0101__rds_01_0002_en-us_topic_0032347778_p1040982941020"><a name="rds_01_0101__rds_01_0002_en-us_topic_0032347778_li58581622171411"></a><a name="rds_01_0002_en-us_topic_0032347778_li58581622171411"></a>202</p>
</li><li id="rds_01_0101__rds_01_0002_en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_01_0101__rds_01_0002_en-us_topic_0032347778_p0723374409"><a name="rds_01_0101__rds_01_0002_en-us_topic_0032347778_li11583183218149"></a><a name="rds_01_0002_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_01_0101__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_01_0101__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="en-us_topic_0056887470.html">DB Instance Management</a></div>
</div>
</div>