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>
216 lines
18 KiB
HTML
216 lines
18 KiB
HTML
<a name="rds_05_0032"></a><a name="rds_05_0032"></a>
|
|
|
|
<h1 class="topictitle1">Querying Available Instance Classes for a DB Instance</h1>
|
|
<div id="body0000002474358592"><div class="section" id="rds_05_0032__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="rds_05_0032__p5753583532">This API is used to query available instance classes for a DB instance.</p>
|
|
<ul id="rds_05_0032__ul11744937175719"><li id="rds_05_0032__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_05_0032__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_05_0032__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="rds_05_0032__ul53354139141429"><li id="rds_05_0032__li1270098217262">URI format<p id="rds_05_0032__p147291933121420"><a name="rds_05_0032__li1270098217262"></a><a name="li1270098217262"></a>GET https://{endpoint}/v3/{project_id}/instances/{instance_id}/flavors-resize</p>
|
|
</li></ul>
|
|
<ul id="rds_05_0032__ul49831254144655"><li id="rds_05_0032__li15430535">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0032__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="rds_05_0032__row60083059"><th align="left" class="cellrowborder" valign="top" width="20.979999999999997%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="rds_05_0032__p34889605"><strong id="rds_05_0032__b941013319285">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.55%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="rds_05_0032__p7485743"><strong id="rds_05_0032__b86041829162917">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.470000000000006%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="rds_05_0032__p2365466"><strong id="rds_05_0032__b1058615319292">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0032__row57385070"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0032__p17679057">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_05_0032__p22717550">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.470000000000006%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_05_0032__p1434580163733">Project ID of a tenant in a region.</p>
|
|
<p id="rds_05_0032__p181691757183820">To obtain the value, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0032__row2864326155157"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0032__p41557789155220">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_05_0032__p10737742155220">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.470000000000006%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_05_0032__p981962520456">Instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="rds_05_0032__section3074340117316"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0032__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_05_0032__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.3.2.2.5.1.1"><p id="rds_05_0032__p95111733143318">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.3.2.2.5.1.2"><p id="rds_05_0032__p13511123373311">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.3.2.2.5.1.3"><p id="rds_05_0032__p125111433133312">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.3.2.2.5.1.4"><p id="rds_05_0032__p551110331335">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0032__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.3.2.2.5.1.1 "><p id="rds_05_0032__p1163015550331">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.3.2.2.5.1.2 "><p id="rds_05_0032__p1963035563316">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.3.2.2.5.1.3 "><p id="rds_05_0032__p1630105520331">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.3.2.2.5.1.4 "><p id="rds_05_0032__p1086851153317">Specifies the user token.</p>
|
|
<p id="rds_05_0032__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>
|
|
<div class="section" id="rds_05_0032__section318715282232"><h4 class="sectiontitle">Example Request</h4><p id="rds_05_0032__en-us_topic_0000001560574042_p18878123011015">Query available instance classes for a DB instance.</p>
|
|
<pre class="screen" id="rds_05_0032__en-us_topic_0000001560574042_screen17878330904">GET https://rds.eu-de.otc.t-systems.com/v3/054e292c9880d4992f02c0196d3ea468/instances/d674b54d5e0241c49eeb50c82ef3efe0in03/flavors-resize</pre>
|
|
</div>
|
|
<div class="section" id="rds_05_0032__section28521534113742"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0032__table32267243" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="rds_05_0032__row9230088"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.2.4.1.1"><p id="rds_05_0032__p9439626"><strong id="rds_05_0032__b7143122105018">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.482048204820483%" id="mcps1.3.5.2.2.4.1.2"><p id="rds_05_0032__p26412257"><strong id="rds_05_0032__b19655202618508">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.184618461846185%" id="mcps1.3.5.2.2.4.1.3"><p id="rds_05_0032__p59018101"><strong id="rds_05_0032__b1673220284500">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0032__row9246228181816"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p8578253115215">flavor_groups</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.482048204820483%" headers="mcps1.3.5.2.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p1674671814516">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.184618461846185%" headers="mcps1.3.5.2.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p10746518194514">List of available instance classes. For details, see <a href="#rds_05_0032__en-us_topic_0000001560574042_table19464718184511">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rds_05_0032__en-us_topic_0000001560574042_table19464718184511"></a><a name="en-us_topic_0000001560574042_table19464718184511"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0032__en-us_topic_0000001560574042_table19464718184511" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Data structure description of field flavor_groups</caption><thead align="left"><tr id="rds_05_0032__en-us_topic_0000001560574042_row374761854520"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="rds_05_0032__en-us_topic_0000001560574042_p874711814451"><strong id="rds_05_0032__b54472243516">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="rds_05_0032__en-us_topic_0000001560574042_p18747218144519"><strong id="rds_05_0032__b1302026400">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="rds_05_0032__en-us_topic_0000001560574042_p6747191804514"><strong id="rds_05_0032__b18581182612514">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0032__en-us_topic_0000001560574042_row474731844511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p1548619301552">group_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p12486173005514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p154865306552">Instance class. Its value can be any of the following:</p>
|
|
<ul id="rds_05_0032__ul192680018292"><li id="rds_05_0032__li963810416294"><strong id="rds_05_0032__b1319992419354">general</strong>: general-purpose</li><li id="rds_05_0032__li15268708291"><strong id="rds_05_0032__b7604153412125">dedicated</strong>: dedicated</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0032__en-us_topic_0000001560574042_row874771804515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p548663025512">compute_flavors</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="rds_05_0032__p11486630195513">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p148613011556">List of compute specifications. For details, see <a href="#rds_05_0032__en-us_topic_0000001560574042_table145112545559">Table 5</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="rds_05_0032__en-us_topic_0000001560574042_table145112545559"></a><a name="en-us_topic_0000001560574042_table145112545559"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0032__en-us_topic_0000001560574042_table145112545559" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Data structure description of field compute_flavors</caption><thead align="left"><tr id="rds_05_0032__en-us_topic_0000001560574042_row49165415552"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="rds_05_0032__en-us_topic_0000001560574042_p1591195465510"><strong id="rds_05_0032__b114491249518">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="rds_05_0032__en-us_topic_0000001560574042_p139125415558"><strong id="rds_05_0032__b503446493">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="rds_05_0032__en-us_topic_0000001560574042_p139118546552"><strong id="rds_05_0032__b155833261454">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="rds_05_0032__en-us_topic_0000001560574042_row891954145510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p149195413554">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p291195455518">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p19117541554">Specification ID, which is unique.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0032__en-us_topic_0000001560574042_row19145455520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p179114549559">code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p1592185425511">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p129295485514">Resource specification code. Example: <strong id="rds_05_0032__b1548612374119">rds.mysql.n1.xlarge.4.rr</strong></p>
|
|
<p id="rds_05_0032__en-us_topic_0000001560574042_p1892125410550">For more specifications, see <a href="rds_06_0002.html">Querying Database Specifications</a>.</p>
|
|
<ul id="rds_05_0032__en-us_topic_0000001560574042_ul187651738135610"><li id="rds_05_0032__en-us_topic_0000001560574042_li16765113875619"><strong id="rds_05_0032__b98251618405">rds</strong>: indicates the RDS product.</li><li id="rds_05_0032__en-us_topic_0000001560574042_li187652389566"><strong id="rds_05_0032__b1813312913314">mysql</strong>: indicates the DB engine.</li><li id="rds_05_0032__en-us_topic_0000001560574042_li11765838125620"><strong id="rds_05_0032__b960293216405">n1.xlarge.4</strong>: indicates the high memory specifications.</li><li id="rds_05_0032__en-us_topic_0000001560574042_li07655386565"><strong id="rds_05_0032__b091275318405">rr</strong>: indicates read replicas (<strong id="rds_05_0032__b1291275334011">.ha</strong> indicates primary/standby DB instances).</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0032__en-us_topic_0000001560574042_row1292145419553"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p139213547550">vcpus</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p492145411558">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p29255495511">Number of vCPUs. For example, the value <strong id="rds_05_0032__b1570610433415">1</strong> indicates one vCPU.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0032__en-us_topic_0000001560574042_row1892354205513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p139245414551">ram</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p19922054195513">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p192155416558">Memory size in GB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="rds_05_0032__en-us_topic_0000001560574042_row69219546557"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="rds_05_0032__en-us_topic_0000001560574042_p39265455517">az_status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="rds_05_0032__en-us_topic_0000001560574042_p17931654175517">Map<String,String></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="rds_05_0032__en-us_topic_0000001560574042_p119325419558">AZ information. <strong id="rds_05_0032__b750316611406">key</strong> indicates the AZ associated with the specification, and <strong id="rds_05_0032__b8516123134016">value</strong> indicates the specification status in the AZ. The value can be any of the following:</p>
|
|
<ul id="rds_05_0032__en-us_topic_0000001836635801_ul188939324525"><li id="rds_05_0032__en-us_topic_0000001836635801_li8893132145219"><strong id="rds_05_0032__b134182491422">normal</strong>: The specification is normal.</li><li id="rds_05_0032__en-us_topic_0000001836635801_li189443217524"><strong id="rds_05_0032__b18444215154512">abandon</strong>: The specification is abandoned.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<ul id="rds_05_0032__ul12573920"><li id="rds_05_0032__li46056421">Example normal response<pre class="screen" id="rds_05_0032__en-us_topic_0000001560574042_screen221018111714">{
|
|
"flavor_groups" : [ {
|
|
"group_type" : "general",
|
|
"compute_flavors" : [ {
|
|
"id" : "400fd0df-0502-34f1-99be-ccf2a04241ae",
|
|
"code" : "rds.pg.n1.medium.2",
|
|
"vcpus" : "1",
|
|
"ram" : "2",
|
|
"az_status" : {
|
|
"****" : "normal"
|
|
}
|
|
}, {
|
|
"id" : "4937f920-ba42-37a8-a375-ab46ef030814",
|
|
"code" : "rds.pg.n1.xlarge.4",
|
|
"vcpus" : "4",
|
|
"ram" : "16",
|
|
"az_status" : {
|
|
"****" : "normal"
|
|
}
|
|
}, {
|
|
"id" : "32a8aa95-72cc-34c7-873b-827e23f3ccec",
|
|
"code" : "rds.pg.n1.2xlarge.2",
|
|
"vcpus" : "8",
|
|
"ram" : "16",
|
|
"az_status" : {
|
|
"****" : "normal"
|
|
}
|
|
}, {
|
|
"id" : "98c033ca-a0f2-34be-8b27-c5dda5e6bee1",
|
|
"code" : "rds.pg.n1.2xlarge.4",
|
|
"vcpus" : "8",
|
|
"ram" : "32",
|
|
"az_status" : {
|
|
"****" : "normal"
|
|
}
|
|
} ]
|
|
} ]
|
|
}</pre>
|
|
</li><li id="rds_05_0032__li33014451514">Abnormal response<p id="rds_05_0032__en-us_topic_0110967248_p014165512396"><a name="rds_05_0032__li33014451514"></a><a name="li33014451514"></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_0032__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_05_0032__rds_01_0002_en-us_topic_0032347778_ul7858132212142"><li id="rds_05_0032__rds_01_0002_en-us_topic_0032347778_li58581622171411">Normal<p id="rds_05_0032__rds_01_0002_en-us_topic_0032347778_p1040982941020"><a name="rds_05_0032__rds_01_0002_en-us_topic_0032347778_li58581622171411"></a><a name="rds_01_0002_en-us_topic_0032347778_li58581622171411"></a>200</p>
|
|
</li><li id="rds_05_0032__rds_01_0002_en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_05_0032__rds_01_0002_en-us_topic_0032347778_p0723374409"><a name="rds_05_0032__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_05_0032__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_05_0032__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>
|
|
|