forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
197 lines
17 KiB
HTML
197 lines
17 KiB
HTML
<a name="as_06_0303"></a><a name="as_06_0303"></a>
|
|
|
|
<h1 class="topictitle1">Batch Managing Instances</h1>
|
|
<div id="body35690909"><div class="section" id="as_06_0303__section10263773"><h4 class="sectiontitle">Function</h4><ul id="as_06_0303__ul4894151811138"><li id="as_06_0303__li10894191811135">Add or remove instances to or from an AS group in batches.</li><li id="as_06_0303__li1811522351316">Configure instance protection or cancel the configuration for the instances in an AS group in batches.</li></ul>
|
|
<div class="note" id="as_06_0303__note4842243993724"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="as_06_0303__ul3520643293724"><li id="as_06_0303__li1591934016264">A batch operation can be performed on a maximum of 10 instances at a time. After instances are added to an AS group, the number of instances in the AS group cannot be greater than the maximum number of instances. After instances are removed from an AS group, the number of instances in the AS group cannot be less than the minimum number of instances.</li><li id="as_06_0303__li08531142122713">Instances can be added to an AS group only when the AS group is in the <strong id="as_06_0303__b51986441151945">INSERVICE</strong> state and has no scaling action in progress.</li><li id="as_06_0303__li199731740142815">You can remove instances from an AS group only when no scaling action is in progress.</li><li id="as_06_0303__li19231124155712">To add instances to an AS group, ensure that the AZ of the instances falls within that of the AS group.</li><li id="as_06_0303__li028125617285">Only instances in <strong id="as_06_0303__b329325114512">INSERVICE</strong> state can be removed from an AS group. Instance protection can be enabled or disabled only for <strong id="as_06_0303__b6355133616468">INSERVICE</strong> instances.</li><li id="as_06_0303__li105781313132917">When the capacity of an AS group is automatically decreased, the instances with instance protection enabled will not be removed from the AS group.</li><li id="as_06_0303__li4931641293724">If the listener bound to the instance to be removed is the same as the listener in the AS group, the listener will be unbound from the instance. If the listener bound to the instance to be removed is different from the listener in the AS group, the binding relationship between the listener and instance will be reserved.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="as_06_0303__section25265097"><h4 class="sectiontitle">URI</h4><p id="as_06_0303__p22493366">POST /autoscaling-api/v1/{project_id}/scaling_group_instance/{scaling_group_id}/action</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0303__table10023380" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="as_06_0303__row17946858"><th align="left" class="cellrowborder" valign="top" width="22.222222222222225%" id="mcps1.3.2.3.2.5.1.1"><p id="as_06_0303__p44409397"><strong id="as_06_0303__b8993173215524">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.191919191919194%" id="mcps1.3.2.3.2.5.1.2"><p id="as_06_0303__p40391380">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.141414141414144%" id="mcps1.3.2.3.2.5.1.3"><p id="as_06_0303__p50476336">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.44444444444445%" id="mcps1.3.2.3.2.5.1.4"><p id="as_06_0303__p62051376"><strong id="as_06_0303__b5329232125216">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0303__row60105532"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0303__p36709949">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0303__p20715931">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0303__p268861">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.44444444444445%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0303__p36520930">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row61782511"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0303__p38327532">scaling_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0303__p17522377">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0303__p10026414">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.44444444444445%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0303__p6833220">Specifies the AS group ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="as_06_0303__section26059286"><h4 class="sectiontitle">Request Message</h4><ul id="as_06_0303__ul1579110"><li id="as_06_0303__li14211994">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0303__table60799090" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="as_06_0303__row8858194"><th align="left" class="cellrowborder" valign="top" width="22.54901960784314%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="as_06_0303__p46425119"><strong id="as_06_0303__b106339347529">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.54901960784314%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="as_06_0303__p2338313">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.64705882352941%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="as_06_0303__p55185655">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="37.254901960784316%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="as_06_0303__p40853074"><strong id="as_06_0303__b589893685218">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0303__row20764673"><td class="cellrowborder" valign="top" width="22.54901960784314%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0303__p4216941">instances_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.54901960784314%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0303__p6027901">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.64705882352941%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0303__p18497945">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.254901960784316%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0303__p21938602">Specifies the ECS ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row3847768616914"><td class="cellrowborder" valign="top" width="22.54901960784314%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0303__p1754244916917">instance_delete</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.54901960784314%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0303__p1165227516917">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.64705882352941%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0303__p431024216917">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.254901960784316%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0303__p52211517171510">Specifies whether to delete an instance when it is removed from an AS group.</p>
|
|
<p id="as_06_0303__p3721426171515">Options:</p>
|
|
<ul id="as_06_0303__ul39711318155"><li id="as_06_0303__li987113346150"><strong id="as_06_0303__b12135723171410">no</strong> (default): The instance will not be deleted.</li><li id="as_06_0303__li19711931151513"><strong id="as_06_0303__b3803102511216">yes</strong>: The instance will be deleted.</li></ul>
|
|
<p id="as_06_0303__p5515899416917">This parameter takes effect only when the <strong>action</strong> is set to <strong>REMOVE</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row416365216942"><td class="cellrowborder" valign="top" width="22.54901960784314%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0303__p4883500616945">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.54901960784314%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0303__p6332141216945">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.64705882352941%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0303__p2876071816945">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="37.254901960784316%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0303__p479207748230">Specifies an action to be performed on instances in batches. The options are as follows:</p>
|
|
<ul id="as_06_0303__ul6530813782310"><li id="as_06_0303__li497062282310"><strong id="as_06_0303__b40625683152531">ADD</strong>: adds instances to the AS group.</li><li id="as_06_0303__li6445314582310"><strong id="as_06_0303__b41969938152555">REMOVE</strong>: removes instances from the AS group.</li><li id="as_06_0303__li35612190101152"><strong id="as_06_0303__b842352706155259">PROTECT</strong>: enables instance protection.</li><li id="as_06_0303__li3091752010121"><strong id="as_06_0303__b842352706155313">UNPROTECT</strong>: disables instance protection.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="as_06_0303__ul32196376"><li id="as_06_0303__li21331933">Example request<div class="p" id="as_06_0303__p1776823734715"><a name="as_06_0303__li21331933"></a><a name="li21331933"></a>This example shows how to remove and delete instances with IDs <strong id="as_06_0303__b3550524162813">instance_id_1</strong> and <strong id="as_06_0303__b1511632820282">instance_id_2</strong> from the AS group with ID <strong id="as_06_0303__b23012514287">e5d27f5c-dd76-4a61-b4bc-a67c5686719a</strong> in a batch.<pre class="screen" id="as_06_0303__screen255263514472">POST https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_group_instance/e5d27f5c-dd76-4a61-b4bc-a67c5686719a/action
|
|
|
|
{
|
|
"action": "REMOVE",
|
|
"instances_id": [
|
|
"instance_id_1",
|
|
"instance_id_2"
|
|
],
|
|
"instance_delete": "yes"
|
|
}</pre>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="as_06_0303__section33206990"><h4 class="sectiontitle">Response Message</h4><ul id="as_06_0303__ul9007507"><li id="as_06_0303__li56913160">Response parameters<p id="as_06_0303__p60400126203515"><a name="as_06_0303__li56913160"></a><a name="li56913160"></a>None</p>
|
|
</li><li id="as_06_0303__li3640858994017">Example response<p id="as_06_0303__p15614505203519"><a name="as_06_0303__li3640858994017"></a><a name="li3640858994017"></a>None</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="as_06_0303__section30427456"><h4 class="sectiontitle">Returned Values</h4><ul id="as_06_0303__ul40603851"><li id="as_06_0303__li29890343">Normal<p id="as_06_0303__p577635"><a name="as_06_0303__li29890343"></a><a name="li29890343"></a>204</p>
|
|
</li><li id="as_06_0303__li5198720">Abnormal
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0303__table46788488" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_0303__row8624464"><th align="left" class="cellrowborder" valign="top" width="43.8%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="as_06_0303__p27492955">Returned Value</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.2%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="as_06_0303__p12336887">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0303__row59763787"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p9028608">400 Bad Request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p60228670">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row5187119"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p17503500">401 Unauthorized</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p8497414">You must enter the username and password to access the requested page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row9367865"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p20599592">403 Forbidden</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p57954280">You are forbidden to access the requested page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row51826478"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p37195178">404 Not Found</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p60019402">The server could not find the requested page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row3303707"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p66273709">405 Method Not Allowed</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p66570199">You are not allowed to use the method specified in the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row62260885"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p9966935">406 Not Acceptable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p2015430">The response generated by the server could not be accepted by the client.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row18138873"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p59962646">407 Proxy Authentication Required</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p25136147">You must use the proxy server for authentication to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row24898733"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p3531486">408 Request Timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p17614915">The request timed out.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row24316508"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p23480171">409 Conflict</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p22845731">The request could not be processed due to a conflict.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row4284989"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p11539844">500 Internal Server Error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p62312200">Failed to complete the request because of an internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row23938892"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p60002101">501 Not Implemented</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p28332047">Failed to complete the request because the server does not support the requested function.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row53661838"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p51641620">502 Bad Gateway</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p22221662">Failed to complete the request because the request is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row65777232"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p26355580">503 Service Unavailable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p54427232">Failed to complete the request because the system is unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0303__row20083047"><td class="cellrowborder" valign="top" width="43.8%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0303__p16114131">504 Gateway Timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.2%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0303__p30176268">A gateway timeout error occurred.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="as_06_0303__section17669131616110"><h4 class="sectiontitle">Error Codes</h4><p id="as_06_0303__p172692548116">See <a href="as_07_0102.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="as_06_0300.html">Instances</a></div>
|
|
</div>
|
|
</div>
|
|
|