forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
131 lines
9.6 KiB
HTML
131 lines
9.6 KiB
HTML
<a name="EN-US_TOPIC_0020212671"></a><a name="EN-US_TOPIC_0020212671"></a>
|
|
|
|
<h1 class="topictitle1">Querying Disks Attached to an <span id="text1475228819">ECS</span></h1>
|
|
<div id="body1686169"><div class="section" id="EN-US_TOPIC_0020212671__section61843920"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212671__p2362032">This API is used to query the disks attached to an <span id="EN-US_TOPIC_0020212671__text24028296115">ECS</span>.</p>
|
|
<p id="EN-US_TOPIC_0020212671__p217084943613">Disks that have been successfully attached and are being attached are to be queried.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212671__section19724370"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212671__p94271613205312">GET /v2.1/{project_id}/servers/{server_id}/os-volume_attachments</p>
|
|
<p id="EN-US_TOPIC_0020212671__p248418710335">GET /v2/{project_id}/servers/{server_id}/os-volume_attachments</p>
|
|
<div class="p" id="EN-US_TOPIC_0020212671__p156861540124617"><a href="#EN-US_TOPIC_0020212671__table35893824">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212671__table35893824"></a><a name="table35893824"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212671__table35893824" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212671__row23656219"><th align="left" class="cellrowborder" valign="top" width="16.98%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0020212671__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.169999999999998%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0020212671__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.85%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0020212671__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212671__row23086940"><td class="cellrowborder" valign="top" width="16.98%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p58102813">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p8707407">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.85%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212671__row39466727"><td class="cellrowborder" valign="top" width="16.98%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p42688329">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p35202648">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.85%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p32842235">Specifies the <span id="EN-US_TOPIC_0020212671__text1714412213398">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212671__section43301605"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0020212671__p51234165">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212671__section54170131"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0020212671__p19194554471"><strong id="EN-US_TOPIC_0020212671__b713315353473">Response parameters</strong></p>
|
|
<div class="p" id="EN-US_TOPIC_0020212671__p457612105478"><a href="#EN-US_TOPIC_0020212671__table57959838">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212671__table57959838"></a><a name="table57959838"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212671__table57959838" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212671__row39710134"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.3.2.2.4.1.1"><p id="EN-US_TOPIC_0020212671__p62404314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.4.3.2.2.4.1.2"><p id="EN-US_TOPIC_0020212671__p3528183">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.4.3.2.2.4.1.3"><p id="EN-US_TOPIC_0020212671__p17347392">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212671__row62961510"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p66717520">volumeAttachments</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p49639570">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p15568903">Specifies the disks attached to an <span id="EN-US_TOPIC_0020212671__text196610535506">ECS</span>. For details, see <a href="#EN-US_TOPIC_0020212671__table7886611">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212671__table7886611"></a><a name="table7886611"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212671__table7886611" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212671__b11348946152216">volumeAttachments</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212671__row60727582"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.3.3.2.4.1.1"><p id="EN-US_TOPIC_0020212671__p01561150124719">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.4.3.3.2.4.1.2"><p id="EN-US_TOPIC_0020212671__p21565508475">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.4.3.3.2.4.1.3"><p id="EN-US_TOPIC_0020212671__p111561350154718">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212671__row34544438"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p46636132">device</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p30355189">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p50116845">Specifies the attached directory.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212671__row48398424"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p27958252">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p25568738">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p50454834">Specifies the ID of the attached resource.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212671__row51440330"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p5917164">serverId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p33594135">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p62498284">Specifies the <span id="EN-US_TOPIC_0020212671__text15801115385013">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212671__row25613652"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212671__p61439917">volumeId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212671__p51461341">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212671__p1462819">Specifies the ID of the attached disk.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212671__section763514718378"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0020212671__p1041814270579">Query details about disks attached to an ECS.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0020212671__screen14582457192">GET https://{endpoint}/v2/{project_id}/servers/{server_id}/os-volume_attachments
|
|
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-volume_attachments</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212671__section1013118563474"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212671__screen34284862202756">{
|
|
"volumeAttachments": [
|
|
{
|
|
"device": "/dev/sdd",
|
|
"id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
|
|
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
|
|
"volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"
|
|
},
|
|
{
|
|
"device": "/dev/sdc",
|
|
"id": "a26887c6-c47b-4654-abb5-dfadf7d3f804",
|
|
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
|
|
"volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f804"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212671__section17769131"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212671__p59762422">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0020212667.html">Disk Management</a></div>
|
|
</div>
|
|
</div>
|
|
|