forked from docs/doc-exports
move doc sources to other location Reviewed-by: OpenTelekomCloud Bot <None>
205 lines
16 KiB
HTML
205 lines
16 KiB
HTML
<a name="EN-US_TOPIC_0101860613"></a><a name="EN-US_TOPIC_0101860613"></a>
|
|
|
|
<h1 class="topictitle1">Querying Disk Attachment of an <span id="text595310148536">ECS</span></h1>
|
|
<div id="body1521017541072"><div class="section" id="EN-US_TOPIC_0101860613__section61843920"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0101860613__p2362032">This API is used to query disk attachment of an <span id="EN-US_TOPIC_0101860613__text1256919912912">ECS</span>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0101860613__section19724370"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0101860613__p248418710335">GET /v2.1/servers/{server_id}/block_device</p>
|
|
<div class="p" id="EN-US_TOPIC_0101860613__p289219215188"><a href="#EN-US_TOPIC_0101860613__table35893824">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0101860613__table35893824"></a><a name="table35893824"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0101860613__table35893824" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0101860613__row23656219"><th align="left" class="cellrowborder" valign="top" width="16.7%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0101860613__p37105578">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.810000000000002%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0101860613__p52761866">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.49000000000001%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0101860613__p45852771">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0101860613__row39466727"><td class="cellrowborder" valign="top" width="16.7%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p42688329">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.810000000000002%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p35202648">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.49000000000001%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p32842235">Specifies the <span id="EN-US_TOPIC_0101860613__text8378104474518">ECS</span> ID in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0101860613__section43301605"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0101860613__p51234165">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0101860613__section54170131"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0101860613__p19617143712182"><a href="#EN-US_TOPIC_0101860613__table57959838">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0101860613__table57959838"></a><a name="table57959838"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0101860613__table57959838" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0101860613__row39710134"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0101860613__p62404314">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0101860613__p3528183">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0101860613__p17347392">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0101860613__row62961510"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p66717520">volumeAttachments</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p49639570">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p15568903">Specifies the disks attached to an <span id="EN-US_TOPIC_0101860613__text5726154414119">ECS</span>. For details, see <a href="#EN-US_TOPIC_0101860613__table7886611">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row849762318356"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p292212560356">attachableQuantity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p1448919233356">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p1549432393517">Specifies the number of disks that can be attached to an <span id="EN-US_TOPIC_0101860613__text4703172317434">ECS</span>. For details, see <a href="#EN-US_TOPIC_0101860613__table1635814953813">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0101860613__table7886611"></a><a name="table7886611"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0101860613__table7886611" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0101860613__b842352706181740">volumeAttachments</strong> parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0101860613__row60727582"><th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0101860613__p369625221516">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.330000000000002%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0101860613__p56961152201518">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68.94%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0101860613__p1169665217155">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0101860613__row34544438"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p46636132">serverId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p30355189">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p50116845">Specifies the <span id="EN-US_TOPIC_0101860613__text9755151815317">ECS</span> ID in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row48398424"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p16791461647">volumeId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p10861332121715">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p50454834">Specifies the EVS disk ID in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row51440330"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p1980225720418">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p1836163411178">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p62498284">Specifies the mount ID, which is the same as the EVS disk ID.</p>
|
|
<p id="EN-US_TOPIC_0101860613__p715665074915">The value is in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row9400111250"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p44001611759">size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p1040020111156">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p1440012113518">Specifies the EVS disk size in GB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row25613652"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p5917164">device</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p51461341">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p1462819">Specifies the drive letter of the EVS disk, which is the device name of the EVS disk.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row138081017757"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p181061717510">pciAddress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p128101117559">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p28102176515">Specifies the PCI address.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row3107744183313"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p11108124414332">bootIndex</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p1410818444336">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p11270135612595">Specifies the EVS disk boot sequence.</p>
|
|
<ul id="EN-US_TOPIC_0101860613__ul651412221208"><li id="EN-US_TOPIC_0101860613__li45141221206"><strong id="EN-US_TOPIC_0101860613__b842352706181942">0</strong> indicates the system disk.</li><li id="EN-US_TOPIC_0101860613__li11514192215014">Non-0 indicates a data disk.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row1085510510579"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p1485515145717">bus</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p185525155718">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p18874019155217">Indicates the disk bus type.</p>
|
|
<p id="EN-US_TOPIC_0101860613__p1485511511573">Options: <strong id="EN-US_TOPIC_0101860613__b842352706114826">virtio</strong> and <strong id="EN-US_TOPIC_0101860613__b842352706114831">scsi</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0101860613__table1635814953813"></a><a name="table1635814953813"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0101860613__table1635814953813" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="EN-US_TOPIC_0101860613__b842352706145425">attachableQuantity</strong> parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0101860613__row436410913388"><th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.4.2.4.2.4.1.1"><p id="EN-US_TOPIC_0101860613__p156517121615">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.330000000000002%" id="mcps1.3.4.2.4.2.4.1.2"><p id="EN-US_TOPIC_0101860613__p96519118167">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68.94%" id="mcps1.3.4.2.4.2.4.1.3"><p id="EN-US_TOPIC_0101860613__p136511413166">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0101860613__row1737418916381"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p437417983817">free_scsi</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p73769914385">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p6380292381">Specifies the number of SCSI disks that can be attached to an <span id="EN-US_TOPIC_0101860613__text1646472654316">ECS</span>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row2380169133819"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p12381199113810">free_blk</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p1538349123813">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p667513342407">Specifies the number of virtio_blk disks that can be attached to an <span id="EN-US_TOPIC_0101860613__text1217742710434">ECS</span>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0101860613__row11386294387"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0101860613__p16388793384">free_disk</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.330000000000002%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0101860613__p4390139183812">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.94%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0101860613__p143921593380">Specifies the total number of disks that can be attached to an <span id="EN-US_TOPIC_0101860613__text1391013613437">ECS</span>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0101860613__section1828405010213"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0101860613__screen30281189171813">GET https://{endpoint}/v2.1/servers/4d8c3732-a248-40ed-bebc-539a6ffd25c0/block_device</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0101860613__section28871314103713"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0101860613__screen1989931413716">{
|
|
"attachableQuantity": {
|
|
"free_scsi": 23,
|
|
"free_blk": 15,
|
|
"free_disk": 23
|
|
},
|
|
"volumeAttachments": [
|
|
{
|
|
"pciAddress": "0000:02:01.0",
|
|
"volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
|
|
"device": "/dev/vda",
|
|
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
|
|
"id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
|
|
"size": "40",
|
|
"bootIndex": 0,
|
|
"bus":"virtio"
|
|
},
|
|
{
|
|
"pciAddress": "0000:02:02.0",
|
|
"volumeId": "a26887c6-c47b-4654-abb5-asdf234r234r",
|
|
"device": "/dev/vdb",
|
|
"serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
|
|
"id": "a26887c6-c47b-4654-abb5-asdf234r234r",
|
|
"size": "10",
|
|
"bootIndex": 1,
|
|
"bus":"virtio"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0101860613__en-us_topic_0092803065_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0101860613__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_0101860613__en-us_topic_0092803065_en-us_topic_0067161469_en-us_topic_0057973179_section23611955"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0101860613__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>
|
|
|