doc-exports/docs/css/api-ref/css_03_0023.html
Wuwan, Qi 8675132585 CSS API 23.2.1 20230926
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
2023-10-23 09:34:01 +00:00

242 lines
16 KiB
HTML

<a name="css_03_0023"></a><a name="css_03_0023"></a>
<h1 class="topictitle1">Obtaining the List of Instance Flavors</h1>
<div id="body1502957786213"><div class="section" id="css_03_0023__section162880126447"><h4 class="sectiontitle">Function</h4><p id="css_03_0023__p19460161254418">This API is used to query and display the IDs of supported instance flavors.</p>
</div>
<div class="section" id="css_03_0023__section1928871264412"><h4 class="sectiontitle">URI</h4><pre class="screen" id="css_03_0023__screen961365211405">GET /v1.0/{project_id}/flavors</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_03_0023__table13042122448" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="css_03_0023__row19460141264413"><th align="left" class="cellrowborder" valign="top" width="14.940000000000001%" id="mcps1.3.2.3.2.5.1.1"><p id="css_03_0023__p7460181264412">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.59%" id="mcps1.3.2.3.2.5.1.2"><p id="css_03_0023__p2460121274417">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.38%" id="mcps1.3.2.3.2.5.1.3"><p id="css_03_0023__p134601612144419">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.09%" id="mcps1.3.2.3.2.5.1.4"><p id="css_03_0023__p1460712184418">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0023__row84601812184412"><td class="cellrowborder" valign="top" width="14.940000000000001%" headers="mcps1.3.2.3.2.5.1.1 "><p id="css_03_0023__p346041224419">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.59%" headers="mcps1.3.2.3.2.5.1.2 "><p id="css_03_0023__p184601712194415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.38%" headers="mcps1.3.2.3.2.5.1.3 "><p id="css_03_0023__p194601412174416">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.09%" headers="mcps1.3.2.3.2.5.1.4 "><p id="css_03_0023__p1836110010124">Project ID. For details, see <a href="css_03_0071.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0023__section6319121215446"><h4 class="sectiontitle">Request</h4><p id="css_03_0023__p13221114358">None</p>
</div>
<div class="section" id="css_03_0023__section2319712124420"><h4 class="sectiontitle">Response</h4><p id="css_03_0023__p754016471358"><a href="#css_03_0023__table347318359446">Table 2</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="css_03_0023__table347318359446"></a><a name="table347318359446"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0023__table347318359446" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="css_03_0023__row7473435194418"><th align="left" class="cellrowborder" valign="top" width="22.19221922192219%" id="mcps1.3.4.3.2.4.1.1"><p id="css_03_0023__p74739353448">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.352635263526352%" id="mcps1.3.4.3.2.4.1.2"><p id="css_03_0023__p14731535104420">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.45514551455145%" id="mcps1.3.4.3.2.4.1.3"><p id="css_03_0023__p11473113513444">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0023__row1247323510445"><td class="cellrowborder" valign="top" width="22.19221922192219%" headers="mcps1.3.4.3.2.4.1.1 "><p id="css_03_0023__p5571939455">versions</p>
</td>
<td class="cellrowborder" valign="top" width="26.352635263526352%" headers="mcps1.3.4.3.2.4.1.2 "><p id="css_03_0023__p5575317458">Array of <a href="#css_03_0023__table25411438165118">versions</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="51.45514551455145%" headers="mcps1.3.4.3.2.4.1.3 "><p id="css_03_0023__p5577364514">List of engine versions.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="css_03_0023__table25411438165118"></a><a name="table25411438165118"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0023__table25411438165118" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="css_03_0023__b84235270618226">versions</strong> field description</caption><thead align="left"><tr id="css_03_0023__row454143845111"><th align="left" class="cellrowborder" valign="top" width="22.81228122812281%" id="mcps1.3.4.4.2.4.1.1"><p id="css_03_0023__p18541838105118">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.882688268826882%" id="mcps1.3.4.4.2.4.1.2"><p id="css_03_0023__p154133845118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.305030503050304%" id="mcps1.3.4.4.2.4.1.3"><p id="css_03_0023__p954153825112">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0023__row654183895116"><td class="cellrowborder" valign="top" width="22.81228122812281%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0023__p05416384511">version</p>
</td>
<td class="cellrowborder" valign="top" width="26.882688268826882%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0023__p1854103820518">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.305030503050304%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0023__p18541638115116">Engine version.</p>
</td>
</tr>
<tr id="css_03_0023__row154952219371"><td class="cellrowborder" valign="top" width="22.81228122812281%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0023__p250152253718">type</p>
</td>
<td class="cellrowborder" valign="top" width="26.882688268826882%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0023__p1850112253714">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.305030503050304%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0023__p195022253710">Instance type. The options are <strong id="css_03_0023__b4699125992818">ess</strong>, <strong id="css_03_0023__b514814210291">ess-cold</strong>, <strong id="css_03_0023__b185916782916">ess-master</strong>, and <strong id="css_03_0023__b15243191015290">ess-client</strong>.</p>
</td>
</tr>
<tr id="css_03_0023__row14541103813513"><td class="cellrowborder" valign="top" width="22.81228122812281%" headers="mcps1.3.4.4.2.4.1.1 "><p id="css_03_0023__p175415381511">flavors</p>
</td>
<td class="cellrowborder" valign="top" width="26.882688268826882%" headers="mcps1.3.4.4.2.4.1.2 "><p id="css_03_0023__p05411338165117">Array of <a href="#css_03_0023__table5319191204412">flavors</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50.305030503050304%" headers="mcps1.3.4.4.2.4.1.3 "><p id="css_03_0023__p354113814516">Flavor list</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="css_03_0023__table5319191204412"></a><a name="table5319191204412"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0023__table5319191204412" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="css_03_0023__b1464817376">flavors</strong> field description</caption><thead align="left"><tr id="css_03_0023__row174761812154414"><th align="left" class="cellrowborder" valign="top" width="24.062406240624064%" id="mcps1.3.4.5.2.4.1.1"><p id="css_03_0023__p5476181212444">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.982598259825977%" id="mcps1.3.4.5.2.4.1.2"><p id="css_03_0023__p1047616121445">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.95499549954995%" id="mcps1.3.4.5.2.4.1.3"><p id="css_03_0023__p13476012154420">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0023__row17162174810547"><td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.4.5.2.4.1.1 "><p id="css_03_0023__p916218486541">ram</p>
</td>
<td class="cellrowborder" valign="top" width="25.982598259825977%" headers="mcps1.3.4.5.2.4.1.2 "><p id="css_03_0023__p31621148125410">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="49.95499549954995%" headers="mcps1.3.4.5.2.4.1.3 "><p id="css_03_0023__p4162194885420">Memory size of an instance. Unit: GB</p>
</td>
</tr>
<tr id="css_03_0023__row74749439549"><td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.4.5.2.4.1.1 "><p id="css_03_0023__p114741743145412">cpu</p>
</td>
<td class="cellrowborder" valign="top" width="25.982598259825977%" headers="mcps1.3.4.5.2.4.1.2 "><p id="css_03_0023__p147474345414">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="49.95499549954995%" headers="mcps1.3.4.5.2.4.1.3 "><p id="css_03_0023__p13474124319547">Number of vCPUs of an instance.</p>
</td>
</tr>
<tr id="css_03_0023__row16177639165413"><td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.4.5.2.4.1.1 "><p id="css_03_0023__p9177339165420">name</p>
</td>
<td class="cellrowborder" valign="top" width="25.982598259825977%" headers="mcps1.3.4.5.2.4.1.2 "><p id="css_03_0023__p71772039185413">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.95499549954995%" headers="mcps1.3.4.5.2.4.1.3 "><p id="css_03_0023__p1417713985413">Flavor name.</p>
</td>
</tr>
<tr id="css_03_0023__row090371619575"><td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.4.5.2.4.1.1 "><p id="css_03_0023__p1990311645710">region</p>
</td>
<td class="cellrowborder" valign="top" width="25.982598259825977%" headers="mcps1.3.4.5.2.4.1.2 "><p id="css_03_0023__p39033166571">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.95499549954995%" headers="mcps1.3.4.5.2.4.1.3 "><p id="css_03_0023__p79039161579">AZ</p>
</td>
</tr>
<tr id="css_03_0023__row2068439175717"><td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.4.5.2.4.1.1 "><p id="css_03_0023__p16684119145711">diskrange</p>
</td>
<td class="cellrowborder" valign="top" width="25.982598259825977%" headers="mcps1.3.4.5.2.4.1.2 "><p id="css_03_0023__p196843925717">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.95499549954995%" headers="mcps1.3.4.5.2.4.1.3 "><p id="css_03_0023__p10684119125713">Disk capacity range of an instance.</p>
</td>
</tr>
<tr id="css_03_0023__row18476111274413"><td class="cellrowborder" valign="top" width="24.062406240624064%" headers="mcps1.3.4.5.2.4.1.1 "><p id="css_03_0023__p124764126445">flavor_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.982598259825977%" headers="mcps1.3.4.5.2.4.1.2 "><p id="css_03_0023__p94766127449">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.95499549954995%" headers="mcps1.3.4.5.2.4.1.3 "><p id="css_03_0023__p104761512194419">ID of a flavor.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_03_0023__section1154041616351"><h4 class="sectiontitle">Examples</h4><div class="p" id="css_03_0023__p153839202353">Example request<pre class="screen" id="css_03_0023__screen496302015458">GET /v1.0/6204a5bd270343b5885144cf9c8c158d/flavors</pre>
</div>
<p id="css_03_0023__p1947611234412">Example response</p>
<pre class="screen" id="css_03_0023__screen491757623">{
"versions": [
{
"version": "7.6.2",
"flavors": [
{
"cpu": 1,
"ram": 8,
"name": "css.medium.8",
"region": "eu-de",
"diskrange": "40,640",
"flavor_id": "6b6c0bcf-750d-4f8a-b6f5-c45a143f5198"
},
{
"cpu": 2,
"ram": 16,
"name": "css.large.8",
"region": "eu-de",
"diskrange": "40,1280",
"flavor_id": "d373e339-3cf4-4c00-9739-2259e9f3ec16"
},
{
"cpu": 4,
"ram": 32,
"name": "css.xlarge.8",
"region": "eu-de",
"diskrange": "40,2560",
"flavor_id": "2d8daf1b-873f-4c2e-a7b9-2f9cbcf2f213"
},
{
"cpu": 8,
"ram": 64,
"name": "css.2xlarge.8",
"region": "eu-de",
"diskrange": "80,5120",
"flavor_id": "b3d33ec6-d58a-40f0-aa51-4f671ce64b2a"
},
{
"cpu": 16,
"ram": 128,
"name": "css.4xlarge.8",
"region": "eu-de",
"diskrange": "160,10240",
"flavor_id": "f74419ca-bc91-4558-b4e2-90eeefb37c6e"
}
]
}
]
}</pre>
</div>
<div class="section" id="css_03_0023__section87962546391"><h4 class="sectiontitle">Status Code</h4><p id="css_03_0023__p46921709171"><a href="#css_03_0023__table12321369178">Table 5</a> describes the status code.</p>
<div class="tablenoborder"><a name="css_03_0023__table12321369178"></a><a name="table12321369178"></a><table cellpadding="4" cellspacing="0" summary="" id="css_03_0023__table12321369178" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Status code</caption><thead align="left"><tr id="css_03_0023__en-us_topic_0000001342030725_row1972183521418"><th align="left" class="cellrowborder" valign="top" width="15.939999999999998%" id="mcps1.3.6.3.2.4.1.1"><p id="css_03_0023__en-us_topic_0000001342030725_p14560134151414">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.04%" id="mcps1.3.6.3.2.4.1.2"><p id="css_03_0023__en-us_topic_0000001342030725_p5563194141411">Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.02%" id="mcps1.3.6.3.2.4.1.3"><p id="css_03_0023__en-us_topic_0000001342030725_p256616411143">Status Code Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_03_0023__en-us_topic_0000001342030725_row129720356144"><td class="cellrowborder" valign="top" width="15.939999999999998%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0023__en-us_topic_0000001342030725_p1957004131410">400</p>
</td>
<td class="cellrowborder" valign="top" width="31.04%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0023__en-us_topic_0000001342030725_p165731141171419">BadRequest</p>
</td>
<td class="cellrowborder" valign="top" width="53.02%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0023__en-us_topic_0000001342030725_p65778413148">Invalid request.</p>
<p id="css_03_0023__en-us_topic_0000001342030725_p1557974171415">The client should not repeat the request without modifications.</p>
</td>
</tr>
<tr id="css_03_0023__en-us_topic_0000001342030725_row8972103517147"><td class="cellrowborder" valign="top" width="15.939999999999998%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0023__en-us_topic_0000001342030725_p75841441191410">404</p>
</td>
<td class="cellrowborder" valign="top" width="31.04%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0023__en-us_topic_0000001342030725_p258716416142">NotFound</p>
</td>
<td class="cellrowborder" valign="top" width="53.02%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0023__en-us_topic_0000001342030725_p15589154118141">The requested resource cannot be found.</p>
<p id="css_03_0023__en-us_topic_0000001342030725_p14590164151410">The client should not repeat the request without modifications.</p>
</td>
</tr>
<tr id="css_03_0023__en-us_topic_0000001342030725_row297223511416"><td class="cellrowborder" valign="top" width="15.939999999999998%" headers="mcps1.3.6.3.2.4.1.1 "><p id="css_03_0023__en-us_topic_0000001342030725_p13595164131416">200</p>
</td>
<td class="cellrowborder" valign="top" width="31.04%" headers="mcps1.3.6.3.2.4.1.2 "><p id="css_03_0023__en-us_topic_0000001342030725_p9598741131416">OK</p>
</td>
<td class="cellrowborder" valign="top" width="53.02%" headers="mcps1.3.6.3.2.4.1.3 "><p id="css_03_0023__en-us_topic_0000001342030725_p659994115146">The request is processed successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_03_0008.html">Cluster Management APIs</a></div>
</div>
</div>