doc-exports/docs/dli/api-ref/dli_02_0331.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

133 lines
9.2 KiB
HTML

<a name="dli_02_0331"></a><a name="dli_02_0331"></a>
<h1 class="topictitle1">Associating a Queue with an Elastic Resource Pool</h1>
<div id="body0000001160410594"><div class="section" id="dli_02_0331__section819119387509"><h4 class="sectiontitle">Function</h4><p id="dli_02_0331__p104717181016">This API is used to associate a queue with an elastic resource pool.</p>
</div>
<div class="section" id="dli_02_0331__section10192538115020"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0331__ul1875162815110"><li id="dli_02_0331__li203306391715">URI format<p id="dli_02_0331__p12516401111"><a name="dli_02_0331__li203306391715"></a><a name="li203306391715"></a>POST /v3/{project_id}/elastic-resource-pools/{elastic_resource_pool_name}/queues</p>
</li><li id="dli_02_0331__li1523573115118">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0331__table7194193885015" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0331__row1194138135013"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0331__p1519453875019">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_0331__p161961038105011">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_0331__p1419683812505">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_0331__p8197538145017">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0331__row91941038145019"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0331__p719713386507">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_0331__p191981738175017">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_0331__p0198113865020">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_0331__p204643814507">Elastic resource pool name.</p>
</td>
</tr>
<tr id="dli_02_0331__row10194438115012"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0331__p132001938175015">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_0331__p152001038165018">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_0331__p1520113816502">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_0331__p1547183814502">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>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dli_02_0331__section192028385506"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0331__request_ASSOCIA_QUEUE_TO_ELASTIC_RESOURCE_POOLReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter</caption><thead align="left"><tr id="dli_02_0331__row7206103885014"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="dli_02_0331__p12206138105011">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="dli_02_0331__p1207183885014">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="dli_02_0331__p1320753895019">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="dli_02_0331__p220711381501">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0331__row1620617384504"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="dli_02_0331__p1720783825011">queue_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="dli_02_0331__p320883819502">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="dli_02_0331__p2020823818500">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="dli_02_0331__p5208163810503">Queue name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0331__section9209938115020"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0331__response_ASSOCIA_QUEUE_TO_ELASTIC_RESOURCE_POOLResp" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0331__row10210153818503"><th align="left" class="cellrowborder" valign="top" width="18.4981501849815%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0331__p1621020381501">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_0331__p1161363288">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_0331__p321173835012">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_0331__p22111388505">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0331__row1921093855015"><td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0331__p14212193895017">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_0331__p19167366284">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0331__p32123389508">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="55.48445155484452%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0331__p1559954201511">Whether the request is successfully executed. Value <strong id="dli_02_0331__b12541632202210">true</strong> indicates that the request is successfully executed.</p>
</td>
</tr>
<tr id="dli_02_0331__row921053816507"><td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0331__p1421217382508">message</p>
</td>
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0331__p916143611284">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.4981501849815%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0331__p4213113815016">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.48445155484452%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0331__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_0331__section14769144211244"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0331__p154141212529">Associate the <strong id="dli_02_0331__b535116527225">lhm_sql</strong> queue with the elastic resource pool.</p>
<pre class="screen" id="dli_02_0331__screen20896934203912">{
"queue_name" : "lhm_sql"
}</pre>
</div>
<div class="section" id="dli_02_0331__section8528115415245"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0331__screen10826144516395">{
"is_success" : true,
"message" : ""
}</pre>
</div>
<div class="section" id="dli_02_0331__section621793825013"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0331__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="dli_02_0331__row13218938205012"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="dli_02_0331__p921814384503">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_0331__p921873814500">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dli_02_0331__row92181138115016"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="dli_02_0331__p142191138145013">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="dli_02_0331__p4219153815019">OK</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dli_02_0331__section9219133845015"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0331__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>