doc-exports/docs/ecs/api-ref/en-us_topic_0065817711.html
guoyanyan db3ca7e730 ecs_api_1109
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2022-12-05 13:19:54 +00:00

199 lines
17 KiB
HTML

<a name="EN-US_TOPIC_0065817711"></a><a name="EN-US_TOPIC_0065817711"></a>
<h1 class="topictitle1">Querying Information About a Disk (Discarded)</h1>
<div id="body1499652824862"><div class="section" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_section18673210"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p45980677">This API is used to query information about a specified disk.</p>
<p id="EN-US_TOPIC_0065817711__p93071327105610">This API has been discarded. Use the EVS API "Querying Details About a Disk (OpenStack Cinder API v2)".</p>
</div>
<div class="section" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_section33841163"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0065817711__p3866358567">GET /v2/{project_id}/os-volumes/{volume_id}</p>
<p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p742294318453">GET /v2.1/{project_id}/os-volumes/{volume_id}</p>
<div class="p" id="EN-US_TOPIC_0065817711__p1492926125919"><a href="#EN-US_TOPIC_0065817711__en-us_topic_0057973212_table2814978410562">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0065817711__en-us_topic_0057973212_table2814978410562"></a><a name="en-us_topic_0057973212_table2814978410562"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_table2814978410562" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row4149654710562"><th align="left" class="cellrowborder" valign="top" width="33%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0065817711__p5187119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0065817711__p17503500">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0065817711__p8497414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row3491217610562"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p931403110562">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p1623904210562">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__p37593705">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row168831648104912"><td class="cellrowborder" valign="top" width="33%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p588311484495">volume_id</p>
</td>
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p5883148154912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p788310481495">Specifies the disk ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_section41255355"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p26852651">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_section35753879"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0065817711__p206951837135918"><a href="#EN-US_TOPIC_0065817711__en-us_topic_0057973212_table27581142">Table 2</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0065817711__en-us_topic_0057973212_table27581142"></a><a name="en-us_topic_0057973212_table27581142"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_table27581142" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row31073981"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0065817711__p62404314">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0065817711__p3528183">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0065817711__p17347392">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row49449215"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p45963511">id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p32056895">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p6109664">Specifies the disk ID in UUID format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row54986980"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p24760409">displayName</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p59436098">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p57742226">Specifies the disk name.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row49917988"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p16825232">status</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p20666548">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p33321799">Specifies the disk status.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row31460736"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p65291693">attachments</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p54135799">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p44871424">Specifies the attachment information about a disk.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row1189633"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p29251466">availabilityZone</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p20558515">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p62709254">Specifies the AZ to which the disk belongs.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row27512376"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p13910022">createdAt</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p52970008">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p46529834">Specifies the time when the disk was created.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row16115327"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p30273100">displayDescription</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p36202017">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p23168261">Specifies the disk description.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row7187765"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p45338124">volumeType</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p48509390">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p39879225">Specifies the disk type.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row23368709"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p13817278">snapshotId</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p45457768">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p16629678">Specifies the snapshot ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row15449375"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p43439845">metadata</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p28966593">Object</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p64623316">Specifies the disk metadata.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row44738940"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p67084362">size</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p65124208">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p64903654">Specifies the disk size.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_table10694153118228" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0065817711__b1173714642114123">attachments</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row1770213111229"><th align="left" class="cellrowborder" valign="top" width="26.502650265026507%" id="mcps1.3.5.2.4.1.1"><p id="EN-US_TOPIC_0065817711__p16689725015">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.81248124812481%" id="mcps1.3.5.2.4.1.2"><p id="EN-US_TOPIC_0065817711__p6681718507">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.684868486848686%" id="mcps1.3.5.2.4.1.3"><p id="EN-US_TOPIC_0065817711__p0822755015">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row17709183112211"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.5.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p5711203142219">device</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.5.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p371215313222">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.5.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p87146313224">Specifies the directory to which the disk is mounted.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row11715153182215"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.5.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p197177319224">id</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.5.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p1719183182216">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.5.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p97211331142215">Specifies the ID of the attached resource.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row117221431132216"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.5.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p37244312222">serverId</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.5.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p11726103113222">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.5.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p18728731122219">Specifies the <span id="EN-US_TOPIC_0065817711__text147742613142">ECS</span> ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_row1729193182219"><td class="cellrowborder" valign="top" width="26.502650265026507%" headers="mcps1.3.5.2.4.1.1 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p673013122218">volumeId</p>
</td>
<td class="cellrowborder" valign="top" width="24.81248124812481%" headers="mcps1.3.5.2.4.1.2 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p1573210319222">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.684868486848686%" headers="mcps1.3.5.2.4.1.3 "><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_p97342312223">Specifies the ID of the attached disk.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="EN-US_TOPIC_0065817711__section1916812241102"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0065817711__screen15593234804">GET https://{endpoint}/v2/b84c367e4d1047fc9b54f28b400ddbc2/os-volumes/70b14513-faad-4646-b7ab-a065cef282b4
GET https://{endpoint}/v2.1/b84c367e4d1047fc9b54f28b400ddbc2/os-volumes/70b14513-faad-4646-b7ab-a065cef282b4</pre>
</div>
<div class="section" id="EN-US_TOPIC_0065817711__section79186115409"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0065817711__screen19927711124011">{
"volume":
{
"status": "available",
"attachments": [{}],
"availabilityZone": "nova",
"createdAt": "2016-05-20T07:57:56.299000",
"displayDescription": null,
"volumeType": null,
"dispalyName": "test",
"snapshotId": null,
"metadata": {},
"id": "70b14513-faad-4646-b7ab-a065cef282b4",
"size": 1
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0065817711__en-us_topic_0057973212_en-us_topic_0020212692_p23670760">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_0267427881.html">Disk Management (OpenStack Nova APIs)</a></div>
</div>
</div>