doc-exports/docs/as/api-ref/as_06_0403.html
guoyanyan 31704f0318 as_api_0325
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-04-13 08:59:32 +00:00

360 lines
33 KiB
HTML

<a name="as_06_0403"></a><a name="as_06_0403"></a>
<h1 class="topictitle1">Modifying an AS Policy</h1>
<div id="body16106447"><div class="section" id="as_06_0403__section38035443"><h4 class="sectiontitle">Function</h4><p id="as_06_0403__p29553812">This API is used to modify a specified AS policy.</p>
</div>
<div class="section" id="as_06_0403__section6774674"><h4 class="sectiontitle">URI</h4><p id="as_06_0403__p24185120">PUT /autoscaling-api/v1/{project_id}/scaling_policy/{scaling_policy_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0403__table12837735" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="as_06_0403__row25617672"><th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.2.3.2.5.1.1"><p id="as_06_0403__p61765553"><strong id="as_06_0403__b17750832195414">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.3.2.5.1.2"><p id="as_06_0403__p36953931">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.3.2.5.1.3"><p id="as_06_0403__p40478462">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.2.3.2.5.1.4"><p id="as_06_0403__p57529969"><strong id="as_06_0403__b1935153316541">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0403__row29415884"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0403__p33876408">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0403__p59634524">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0403__p65667169">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0403__p36520930">Specifies the project ID.</p>
</td>
</tr>
<tr id="as_06_0403__row22746728"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0403__p30545685">scaling_policy_id</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0403__p58281439">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0403__p23176109">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0403__p65325544">Specifies an AS policy ID. For details, see <a href="as_06_0405.html">Querying AS Policies Bound to an AS Group</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="as_06_0403__section60972066"><h4 class="sectiontitle">Request Message</h4><ul id="as_06_0403__ul42137138"><li id="as_06_0403__li43689923">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0403__table57664987" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="as_06_0403__row64660974"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="as_06_0403__p3047552">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="as_06_0403__p45525183">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="as_06_0403__p63661202">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="as_06_0403__p56283746">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0403__row62689558"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0403__p44689431">scaling_policy_name</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0403__p63074124">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0403__p8730397">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0403__p52610097">Specifies the AS policy name. The name contains only letters, digits, underscores (_), and hyphens (-), and cannot exceed 64 characters.</p>
</td>
</tr>
<tr id="as_06_0403__row56226836"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0403__p58079852">scaling_policy_type</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0403__p6847548">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0403__p17780525">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0403__p30936422">Specifies the AS policy type.</p>
<ul id="as_06_0403__ul44233651193034"><li id="as_06_0403__li66631917193034"><strong id="as_06_0403__b8908878154133">ALARM</strong> (corresponding to <strong id="as_06_0403__b13071039154133">alarm_id</strong>): indicates that the scaling action is triggered by an alarm. </li><li id="as_06_0403__li24872479193034"><strong id="as_06_0403__b47749798154133">SCHEDULED</strong> (corresponding to <strong id="as_06_0403__b27095003154133">scheduled_policy</strong>): indicates that the scaling action is triggered as scheduled.</li><li id="as_06_0403__li17559006193034"><strong id="as_06_0403__b48283661154133">RECURRENCE</strong> (corresponding to <strong id="as_06_0403__b31899767154133">scheduled_policy</strong>): indicates that the scaling action is triggered periodically.</li></ul>
</td>
</tr>
<tr id="as_06_0403__row36666067"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0403__p17161430">alarm_id</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0403__p47898561">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0403__p54578237">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0403__p9582029104355">Specifies the alarm rule ID. This parameter is mandatory when <strong id="as_06_0403__b842352706153331">scaling_policy_type</strong> is set to <strong id="as_06_0403__b842352706153340">ALARM</strong>. After this parameter is specified, the value of <strong id="as_06_0403__b842352706153543">scheduled_policy</strong> does not take effect.</p>
<p id="as_06_0403__p6030106312521">After you modify an alarm policy, the system automatically adds an alarm triggering activity of the autoscaling type to the <strong id="as_06_0403__b84235270619718">alarm_actions</strong> field in the alarm rule specified by the parameter value.</p>
<p id="as_06_0403__p583865912521">You can obtain the parameter value by querying Cloud Eye alarm rules. </p>
</td>
</tr>
<tr id="as_06_0403__row59087616"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0403__p21367612">scheduled_policy</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0403__p53055045">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0403__a4c03d226ca78442f99e13b8d363cd51d"><a href="#as_06_0403__t759e6d15d244474e8f286185ede143fb">scheduled_policy</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0403__p476380">Specifies the periodic or scheduled AS policy. This parameter is mandatory when <strong id="as_06_0403__b842352706171742">scaling_policy_type</strong> is set to <strong id="as_06_0403__b842352706171747">SCHEDULED</strong> or <strong id="as_06_0403__b842352706171752">RECURRENCE</strong>. After this parameter is specified, the value of <strong id="as_06_0403__b84235270614268">alarm_id</strong> does not take effect. For details, see <a href="#as_06_0403__t759e6d15d244474e8f286185ede143fb">Table 3</a>.</p>
</td>
</tr>
<tr id="as_06_0403__row4287423"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0403__p11736974">scaling_policy_action</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0403__p11170862">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0403__p167395571418"><a href="#as_06_0403__t34390832ab524bcc8123c0f9a056064f">scaling_policy_action</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0403__p9150720">Specifies the scaling action of the AS policy. For details, see <a href="#as_06_0403__t34390832ab524bcc8123c0f9a056064f">Table 4</a>.</p>
</td>
</tr>
<tr id="as_06_0403__row15247616"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="as_06_0403__p27097356">cool_down_time</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="as_06_0403__p47402253">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="as_06_0403__p14377323">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="as_06_0403__p23712525">Specifies the cooldown period (in seconds). The value ranges from 0 to 86400.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="as_06_0403__t759e6d15d244474e8f286185ede143fb"></a><a name="t759e6d15d244474e8f286185ede143fb"></a><table cellpadding="4" cellspacing="0" summary="" id="as_06_0403__t759e6d15d244474e8f286185ede143fb" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="as_06_0403__b384479104520">scheduled_policy</strong> field description</caption><thead align="left"><tr id="as_06_0403__rce98b9668cd747c88039421afe5ce935"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="as_06_0403__ad9ac3007570a4752b2b2dbc0fb04dadc">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="as_06_0403__en-us_topic_0020845960_p366931181079">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="as_06_0403__a602246198adf4a79a13bc4317d4c0d4f">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="as_06_0403__a8cbfa8dcb0b943ff8e789755123fec83">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0403__r43de461181294c56b28da56a1f604b09"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="as_06_0403__abc19a41a8f594f1ba6701e10da50a078">launch_time</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="as_06_0403__en-us_topic_0020845960_p193525921079">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="as_06_0403__a15ae7b8585d24e48abc6b9bf45636fda">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="as_06_0403__a61510df8f8ad43319d6df7c903934e43">Specifies the time when the scaling action is triggered. The time format complies with UTC.</p>
<ul id="as_06_0403__uf00af89403894ffc8ec87c36bc988668"><li id="as_06_0403__ld90aee8d978c4c00a70098e4cce1134d">If <strong id="as_06_0403__b1719774022013">scaling_policy_type</strong> is set to <strong id="as_06_0403__b181971940122020">SCHEDULED</strong>, the time format is <strong id="as_06_0403__b1019719408207">YYYY-MM-DDThh:mmZ</strong>.</li><li id="as_06_0403__ld793c7f0a8bd4839b44555ebc42ed4b0">If <strong id="as_06_0403__b1819804082014">scaling_policy_type</strong> is set to <strong id="as_06_0403__b19198840192016">RECURRENCE</strong>, the time format is <strong id="as_06_0403__b4198164018201">hh:mm</strong>.</li></ul>
</td>
</tr>
<tr id="as_06_0403__rbd5ec7242fef4c03b21636ac14160d9e"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="as_06_0403__a18479f6b70b34f29b2b90d754f59282a">recurrence_type</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="as_06_0403__en-us_topic_0020845960_p240561431079">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="as_06_0403__ae1f14fa2e6a54531aeffd26874fea267">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="as_06_0403__aec06182f642543c6b455c58bfdaffadd">Specifies the periodic triggering type. This parameter is mandatory when <strong id="as_06_0403__b842352706172110">scaling_policy_type</strong> is set to <strong id="as_06_0403__b842352706172115">RECURRENCE</strong>.</p>
<ul id="as_06_0403__ul2889151214615"><li id="as_06_0403__li1088916124612"><strong id="as_06_0403__b81993407202">Daily</strong>: indicates that the scaling action is triggered once a day.</li><li id="as_06_0403__li3889412462"><strong id="as_06_0403__b32001400204">Weekly</strong>: indicates that the scaling action is triggered once a week.</li><li id="as_06_0403__li1388901211610"><strong id="as_06_0403__b14200040152015">Monthly</strong>: indicates that the scaling action is triggered once a month.</li></ul>
</td>
</tr>
<tr id="as_06_0403__r0a62cf7acbad402386b6375b0d8b1353"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="as_06_0403__a36de9ca6c86e45a3b06fa24eedf584ad">recurrence_value</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="as_06_0403__en-us_topic_0020845960_p23905621079">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="as_06_0403__ad2c0647319f843e0a6c26a2fe1e57172">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="as_06_0403__a07f48cfcdafa4ffd87bba3b4e90c0111">Specifies the day when a periodic scaling action is triggered. This parameter is mandatory when <strong id="as_06_0403__b13201164012013">scaling_policy_type</strong> is set to <strong id="as_06_0403__b10201104062014">RECURRENCE</strong>.</p>
<ul id="as_06_0403__u339136fb44714869865eb1ccb9d659cd"><li id="as_06_0403__ld9de24d7f00642269263dc70d7e5be5f">If <strong id="as_06_0403__b1520124072016">recurrence_type</strong> is set to <strong id="as_06_0403__b5201840172017">Daily</strong>, the value is <strong id="as_06_0403__b1720124012016">null</strong>, indicating that the scaling action is triggered once a day.</li><li id="as_06_0403__lbb0053bb8bd342e9822909820f172b0f">If <strong id="as_06_0403__b79601362313">recurrence_type</strong> is set to <strong id="as_06_0403__b139602361435">Weekly</strong>, the value ranges from <strong id="as_06_0403__b1896017361135">1</strong> (Sunday) to <strong id="as_06_0403__b29611360311">7</strong> (Saturday). The digits refer to dates in each week and separated by a comma, such as <strong id="as_06_0403__b1496119362037">1,3,5</strong>.</li><li id="as_06_0403__l08d4d47d2a39489aa6b6c576eddc1e0e">If <strong id="as_06_0403__b84235270617528">recurrence_type</strong> is set to <strong id="as_06_0403__b520319409200">Monthly</strong>, the value ranges from <strong id="as_06_0403__b11203640102019">1</strong> to <strong id="as_06_0403__b1820314014207">31</strong>. The digits refer to the dates in each month and separated by a comma, such as <strong id="as_06_0403__b020374092010">1,10,13,28</strong>.</li></ul>
</td>
</tr>
<tr id="as_06_0403__r4c08c4f22c3b4df1a3a5403eeddc4354"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="as_06_0403__a0c2c51e444dd4e29ba2b60d5461e12c2">start_time</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="as_06_0403__en-us_topic_0020845960_p594178421079">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="as_06_0403__a615a9f0c0305423db2f2ddf584c93d4b">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="as_06_0403__a9fd1aed571e0410681f98248360eb0e0">Specifies the start time of the scaling action triggered periodically. The time format complies with UTC.</p>
<p id="as_06_0403__aea18ea5bcc1d42469166346b0e654f95">The time format is <strong id="as_06_0403__b122043407204">YYYY-MM-DDThh:mmZ</strong>.</p>
</td>
</tr>
<tr id="as_06_0403__r2ca2a0e358dc475ca68e9d3916d479c5"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="as_06_0403__ad750922d2cc94d0d9be7f5cfa9629ad0">end_time</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="as_06_0403__en-us_topic_0020845960_p481158781079">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="as_06_0403__adfb428f0abfd4adc9ea6b4ac94f5357a">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="as_06_0403__ad0f134288f51466e8329969670b77dd3">Specifies the end time of the scaling action triggered periodically. The time format complies with UTC. This parameter is mandatory when <strong id="as_06_0403__b842352706173440">scaling_policy_type</strong> is set to <strong id="as_06_0403__b842352706173444">RECURRENCE</strong>.</p>
<p id="as_06_0403__af47b13bb74d8445098a267eecf33d26b">When the scaling action is triggered periodically, the end time cannot be earlier than the current and start time.</p>
<p id="as_06_0403__aa2999aa7024c474389f0f97b6fe10b2f">The time format is <strong id="as_06_0403__b82049407207">YYYY-MM-DDThh:mmZ</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="as_06_0403__t34390832ab524bcc8123c0f9a056064f"></a><a name="t34390832ab524bcc8123c0f9a056064f"></a><table cellpadding="4" cellspacing="0" summary="" id="as_06_0403__t34390832ab524bcc8123c0f9a056064f" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="as_06_0403__as_06_0401_b12659161334419">scaling_policy_action</strong> field description</caption><thead align="left"><tr id="as_06_0403__as_06_0401_re1f0786afb8b4e88a8fc1ea46d03b82a"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.3.2.1.3.2.5.1.1"><p id="as_06_0403__as_06_0401_aec3e6ac917d14dfeb7ffb65860bb1306">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.1.3.2.5.1.2"><p id="as_06_0403__as_06_0401_p161699610619">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.3.2.1.3.2.5.1.3"><p id="as_06_0403__as_06_0401_adf1eacf282f34f0c87a7f239f00b4faf">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46%" id="mcps1.3.3.2.1.3.2.5.1.4"><p id="as_06_0403__as_06_0401_adbb947caa2164ef080b97285f51e2ca4">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0403__as_06_0401_r6132212f59bc42529826e44935a5cfaf"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="as_06_0403__as_06_0401_ae05d19776675443bb90e03221ee13658">operation</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="as_06_0403__as_06_0401_p6386788410619">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="as_06_0403__as_06_0401_ab3f64183c0044f0cb0c72b8b7c381c66">String</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="as_06_0403__as_06_0401_a5c8d1942ad2246beaa196587336c303e">Specifies the operation to be performed. The default operation is <strong>ADD</strong>.</p>
<ul id="as_06_0403__as_06_0401_ul17377291387"><li id="as_06_0403__as_06_0401_li47372296812"><strong>ADD</strong>: adds specified number of instances to the AS group.</li><li id="as_06_0403__as_06_0401_li1473712297814"><strong id="as_06_0403__as_06_0401_b84235270611343">REMOVE/REDUCE</strong>: removes or reduces specified number of instances from the AS group.</li><li id="as_06_0403__as_06_0401_li14737152919813"><strong>SET</strong>: sets the number of instances in the AS group.</li></ul>
</td>
</tr>
<tr id="as_06_0403__as_06_0401_rd780cce224684db9a0a0fff71c2cc5ce"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="as_06_0403__as_06_0401_p26677605172946">instance_number</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="as_06_0403__as_06_0401_p13402436172946">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="as_06_0403__as_06_0401_p11855564172946">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="as_06_0403__as_06_0401_p20776612172946">Specifies the number of instances to be operated. The default number is <strong>1</strong>. The value range is as follows for a default quota:</p>
<ul id="as_06_0403__as_06_0401_ul897214318562"><li id="as_06_0403__as_06_0401_li16972144318562">If <strong id="as_06_0403__as_06_0401_b12649189115414">operation</strong> is set to <strong id="as_06_0403__as_06_0401_b976871918548">SET</strong>, the value ranges from 0 to 200.</li><li id="as_06_0403__as_06_0401_li12972643195610">If <strong id="as_06_0403__as_06_0401_b13160165618541">operation</strong> is set to <strong id="as_06_0403__as_06_0401_b2029714596546">ADD</strong>, <strong id="as_06_0403__as_06_0401_b798416185520">REMOVE</strong>, or <strong id="as_06_0403__as_06_0401_b7950192184120">REDUCE</strong>, the value ranges from 1 to 200.</li></ul>
<div class="note" id="as_06_0403__as_06_0401_note99603584562"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="as_06_0403__as_06_0401_p696175820561">Either <strong id="as_06_0403__as_06_0401_b842352706105430">instance_number</strong> or <strong id="as_06_0403__as_06_0401_b842352706105435">instance_percentage</strong> is required.</p>
</div></div>
</td>
</tr>
<tr id="as_06_0403__as_06_0401_row4165649917933"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="as_06_0403__as_06_0401_p17249893172946">instance_percentage</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="as_06_0403__as_06_0401_p55064094172946">No</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="as_06_0403__as_06_0401_p31006664172946">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="46%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="as_06_0403__as_06_0401_p083717531563">Specifies the percentage of instances to be operated. You can increase, decrease, or set the number of instances in an AS group to the specified percentage of the current number of instances. If <strong id="as_06_0403__as_06_0401_b587711610207">operation</strong> is set to <strong id="as_06_0403__as_06_0401_b7766189182012">ADD</strong>, <strong id="as_06_0403__as_06_0401_b155020126201">REMOVE</strong> or <strong id="as_06_0403__as_06_0401_b1958414415402">REDUCE</strong>, the value is an integer from 1 to 20000. If <strong id="as_06_0403__as_06_0401_b15177335112010">operation</strong> is set to <strong id="as_06_0403__as_06_0401_b15787182814204">SET</strong>, the value is an integer from 0 to 20000.</p>
<p id="as_06_0403__as_06_0401_p55280357172946">If neither <strong id="as_06_0403__as_06_0401_b8423527061122">instance_number</strong> nor <strong id="as_06_0403__as_06_0401_b8423527061126">instance_percentage</strong> is specified, the number of instances to be operated is 1.</p>
<p id="as_06_0403__as_06_0401_p27761166172946">Either <strong id="as_06_0403__as_06_0401_b389626453">instance_number</strong> or <strong id="as_06_0403__as_06_0401_b125335115">instance_percentage</strong> is required.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="as_06_0403__ul41666396"><li id="as_06_0403__li39453247">Example request<p id="as_06_0403__p412721172917"><a name="as_06_0403__li39453247"></a><a name="li39453247"></a>This example shows how to modify the periodic AS policy with ID <strong id="as_06_0403__b131911831175617">0h327883-324n-4dzd-9c61-68d03ee191dd</strong> for an AS group with two instances. The modification is as follows: The AS policy name is changed to <strong id="as_06_0403__b1681132910577">policy_01</strong>, and the modification is executed at 16:00 every day from 2016-01-08T17:31Z through 2016-02-08T17:31Z.</p>
<pre class="screen" id="as_06_0403__screen18597852112820">PUT https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_policy/0h327883-324n-4dzd-9c61-68d03ee191dd
{
"scaling_policy_type": "RECURRENCE",
"scaling_policy_name": "policy_01",
"scheduled_policy": {
"launch_time": "16:00",
"recurrence_type": "Daily",
"end_time": "2016-02-08T17:31Z",
"start_time": "2016-01-08T17:31Z"
},
"scaling_policy_action": {
"operation": "SET",
"instance_number": 2
}
}</pre>
</li></ul>
</div>
<div class="section" id="as_06_0403__section11877685"><h4 class="sectiontitle">Response Message</h4><ul id="as_06_0403__ul6738088"><li id="as_06_0403__li60642794">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0403__table8914235" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_0403__row41110918"><th align="left" class="cellrowborder" valign="top" width="27.312731273127312%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="as_06_0403__p41650091"><strong id="as_06_0403__b5533173717545">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.682168216821683%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="as_06_0403__p18214233">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.00510051005101%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="as_06_0403__p66066743"><strong id="as_06_0403__b123320384541">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0403__row49805933"><td class="cellrowborder" valign="top" width="27.312731273127312%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="as_06_0403__p7748772">scaling_policy_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.682168216821683%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="as_06_0403__p23670787">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.00510051005101%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="as_06_0403__p38285619">Specifies the AS policy ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="as_06_0403__ul14127452"><li id="as_06_0403__li60038205">Example response<pre class="screen" id="as_06_0403__screen2288954195118">{
"scaling_policy_id": "0h327883-324n-4dzd-9c61-68d03ee191dd"
}</pre>
</li></ul>
</div>
<div class="section" id="as_06_0403__section39790309"><h4 class="sectiontitle">Returned Values</h4><ul id="as_06_0403__ul35460209"><li id="as_06_0403__li50706425">Normal<p id="as_06_0403__p53704644"><a name="as_06_0403__li50706425"></a><a name="li50706425"></a>200</p>
</li><li id="as_06_0403__li13579756">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0403__table55108945" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_0403__row19299281"><th align="left" class="cellrowborder" valign="top" width="36%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="as_06_0403__p19737894">Returned Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="64%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="as_06_0403__p55265559">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0403__row47325326"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p8146160">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p55859239">The server failed to process the request.</p>
</td>
</tr>
<tr id="as_06_0403__row32971110"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p53414263">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p31588048">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="as_06_0403__row15856984"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p9347313">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p18934887">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="as_06_0403__row36196256"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p46215595">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p52475719">The server could not find the requested page.</p>
</td>
</tr>
<tr id="as_06_0403__row2519427"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p2747002">405 Method Not Allowed</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p21180630">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="as_06_0403__row56407950"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p5641212">406 Not Acceptable</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p54284994">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="as_06_0403__row18802902"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p46640084">407 Proxy Authentication Required</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p19750463">You must use the proxy server for authentication to process the request.</p>
</td>
</tr>
<tr id="as_06_0403__row43536440"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p36790769">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p27262282">The request timed out.</p>
</td>
</tr>
<tr id="as_06_0403__row44033946"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p9979846">409 Conflict</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p3061223">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="as_06_0403__row27551015"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p17039762">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p38043494">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="as_06_0403__row6847126"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p17746329">501 Not Implemented</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p28166553">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="as_06_0403__row52172387"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p65213800">502 Bad Gateway</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p47826462">Failed to complete the request because the request is invalid.</p>
</td>
</tr>
<tr id="as_06_0403__row27784979"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p35990804">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p29574043">Failed to complete the request because the system is unavailable.</p>
</td>
</tr>
<tr id="as_06_0403__row64839795"><td class="cellrowborder" valign="top" width="36%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0403__p17532027">504 Gateway Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="64%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0403__p10808059">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="as_06_0403__section17669131616110"><h4 class="sectiontitle">Error Codes</h4><p id="as_06_0403__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_0400.html">AS Policies</a></div>
</div>
</div>