forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
444 lines
36 KiB
HTML
444 lines
36 KiB
HTML
<a name="mrs_02_0200"></a><a name="mrs_02_0200"></a>
|
|
|
|
<h1 class="topictitle1">Viewing Auto Scaling Policies</h1>
|
|
<div id="body1599638193445"><div class="section" id="mrs_02_0200__section1321848203217"><h4 class="sectiontitle">Function</h4><p id="mrs_02_0200__p1432213487321">This API is used to view all auto scaling policies of a specified cluster.</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section11323174818323"><h4 class="sectiontitle">URI</h4><p id="mrs_02_0200__p133231048133210">GET /v2/{project_id}/autoscaling-policy/{cluster_id}</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__table6325448183219" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="mrs_02_0200__row113242485328"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="mrs_02_0200__p1232514818327">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="mrs_02_0200__p1732564814322">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="mrs_02_0200__p63251448153219">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="mrs_02_0200__p203265481325">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row19324104833212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="mrs_02_0200__p1832624833211">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="mrs_02_0200__p183264486322">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="mrs_02_0200__p14326134817322">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="mrs_02_0200__p3326248113210">The project ID. For details about how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row163241048103212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="mrs_02_0200__p13271848103216">cluster_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="mrs_02_0200__p0327748193210">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="mrs_02_0200__p2327184843216">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="mrs_02_0200__p1632894853219">The cluster ID. For details about how to obtain the cluster ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section12328164815321"><h4 class="sectiontitle">Request Parameters</h4><p id="mrs_02_0200__p032818484328">None</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section33281148183211"><h4 class="sectiontitle">Response Parameters</h4><p id="mrs_02_0200__p2329124816329"><strong id="mrs_02_0200__b5329184810328">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_ListAutoScalingPolicyV2" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response body parameter</caption><thead align="left"><tr id="mrs_02_0200__row6329194833216"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="mrs_02_0200__p1733094823212">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="mrs_02_0200__p333054813218">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="mrs_02_0200__p1933054853218">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row1332913485328"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="mrs_02_0200__p58344520613">[Array element]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="mrs_02_0200__p1433114810321">Array of AutoScalingPolicyV2 objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="mrs_02_0200__p1733174813322">The auto scaling policy list. For details, see <a href="#mrs_02_0200__response_AutoScalingPolicyV2">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0200__response_AutoScalingPolicyV2"></a><a name="response_AutoScalingPolicyV2"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_AutoScalingPolicyV2" frame="border" border="1" rules="all"><caption><b>Table 3 </b>AutoScalingPolicyV2</caption><thead align="left"><tr id="mrs_02_0200__row16332114873213"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="mrs_02_0200__p1333314811329">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="mrs_02_0200__p6333148113213">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="mrs_02_0200__p2333164810326">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row123321348203217"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0200__p103331948103220">node_group_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0200__p3333148113218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0200__p10334648203216">The node group name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row16332194863212"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0200__p23343489324">resource_pool_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0200__p1433413482321">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0200__p1334194833218">The resource plan name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row113321348193212"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="mrs_02_0200__p7335164853218">auto_scaling_policy</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="mrs_02_0200__p1335144818323">AutoScalingPolicy object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="mrs_02_0200__p19335154853211">The auto scaling policy. For details, see <a href="#mrs_02_0200__response_AutoScalingPolicy">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0200__response_AutoScalingPolicy"></a><a name="response_AutoScalingPolicy"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_AutoScalingPolicy" frame="border" border="1" rules="all"><caption><b>Table 4 </b>AutoScalingPolicy</caption><thead align="left"><tr id="mrs_02_0200__row43381248153214"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="mrs_02_0200__p2034294823217">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="mrs_02_0200__p1634211489328">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="mrs_02_0200__p23423481320">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row11338248203214"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="mrs_02_0200__p5342174815329">auto_scaling_enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="mrs_02_0200__p15343194814327">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="mrs_02_0200__p53437489328">Whether to enable the auto scaling policy.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row103401948193212"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="mrs_02_0200__p14343848183211">min_capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="mrs_02_0200__p1934444818323">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="mrs_02_0200__p1634415481321">The minimum number of nodes reserved in the node group. The value ranges from 0 to 500.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row16340124833218"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="mrs_02_0200__p11345148153216">max_capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="mrs_02_0200__p43452482322">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="mrs_02_0200__p18345154819323">The maximum number of nodes in the node group. The value ranges from 0 to 500.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row53401548113217"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="mrs_02_0200__p9345184818322">resources_plans</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="mrs_02_0200__p0346154893216">Array of ResourcesPlan objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="mrs_02_0200__p113461248153218">The resource plan list. If this parameter is left blank, the resource plan is disabled. When <strong id="mrs_02_0200__b175162523410590">auto_scaling_enable</strong> is set to <strong id="mrs_02_0200__b178376850210590">true</strong>, either this parameter or <strong id="mrs_02_0200__b34277517810590">rules</strong> must be configured. For details about this parameter, see <a href="#mrs_02_0200__response_ResourcesPlan">Table 5</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row20341114818329"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="mrs_02_0200__p134613488322">rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="mrs_02_0200__p163471448193217">Array of Rule objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="mrs_02_0200__p1934764819323">List of auto scaling rules. When <strong id="mrs_02_0200__b382543282614">auto_scaling_enable</strong> is set to <strong id="mrs_02_0200__b19826332182618">true</strong>, either this parameter or <strong id="mrs_02_0200__b882643212266">resources_plans</strong> must be configured. For details about this parameter, see <a href="#mrs_02_0200__response_Rule">Table 6</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row5341948163213"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="mrs_02_0200__p19347184853216">exec_scripts</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="mrs_02_0200__p18347174843212">Array of ScaleScript objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="mrs_02_0200__p1348134813215">The list of custom scaling automation scripts. If this parameter is left blank, the automation script is disabled. For details, see <a href="#mrs_02_0200__response_ScaleScript">Table 8</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0200__response_ResourcesPlan"></a><a name="response_ResourcesPlan"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_ResourcesPlan" frame="border" border="1" rules="all"><caption><b>Table 5 </b>ResourcesPlan</caption><thead align="left"><tr id="mrs_02_0200__row12348194818328"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.1"><p id="mrs_02_0200__p1234916485321">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.6.2.4.1.2"><p id="mrs_02_0200__p1235084883210">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.6.2.4.1.3"><p id="mrs_02_0200__p193501848163220">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row1348184817329"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="mrs_02_0200__p63501488327">period_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="mrs_02_0200__p835094810324">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="mrs_02_0200__p335018488328">The cycle type of a resource plan. Currently, only the following cycle type is supported:</p>
|
|
<p id="mrs_02_0200__p163511648113218">daily</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row1634994883215"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="mrs_02_0200__p335117487329">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="mrs_02_0200__p1335114814324">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="mrs_02_0200__p33511489325">The start time of a resource plan. The value is in the format of <strong id="mrs_02_0200__b186095974310590">hour:minute</strong>, indicating that the time ranges from 00:00 to 23:59.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row18349114863214"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="mrs_02_0200__p63521348203220">end_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="mrs_02_0200__p835264893220">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="mrs_02_0200__p18352948163211">The end time of a resource plan. The value is in the same format as that of <span class="parmname" id="mrs_02_0200__parmname68043022810590"><b>start_time</b></span>. The interval between <strong id="mrs_02_0200__b194555627010590">end_time</strong> and <strong id="mrs_02_0200__b44410650610590">start_time</strong> must be greater than or equal to 30 minutes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row7349448193219"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="mrs_02_0200__p19352194810323">min_capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="mrs_02_0200__p11353194815324">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="mrs_02_0200__p8353348143220">The minimum number of reserved nodes in a node group in a resource plan. The value ranges from 0 to 500.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row0349348113211"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="mrs_02_0200__p1835344813324">max_capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="mrs_02_0200__p13353194812325">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="mrs_02_0200__p43541248143214">The maximum number of reserved nodes in a node group in a resource plan. The value ranges from 0 to 500.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row592381113209"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.1 "><p id="mrs_02_0200__p79081229131611">effective_days</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.6.2.4.1.2 "><p id="mrs_02_0200__p19908929191610">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.6.2.4.1.3 "><p id="mrs_02_0200__p19909122914164">Effective date of a resource plan. If this parameter is left blank, it indicates that the resource plan takes effect every day. The options are as follows:</p>
|
|
<p id="mrs_02_0200__p1291052931619"><strong id="mrs_02_0200__b179191254123116">MONDAY</strong>, <strong id="mrs_02_0200__b19919185443111">TUESDAY</strong>, <strong id="mrs_02_0200__b159191254193110">WEDNESDAY</strong>, <strong id="mrs_02_0200__b691985413112">THURSDAY</strong>, <strong id="mrs_02_0200__b19919054153114">FRIDAY</strong>, <strong id="mrs_02_0200__b119196544312">SATURDAY</strong>, and <strong id="mrs_02_0200__b1092055413118">SUNDAY</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0200__response_Rule"></a><a name="response_Rule"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_Rule" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Rule</caption><thead align="left"><tr id="mrs_02_0200__row193548481321"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="mrs_02_0200__p1335610483321">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="mrs_02_0200__p6356144833212">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="mrs_02_0200__p435617484325">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row123541048113210"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="mrs_02_0200__p203579481327">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="mrs_02_0200__p6357114816321">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="mrs_02_0200__p103571948103212">The name of an auto scaling rule. The name can contain only 1 to 64 characters. Only letters, numbers, hyphens (-), and underscores (_) are allowed. Rule names must be unique in a node group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row16355134893217"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="mrs_02_0200__p3357164803218">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="mrs_02_0200__p1735824810329">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="mrs_02_0200__p11358748173219">The description about an auto scaling rule. It contains a maximum of 1,024 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row203551148183217"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="mrs_02_0200__p1335854863211">adjustment_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="mrs_02_0200__p83581948193218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="mrs_02_0200__p73581048163218">Auto scaling rule adjustment type. Possible values:</p>
|
|
<ul id="mrs_02_0200__ul335912489320"><li id="mrs_02_0200__li15359154803212"><strong id="mrs_02_0200__b165681974510590">scale_out</strong>: cluster scale-out</li><li id="mrs_02_0200__li535994823213"><strong id="mrs_02_0200__b16380903310590">scale_in</strong>: cluster scale-in</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row1235511484320"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="mrs_02_0200__p11359114873219">cool_down_minutes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="mrs_02_0200__p6359144823215">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="mrs_02_0200__p2036034863219">The cluster cooling time after an auto scaling rule is triggered, when no auto scaling operation is performed. The unit is minute. The value ranges from 0 to 10080. One week is equal to 10,080 minutes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row135514814322"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="mrs_02_0200__p1360144843216">scaling_adjustment</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="mrs_02_0200__p14360144818324">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="mrs_02_0200__p143601748183212">The number of cluster nodes that can be adjusted at a time. The value ranges from 1 to 100.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row5355194812328"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="mrs_02_0200__p1361154853219">trigger</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="mrs_02_0200__p19361154883215">Trigger object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="mrs_02_0200__p18361144815326">The condition for triggering a rule. For details, see <a href="#mrs_02_0200__response_Trigger">Table 7</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0200__response_Trigger"></a><a name="response_Trigger"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_Trigger" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Trigger</caption><thead align="left"><tr id="mrs_02_0200__row1236234818328"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.8.2.4.1.1"><p id="mrs_02_0200__p9363748183216">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.8.2.4.1.2"><p id="mrs_02_0200__p10363114819323">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.8.2.4.1.3"><p id="mrs_02_0200__p4364124810325">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row136274863211"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="mrs_02_0200__p15364548113216">metric_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="mrs_02_0200__p23646481329">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="mrs_02_0200__p9364124863211">The metric name. This triggering condition makes a judgment according to the value of the metric. A metric name contains a maximum of 64 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row1636264883210"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="mrs_02_0200__p1036504816323">metric_value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="mrs_02_0200__p163651548123218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="mrs_02_0200__p1365114873210">The metric threshold to trigger a rule.</p>
|
|
<p id="mrs_02_0200__p19365104819322">The value must be an integer or a number with two decimal places.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row1336244811322"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="mrs_02_0200__p173668480321">comparison_operator</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="mrs_02_0200__p2366134863217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="mrs_02_0200__p0366548173210">The metric judgment logic operator. Possible values:</p>
|
|
<ul id="mrs_02_0200__ul1336724810325"><li id="mrs_02_0200__li33671348103212"><strong id="mrs_02_0200__b119016133410590">LT</strong>: less than</li><li id="mrs_02_0200__li536774843215"><strong id="mrs_02_0200__b96882614510590">GT</strong>: greater than</li><li id="mrs_02_0200__li133676483320"><strong id="mrs_02_0200__b135090483810590">LTOE</strong>: less than or equal to</li><li id="mrs_02_0200__li736844818323"><strong id="mrs_02_0200__b5834123710590">GTOE</strong>: greater than or equal to</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row193621148133217"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.1 "><p id="mrs_02_0200__p336964812325">evaluation_periods</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.8.2.4.1.2 "><p id="mrs_02_0200__p1371164853212">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.8.2.4.1.3 "><p id="mrs_02_0200__p11372164833216">The number of consecutive five-minute periods, during which a metric threshold is reached. The value ranges from 1 to 288.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0200__response_ScaleScript"></a><a name="response_ScaleScript"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_ScaleScript" frame="border" border="1" rules="all"><caption><b>Table 8 </b>ScaleScript</caption><thead align="left"><tr id="mrs_02_0200__row16375048103212"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.1"><p id="mrs_02_0200__p15377114883212">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.2"><p id="mrs_02_0200__p143776481322">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.9.2.4.1.3"><p id="mrs_02_0200__p637718482320">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row1337618489323"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p0377184814326">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p137816487328">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p18378848113216">The name of a custom automation script. Names must be unique in a cluster. The value can contain only numbers, letters, spaces, hyphens (-), and underscores (_) and cannot start with a space. The value can contain 1 to 64 characters.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row23761487322"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p1437864816326">uri</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p183781948173219">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p7379448173218">The path of a custom automation script. Set this parameter to an OBS bucket path or a local VM path.</p>
|
|
<ul id="mrs_02_0200__ul16379134816322"><li id="mrs_02_0200__li43791448173215">OBS bucket path: Enter a script path, for example, <strong id="mrs_02_0200__b38600760810590">obs://</strong><em id="mrs_02_0200__i97942202410590">XXX</em><strong id="mrs_02_0200__b26652523310590">/scale.sh</strong>.</li><li id="mrs_02_0200__li6379114863213">Local VM path: Enter a script path. The script path must start with a slash (/) and end with <strong id="mrs_02_0200__b50256182810590">.sh</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row7376154893216"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p237984819320">parameters</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p1137917489329">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p133803483328">Parameters of a custom automation script. Multiple parameters are separated by space. The following predefined system parameters can be transferred:</p>
|
|
<ul id="mrs_02_0200__ul73801448193218"><li id="mrs_02_0200__li138011484327"><em id="mrs_02_0200__i156367189810590">${mrs_scale_node_num}</em>: The number of nodes to be added or removed</li><li id="mrs_02_0200__li1938034810325"><em id="mrs_02_0200__i139006946510590">${mrs_scale_type}</em>: The scaling type. The value can be <strong id="mrs_02_0200__b37856803710590">scale_out</strong> or <strong id="mrs_02_0200__b7358279410590">scale_in</strong>.</li><li id="mrs_02_0200__li838017483327"><em id="mrs_02_0200__i151239062410590">${mrs_scale_node_hostnames}</em>: Host names of the nodes to be added or removed</li><li id="mrs_02_0200__li53811248133216"><em id="mrs_02_0200__i81453435710590">${mrs_scale_node_ips}</em>: IP addresses of the nodes to be added or removed</li><li id="mrs_02_0200__li1538111488326"><em id="mrs_02_0200__i1552531810126">${mrs_scale_rule_name}</em>: The name of the rule that triggers scaling. Other user-defined parameters are used in the same way as those of common shell scripts. Parameters are separated by spaces.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row1237614813212"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p12382548113217">nodes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p338204816326">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p1238284833210">The name of the node group where the custom automation script is executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row143761848163213"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p143831348113211">active_master</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p6383184817321">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p1838315483329">Whether the custom automation script runs only on the active master node. The default value is <strong id="mrs_02_0200__b1048774922315">false</strong>, indicating that the custom automation script can run on all master nodes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row537684812324"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p8383114873215">fail_action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p5384148163211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p153851548193220">Whether to continue executing subsequent scripts and creating a cluster after the custom automation script fails to execute. Notes:</p>
|
|
<ul id="mrs_02_0200__ul143858482329"><li id="mrs_02_0200__li438511489326">You are advised to set this parameter to <strong id="mrs_02_0200__b98915089110590">continue</strong> in the commissioning phase so the cluster can continue to be installed and started no matter whether the custom automation script is executed successfully.</li><li id="mrs_02_0200__li18385134813324">The scale-in operation cannot be undone. <span class="parmname" id="mrs_02_0200__parmname205944232110590"><b>fail_action</b></span> must be set to <span class="parmvalue" id="mrs_02_0200__parmvalue176806289510590"><b>continue</b></span> for the scripts that are executed after scale-in. Possible values:</li><li id="mrs_02_0200__li1038564816324"><strong id="mrs_02_0200__b174868789310590">continue</strong>: Continue to execute subsequent scripts.</li><li id="mrs_02_0200__li738624818322"><strong id="mrs_02_0200__b152874377910590">errorout</strong>: Stop the action.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row3376154820327"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="mrs_02_0200__p83863488327">action_stage</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="mrs_02_0200__p19386348173218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="mrs_02_0200__p143861748163214">The time when a script is executed. Possible values:</p>
|
|
<ul id="mrs_02_0200__ul1438784843216"><li id="mrs_02_0200__li14387124873216"><strong id="mrs_02_0200__b112753317710590">before_scale_out</strong>: before scale-out</li><li id="mrs_02_0200__li16387848123215"><strong id="mrs_02_0200__b76968842510590">before_scale_in</strong>: before scale-in</li><li id="mrs_02_0200__li4387124843211"><strong id="mrs_02_0200__b184460983110590">after_scale_out</strong>: after scale-out</li><li id="mrs_02_0200__li12388248123210"><strong id="mrs_02_0200__b119366515410590">after_scale_in</strong>: after scale-in</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="mrs_02_0200__p5388124815329"><strong id="mrs_02_0200__b1838820481325">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0200__response_ErrorRsp" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="mrs_02_0200__row13388148133211"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.11.2.4.1.1"><p id="mrs_02_0200__p13901348153219">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.11.2.4.1.2"><p id="mrs_02_0200__p3390164813325">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.11.2.4.1.3"><p id="mrs_02_0200__p153902485329">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0200__row17389114843215"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.11.2.4.1.1 "><p id="mrs_02_0200__p10391848123216">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.11.2.4.1.2 "><p id="mrs_02_0200__p123911548173219">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.11.2.4.1.3 "><p id="mrs_02_0200__p0391174843211">Error codes.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0200__row1538974863217"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.11.2.4.1.1 "><p id="mrs_02_0200__p1239144873214">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.11.2.4.1.2 "><p id="mrs_02_0200__p8392164814323">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.11.2.4.1.3 "><p id="mrs_02_0200__p3392104823212">The error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section8392154812324"><h4 class="sectiontitle">Example Request</h4><p id="mrs_02_0200__p539264815327">None</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section8393174816327"><h4 class="sectiontitle">Example Response</h4><p id="mrs_02_0200__p6393134811326"><strong id="mrs_02_0200__b1839319485322">Status code: 200</strong></p>
|
|
<p id="mrs_02_0200__p133931848153212">Auto scaling policies are displayed.</p>
|
|
<pre class="screen" id="mrs_02_0200__screen26023071616">{
|
|
"auto_scaling_policies" : [ {
|
|
"node_group_name" : "task_node_analysis_group",
|
|
"resource_pool_name" : "default",
|
|
"auto_scaling_policy" : {
|
|
"auto_scaling_enable" : true,
|
|
"min_capacity" : 0,
|
|
"max_capacity" : 1,
|
|
"resources_plans" : [ {
|
|
"period_type" : "daily",
|
|
"effective_days" : [ "SUNDAY" ],
|
|
"start_time" : "12:00",
|
|
"end_time" : "13:00",
|
|
"min_capacity" : 2,
|
|
"max_capacity" : 3
|
|
} ],
|
|
"rules" : [ {
|
|
"name" : "default-expand-1",
|
|
"description" : "",
|
|
"adjustment_type" : "scale_out",
|
|
"cool_down_minutes" : 5,
|
|
"scaling_adjustment" : 1,
|
|
"trigger" : {
|
|
"metric_name" : "YARNAppRunning",
|
|
"metric_value" : 100,
|
|
"comparison_operator" : "GTOE",
|
|
"evaluation_periods" : 1
|
|
}
|
|
} ]
|
|
}
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section17497124813215"><h4 class="sectiontitle">Status Codes</h4><p id="mrs_02_0200__p1693116917524">See <a href="mrs_02_0015.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0200__section349834810328"><h4 class="sectiontitle">Error Codes</h4><p id="mrs_02_0200__p1749812480320">See <a href="mrs_02_0014.html">Error Code</a>.</p>
|
|
</div>
|
|
<p id="mrs_02_0200__p8060118"></p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_02_0199.html">Auto Scaling APIs (V2)</a></div>
|
|
</div>
|
|
</div>
|
|
|