forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: chenjunjie <chenjunjie@huawei.com> Co-committed-by: chenjunjie <chenjunjie@huawei.com>
199 lines
17 KiB
HTML
199 lines
17 KiB
HTML
<a name="ResizeInstance"></a><a name="ResizeInstance"></a>
|
|
|
|
<h1 class="topictitle1">Modifying Instance Specifications</h1>
|
|
<div id="body1708331107508"><div class="section" id="ResizeInstance__section151711543020"><h4 class="sectiontitle">Function</h4><p id="ResizeInstance__p155173153307">This API is used to modify specifications of a DCS instance in the <strong id="ResizeInstance__b17517121518300">Running</strong> state.</p>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section17518111514303"><h4 class="sectiontitle">URI</h4><p id="ResizeInstance__p1151812150305">POST /v2/{project_id}/instances/{instance_id}/resize</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ResizeInstance__table15181415183011" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ResizeInstance__row16518171511301"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ResizeInstance__p65181415133015">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ResizeInstance__p1519915173016">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ResizeInstance__p1351921533017">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ResizeInstance__p11519615123017">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ResizeInstance__row1051818152302"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ResizeInstance__p0519915163012">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ResizeInstance__p55191415153019">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ResizeInstance__p8519171515308">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ResizeInstance__p1751931543018">Instance ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row13518015203019"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ResizeInstance__p175193156309">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ResizeInstance__p16519131543011">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ResizeInstance__p8519101563018">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ResizeInstance__p155201215193015">Project ID. For details, see <a href="dcs-api-0312045.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section55201015203017"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ResizeInstance__request_ResizeInstanceBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="ResizeInstance__row14520171563012"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ResizeInstance__p6520815143019">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ResizeInstance__p1952151510309">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ResizeInstance__p18521151513300">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ResizeInstance__p352181519308">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ResizeInstance__row4520181523015"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p5521315153012">spec_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p205211815153014">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p15521415163020">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p952161553019">Flavor after the modification. The query method is as follows:</p>
|
|
<ul id="ResizeInstance__ul35214151306"><li id="ResizeInstance__li852111523014">Method 1: Log in to the DCS console, go to the instance creation page, and check the instance flavor.</li><li id="ResizeInstance__li1552121583020">Method 2: Call the <a href="ListFlavors.html">API used to query product flavors</a>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row452021517307"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p352241518302">new_capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p17522121512307">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p16522141510307">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p452241512301">New memory size of the DCS instance, in GB.</p>
|
|
<p id="ResizeInstance__p155221315163015">For a single-node or master/standby DCS Redis 4.0 or later instance, the value can be <strong id="ResizeInstance__b35229156300">0.125</strong>, <strong id="ResizeInstance__b1522161563012">0.25</strong>, <strong id="ResizeInstance__b0522101553013">0.5</strong>, <strong id="ResizeInstance__b1522171523014">1</strong>, <strong id="ResizeInstance__b852231583015">2</strong>, <strong id="ResizeInstance__b152261516300">4</strong>, <strong id="ResizeInstance__b15221515123012">8</strong>, <strong id="ResizeInstance__b452211517309">16</strong>, <strong id="ResizeInstance__b1522131512309">32</strong>, or <strong id="ResizeInstance__b652210155300">64</strong>. For a cluster DCS Redis 4.0 or later instance, the value can be <strong id="ResizeInstance__b4522141517305">4</strong>, <strong id="ResizeInstance__b9522191533019">8</strong>, <strong id="ResizeInstance__b852341533012">16</strong>, <strong id="ResizeInstance__b11523191520309">24</strong>, <strong id="ResizeInstance__b75231115153014">32</strong>, <strong id="ResizeInstance__b752331503019">48</strong>, <strong id="ResizeInstance__b952361512306">64</strong>, <strong id="ResizeInstance__b185231015143013">96</strong>, <strong id="ResizeInstance__b155231815103018">128</strong>, <strong id="ResizeInstance__b1752391503010">192</strong>, <strong id="ResizeInstance__b15523815193018">256</strong>, <strong id="ResizeInstance__b125231515103012">384</strong>, <strong id="ResizeInstance__b17523161583017">512</strong>, <strong id="ResizeInstance__b1352314157306">768</strong>, or <strong id="ResizeInstance__b1852319156305">1024</strong>. For a read/write splitting instance, the value can be <strong id="ResizeInstance__b145233151306">1</strong>, <strong id="ResizeInstance__b252361518303">2</strong>, <strong id="ResizeInstance__b17523415203017">4</strong>, <strong id="ResizeInstance__b2523141593011">8</strong>, <strong id="ResizeInstance__b05231315133015">16</strong>, <strong id="ResizeInstance__b17523915153011">32</strong>, <strong id="ResizeInstance__b16523101512301">64</strong>.</p>
|
|
<p id="ResizeInstance__p3523201514305">Currently, the specifications of a Proxy Cluster DCS Redis 3.0 instance cannot be reduced. In addition to integers, 0.125, 0.25, and 0.5 are also supported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row115201515113017"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p105231015103011">bss_param</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p7523115113014">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p852311512303"><a href="#ResizeInstance__request_BssParamEntity">BssParamEntity</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p25231215133018">This parameter does not need to be set for pay-per-use instances.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row19520121510304"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p1452491503010">reserved_ip</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p2524215153010">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p7524191515309">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p15245158308">IP addresses to retain. Mandatory during cluster scale-in. If this parameter is not set, the system randomly deletes unnecessary shards.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row155207159301"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p17524191503016">change_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p1352401515307">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p052451510305">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p3524121514306">Modification type. Mandatory when the number of replicas of a DCS Redis instance is modified.</p>
|
|
<ul id="ResizeInstance__ul1352420154308"><li id="ResizeInstance__li1524915193015"><strong id="ResizeInstance__b1652461517308">createReplication</strong>: adding replicas</li><li id="ResizeInstance__li1452416159307"><strong id="ResizeInstance__b1152561583010">deleteReplication</strong>: deleting replicas</li><li id="ResizeInstance__li6525181516305"><strong id="ResizeInstance__b1652511563019">addSharding</strong>: adding shards</li><li id="ResizeInstance__li1525131512306"><strong id="ResizeInstance__b552519156308">instanceType</strong>: changing the instance type. Currently, you can change a master/standby or read/write splitting DCS Redis 4.0/5.0/6.0 instance to the Proxy Cluster type, or from Proxy Cluster to master/standby or read/write splitting.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row5520181513014"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p9525131519301">available_zones</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p85253159300">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p75251915123019">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p1352521514304">Code of the AZ where each replica is in. This parameter is mandatory when you add replicas to a DCS Redis instance. Before specifying an AZ, ensure that there are available resources in it. This parameter is mandatory when you delete replicas from a cluster instance.</p>
|
|
<p id="ResizeInstance__p1752512151301">For details, see <a href="ListAvailableZones.html">Querying AZs</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row852016159306"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p5525171523014">node_list</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p65251515123015">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p55260157302">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p552681513012">ID of the replica to delete. This parameter is mandatory when you delete replicas of a master/standby or read/write splitting DCS Redis 4.0 or 5.0 instance. Currently, only one replica can be deleted at a time.</p>
|
|
<p id="ResizeInstance__p25261415193014">For details, see <a href="ListGroupReplicationInfo.html">Querying Details of Shards and Replicas</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ResizeInstance__row1152091573020"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ResizeInstance__p155262151306">execute_immediately</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ResizeInstance__p14526815163011">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ResizeInstance__p652601517302">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ResizeInstance__p195267156300">Whether to apply the change immediately. The default value is <strong id="ResizeInstance__b8526121513013">true</strong>.</p>
|
|
<ul id="ResizeInstance__ul4526715103020"><li id="ResizeInstance__li175261315153014"><strong id="ResizeInstance__b11526815143016">true</strong>: Apply the change immediately.</li><li id="ResizeInstance__li252781518302"><strong id="ResizeInstance__b1152711593019">false</strong>: Apply the change during the maintenance window. .</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ResizeInstance__request_BssParamEntity"></a><a name="request_BssParamEntity"></a><table cellpadding="4" cellspacing="0" summary="" id="ResizeInstance__request_BssParamEntity" frame="border" border="1" rules="all"><caption><b>Table 3 </b>BssParamEntity</caption><thead align="left"><tr id="ResizeInstance__row1527201593019"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="ResizeInstance__p1652711155303">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="ResizeInstance__p1527101593016">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="ResizeInstance__p35287157303">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="ResizeInstance__p252815156304">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ResizeInstance__row252711514303"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ResizeInstance__p1752841520308">is_auto_pay</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ResizeInstance__p952813152306">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ResizeInstance__p125281315103013">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ResizeInstance__p1752881515308">This parameter is reserved.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section17528181511304"><h4 class="sectiontitle">Response Parameters</h4><p id="ResizeInstance__p352819150302">None</p>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section145284156309"><h4 class="sectiontitle">Example Requests</h4><p id="ResizeInstance__p165286159303">Changing instance specifications to 1 GB.</p>
|
|
<pre class="screen" id="ResizeInstance__screen15529141593011">POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/resize
|
|
|
|
{
|
|
"spec_code" : "redis.ha.xu1.tiny.r2.1",
|
|
"new_capacity" : 1,
|
|
"reserved_ip" : [ "192.168.0.125" ],
|
|
"change_type" : "createReplication",
|
|
"available_zones" : [ "e7afd64502d64fe3bfb60c2c82ec0ec6", "d90ff6d692954373bf53be49cf3900cb" ],
|
|
"node_list" : [ "ff80808282eee5f90183120188ae093e" ],
|
|
"execute_immediately" : true
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section1753021543010"><h4 class="sectiontitle">Example Responses</h4><p id="ResizeInstance__p45307158309">None</p>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section155303151304"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ResizeInstance__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ResizeInstance__row1853018156308"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ResizeInstance__p95308151309">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ResizeInstance__p19530131517305">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ResizeInstance__row15301515153013"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ResizeInstance__p195305152302">204</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ResizeInstance__p553018152302">DCS instance specifications modified successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ResizeInstance__section1853111517306"><h4 class="sectiontitle">Error Codes</h4><p id="ResizeInstance__p9531915173015">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="LifecycleManagement.html">Lifecycle Management</a></div>
|
|
</div>
|
|
</div>
|
|
|