doc-exports/docs/as/api-ref/as_06_0903.html
Zaoxu, Li eda4b9181d AS API DOC
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>
2024-09-19 11:04:13 +00:00

228 lines
18 KiB
HTML

<a name="as_06_0903"></a><a name="as_06_0903"></a>
<h1 class="topictitle1">Querying a Lifecycle Hook</h1>
<div id="body1477307874499"><div class="section" id="as_06_0903__section2082935495536"><h4 class="sectiontitle">Function</h4><p id="as_06_0903__p9418520">This interface is used to query details about a specified lifecycle hook by AS group ID and lifecycle hook name.</p>
</div>
<div class="section" id="as_06_0903__section1799627095536"><h4 class="sectiontitle">URI</h4><p id="as_06_0903__p2903857795536">GET /autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/{scaling_group_id}/{lifecycle_hook_name}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0903__table331451795536" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="as_06_0903__row3996181195536"><th align="left" class="cellrowborder" valign="top" width="20.792079207920793%" id="mcps1.3.2.3.2.5.1.1"><p id="as_06_0903__p1568129195536"><strong id="as_06_0903__b1537145424110">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.81188118811881%" id="mcps1.3.2.3.2.5.1.2"><p id="as_06_0903__p6222504395536">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.841584158415841%" id="mcps1.3.2.3.2.5.1.3"><p id="as_06_0903__p706369995536">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.554455445544555%" id="mcps1.3.2.3.2.5.1.4"><p id="as_06_0903__p3528875695536"><strong id="as_06_0903__b12136145814117">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0903__row3981698995536"><td class="cellrowborder" valign="top" width="20.792079207920793%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0903__p395071195536">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0903__p5157220295536">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0903__p1659881395536">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.554455445544555%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0903__p36520930">Specifies the project ID.</p>
</td>
</tr>
<tr id="as_06_0903__row3571771510329"><td class="cellrowborder" valign="top" width="20.792079207920793%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0903__p745378510329">scaling_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0903__p6688574910329">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0903__p4903655610329">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.554455445544555%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0903__p1253812010329">Specifies the AS group ID.</p>
</td>
</tr>
<tr id="as_06_0903__row2869654220449"><td class="cellrowborder" valign="top" width="20.792079207920793%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0903__p4271853720449">lifecycle_hook_name</p>
</td>
<td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0903__p3764947720449">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0903__p2970879320449">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.554455445544555%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0903__p5760206220449">Specifies the lifecycle hook name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="as_06_0903__section2093926095536"><h4 class="sectiontitle">Request</h4><p id="as_06_0903__p60400126203515">None</p>
</div>
<div class="section" id="as_06_0903__section158971933810"><h4 class="sectiontitle">Example Request</h4><p id="as_06_0903__p15614505203519">This example queries the details about the lifecycle hook named <strong id="as_06_0903__b1530214258483">test-hook1</strong> of the AS group with ID <strong id="as_06_0903__b17169616482">e5d27f5c-dd76-4a61-b4bc-a67c5686719a</strong>.</p>
<pre class="screen" id="as_06_0903__screen14763185420369">GET https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_lifecycle_hook/e5d27f5c-dd76-4a61-b4bc-a67c5686719a/test-hook1</pre>
</div>
<div class="section" id="as_06_0903__section5819104495536"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0903__table4481657020544" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="as_06_0903__r07c149f5825841db8ee6d43551c16f38"><th align="left" class="cellrowborder" valign="top" width="28.139999999999997%" id="mcps1.3.5.2.2.4.1.1"><p id="as_06_0903__a70705712c4644a3f9106ee9e0727ee34"><strong id="as_06_0903__b1319235919417">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.61%" id="mcps1.3.5.2.2.4.1.2"><p id="as_06_0903__a51fd48ca8b3d45ed89897d91cb5795f5">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.25%" id="mcps1.3.5.2.2.4.1.3"><p id="as_06_0903__p20887251142011"><strong id="as_06_0903__b128617186327">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0903__r3844b3b1de59401981cc1e995eaf8b72"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__a628f3bd58c14433286924607a7ba24c3">lifecycle_hook_name</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__acad95c80dcc94fcfa7829c8f402715e3">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__acdf061de9df94872a5ca5dac3d31f5a9">Specifies the lifecycle hook name.</p>
</td>
</tr>
<tr id="as_06_0903__r7664b9b45a434806a91218e37eb4f7ca"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__a8a3f043fc2dd4a5c8bdd1ce77ffbaf99">lifecycle_hook_type</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__a3cbe4ec789da40c18cf0cce79e68a9bb">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a1a35c49451464244995f0eeb3447d8f7">Specifies the lifecycle hook type.</p>
<ul id="as_06_0903__ul01621230121412"><li id="as_06_0903__li13162143031411">INSTANCE_TERMINATING</li><li id="as_06_0903__li191622030181410">INSTANCE_LAUNCHING</li></ul>
</td>
</tr>
<tr id="as_06_0903__rb734954ff1134db6a3a97f5405cda4c1"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__a6958eda26f3c41f7822d3cbf9c4f64d8">default_result</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__a4ed9106f2ad64261b54661a76b023977">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a9faa8ecf81b441dab4eefca8871d5025">Specifies the default lifecycle hook callback operation.</p>
<ul id="as_06_0903__ul14379113321413"><li id="as_06_0903__li103801433101410">ABANDON</li><li id="as_06_0903__li1138013310145">CONTINUE</li></ul>
</td>
</tr>
<tr id="as_06_0903__r96cdae57d3054fcea0cdd7f5e7230d7b"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__a0f23499f581e4e8e80754e489d8547d6">default_timeout</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__a9211e5948e2f4c6f8672dc13754f0f4f">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a01de8ec8ba6d4423b450a328ad988dd9">Specifies the lifecycle hook timeout duration in the unit of second.</p>
</td>
</tr>
<tr id="as_06_0903__r35a30bbabe4d4d4a825eae107cca440a"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__a7058896d13924f86864aea45341f9981">notification_topic_urn</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__aaab0e1032f34406fae2be4a15bf748a4">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a3862095995704fb5976b34188d617ff4">Specifies a unique topic in SMN.</p>
</td>
</tr>
<tr id="as_06_0903__rec38ce8a4a914f2d81d7b0d65b454560"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__ae116f2f1d8eb4ecca21649493fd6c378">notification_topic_name</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__ae7596de057f243cea4845a9b184ea3a3">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a83317b7c732744ffa77e925a6f9010a7">Specifies the topic name in SMN.</p>
</td>
</tr>
<tr id="as_06_0903__r4da8894d8d054fcc90c9c29b3ee733fd"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__aa0e2fd69ca7840b490ace3bff400a950">notification_metadata</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__a57e05d4f7c6343959f3fa980e10fd703">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a5178effa19a84a2791f42e118d2ed645">Specifies the customized notification.</p>
</td>
</tr>
<tr id="as_06_0903__r5ba3240052f04f9fb832ec523209399c"><td class="cellrowborder" valign="top" width="28.139999999999997%" headers="mcps1.3.5.2.2.4.1.1 "><p id="as_06_0903__ad2a6693ca8844a8fbf7210f754cfb98a">create_time</p>
</td>
<td class="cellrowborder" valign="top" width="17.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="as_06_0903__ae6e7636c9679456ca6514cf5561df76c">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.25%" headers="mcps1.3.5.2.2.4.1.3 "><p id="as_06_0903__a529440b6bb1545d2a657c58e10a8019c">Specifies the time when the lifecycle hook is created. The time is UTC-compliant.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="as_06_0903__section115512571618"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="as_06_0903__screen40081303191327">{
"lifecycle_hook_name": "test-hook1",
"default_result": "CONTINUE",
"default_timeout": 3600,
"notification_topic_urn": "urn:smn:<em id="as_06_0903__i59477074153017">regionId</em>:b53e5554fad0494d96206fb84296510b:gsh",
"notification_topic_name": "gsh",
"lifecycle_hook_type": "INSTANCE_LAUNCHING",
"notification_metadata": null,
"create_time": "2016-11-18T04:01:34Z"
}</pre>
</div>
<div class="section" id="as_06_0903__section1489498995536"><h4 class="sectiontitle">Returned Values</h4><ul id="as_06_0903__ul6564343395536"><li id="as_06_0903__li5391999295536">Normal<p id="as_06_0903__p1551788295536"><a name="as_06_0903__li5391999295536"></a><a name="li5391999295536"></a>200</p>
</li><li id="as_06_0903__li544321895536">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0903__table4898896895536" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_0903__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_0903__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_0903__p2544972695536">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0903__row4816190795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p4174453595536">The server failed to process the request.</p>
</td>
</tr>
<tr id="as_06_0903__row4015650395536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p6453073695536">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="as_06_0903__row4390571895536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p3417285595536">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="as_06_0903__row3912024395536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p4362270595536">The server could not find the requested page.</p>
</td>
</tr>
<tr id="as_06_0903__row5706002995536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p3760842795536">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="as_06_0903__row293152795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p4061970695536">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="as_06_0903__row3003304095536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p1515577295536">You must use the proxy server for authentication to process the request.</p>
</td>
</tr>
<tr id="as_06_0903__row218422095536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p3648411695536">The request timed out.</p>
</td>
</tr>
<tr id="as_06_0903__row5992159295536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p2184504195536">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="as_06_0903__row6238764295536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p2835763895536">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="as_06_0903__row5389215795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p5694869095536">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="as_06_0903__row4277616795536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p516757795536">Failed to complete the request because the request is invalid.</p>
</td>
</tr>
<tr id="as_06_0903__row4650819895536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p6339370495536">Failed to complete the request because the system is unavailable.</p>
</td>
</tr>
<tr id="as_06_0903__row3367243095536"><td class="cellrowborder" valign="top" width="43.980000000000004%" headers="mcps1.3.7.2.2.1.1.3.1.1 "><p id="as_06_0903__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_0903__p243336495536">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="as_06_0903__section17669131616110"><h4 class="sectiontitle">Error Codes</h4><p id="as_06_0903__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>