forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
98 lines
9.5 KiB
HTML
98 lines
9.5 KiB
HTML
<a name="EN-US_TOPIC_0060410930"></a><a name="EN-US_TOPIC_0060410930"></a>
|
|
|
|
<h1 class="topictitle1">Checking for Tags of a <span id="text93761115448">BMS</span><span id="text1297323418528"></span><span id="text17882910183212"></span> (Native OpenStack API)</h1>
|
|
<div id="body1495513488165"><div class="section" id="EN-US_TOPIC_0060410930__section66970384144623"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0060410930__p55892006144623">This API is used to check whether a <span id="EN-US_TOPIC_0060410930__text482634115318">BMS</span><span id="EN-US_TOPIC_0060410930__text108213435314"></span><span id="EN-US_TOPIC_0060410930__text19631916133210"></span> has a specified tag.</p>
|
|
<p id="EN-US_TOPIC_0060410930__p567751719327">You are required to use the HTTP header <strong id="EN-US_TOPIC_0060410930__en-us_topic_0060410926_b842352706165643">X-OpenStack-Nova-API-Version: 2.26</strong> to specify the micro version on the client.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0060410930__section20295111144623"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0060410930__p12242131144623">GET /v2.1/{project_id}/servers/{server_id}/tags/{tag}</p>
|
|
<p id="EN-US_TOPIC_0060410930__p7165539412"><a href="#EN-US_TOPIC_0060410930__table6300135020116">Table 1</a> lists the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0060410930__table6300135020116"></a><a name="table6300135020116"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0060410930__table6300135020116" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0060410930__row6301650413"><th align="left" class="cellrowborder" valign="top" width="24.892489248924893%" id="mcps1.3.2.4.2.4.1.1"><p id="EN-US_TOPIC_0060410930__p29933752144623">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.892489248924893%" id="mcps1.3.2.4.2.4.1.2"><p id="EN-US_TOPIC_0060410930__p8714817144623">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50.215021502150215%" id="mcps1.3.2.4.2.4.1.3"><p id="EN-US_TOPIC_0060410930__p34811538144623">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0060410930__row1830145014117"><td class="cellrowborder" valign="top" width="24.892489248924893%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0060410930__p27039406144623">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.892489248924893%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0060410930__p42708297144623">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.215021502150215%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0060410930__p36820045144623">Specifies the project ID.</p>
|
|
<p id="EN-US_TOPIC_0060410930__p9141450142010">For how to obtain the project ID, see <a href="https://docs.otc.t-systems.com/en-us/api/apiug/apig-en-api-180328009.html" target="_blank" rel="noopener noreferrer">Obtaining Required Information</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0060410930__row030112504112"><td class="cellrowborder" valign="top" width="24.892489248924893%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0060410930__p65376104144623">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.892489248924893%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0060410930__p60973080144623">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.215021502150215%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0060410930__p39872428144623">Specifies the <span id="EN-US_TOPIC_0060410930__text0567164064218">BMS</span><span id="EN-US_TOPIC_0060410930__text115681840114216"></span><span id="EN-US_TOPIC_0060410930__text19568204011424"></span> ID.</p>
|
|
<p id="EN-US_TOPIC_0060410930__p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0060410930__en-us_topic_0113746489_text013014803615">BMS</span><span id="EN-US_TOPIC_0060410930__en-us_topic_0113746489_text10131448133612"></span> console or by calling the <a href="en-us_topic_0053158693.html">Querying BMSs (Native OpenStack API)</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0060410930__row33016506115"><td class="cellrowborder" valign="top" width="24.892489248924893%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0060410930__p8862197144623">tag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.892489248924893%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0060410930__p46749363144623">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50.215021502150215%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0060410930__p28602098144623">Specifies the key of the tag to be queried.</p>
|
|
<p id="EN-US_TOPIC_0060410930__p15688120112814">Constraints:</p>
|
|
<ul id="EN-US_TOPIC_0060410930__ul926591942418"><li id="EN-US_TOPIC_0060410930__li13375192802420">URL encoding is required for special characters.</li><li id="EN-US_TOPIC_0060410930__li1326521992419">If no tag key is specified, all tags of the <span id="EN-US_TOPIC_0060410930__text1873714012533">BMS</span><span id="EN-US_TOPIC_0060410930__text197378408537"></span><span id="EN-US_TOPIC_0060410930__text1299834219325"></span> are displayed.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0060410930__section56092298144623"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0060410930__ul0181353101019"><li id="EN-US_TOPIC_0060410930__li460910125101">Request parameters<p id="EN-US_TOPIC_0060410930__p1411613163109"><a name="EN-US_TOPIC_0060410930__li460910125101"></a><a name="li460910125101"></a>None</p>
|
|
</li><li id="EN-US_TOPIC_0060410930__li31865320107">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0060410930__screen692717114116"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">GET</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/servers/2d85af7c-cbfe-40c5-a378-4d03b42fb0e2/tags/{tag}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0060410930__section21987090144623"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0060410930__p36123842144623">If the specified tag exists, no response is returned.</p>
|
|
<p id="EN-US_TOPIC_0060410930__p1858584511577">If the specified tag does not exist, the response is as follows:</p>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0060410930__screen882780135820"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"itemNotFound"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"message"</span><span class="p">:</span><span class="w"> </span><span class="s">"Server 2d85af7c-cbfe-40c5-a378-4d03b42fb0e2 has no tag 'abc'"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"code"</span><span class="p">:</span><span class="w"> </span><span class="mi">404</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0060410930__section27037160"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_p1271142611013">Normal values
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.1.1.3.1.1"><p id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_p19735204616177">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.1.1.3.1.2"><p id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_p207355465176">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_p13735144611178">204</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_p81516575011">The server has processed the request but did not return any content.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0060410930__en-us_topic_0053158659_p47633965">For details about other returned values, see <a href="en-us_topic_0053158690.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0060410930__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0060410930__en-us_topic_0106040941_p10243161417491">See <a href="en-us_topic_0107541808.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0060410925.html">BMS 1D Tag Management</a></div>
|
|
</div>
|
|
</div>
|
|
|