Files
doc-exports/docs/bms/api-ref/en-us_topic_0000002340063040.html
wanghuijuan738 69783f9e3e bms api 20241225 version
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com>
Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
2025-07-16 09:58:55 +00:00

149 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0000002340063040"></a><a name="EN-US_TOPIC_0000002340063040"></a>
<h1 class="topictitle1">Querying Information About EVS Disks Attached to a <span id="en-us_topic_0053158658_text93761115448">BMS</span><span id="en-us_topic_0053158658_text132783143316"></span><span id="en-us_topic_0053158658_text8624834164819"></span></h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_section61843920"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p2362032">This API is used to query information about EVS disks attached to a <span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text452213345338">BMS</span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text1947382572"></span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text14635838114818"></span>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_section19724370"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p8793907163032">GET /v2.1/{project_id}/servers/{server_id}/os-volume_attachments</p>
<p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p53528314915"><a href="#EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table98221910184910">Table 1</a> lists the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table98221910184910"></a><a name="en-us_topic_0053158658_table98221910184910"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table98221910184910" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row198228100493"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.1"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p37105578">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.2"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p52761866">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.3"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p45852771">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row482218108494"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p58102813">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p8707407">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p34211353">Specifies the project ID.</p>
<p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_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_0000002340063040__en-us_topic_0053158658_row082212108498"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p42688329">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p35202648">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p32842235">Specifies the <span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text8345838143314">BMS</span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text14345738113312"></span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text20698164734815"></span> ID.</p>
<p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0113746489_text895314101319">BMS</span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0113746489_text1695320481317"></span> console or by calling the API <a href="en-us_topic_0000002340063012.html">Querying BMSs</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_section43301605"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p6746145179">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_section1798413587408"><h4 class="sectiontitle">Example Request</h4><div class="p" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p14327202610611">Querying EVS disks attached to a <span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text8992548111218">BMS</span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text15803221423"></span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text205161451161216"></span> (ID: 95bf2490-5428-432c-ad9b-5e3406f869dd)<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_screen697510127457"><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/os-volume_attachments</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_section54170131"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table57959838" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row39710134"><th align="left" class="cellrowborder" valign="top" width="26.08%" id="mcps1.3.5.2.1.4.1.1"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p59978491115233">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.64%" id="mcps1.3.5.2.1.4.1.2"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p26419641115233">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.28%" id="mcps1.3.5.2.1.4.1.3"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p64181866115233">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row62961510"><td class="cellrowborder" valign="top" width="26.08%" headers="mcps1.3.5.2.1.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p66717520">volumeAttachments</p>
</td>
<td class="cellrowborder" valign="top" width="25.64%" headers="mcps1.3.5.2.1.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p49639570">Object</p>
</td>
<td class="cellrowborder" valign="top" width="48.28%" headers="mcps1.3.5.2.1.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p15568903">Specifies information about the disks attached to the <span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text10651144263320">BMS</span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text165113429334"></span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text4616155354819"></span>. For details, see <a href="#EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table7886611">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table7886611"></a><a name="en-us_topic_0053158658_table7886611"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_table7886611" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_b176554398518">volumeAttachments</strong> data structure</caption><thead align="left"><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row60727582"><th align="left" class="cellrowborder" valign="top" width="26.437356264373562%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p19987085">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.42745725427458%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p4546697">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.135186481351866%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p32738149">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row34544438"><td class="cellrowborder" valign="top" width="26.437356264373562%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p46636132">device</p>
</td>
<td class="cellrowborder" valign="top" width="25.42745725427458%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p30355189">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.135186481351866%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p50116845">Specifies the mount directory, for example, <strong id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_b236312145244">/dev/vdb</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row48398424"><td class="cellrowborder" valign="top" width="26.437356264373562%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p27958252">id</p>
</td>
<td class="cellrowborder" valign="top" width="25.42745725427458%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p25568738">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.135186481351866%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p50454834">Specifies the ID of the attached resource.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row51440330"><td class="cellrowborder" valign="top" width="26.437356264373562%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p5917164">serverId</p>
</td>
<td class="cellrowborder" valign="top" width="25.42745725427458%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p33594135">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.135186481351866%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p62498284">Specifies the ID of the <span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text194132454338">BMS</span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text641384517333"></span><span id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_text164261359124819"></span> to which the disks are attached.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_row25613652"><td class="cellrowborder" valign="top" width="26.437356264373562%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p61439917">volumeId</p>
</td>
<td class="cellrowborder" valign="top" width="25.42745725427458%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p51461341">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.135186481351866%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_p1462819">Specifies the IDs of the EVS disks attached to the BMS.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_section15519517124113"><h4 class="sectiontitle">Example Response</h4><div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_screen34284862202756"><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></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;volumeAttachments&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;device&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;/dev/vdb&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;serverId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;820abbd0-2d8e-4bc5-ae46-69cacfd4fbaa&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;b53f23bd-ee8f-49ec-9420-d1acfeaf91d6&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;volumeId&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;b53f23bd-ee8f-49ec-9420-d1acfeaf91d6&quot;</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_0000002340063040__en-us_topic_0053158658_section7610951"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_p193201622141412">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.7.2.1.1.3.1.1"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_p19735204616177">Returned Values</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.7.2.1.1.3.1.2"><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_p13735144611178">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_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_0000002340063040__en-us_topic_0053158658_section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0000002340063040__en-us_topic_0053158658_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_0000002340222812.html">BMS Disk Management (OpenStack Nova APIs)</a></div>
</div>
</div>