doc-exports/docs/rds/api-ref/rds_06_0002.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

219 lines
19 KiB
HTML

<a name="rds_06_0002"></a><a name="rds_06_0002"></a>
<h1 class="topictitle1">Querying Database Specifications</h1>
<div id="body1545296199187"><div class="section" id="rds_06_0002__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="rds_06_0002__p52780252141331">This API is used to query the database specifications of a specified DB engine version.</p>
<ul id="rds_06_0002__ul12259155218373"><li id="rds_06_0002__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_06_0002__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_06_0002__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="rds_06_0002__ul53354139141429"><li id="rds_06_0002__li1270098217262">URI format<p id="rds_06_0002__p66079617141421"><a name="rds_06_0002__li1270098217262"></a><a name="li1270098217262"></a>GET https://{<em id="rds_06_0002__i86129260155">Endpoint</em>}/v3/{project_id}/flavors/{database_name}?version_name={version_name}</p>
</li></ul>
<ul id="rds_06_0002__ul49831254144655"><li id="rds_06_0002__li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0002__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0002__row60083059"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="rds_06_0002__p34889605"><strong id="rds_06_0002__b1836614023310">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="rds_06_0002__p7485743"><strong id="rds_06_0002__b1273274016330">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="rds_06_0002__p2365466"><strong id="rds_06_0002__b491164163315">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0002__row57385070"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0002__p17679057">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0002__p22717550">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0002__p28182251">Specifies the project ID of a tenant in a region.</p>
<p id="rds_06_0002__p181691757183820">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_06_0002__row2864326155157"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0002__p41557789155220">database_name</p>
</td>
<td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0002__p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0002__p64450739155220">Specifies the DB engine name. Its value can be any of the following and is case-insensitive:</p>
<ul id="rds_06_0002__ul924933143511"><li id="rds_06_0002__li1195974113511">MySQL</li><li id="rds_06_0002__li2014417783511">PostgreSQL</li><li id="rds_06_0002__li192495323520">SQLServer</li></ul>
</td>
</tr>
<tr id="rds_06_0002__row4161445171"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0002__p516110417170">version_name</p>
</td>
<td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0002__p116114111716">No</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0002__p560353184916">Specifies the database version. For details about how to obtain the database version, see section <a href="rds_06_0001.html">Querying Version Information About a DB Engine</a>. For details about the version, see <a href="en-us_topic_0043898356.html">DB Engines and Versions</a>.</p>
<p id="rds_06_0002__p31610414179"></p>
</td>
</tr>
<tr id="rds_06_0002__row115971435205310"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0002__p1959723516537">spec_code</p>
</td>
<td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0002__p105971935105319">No</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0002__p10597235155311">Specifies the specification code.</p>
<div class="notice" id="rds_06_0002__note4969759191412"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="rds_06_0002__p5691164615260">For Microsoft SQL Server, Only 2022_EE, 2019_EE and 2017_EE support the creation of read replicas and do not support the creation of single DB instances.</p>
</div></div>
<p id="rds_06_0002__p86678172112">The format of the specification code is: {<em id="rds_06_0002__i126668122115">spec code</em>}{<em id="rds_06_0002__i196617832114">instance mode</em>}.</p>
<ul id="rds_06_0002__ul24442061515"><li id="rds_06_0002__li105302024192113"><em id="rds_06_0002__i35334240217">spec code</em> can be obtained from <a href="rds_10_0004.html">DB Instance Classes</a>.</li><li id="rds_06_0002__li1095921282110"><em id="rds_06_0002__i9410114261817">instance mode</em> can be any of the following:<ul id="rds_06_0002__ul07451328162117"><li id="rds_06_0002__li1444664510">For single DB instances, the value is <strong id="rds_06_0002__b105131586157">null</strong>. Example spe_code: rds.mysql.n1.xlarge</li><li id="rds_06_0002__li239415197519">For primary/standby DB instances, the value is <span class="parmvalue" id="rds_06_0002__parmvalue05973377819"><b>.ha</b></span>. Example spe_code: rds.mysql.n1.xlarge.ha</li><li id="rds_06_0002__li132621955572">For read replicas, the value is <span class="parmvalue" id="rds_06_0002__parmvalue17579173418816"><b>.rr</b></span>. Example spe_code: rds.mysql.n1.xlarge.rr</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_06_0002__section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_06_0002__ul1183180183717"><li id="rds_06_0002__li1283110163719">Request parameters<p id="rds_06_0002__p848415163614"><a name="rds_06_0002__li1283110163719"></a><a name="li1283110163719"></a>None</p>
</li></ul>
<ul id="rds_06_0002__ul59516447497"><li id="rds_06_0002__li4411135064210">Example<p id="rds_06_0002__p573812146463"><a name="rds_06_0002__li4411135064210"></a><a name="li4411135064210"></a>GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/flavors/mysql?version_name=5.7</p>
</li></ul>
</div>
<div class="section" id="rds_06_0002__section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_06_0002__ul66273227"><li id="rds_06_0002__li59588135">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0002__table29752153" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0002__row62070345"><th align="left" class="cellrowborder" valign="top" width="16.6%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="rds_06_0002__p61642077"><strong id="rds_06_0002__b12952446193514">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.07%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="rds_06_0002__p26952341"><strong id="rds_06_0002__b1660114793511">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="rds_06_0002__p35656026"><strong id="rds_06_0002__b8477174833518">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0002__row2456979"><td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_06_0002__p64797609">flavors</p>
</td>
<td class="cellrowborder" valign="top" width="50.07%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_06_0002__p158510360232">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_06_0002__p22140377">Indicates the DB instance specifications information list.</p>
<p id="rds_06_0002__p16922658102215">For details, see <a href="#rds_06_0002__table1336414511696">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rds_06_0002__table1336414511696"></a><a name="table1336414511696"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0002__table1336414511696" frame="border" border="1" rules="all"><caption><b>Table 3 </b>flavors field data structure description</caption><thead align="left"><tr id="rds_06_0002__row1136575114913"><th align="left" class="cellrowborder" valign="top" width="17.419999999999998%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="rds_06_0002__p11365551997"><strong id="rds_06_0002__b113658511918">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.34%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="rds_06_0002__p133651151592"><strong id="rds_06_0002__b53655519910">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="69.24%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="rds_06_0002__p153652051699"><strong id="rds_06_0002__b2365251098">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0002__row1836518511791"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p536514511917">vcpus</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p1536565119912">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p2036516516918">Indicates the CPU size. For example, the value <strong id="rds_06_0002__b4365195113919">1</strong> indicates 1 vCPU.</p>
</td>
</tr>
<tr id="rds_06_0002__row5365105113912"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p12365125118914">ram</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p836516511995">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p153652516919">Indicates the memory size in GB.</p>
</td>
</tr>
<tr id="rds_06_0002__row679961301515"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p7799213121515">id</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p1679991311158">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p18800113191519">Indicates the specification ID, which is unique.</p>
</td>
</tr>
<tr id="rds_06_0002__row8365551393"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p13651511297">spec_code</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p43661851398">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p12367175119911">Indicates the resource specification code. Use <strong id="rds_06_0002__b17367135110910">rds.mysql.n1.xlarge.rr</strong> as an example.</p>
<ul id="rds_06_0002__ul63671451691"><li id="rds_06_0002__li7367135110917"><span class="parmvalue" id="rds_06_0002__parmvalue1536710512915"><b>rds</b></span>: indicates the RDS product.</li><li id="rds_06_0002__li123670517918"><span class="parmvalue" id="rds_06_0002__parmvalue33671512092"><b>mysql</b></span>: indicates the DB engine.</li><li id="rds_06_0002__li036719516918"><span class="parmvalue" id="rds_06_0002__parmvalue1036825115914"><b>n1.xlarge</b></span>: indicates the high memory performance specifications.</li><li id="rds_06_0002__li83682511997"><span class="parmvalue" id="rds_06_0002__parmvalue133680511490"><b>rr</b></span>: indicates the read replica (<span class="parmvalue" id="rds_06_0002__parmvalue1368451394"><b>.ha</b></span> indicates primary/standby DB instances).</li></ul>
</td>
</tr>
<tr id="rds_06_0002__row1336818511999"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p73681851695">version_name</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p536875112917">Array</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p1136845114915">Indicates the database version.</p>
<ul id="rds_06_0002__ul183911316327"><li id="rds_06_0002__li1883921320322">MySQL databases support 5.6, 5.7, and 8.0.</li><li id="rds_06_0002__li12840413143219">PostgreSQL databases support 9.5, 9.6, 10, 11, 12, 13, 14 and 15.</li><li id="rds_06_0002__li68401913153220">Microsoft SQL Server databases only support 2017_SE, 2017_EE, 2019_SE, 2019_EE, 2022_SE and 2022_EE.</li></ul>
<p id="rds_06_0002__p2126612175014">Example value for MySQL: ["5.6","5.7","8.0"]</p>
</td>
</tr>
<tr id="rds_06_0002__row1336815110915"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p636815511396">instance_mode</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p1536816511996">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p153688511917">Indicates the DB instance type. Its value can be any of the following:</p>
<ul id="rds_06_0002__ul8368145117913"><li id="rds_06_0002__li83681951999"><strong id="rds_06_0002__b73682511793">ha</strong>: indicates primary/standby DB instances.</li><li id="rds_06_0002__li113686514917"><strong id="rds_06_0002__b2036814511598">replica</strong>: indicates read replicas.</li><li id="rds_06_0002__li17368115118912"><strong id="rds_06_0002__b536811513919">single</strong>: indicates single DB instances.</li></ul>
</td>
</tr>
<tr id="rds_06_0002__row0369125111912"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p1436965119915">az_status</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p12369205111920">Map&lt;String, String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p1636955113917">Indicates the specification status in an AZ. Its value can be any of the following:</p>
<ul id="rds_06_0002__ul4369125119920"><li id="rds_06_0002__li53697511915"><strong id="rds_06_0002__b1336935111918">normal</strong>: indicates that the specifications in the AZ are available.</li><li id="rds_06_0002__li63691511912"><strong id="rds_06_0002__b17369145113914">unsupported</strong>: indicates that the specifications are not supported by the AZ.</li><li id="rds_06_0002__li18369351590"><strong id="rds_06_0002__b1536935113915">sellout</strong>: indicates that the specifications in the AZ are sold out.</li></ul>
</td>
</tr>
<tr id="rds_06_0002__row1345610125239"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p3457151252316">az_desc</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p164579120231">Map&lt;String, String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p1745710129236">Indicates the description of the AZ to which the specifications belong.</p>
</td>
</tr>
<tr id="rds_06_0002__row9947193510327"><td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0002__p1194793514325">group_type</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0002__p994716356322">String</p>
</td>
<td class="cellrowborder" valign="top" width="69.24%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0002__p189470351324">Indicates the performance specifications. Its value can be any of the following:</p>
<ul id="rds_06_0002__ul153561939163711"><li id="rds_06_0002__li193568394374"><strong id="rds_06_0002__b6624172703118">normal</strong>: general-enhanced</li><li id="rds_06_0002__li649511464416"><strong id="rds_06_0002__b15909351193217">general</strong>: general-purpose</li><li id="rds_06_0002__li576021120184"><strong id="rds_06_0002__b1686961211187">dedicated</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_06_0002__ul26818564"><li id="rds_06_0002__li40040492">Example normal response<pre class="codeblock" id="rds_06_0002__codeblock17911107173320">{
"flavors": [{
"vcpus": "1",
"ram": 2,
"id":"2988b9cc-2aac-3a94-898c-14666702f129",
"spec_code": "rds.mysql.n1.large.ha",
"version_name": ["5.6","5.7","8.0"],
"instance_mode": "ha",
"az_status": {
"az1": "normal",
"az2": "normal"
},
"az_desc": {
"az1": "az1",
"az2": "az2"
},
"group_type": "normal"
},
{
"vcpus": "1",
"ram": 2,
"id":"2988b9cc-2aac-3a94-898c-14666702f130",
"spec_code": "rds.mysql.n1.large.rr",
"version_name": ["5.6","5.7","8.0"],
"instance_mode": "replica",
"az_status": {
"az1": "normal",
"az2": "normal"
},
"az_desc": {
"az1": "az1",
"az2": "az2"
},
"group_type": "normal"
}
]
}</pre>
</li><li id="rds_06_0002__li33014451514">Abnormal response<p id="rds_06_0002__en-us_topic_0224329858_p014165512396"><a name="rds_06_0002__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_06_0002__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_06_0002__en-us_topic_0032347778_ul7858132212142"><li id="rds_06_0002__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_06_0002__en-us_topic_0032347778_p1040982941020"><a name="rds_06_0002__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_06_0002__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_06_0002__en-us_topic_0032347778_p0723374409"><a name="rds_06_0002__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_06_0002__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_06_0002__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_09_0000.html">API v3 (Recommended)</a></div>
</div>
</div>