forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
200 lines
16 KiB
HTML
200 lines
16 KiB
HTML
<a name="as_06_0905"></a><a name="as_06_0905"></a>
|
|
|
|
<h1 class="topictitle1">Calling Back a Lifecycle Hook</h1>
|
|
<div id="body1477307874499"><div class="section" id="as_06_0905__section2082935495536"><h4 class="sectiontitle">Function</h4><p id="as_06_0905__p5557779410106">This interface is used to call back the lifecycle hook specified by a scaling instance based on the lifecycle action key or based on the instance ID and lifecycle hook name.</p>
|
|
<ul id="as_06_0905__ul18631132342615"><li id="as_06_0905__li19631122382610">If you have completed customized operations before the timeout duration expires, you can terminate or continue the lifecycle operations.</li><li id="as_06_0905__li563182322614">If you require more time to complete your custom operations, extend the timeout duration to enable the instance to remain in a wait state for an additional hour.</li><li id="as_06_0905__li1063172342614">The callback operation can be performed only when the lifecycle hook of the target instance is in <strong id="as_06_0905__b842352706153634">HANGING</strong> state.</li></ul>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section1799627095536"><h4 class="sectiontitle">URI</h4><p id="as_06_0905__p2903857795536">PUT /autoscaling-api/v1/{project_id}/scaling_instance_hook/{scaling_group_id}/callback</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0905__table331451795536" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="as_06_0905__row3996181195536"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.2.3.2.5.1.1"><p id="as_06_0905__p1568129195536"><strong id="as_06_0905__b161579034313">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="as_06_0905__p6222504395536">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.3.2.5.1.3"><p id="as_06_0905__p706369995536">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42%" id="mcps1.3.2.3.2.5.1.4"><p id="as_06_0905__p3528875695536"><strong id="as_06_0905__b1623170144320">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0905__row3981698995536"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0905__p395071195536">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0905__p5157220295536">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0905__p1659881395536">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0905__p36520930">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row3571771510329"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0905__p745378510329">scaling_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0905__p6688574910329">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0905__p4903655610329">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0905__p1253812010329">Specifies the AS group ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section2093926095536"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0905__table4997382820112" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="as_06_0905__row2123882320112"><th align="left" class="cellrowborder" valign="top" width="19.801980198019802%" id="mcps1.3.3.2.2.5.1.1"><p id="as_06_0905__p4262313620112"><strong id="as_06_0905__b248715194319">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.801980198019802%" id="mcps1.3.3.2.2.5.1.2"><p id="as_06_0905__p2992199720112">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.871287128712872%" id="mcps1.3.3.2.2.5.1.3"><p id="as_06_0905__p776271120112">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="47.524752475247524%" id="mcps1.3.3.2.2.5.1.4"><p id="as_06_0905__p2479984520112"><strong id="as_06_0905__b9253527433">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0905__row6263043220112"><td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.1 "><p id="as_06_0905__p3990020720112">lifecycle_action_key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.2 "><p id="as_06_0905__p1069132320112">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.3.2.2.5.1.3 "><p id="as_06_0905__p6069079520112">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.524752475247524%" headers="mcps1.3.3.2.2.5.1.4 "><p id="as_06_0905__p73891115192119">Specifies the lifecycle operation token, which is obtained by calling the API for <a href="as_06_0906.html">querying instance suspension</a>.</p>
|
|
<p id="as_06_0905__p3673632611937">When specifying a lifecycle callback object, this field is mandatory if the <strong id="as_06_0905__b842352706154014_1">instance_id</strong> parameter is not used. If both this parameter and the <strong id="as_06_0905__b1380721220154038">instance_id</strong> parameter are used, preferentially use this parameter for callback.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row55691878201313"><td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.1 "><p id="as_06_0905__p65006536201322">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.2 "><p id="as_06_0905__p31038046201322">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.3.2.2.5.1.3 "><p id="as_06_0905__p31053834201322">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.524752475247524%" headers="mcps1.3.3.2.2.5.1.4 "><p id="as_06_0905__p10950768201531">Specifies the instance ID.</p>
|
|
<p id="as_06_0905__p1694397201322">When a lifecycle callback object is specified, this parameter is mandatory if the <strong id="as_06_0905__b842352706154014_3">lifecycle_action_key</strong> parameter is not used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row32208529111251"><td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.1 "><p id="as_06_0905__p43733848111254">lifecycle_hook_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.2 "><p id="as_06_0905__p52780834111254">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.3.2.2.5.1.3 "><p id="as_06_0905__p47389189111254">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.524752475247524%" headers="mcps1.3.3.2.2.5.1.4 "><p id="as_06_0905__p13319080111254">Specifies the lifecycle hook name.</p>
|
|
<p id="as_06_0905__p35204414111313">When a lifecycle callback object is specified, this parameter is mandatory if the <strong id="as_06_0905__b842352706154014_5">lifecycle_action_key</strong> parameter is not used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row1884829420112"><td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.1 "><p id="as_06_0905__p5031683220112">lifecycle_action_result</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.3.2.2.5.1.2 "><p id="as_06_0905__p4913161120112">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.871287128712872%" headers="mcps1.3.3.2.2.5.1.3 "><p id="as_06_0905__p2023756720112">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.524752475247524%" headers="mcps1.3.3.2.2.5.1.4 "><p id="as_06_0905__p55541820112">Specifies the lifecycle callback action.</p>
|
|
<ul id="as_06_0905__ul112083645318"><li id="as_06_0905__li3201336135314"><strong id="as_06_0905__b842352706154218">ABANDON</strong>: terminates the instance.</li><li id="as_06_0905__li1820536135314"><strong id="as_06_0905__b842352706154331">CONTINUE</strong>: continues the instance.</li><li id="as_06_0905__li122033605320"><strong id="as_06_0905__b842352706154410">EXTEND</strong>: extends the timeout duration, one hour each time.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section153982041335"><h4 class="sectiontitle">Example Request</h4><div class="p" id="as_06_0905__p9793718378">This example uses the lifecycle token <strong id="as_06_0905__b4822538541">23880867-6288-4470-98a8-f8bda096b6c4</strong> to perform the <strong id="as_06_0905__b12329112615513">ABANDON</strong> callback operation in the AS group with ID <strong id="as_06_0905__b1044215125516">e5d27f5c-dd76-4a61-b4bc-a67c5686719a</strong>.<pre class="screen" id="as_06_0905__screen2719113143711">PUT https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_instance_hook/e5d27f5c-dd76-4a61-b4bc-a67c5686719a/callback
|
|
|
|
{
|
|
"lifecycle_action_result": "ABANDON",
|
|
"lifecycle_action_key":"23880867-6288-4470-98a8-f8bda096b6c4"
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section5819104495536"><h4 class="sectiontitle">Response</h4><p id="as_06_0905__p60400126203515">None</p>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section231318201532"><h4 class="sectiontitle">Example Response</h4><p id="as_06_0905__p15614505203519">None</p>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section1489498995536"><h4 class="sectiontitle">Returned Values</h4><ul id="as_06_0905__ul6564343395536"><li id="as_06_0905__li5391999295536">Normal<p id="as_06_0905__p1551788295536"><a name="as_06_0905__li5391999295536"></a><a name="li5391999295536"></a>204</p>
|
|
</li><li id="as_06_0905__li544321895536">Abnormal
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0905__table4898896895536" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_0905__row2202573295536"><th align="left" class="cellrowborder" valign="top" width="43.980000000000004%" id="mcps1.3.7.2.2.1.1.3.1.1"><p id="as_06_0905__p3925390595536">Returned Value</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.02%" id="mcps1.3.7.2.2.1.1.3.1.2"><p id="as_06_0905__p2544972695536">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="as_06_0905__row4816190795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p880040995536">400 Bad Request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p4174453595536">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row4015650395536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p3145134295536">401 Unauthorized</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p6453073695536">You must enter the username and password to access the requested page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row4390571895536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p6670224695536">403 Forbidden</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p3417285595536">You are forbidden to access the requested page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row3912024395536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p1462312895536">404 Not Found</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p4362270595536">The server could not find the requested page.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row5706002995536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p5845961695536">405 Method Not Allowed</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p3760842795536">You are not allowed to use the method specified in the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row293152795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p3612717195536">406 Not Acceptable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p4061970695536">The response generated by the server could not be accepted by the client.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row3003304095536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p1675719895536">407 Proxy Authentication Required</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p1515577295536">You must use the proxy server for authentication to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row218422095536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p4270415095536">408 Request Timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p3648411695536">The request timed out.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row5992159295536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p2181080895536">409 Conflict</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p2184504195536">The request could not be processed due to a conflict.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row6238764295536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p2023420295536">500 Internal Server Error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p2835763895536">Failed to complete the request because of an internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row5389215795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p318858395536">501 Not Implemented</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p5694869095536">Failed to complete the request because the server does not support the requested function.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row4277616795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p4231752695536">502 Bad Gateway</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p516757795536">Failed to complete the request because the request is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row4650819895536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p906768395536">503 Service Unavailable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p6339370495536">Failed to complete the request because the system is unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="as_06_0905__row3367243095536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0905__p4311227595536">504 Gateway Timeout</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.02%" headers="mcps1.3.7.2.2.1.1.3.1.2 "><p id="as_06_0905__p243336495536">A gateway timeout error occurred.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="as_06_0905__section17669131616110"><h4 class="sectiontitle">Error Codes</h4><p id="as_06_0905__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_0900.html">Lifecycle Hooks</a></div>
|
|
</div>
|
|
</div>
|
|
|