Files
doc-exports/docs/ecs/api-ref/en-us_topic_0167811961.html
wanghuijuan738 8f024b87ae ECS API 20251204 version. Adding an API Document.
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com>
Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
2025-12-17 11:05:14 +00:00

164 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0167811961"></a><a name="EN-US_TOPIC_0167811961"></a>
<h1 class="topictitle1">Querying Details of a Single Disk Attached to an <span id="text92811526115116">ECS</span></h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_section61843920"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_p2362032">This API is used to query details of a single disk attached to an <span id="EN-US_TOPIC_0167811961__text16298162725119">ECS</span>.</p>
<p id="EN-US_TOPIC_0167811961__p56310314585">This API supports checking fine-grained permissions for enterprise projects. For details, see <a href="en-us_topic_0103071514.html">ecs:cloudServers:showServerBlockDevice</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_section19724370"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_p248418710335">GET /v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id}</p>
<div class="p" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_p1514552742114"><a href="#EN-US_TOPIC_0167811961__table179834801714">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0167811961__table179834801714"></a><a name="table179834801714"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0167811961__table179834801714" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0167811961__row979920482179"><th align="left" class="cellrowborder" valign="top" width="22.322232223222326%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0167811961__p15031357201719">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.872587258725872%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0167811961__p65038576174">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.805180518051806%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0167811961__p650335714175">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0167811961__row9799184841719"><td class="cellrowborder" valign="top" width="22.322232223222326%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p35032057131719">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.872587258725872%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p145034574175">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.805180518051806%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p12503957111716">Specifies the <span id="EN-US_TOPIC_0167811961__text43651752182313">ECS</span> ID in UUID format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row1799144813175"><td class="cellrowborder" valign="top" width="22.322232223222326%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p1250365716175">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.872587258725872%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p75031757181718">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.805180518051806%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p6503145716174">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row12799248151714"><td class="cellrowborder" valign="top" width="22.322232223222326%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p125031357101710">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.872587258725872%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p1650315791714">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.805180518051806%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p1950313575172">Specifies the EVS disk ID in UUID format.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_section43301605"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_p51234165">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_section54170131"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_p189031415112213"><a href="#EN-US_TOPIC_0167811961__table11593131681815">Table 2</a> describes the response parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0167811961__table11593131681815"></a><a name="table11593131681815"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0167811961__table11593131681815" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0167811961__row19593141681819"><th align="left" class="cellrowborder" valign="top" width="24.552455245524552%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0167811961__p11396720141819">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.382538253825388%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0167811961__p10396820131815">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.065006500650064%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0167811961__p203961520151813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0167811961__row1459315162187"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p14396132001820">volumeAttachment</p>
</td>
<td class="cellrowborder" valign="top" width="25.382538253825388%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p16396192001818">Object</p>
</td>
<td class="cellrowborder" valign="top" width="50.065006500650064%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p19396152051810">Specifies the disk attached to an <span id="EN-US_TOPIC_0167811961__text14396620201814">ECS</span>. For details, see <a href="#EN-US_TOPIC_0167811961__table1128997111919">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0167811961__table1128997111919"></a><a name="table1128997111919"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0167811961__table1128997111919" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0167811961__b84235270618554">volumeAttachment</strong> parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0167811961__row02895751919"><th align="left" class="cellrowborder" valign="top" width="24.552455245524552%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0167811961__p6305121701919">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.69246924692469%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0167811961__p183051517181917">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.75507550755075%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0167811961__p14305151711197">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0167811961__row1028913718198"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p12305151771919">serverId</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p193051817181917">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p143055174191">Specifies the <span id="EN-US_TOPIC_0167811961__text675735272416">ECS</span> ID in UUID format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row2028997121920"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p19305171718198">volumeId</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p930541714196">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p8305917191913">Specifies the EVS disk ID in UUID format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row17289478197"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p73057174196">id</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p123052017201915">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p5305717161914">Specifies the mount ID, which is the same as the EVS disk ID.</p>
<p id="EN-US_TOPIC_0167811961__p2305181713193">The value is in UUID format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row102891178197"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p183051817151919">size</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p1930520175199">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p13058172197">Specifies the EVS disk size, in GiB.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row728910715196"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p1730521714196">device</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p0305191720197">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p430519172190">Specifies the drive letter of the EVS disk, displayed as the device name on the console.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row8289776195"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p2030531714194">pciAddress</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p730511711192">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p130510175190">Specifies the PCI address.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row12892717192"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p630516177194">bootIndex</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p3305101714192">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p130613177193">Specifies the EVS disk boot sequence.</p>
<ul id="EN-US_TOPIC_0167811961__ul7306017131912"><li id="EN-US_TOPIC_0167811961__li1730651718192"><strong id="EN-US_TOPIC_0167811961__b842352706181942">0</strong> indicates the system disk.</li><li id="EN-US_TOPIC_0167811961__li103062170195">Non-<strong id="EN-US_TOPIC_0167811961__b842352706193244">0</strong> indicates a data disk.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0167811961__row16289177181915"><td class="cellrowborder" valign="top" width="24.552455245524552%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0167811961__p6306217101919">bus</p>
</td>
<td class="cellrowborder" valign="top" width="24.69246924692469%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0167811961__p930691711194">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.75507550755075%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0167811961__p1230618170191">Specifies the disk bus type.</p>
<p id="EN-US_TOPIC_0167811961__p53067173199">Options: <strong id="EN-US_TOPIC_0167811961__b842352706114826">virtio</strong> and <strong id="EN-US_TOPIC_0167811961__b842352706114831">scsi</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_section1828405010213"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0167811961__p12946235515">Query information about a specified disk attached to an ECS.</p>
<pre class="screen" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_screen30281189171813">GET https://<em id="EN-US_TOPIC_0167811961__i5452131772714">{endpoint}</em>/v1/{project_id}/cloudservers/{server_id}/block_device/{volume_id}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__section460223513117"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0167811961__screen060853510116">{
"volumeAttachment": {
"pciAddress": "0000:02:01.0",
"volumeId": "a26887c6-c47b-4654-abb5-asdf234r234r",
"device": "/dev/vda",
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
"id": "a26887c6-c47b-4654-abb5-asdf234r234r",
"size": "40",
"bootIndex": 0,
"bus":"virtio"
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_en-us_topic_0092803065_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_en-us_topic_0092803065_en-us_topic_0020212692_p23670760">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_en-us_topic_0092803065_en-us_topic_0067161469_en-us_topic_0057973179_section23611955"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0167811961__en-us_topic_0101860614_p7233105282813">See <a href="en-us_topic_0022067717.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0111860831.html">Disk Management</a></div>
</div>
</div>