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

116 lines
10 KiB
HTML

<a name="rds_04_0003"></a><a name="rds_04_0003"></a>
<h1 class="topictitle1">Querying Storage Usage of a DB Instance</h1>
<div id="body0000002507102533"><div class="section" id="rds_04_0003__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="rds_04_0003__en-us_topic_0000001776130338_p33831530">This API is used to query storage usage of a DB instance.</p>
<ul id="rds_04_0003__ul12259155218373"><li id="rds_04_0003__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_04_0003__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_04_0003__en-us_topic_0000001776130338_section2563029124413"><h4 class="sectiontitle">Constraints</h4><p id="rds_04_0003__en-us_topic_0000001776130338_p121571021134413">This API is available only for the MySQL and SQL Server.</p>
<p id="rds_04_0003__p18493185925414">To query the storage usage of an RDS for PostgreSQL instance, you can call the API for <a href="rds_01_0004.html">querying DB instances</a> and check the value of the response parameter <strong id="rds_04_0003__b099312516574">storage_used_space</strong>.</p>
</div>
<div class="section" id="rds_04_0003__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="rds_04_0003__ul53354139141429"><li id="rds_04_0003__li1270098217262">URI format<p id="rds_04_0003__p66079617141421"><a name="rds_04_0003__li1270098217262"></a><a name="li1270098217262"></a>GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/storage-used-space</p>
</li></ul>
<ul id="rds_04_0003__ul49831254144655"><li id="rds_04_0003__li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_04_0003__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_04_0003__row60083059"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="rds_04_0003__p34889605"><strong id="rds_04_0003__b694113538282">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="rds_04_0003__p7485743"><strong id="rds_04_0003__b2184145516280">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.99999999999999%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="rds_04_0003__p2365466"><strong id="rds_04_0003__b7124195682817">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_04_0003__row57385070"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_04_0003__en-us_topic_0238844974_p17679057">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_04_0003__en-us_topic_0238844974_p22717550">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_04_0003__en-us_topic_0238844974_p28182251">Specifies the project ID of a tenant in a region.</p>
<p id="rds_04_0003__en-us_topic_0238844974_p14611855135510">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_04_0003__row2864326155157"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_04_0003__en-us_topic_0238844974_p41557789155220">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_04_0003__en-us_topic_0238844974_p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="57.99999999999999%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_04_0003__en-us_topic_0238844974_p64450739155220">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_04_0003__section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_04_0003__ul1183180183717"><li id="rds_04_0003__li1283110163719">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_04_0003__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_04_0003__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="rds_04_0003__p95111733143318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="rds_04_0003__p13511123373311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="rds_04_0003__p125111433133312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="rds_04_0003__p551110331335">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rds_04_0003__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="rds_04_0003__p1163015550331">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="rds_04_0003__p1963035563316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="rds_04_0003__p1630105520331">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="rds_04_0003__p1086851153317">Specifies the user token.</p>
<p id="rds_04_0003__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>
</li></ul>
<ul id="rds_04_0003__ul336417665015"><li id="rds_04_0003__li4411135064210">Example<pre class="screen" id="rds_04_0003__screen17291427333">GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/314958daf6904c478d17c642ac209abbin01/storage-used-space</pre>
</li></ul>
</div>
<div class="section" id="rds_04_0003__section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_04_0003__ul66273227"><li id="rds_04_0003__li59588135">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_04_0003__table29752153" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="rds_04_0003__row62070345"><th align="left" class="cellrowborder" valign="top" width="19.35%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="rds_04_0003__p61642077"><strong id="rds_04_0003__b1212114317293">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.03%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="rds_04_0003__p26952341"><strong id="rds_04_0003__b3260134412297">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61.62%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="rds_04_0003__p35656026"><strong id="rds_04_0003__b3228104562917">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_04_0003__row2456979"><td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_04_0003__en-us_topic_0000001776130338_en-us_topic_0000001255144633_p66727538">node_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.03%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_04_0003__en-us_topic_0000001776130338_p198201951402">String</p>
</td>
<td class="cellrowborder" valign="top" width="61.62%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_04_0003__en-us_topic_0000001776130338_p119431559594">Instance node ID.</p>
</td>
</tr>
<tr id="rds_04_0003__row7292122523418"><td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_04_0003__en-us_topic_0000001776130338_p11361548596">used</p>
</td>
<td class="cellrowborder" valign="top" width="19.03%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_04_0003__en-us_topic_0000001776130338_p1136184115913">String</p>
</td>
<td class="cellrowborder" valign="top" width="61.62%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_04_0003__en-us_topic_0000001776130338_p4621915185916">Used storage, in GB.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_04_0003__ul26818564"><li id="rds_04_0003__li40040492">Example normal response<pre class="screen" id="rds_04_0003__en-us_topic_0000001776130338_screen20521418152916">{
"node_id" : "0314958daf6904c478d17c642ac209abbin01",
"used" : "14.21"
}</pre>
</li><li id="rds_04_0003__li33014451514">Abnormal response<p id="rds_04_0003__en-us_topic_0224329858_p014165512396"><a name="rds_04_0003__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_04_0003__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_04_0003__en-us_topic_0032347778_ul7858132212142"><li id="rds_04_0003__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_04_0003__en-us_topic_0032347778_p1040982941020"><a name="rds_04_0003__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_04_0003__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_04_0003__en-us_topic_0032347778_p0723374409"><a name="rds_04_0003__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_04_0003__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_04_0003__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>