doc-exports/docs/ecs/api-ref/en-us_topic_0065817706.html
Zaoxu, Li 4edaa4a4cc ECS API 20231016 version
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>
2024-04-29 11:04:13 +00:00

80 lines
7.1 KiB
HTML

<a name="EN-US_TOPIC_0065817706"></a><a name="EN-US_TOPIC_0065817706"></a>
<h1 class="topictitle1">Querying the extra_specs Value for an <span id="text1916311174499">ECS</span> Flavor</h1>
<div id="body1499652824862"><div class="section" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_section33891944"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p57966554">This API is used to query the <strong id="EN-US_TOPIC_0065817706__b84235270616424">extra_specs</strong> value for a specified ECS flavor.</p>
</div>
<div class="section" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_section36592045"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p6399145113254">GET /v2.1/{project_id}/flavors/{flavor_id}/os-extra_specs</p>
<p id="EN-US_TOPIC_0065817706__p1388616403485">GET /v2/{project_id}/flavors/{flavor_id}/os-extra_specs</p>
<div class="p" id="EN-US_TOPIC_0065817706__p89239113812"><a href="#EN-US_TOPIC_0065817706__en-us_topic_0057973064_table47154420">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0065817706__en-us_topic_0057973064_table47154420"></a><a name="en-us_topic_0057973064_table47154420"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_table47154420" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_row324668"><th align="left" class="cellrowborder" valign="top" width="30.7%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0065817706__p5187119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.5%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0065817706__p17503500">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.800000000000004%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0065817706__p8497414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_row17004965"><td class="cellrowborder" valign="top" width="30.7%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p35224963">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.5%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p34649765">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44.800000000000004%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817706__p37593705">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_row26746391"><td class="cellrowborder" valign="top" width="30.7%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p18974100">flavors_id</p>
</td>
<td class="cellrowborder" valign="top" width="24.5%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p60507121">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44.800000000000004%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p2129750">Specifies the flavor ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_section33381957"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p22408261">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_section32002165"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0065817706__p162577401889"><a href="#EN-US_TOPIC_0065817706__en-us_topic_0057973064_table28168569">Table 2</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0065817706__en-us_topic_0057973064_table28168569"></a><a name="en-us_topic_0057973064_table28168569"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_table28168569" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_row26406300"><th align="left" class="cellrowborder" valign="top" width="28.910000000000004%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0065817706__p110452114597">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.830000000000002%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0065817706__p71044217595">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.26%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0065817706__p15104102175910">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_row46433444"><td class="cellrowborder" valign="top" width="28.910000000000004%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p3012613">extra_specs</p>
</td>
<td class="cellrowborder" valign="top" width="22.830000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_p42695066">Map&lt;String,String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="48.26%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817706__p1679511281174">Specifies the key-value pair of an <span id="EN-US_TOPIC_0065817706__text27145231511">ECS</span> flavor.</p>
<p id="EN-US_TOPIC_0065817706__p166420315234">For details about the returned fields, see the <strong id="EN-US_TOPIC_0065817706__b1741454723911">os_extra_specs</strong> field description in "Querying Details About Flavors and Extended Flavor Information".</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_section19584029"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0065817706__p20969178101619">Query the extra_specs details of a specified ECS flavor.</p>
<pre class="screen" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_screen673031016567">GET https://<em id="EN-US_TOPIC_0065817706__i18822452161915">{endpoint}</em>/v2/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2/os-extra_specs
GET https://<em id="EN-US_TOPIC_0065817706__i1875256174817">{endpoint}</em>/v2.1/743b4c0428d94531b9f2add666642e6b/flavors/c3.2xlarge.2/os-extra_specs</pre>
</div>
<div class="section" id="EN-US_TOPIC_0065817706__section1679819123313"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0065817706__screen1860139113311">{
"extra_specs": {
"ecs:performancetype": "computingv3",
"resource_type": "IOoptimizedC3_2"
}
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0065817706__en-us_topic_0057973064_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_0020212655.html">Flavor Management</a></div>
</div>
</div>