1
0
forked from docs/doc-exports
doc-exports/docs/rds/api-ref/en-us_topic_0032347782.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

177 lines
12 KiB
HTML

<a name="en-us_topic_0032347782"></a><a name="en-us_topic_0032347782"></a>
<h1 class="topictitle1">Database Version Queries</h1>
<div id="body63384014"><div class="section" id="en-us_topic_0032347782__section61759636"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0032347782__p33831530">This API is used to obtain version information about a specified type of a database.</p>
</div>
<div class="section" id="en-us_topic_0032347782__section18965813"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0032347782__ul55999443"><li id="en-us_topic_0032347782__li34232944">URI format<p id="en-us_topic_0032347782__p39661040"><a name="en-us_topic_0032347782__li34232944"></a><a name="li34232944"></a>PATH: /rds/v1/{project_id}/datastores/{datastore_name}/versions</p>
<p id="en-us_topic_0032347782__p48498610154457">Method: GET</p>
</li><li id="en-us_topic_0032347782__li21405046">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032347782__table58427690" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0032347782__row1482002"><th align="left" class="cellrowborder" valign="top" width="21.87%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="en-us_topic_0032347782__p52933326"><strong id="en-us_topic_0032347782__b842352706102328">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.689999999999998%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="en-us_topic_0032347782__p59740974"><strong id="en-us_topic_0032347782__b842352706102346">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.44%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="en-us_topic_0032347782__p7180698"><strong id="en-us_topic_0032347782__b842352706163417">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032347782__row44765691"><td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="en-us_topic_0032347782__p2142393">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="27.689999999999998%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="en-us_topic_0032347782__p39316155">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="en-us_topic_0032347782__p1434580163733">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
<tr id="en-us_topic_0032347782__row5992637"><td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="en-us_topic_0032347782__p15641626">datastore_name</p>
</td>
<td class="cellrowborder" valign="top" width="27.689999999999998%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="en-us_topic_0032347782__p59012183">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="50.44%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="en-us_topic_0032347782__p43671367163229">Specifies the DB engine. Valid value:</p>
<ul id="en-us_topic_0032347782__ul924933143511"><li id="en-us_topic_0032347782__li1195974113511">MySQL</li><li id="en-us_topic_0032347782__li2014417783511">PostgreSQL</li><li id="en-us_topic_0032347782__li192495323520">SQLServer</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0032347782__section36474591"><h4 class="sectiontitle">Request</h4><p id="en-us_topic_0032347782__p56327989">None</p>
</div>
<div class="section" id="en-us_topic_0032347782__section59835867"><h4 class="sectiontitle">Normal Response</h4><ul id="en-us_topic_0032347782__ul66273227"><li id="en-us_topic_0032347782__li59588135">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032347782__table29752153" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0032347782__row62070345"><th align="left" class="cellrowborder" valign="top" width="33.33%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="en-us_topic_0032347782__p61642077"><strong id="en-us_topic_0032347782__b1193848353">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.339999999999996%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="en-us_topic_0032347782__p26952341"><strong id="en-us_topic_0032347782__b842352706164541">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="en-us_topic_0032347782__p35656026"><strong id="en-us_topic_0032347782__b1543410584">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032347782__row2456979"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="en-us_topic_0032347782__p64797609">dataStores</p>
</td>
<td class="cellrowborder" valign="top" width="33.339999999999996%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="en-us_topic_0032347782__p14114947">List data structure. For details, see <a href="#en-us_topic_0032347782__table66531170">Table 3</a>.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="en-us_topic_0032347782__p22140377">Indicates the list of database versions.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="en-us_topic_0032347782__table66531170"></a><a name="table66531170"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0032347782__table66531170" frame="border" border="1" rules="all"><caption><b>Table 3 </b>dataStores field data structure description</caption><thead align="left"><tr id="en-us_topic_0032347782__row12984378"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="en-us_topic_0032347782__p45101667"><strong id="en-us_topic_0032347782__b1497928198">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="en-us_topic_0032347782__p29356372"><strong id="en-us_topic_0032347782__b1619437561">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="en-us_topic_0032347782__p29055926"><strong id="en-us_topic_0032347782__b595212698">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0032347782__row4719792"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0032347782__p46758891">id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0032347782__p29373839">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0032347782__p30470722">Indicates the database version ID. Its value is unique.</p>
</td>
</tr>
<tr id="en-us_topic_0032347782__row5801050"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0032347782__p123050">name</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0032347782__p9967070">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0032347782__p2026335">Indicates the database version.</p>
</td>
</tr>
<tr id="en-us_topic_0032347782__row18237015"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0032347782__p803253">datastore</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0032347782__p65063572">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0032347782__p35658012">Indicates the database ID.</p>
</td>
</tr>
<tr id="en-us_topic_0032347782__row52486654"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0032347782__p23560597">image</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0032347782__p29360233">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0032347782__p29368673">Indicates the database image ID.</p>
</td>
</tr>
<tr id="en-us_topic_0032347782__row62991470"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0032347782__p2035480">packages</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0032347782__p30656219">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0032347782__p125790">Indicates the database package version information.</p>
</td>
</tr>
<tr id="en-us_topic_0032347782__row1132111"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="en-us_topic_0032347782__p24592149">active</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="en-us_topic_0032347782__p45807089">Int</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="en-us_topic_0032347782__p195391288540">Indicates the database version activation status. The API returns information only about activated database versions.</p>
<ul id="en-us_topic_0032347782__ul1589151015546"><li id="en-us_topic_0032347782__li1985881218545"><strong id="en-us_topic_0032347782__b599005943910">0</strong>: The database version is not activated.</li><li id="en-us_topic_0032347782__li1689210105419"><strong id="en-us_topic_0032347782__b1440819784015">1</strong>: The database version is activated.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0032347782__ul26818564"><li id="en-us_topic_0032347782__li40040492">Response example<pre class="codeblock" id="en-us_topic_0032347782__codeblock66603612164321">{
"dataStores": [
{
"id": "e8a8b8cc-63f8-4fb5-8d4a-24c502317a62",
"name": "5.6.33",
"datastore": "736270b9-27c7-4f03-823b-447d8245e1c2",
"image": "36bdc308-0389-4830-8813-4a98d62b97de",
"packages": "MySQL-server-5.6.33",
"active": 1
},
{
"id": "e8a8b8cc-63f8-4fb5-8d4a-24c502317a61",
"name": "5.6.30",
"datastore": "736270b9-27c7-4f03-823b-447d8245e1c2",
"image": "36bdc308-0389-4830-8813-4a98d62b97de",
"packages": "MySQL-server-5.6.30",
"active": 1
},
{
"id": "96cccede-bc51-11e6-bd4d-286ed488dd62",
"name": "5.6.34",
"datastore": "736270b9-27c7-4f03-823b-447d8245e1c2",
"image": "36bdc308-0389-4830-8813-4a98d62b97de",
"packages": "MySQL-server-5.6.34",
"active": 1
},
{
"id": "35a3d5ba-6f74-4b29-824d-6de20f1ac090",
"name": "5.6.35",
"datastore": "736270b9-27c7-4f03-823b-447d8245e1c2",
"image": "36bdc308-0389-4830-8813-4a98d62b97de",
"packages": "MySQL-server-5.6.35",
"active": 1
},
{
"id": "129a90a5-d4ef-4828-b3e3-4d3a1e91700d",
"name": "5.6.36",
"datastore": "736270b9-27c7-4f03-823b-447d8245e1c2",
"image": "36bdc308-0389-4830-8813-4a98d62b97de",
"packages": "MySQL-server-5.6.36",
"active": 1
},
{
"id": "87620726-6802-46c0-9028-a8785e1f1922",
"name": "5.7.17",
"datastore": "736270b9-27c7-4f03-823b-447d8245e1c2",
"image": "36bdc308-0389-4830-8813-4a98d62b97de",
"packages": "MySQL-server-5.7.17",
"active": 1
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0032347782__section1651899"><h4 class="sectiontitle">Abnormal Response</h4><p id="en-us_topic_0032347782__p46896054">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_0015.html">API v1 (To Be Discarded)</a></div>
</div>
</div>