doc-exports/docs/geminidb/api-ref/nosql_05_0109.html
Ru, Li Yi ec98136450 geminidb_api_20240905
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-10-09 13:05:44 +00:00

190 lines
18 KiB
HTML

<a name="nosql_05_0109"></a><a name="nosql_05_0109"></a>
<h1 class="topictitle1">Configuring an Autoscaling Policy for Storage Space</h1>
<div id="body0000001358516982"><div class="section" id="nosql_05_0109__section189221192101"><h4 class="sectiontitle">Function</h4><p id="nosql_05_0109__p01121420161012">This API is used to configure an autoscaling policy for storage space.</p>
</div>
<div class="section" id="nosql_05_0109__section19924419111012"><h4 class="sectiontitle">Constraints</h4><ul id="nosql_05_0109__ul1711292011018"><li id="nosql_05_0109__li01126207103">This API supports <span id="nosql_05_0109__text054082423820">GeminiDB Cassandra</span> instances.</li><li id="nosql_05_0109__li16674838154216">This API supports both pay-per-use and yearly/monthly instances.</li><li id="nosql_05_0109__li933411345417">If the instance status is not normal, autoscaling of storage space cannot be configured.</li></ul>
</div>
<div class="section" id="nosql_05_0109__section3929141931018"><h4 class="sectiontitle">URI</h4><p id="nosql_05_0109__p5112172013109">PUT https://{Endpoint}/v3/{project_id}/instances/disk-auto-expansion</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0109__table129319198101" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="nosql_05_0109__row17112220121012"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="nosql_05_0109__p141122206108">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="nosql_05_0109__p111272012106">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="nosql_05_0109__p191127208106">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="nosql_05_0109__p111213205103">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0109__row51121920101010"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="nosql_05_0109__p2112420141014">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="nosql_05_0109__p31122206109">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="nosql_05_0109__p6113172051018">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="nosql_05_0109__p311319203100">Project ID of a tenant in a region. To obtain this value, see <a href="nosql_projectid.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_05_0109__section159441919151012"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0109__table199451119111018" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="nosql_05_0109__row0113620131012"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="nosql_05_0109__p161131120101016">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="nosql_05_0109__p17113102017103">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="nosql_05_0109__p6113182081013">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="nosql_05_0109__p1911342021010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0109__row71133201107"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="nosql_05_0109__p8113112010101">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="nosql_05_0109__p2011332016105">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="nosql_05_0109__p121131820151017">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="nosql_05_0109__p1411382091010">User token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0109__table11957191916107" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="nosql_05_0109__row9113320151012"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="nosql_05_0109__p16113520181018">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="nosql_05_0109__p171138208105">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="nosql_05_0109__p81141720151013">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="nosql_05_0109__p1811422016105">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0109__row4114112015108"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_05_0109__p19114162061014">instance_ids</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_05_0109__p9114182010102">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_05_0109__p15114172012105">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_05_0109__p61141120141016">IDs of the instances where autoscaling is enabled for storage space. Up to 50 instances are supported.</p>
</td>
</tr>
<tr id="nosql_05_0109__row191141120101018"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_05_0109__p191141720171020">switch_option</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_05_0109__p19114192021011">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_05_0109__p5115920131019">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_05_0109__p111151620131014">Whether autoscaling is enabled. The value can be:</p>
<ul id="nosql_05_0109__ul111513202106"><li id="nosql_05_0109__li6115192091010"><strong id="nosql_05_0109__b3189531195816">on</strong>, indicating that autoscaling is enabled for storage space.</li><li id="nosql_05_0109__li1611512031017"><strong id="nosql_05_0109__b24117504584">off</strong>, indicating that autoscaling is disabled for storage space.</li></ul>
<p id="nosql_05_0109__p1811511200100">The default value is <strong id="nosql_05_0109__b1745316295915">on</strong>.</p>
</td>
</tr>
<tr id="nosql_05_0109__row611562051011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="nosql_05_0109__p711582012100">policy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="nosql_05_0109__p61158209102">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="nosql_05_0109__p71151420141017">Array of <a href="#nosql_05_0109__table11976121915105">diskAutoExpansionPolicy</a></p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="nosql_05_0109__p12115320191012">Autoscaling policies for storage space.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="nosql_05_0109__table11976121915105"></a><a name="table11976121915105"></a><table cellpadding="4" cellspacing="0" summary="" id="nosql_05_0109__table11976121915105" frame="border" border="1" rules="all"><caption><b>Table 4 </b>diskAutoExpansionPolicy</caption><thead align="left"><tr id="nosql_05_0109__row811512014104"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="nosql_05_0109__p711517203109">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="nosql_05_0109__p1811512020109">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="nosql_05_0109__p61151020171015">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="nosql_05_0109__p15115182015100">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nosql_05_0109__row19115220181018"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nosql_05_0109__p81151520171020">threshold</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nosql_05_0109__p811572015107">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nosql_05_0109__p171157206109">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nosql_05_0109__p181995520587">Threshold for triggering autoscaling.</p>
<ul id="nosql_05_0109__ul104924115911"><li id="nosql_05_0109__li10492191155920">GeminiDB Cassandra instances<ul id="nosql_05_0109__ul1493163716592"><li id="nosql_05_0109__li169315374597">The value can be <strong id="nosql_05_0109__b1673205584813">80</strong>, <strong id="nosql_05_0109__b155591457174813">85</strong>, or <strong id="nosql_05_0109__b4658759114812">90</strong>.</li><li id="nosql_05_0109__li184091844145915">The default threshold is <strong id="nosql_05_0109__b151139474916">90</strong>, indicating that autoscaling is enabled when the used storage space exceeds 90% of total storage space or the available storage space is less than 10 GB.</li></ul>
</li><li id="nosql_05_0109__li426942565919">GeminiDB Redis instances<ul id="nosql_05_0109__ul52621213018"><li id="nosql_05_0109__li151231531200">The value can be <strong id="nosql_05_0109__b1461594964912">60</strong>, <strong id="nosql_05_0109__b1799119519495">65</strong>, <strong id="nosql_05_0109__b18313185412497">70</strong>, <strong id="nosql_05_0109__b0445125614498">75</strong>, <strong id="nosql_05_0109__b863710589491">80</strong>, <strong id="nosql_05_0109__b672113010509">85</strong>, and <strong id="nosql_05_0109__b675115225012">90</strong>.</li><li id="nosql_05_0109__li01231635018">The default threshold is <strong id="nosql_05_0109__b97664133506">80</strong>, indicating that autoscaling is enabled when the used storage space exceeds 80% of total storage space.</li></ul>
</li></ul>
</td>
</tr>
<tr id="nosql_05_0109__row511592017107"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nosql_05_0109__p1611510206102">step</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nosql_05_0109__p2116192031012">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nosql_05_0109__p10116132016107">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nosql_05_0109__p14279499110">Autoscaling step (s%).</p>
<ul id="nosql_05_0109__ul656217517211"><li id="nosql_05_0109__li9563452026">GeminiDB Cassandra instances<ul id="nosql_05_0109__ul35631451123"><li id="nosql_05_0109__li4563115923">The value can be <strong id="nosql_05_0109__b28841321520">10</strong>, <strong id="nosql_05_0109__b10885103213525">15</strong>, or <strong id="nosql_05_0109__b0885183219523">20</strong>, and the default value is <strong id="nosql_05_0109__b11885832185218">10</strong>.</li><li id="nosql_05_0109__li5750138174">After autoscaling is enabled, storage space will increase by s% automatically.</li></ul>
</li><li id="nosql_05_0109__li185641156212">GeminiDB Redis instances<ul id="nosql_05_0109__ul75641852219"><li id="nosql_05_0109__li6564125423">The value can be <strong id="nosql_05_0109__b25931477532">10</strong>, <strong id="nosql_05_0109__b125930735316">15</strong>, or <strong id="nosql_05_0109__b1759312715315">20</strong>, and the default value is <strong id="nosql_05_0109__b059320795310">20</strong>.</li><li id="nosql_05_0109__li7580502717">When the storage usage is greater than 98%: If the total storage is less than 600 GB, the storage usage after autoscaling (used storage space/total storage space) will be less than 85%. If the total storage is greater than or equal to 600 GB, the system automatically scales up the storage space by over 90 GB.</li></ul>
</li></ul>
<div class="note" id="nosql_05_0109__note35211329133010"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="nosql_05_0109__ul3521202919304"><li id="nosql_05_0109__li41522544415">GeminiDB Cassandra instances<ul id="nosql_05_0109__ul14152175420411"><li id="nosql_05_0109__li1735531751">If the autoscaling step is not a multiple of 10, round it up.</li><li id="nosql_05_0109__li5361731052">The value after the decimal point is rounded. The minimum step is 100 GB by default.</li></ul>
</li><li id="nosql_05_0109__li161527547417">GeminiDB Redis instances<ul id="nosql_05_0109__ul815275413419"><li id="nosql_05_0109__li20996177351">The value after the decimal point is rounded. The minimum step is 1 GB by default.</li></ul>
</li></ul>
</div></div>
</td>
</tr>
<tr id="nosql_05_0109__row411619207109"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="nosql_05_0109__p211618201108">size</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="nosql_05_0109__p17116182061014">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="nosql_05_0109__p21161720141014">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="nosql_05_0109__p57901373171">Storage limit in GB that autoscaling can increase storage space to.</p>
<ul id="nosql_05_0109__ul1412516183210"><li id="nosql_05_0109__li13858102020205">GeminiDB Cassandra instances<ul id="nosql_05_0109__ul19706195515200"><li id="nosql_05_0109__li117069554205">Maximum amount that the system can automatically scale up an instance's storage space to must be greater than or equal to 100 GB of the current DB instance storage space. The value must be no less than the total storage of the instance and cannot exceed its maximum storage.</li><li id="nosql_05_0109__li16857174102218">Batch autoscaling does not allow you to specify an upper storage limit. The upper limit is the maximum storage defined by your instance specifications by default.</li></ul>
</li><li id="nosql_05_0109__li8832133322017">GeminiDB Redis instances<ul id="nosql_05_0109__ul932911595204"><li id="nosql_05_0109__li2065210619223">Autoscaling does not allow you to specify an upper storage limit. The upper limit is the maximum storage defined by your instance specifications by default.</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nosql_05_0109__section1199311196100"><h4 class="sectiontitle">Response Parameters</h4><p id="nosql_05_0109__p1027095916335"><strong id="nosql_05_0109__b44001241201210">Status code: 204</strong></p>
<p id="nosql_05_0109__p141162209102">No response parameters</p>
</div>
<div class="section" id="nosql_05_0109__section1899419190101"><h4 class="sectiontitle">Example Requests</h4><ul id="nosql_05_0109__ul128810405126"><li id="nosql_05_0109__li8881404122">Enabling the autoscaling policy of storage space<ul id="nosql_05_0109__ul16116151161414"><li id="nosql_05_0109__li425852911417">URI example<pre class="screen" id="nosql_05_0109__screen1625811295140">POST https://{Endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/disk-auto-expansion </pre>
</li><li id="nosql_05_0109__li525820299144">Enabling autoscaling for storage space (Set <strong id="nosql_05_0109__b2373173912610">threshold</strong> to <strong id="nosql_05_0109__b1163416451865">90</strong>, <strong id="nosql_05_0109__b848313219710">step</strong> to <strong id="nosql_05_0109__b127281823101710">10</strong>, and <strong id="nosql_05_0109__b145971957101714">size</strong> to <strong id="nosql_05_0109__b196912595172">600</strong>.)<pre class="screen" id="nosql_05_0109__screen525842911146">{
"instance_ids" : [ "93e4b3eda14349b1b870f72829bc3b9bin06" ],
"policy" : {
"threshold" : 90,
"step" : 10,
"size" : 600
}
}</pre>
</li></ul>
</li><li id="nosql_05_0109__li5211753155917">Disabling the autoscaling policy of storage space<ul id="nosql_05_0109__ul681114112012"><li id="nosql_05_0109__li332016818014">URI example<pre class="screen" id="nosql_05_0109__screen153201681402">POST https://{Endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/disk-auto-expansion </pre>
</li><li id="nosql_05_0109__li12321381309">Disabling the autoscaling policy of storage space<pre class="screen" id="nosql_05_0109__screen163217814014">{
"instance_ids" : [ "93e4b3eda14349b1b870f72829bc3b9bin06" ],
"switch_option":"off"
}</pre>
</li></ul>
</li></ul>
</div>
<div class="section" id="nosql_05_0109__section10492019101"><h4 class="sectiontitle">Example Responses</h4><p id="nosql_05_0109__p12116820191016"><strong id="nosql_05_0109__b1166612285012">Status code: 204</strong></p>
<p id="nosql_05_0109__p2011612020100">No Content</p>
<pre class="screen" id="nosql_05_0109__screen41161120111016">{ }</pre>
</div>
<div class="section" id="nosql_05_0109__section19107202213585"><h4 class="sectiontitle">Status Codes</h4><p id="nosql_05_0109__listapiversion_p201216122353">For details, see <a href="nosql_status_code.html">Status Codes</a>.</p>
</div>
<div class="section" id="nosql_05_0109__section21121922155813"><h4 class="sectiontitle">Error Codes</h4><p id="nosql_05_0109__listapiversion_p1265915205719">For details, see <a href="nosql_error_code.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000002.html">Instances</a></div>
</div>
</div>