forked from docs/doc-exports
move doc sources to other location Reviewed-by: OpenTelekomCloud Bot <None>
128 lines
9.5 KiB
HTML
128 lines
9.5 KiB
HTML
<a name="EN-US_TOPIC_0020212672"></a><a name="EN-US_TOPIC_0020212672"></a>
|
|
|
|
<h1 class="topictitle1">Querying a Disk Attached to an <span id="text1346714301615">ECS</span></h1>
|
|
<div id="body53517117"><div class="section" id="EN-US_TOPIC_0020212672__section21764736"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212672__p39919257">This API is used to query a disk attached to an <span id="EN-US_TOPIC_0020212672__text16562256105019">ECS</span> based on the disk ID.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212672__section61664903"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212672__p193601815203315">GET /v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}</p>
|
|
<p id="EN-US_TOPIC_0020212672__p1015019534538">GET /v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}</p>
|
|
<div class="p" id="EN-US_TOPIC_0020212672__p4274121215214"><a href="#EN-US_TOPIC_0020212672__table61787501">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212672__table61787501"></a><a name="table61787501"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212672__table61787501" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212672__row44555055"><th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0020212672__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0020212672__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0020212672__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212672__row9860484"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p3763337517142">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p2840453517142">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212672__row94772224570"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p42688329">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p35202648">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p32842235">Specifies the <span id="EN-US_TOPIC_0020212672__text674910715433">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212672__row976327317144"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p2068039117144">volume_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p6449900717144">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p5703706317144">Specifies the disk ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212672__section18113219"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0020212672__p62419562">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212672__section28801245"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0020212672__p107161249145218"><a href="#EN-US_TOPIC_0020212672__table769899">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212672__table769899"></a><a name="table769899"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212672__table769899" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212672__row6968742"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0020212672__p62404314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0020212672__p3528183">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="67%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0020212672__p17347392">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212672__row13299239"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p3496541">volumeAttachment</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p56686067">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p52192065">Specifies the disks attached to an <span id="EN-US_TOPIC_0020212672__text648375815506">ECS</span>. For details, see <a href="#EN-US_TOPIC_0020212672__table42716605">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212672__table42716605"></a><a name="table42716605"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212672__table42716605" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212672__b6699296094725">volumeAttachment</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212672__row6429"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0020212672__p5194174482">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0020212672__p1119131710483">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="67%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0020212672__p101931717485">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212672__row54793251"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p9068361">device</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p39066822">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p25555552">Specifies the attached directory.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212672__row28673382"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p40842582">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p2490560">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p3679585">Specifies the ID of the attached resource.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212672__row33116269"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p65172112">serverId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p43655223">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p15056362">Specifies the <span id="EN-US_TOPIC_0020212672__text185747393431">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212672__row1289536"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212672__p37343614">volumeId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212672__p64098994">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212672__p20397636">Specifies the ID of the attached disk.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212672__section165814342372"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0020212672__screen14651406208">GET https://{endpoint}/v2/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}
|
|
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-volume_attachments/{volume_id}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212672__section1278119174536"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212672__screen1482841795311">{
|
|
"volumeAttachment":
|
|
{
|
|
"device": "/dev/sdd",
|
|
"id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
|
|
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
|
|
"volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212672__section57884614"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212672__p38818088">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>
|
|
|