doc-exports/docs/dli/api-ref/dli_02_0332.html
Su, Xiaomeng 483e5cc6cc dli_api_20240430
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
2024-05-15 12:04:03 +00:00

213 lines
14 KiB
HTML

<a name="dli_02_0332"></a><a name="dli_02_0332"></a>
<h1 class="topictitle1">Modifying the Scaling Policy of a Queue Associated with an Elastic Resource Pool</h1>
<div id="body0000001160570540"><div class="section" id="dli_02_0332__section13468203855015"><h4 class="sectiontitle">Function</h4><p id="dli_02_0332__p652733818401">This API is used to modify the scaling policy of a queue associated with an elastic resource pool.</p>
</div>
<div class="section" id="dli_02_0332__section5469193885015"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0332__ul113711143184014"><li id="dli_02_0332__li837113435406">URI format<p id="dli_02_0332__p847263814508"><a name="dli_02_0332__li837113435406"></a><a name="li837113435406"></a>PUT /v3/{project_id}/elastic-resource-pools/{elastic_resource_pool_name}/queues/{queue_name}</p>
</li><li id="dli_02_0332__li02587451405">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0332__table12473163814501" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0332__row17472123816505"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0332__p13473173811506">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0332__p04731238105019">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0332__p184741738175012">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0332__p204741038165010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0332__row16472153811507"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0332__p147473818506">elastic_resource_pool_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0332__p34751038135018">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0332__p10475123815506">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0332__p8475238195011">Elastic resource pool name.</p>
</td>
</tr>
<tr id="dli_02_0332__row16472113815508"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0332__p847953865015">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0332__p84793384504">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0332__p1147963825013">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0332__p5431154241517">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="dli_02_0332__row1747211383502"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0332__p20480738185012">queue_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0332__p34807382500">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0332__p114811938165014">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0332__p8481183895012">Name of a bound queue.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dli_02_0332__section548113885017"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0332__request_PUT_ELASTIC_RESOURCE_POOL_QUEUE_PRIORITY_INFOReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter</caption><thead align="left"><tr id="dli_02_0332__row348843816506"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_02_0332__p74891938195018">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.809999999999999%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_02_0332__p14489163835018">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.709999999999997%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_02_0332__p34900385503">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.480000000000004%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_02_0332__p849119386500">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0332__row124885389503"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0332__p184911638145010">queue_scaling_policies</p>
</td>
<td class="cellrowborder" valign="top" width="15.809999999999999%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0332__p449210386502">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.709999999999997%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0332__p152693310413">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="42.480000000000004%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0332__p17492638135019">Scaling policy of a queue in an elastic resource pool. A policy contains the period, priority, and CU range. There must be a default scaling policy (period [00:00, 24:00]) for each queue. For details about the parameters, see <a href="#dli_02_0332__request_priority_infos">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dli_02_0332__request_priority_infos"></a><a name="request_priority_infos"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0332__request_priority_infos" frame="border" border="1" rules="all"><caption><b>Table 3 </b>queue_scaling_policies</caption><thead align="left"><tr id="dli_02_0332__row114931387506"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="dli_02_0332__p1449419386507">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="dli_02_0332__p16494338195017">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="dli_02_0332__p249416386507">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="dli_02_0332__p1549553813502">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0332__row12493103895011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0332__p13540338165017">impact_start_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0332__p5541143813504">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0332__p185418385506">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0332__p11541193845015">Time when a policy takes effect.</p>
</td>
</tr>
<tr id="dli_02_0332__row1249393814508"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0332__p35411838205011">impact_stop_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0332__p16542638125014">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0332__p7542238175011">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0332__p65429382503">Time when a policy expires.</p>
</td>
</tr>
<tr id="dli_02_0332__row24935381500"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0332__p18543153815014">priority</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0332__p125434387507">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0332__p554363816506">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0332__p8543193865015">Priority.</p>
</td>
</tr>
<tr id="dli_02_0332__row159657398326"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0332__p18965103911325">min_cu</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0332__p99651139173211">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0332__p996519393322">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0332__p12965143914329">Minimum number of CUs.</p>
</td>
</tr>
<tr id="dli_02_0332__row13551742133219"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="dli_02_0332__p1255142153213">max_cu</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="dli_02_0332__p195574213322">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="dli_02_0332__p955342193216">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="dli_02_0332__p115554210322">Maximum number of CUs.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0332__section11543193813507"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0332__response_PUT_ELASTIC_RESOURCE_POOL_QUEUE_PRIORITY_INFOResp" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0332__row10544638165015"><th align="left" class="cellrowborder" valign="top" width="18.4981501849815%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0332__p175451638135014">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="7.519248075192481%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0332__p0946135514282">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.4981501849815%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0332__p4545143805020">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.48445155484452%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0332__p554573825016">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0332__row10544103815504"><td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0332__p2545163817503">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0332__p1994685514287">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0332__p155461382506">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="55.48445155484452%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0332__p1559954201511">Whether the request is successfully executed. Value <strong id="dli_02_0332__b1878173892612">true</strong> indicates that the request is successfully executed.</p>
</td>
</tr>
<tr id="dli_02_0332__row16544938165019"><td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0332__p18546163885020">message</p>
</td>
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0332__p13946125511286">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0332__p2546163815019">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.48445155484452%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0332__p19601642121512">System prompt. If execution succeeds, the message may be left blank.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0332__section14769144211244"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0332__p11912165268">Modify the scaling policy of a queue associated with an elastic resource pool.</p>
<pre class="screen" id="dli_02_0332__screen125472384507">{
"queue_scaling_policies" : [ {
"priority" : 100,
"impact_start_time" : "10:00",
"impact_stop_time" : "22:00",
"min_cu":"64",
"max_cu":"752"
}, {
"priority" : 50,
"impact_start_time" : "22:00",
"impact_stop_time" : "10:00",
"min_cu":"64",
"max_cu":"752"
} ]
}</pre>
</div>
<div class="section" id="dli_02_0332__section8528115415245"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0332__screen10826144516395">{
"is_success" : true,
"message" : ""
}</pre>
</div>
<div class="section" id="dli_02_0332__section11549203815013"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0332__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="dli_02_0332__row14549638195017"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="dli_02_0332__p1855003825016">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="dli_02_0332__p4550193845010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0332__row254913813502"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="dli_02_0332__p85503380505">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="dli_02_0332__p95501338105012">OK</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0332__section18551143885017"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0332__p71631038135015">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0325.html">APIs Related to Elastic Resource Pools</a></div>
</div>
</div>