doc-exports/docs/bms/api-ref/en-us_topic_0053158696.html
guoyanyan c311ecafe3 bms_api_0510
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-10-11 08:28:11 +00:00

145 lines
13 KiB
HTML

<a name="EN-US_TOPIC_0053158696"></a><a name="EN-US_TOPIC_0053158696"></a>
<h1 class="topictitle1">Querying IP Addresses of a <span id="text68606276113">BMS</span><span id="text8671554204610"></span><span id="text1697619573376"></span> (Native OpenStack API)</h1>
<div id="body1464590256141"><div class="section" id="EN-US_TOPIC_0053158696__section53922917165259"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0053158696__p5680132165259">This API is used to query private IP addresses of a <span id="EN-US_TOPIC_0053158696__text1019362144714">BMS</span><span id="EN-US_TOPIC_0053158696__text444753132119"></span><span id="EN-US_TOPIC_0053158696__text165259213387"></span>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0053158696__section64211377173223"><h4 class="sectiontitle">Constraints</h4><p id="EN-US_TOPIC_0053158696__p7854724112118">Pagination query is not supported.</p>
</div>
<div class="section" id="EN-US_TOPIC_0053158696__section51121191165259"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0053158696__p63141473165259">GET /v2.1/{project_id}/servers/{server_id}/ips</p>
<p id="EN-US_TOPIC_0053158696__p876020123911"><a href="#EN-US_TOPIC_0053158696__table1152617127395">Table 1</a> lists the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158696__table1152617127395"></a><a name="table1152617127395"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158696__table1152617127395" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158696__row195261122394"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.1"><p id="EN-US_TOPIC_0053158696__p58268319165259">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.2"><p id="EN-US_TOPIC_0053158696__p22113407165259">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.3"><p id="EN-US_TOPIC_0053158696__p46355523165259">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158696__row6528101219392"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0053158696__p1217433165259">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0053158696__p31503226165259">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0053158696__p1624545165259">Specifies the project ID.</p>
<p id="EN-US_TOPIC_0053158696__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_0053158696__row8528101220397"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0053158696__p43442641165259">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0053158696__p29193009165259">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0053158696__p15823538165259">Specifies the <span id="EN-US_TOPIC_0053158696__text159771543112520">BMS</span><span id="EN-US_TOPIC_0053158696__text39771243182515"></span><span id="EN-US_TOPIC_0053158696__text197874320257"></span> ID.</p>
<p id="EN-US_TOPIC_0053158696__p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0053158696__en-us_topic_0113746489_text013014803615">BMS</span><span id="EN-US_TOPIC_0053158696__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>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0053158696__section8194118165259"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0053158696__ul688012438135"><li id="EN-US_TOPIC_0053158696__li1147212014518">Request parameters<p id="EN-US_TOPIC_0053158696__p138612612518"><a name="EN-US_TOPIC_0053158696__li1147212014518"></a><a name="li1147212014518"></a>None</p>
</li><li id="EN-US_TOPIC_0053158696__li08801443151318">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158696__screen117687553136"><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/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd/ips</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0053158696__section58140617165259"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0053158696__ul4330494143919"><li id="EN-US_TOPIC_0053158696__li25775706143919">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158696__table53480673143936" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158696__row28382388143936"><th align="left" class="cellrowborder" valign="top" width="24.8%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0053158696__p59978491115233">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.869999999999997%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0053158696__p26419641115233">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="52.33%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0053158696__p64181866115233">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158696__row8940324143936"><td class="cellrowborder" valign="top" width="24.8%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0053158696__p53077645143936">addresses</p>
</td>
<td class="cellrowborder" valign="top" width="22.869999999999997%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0053158696__p4322023143936">Map&lt;String,Array of <a href="#EN-US_TOPIC_0053158696__table22651992144025">address</a> objects&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="52.33%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0053158696__p26875012217">Specifies the VPC used by the <span id="EN-US_TOPIC_0053158696__text6191114619251">BMS</span><span id="EN-US_TOPIC_0053158696__text51911146182520"></span><span id="EN-US_TOPIC_0053158696__text91911446162514"></span>.</p>
<ul id="EN-US_TOPIC_0053158696__ul116872092214"><li id="EN-US_TOPIC_0053158696__li0687130172217"><strong id="EN-US_TOPIC_0053158696__b16917183682010">key</strong>: indicates the ID of the VPC used by the <span id="EN-US_TOPIC_0053158696__text16871017224">BMS</span><span id="EN-US_TOPIC_0053158696__text9687150172215"></span><span id="EN-US_TOPIC_0053158696__text820162415386"></span>.</li><li id="EN-US_TOPIC_0053158696__li9880194771319"><strong id="EN-US_TOPIC_0053158696__b7887123917203">value</strong> indicates the VPC details.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158696__table22651992144025"></a><a name="table22651992144025"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158696__table22651992144025" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0053158696__b54762198">address</strong> parameter structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158696__row15576094144025"><th align="left" class="cellrowborder" valign="top" width="25.41%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0053158696__p355273111016">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.419999999999998%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0053158696__p16554153131017">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.17%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0053158696__p055523151012">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158696__row1498246144025"><td class="cellrowborder" valign="top" width="25.41%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0053158696__p54249095144025">version</p>
</td>
<td class="cellrowborder" valign="top" width="23.419999999999998%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0053158696__p32100540144025">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="51.17%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0053158696__p16571197144025">Specifies the IP address version. The value can be:</p>
<ul id="EN-US_TOPIC_0053158696__ul1882101316162"><li id="EN-US_TOPIC_0053158696__li15758161811618"><strong id="EN-US_TOPIC_0053158696__b9297191175814">4</strong>: IPv4 address</li><li id="EN-US_TOPIC_0053158696__li20821181331619"><strong id="EN-US_TOPIC_0053158696__b17364111518584">6</strong>: IPv6 address</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158696__row14923052144025"><td class="cellrowborder" valign="top" width="25.41%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0053158696__p807709144025">addr</p>
</td>
<td class="cellrowborder" valign="top" width="23.419999999999998%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0053158696__p65424470144025">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.17%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0053158696__p39086769144025">Specifies the IP address.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0053158696__ul18214269144035"><li id="EN-US_TOPIC_0053158696__li44533297144035">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158696__screen2990529620312"><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>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;addresses&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;08a7715f-7de6-4ff9-a343-95ba4209f24a&quot;</span><span class="p">:</span><span class="w"> </span><span class="o">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;version&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">4</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;addr&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;192.168.2.90&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="o">]</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0053158696__section7610951"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_p193201622141412">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.6.2.1.1.3.1.1"><p id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_p19735204616177">Returned Values</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.6.2.1.1.3.1.2"><p id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.6.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_p13735144611178">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.6.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0053158696__en-us_topic_0106040941_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_0053158696__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0053158696__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_0053158688.html">BMS IP Address Query</a></div>
</div>
</div>