doc-exports/docs/deh/api-ref/deh_02_0022.html
Hasko, Vladimir ba34ad4eaa initial import of DEH API
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2022-09-07 10:09:05 +00:00

248 lines
19 KiB
HTML

<a name="deh_02_0022"></a><a name="deh_02_0022"></a>
<h1 class="topictitle1">Querying ECSs on a DeH</h1>
<div id="body1512563929533"><div class="section" id="deh_02_0022__section34213098"><h4 class="sectiontitle">Function</h4><p id="deh_02_0022__p30516772">This API is used to query information about deployed ECSs on a DeH.</p>
</div>
<div class="section" id="deh_02_0022__section39482434"><h4 class="sectiontitle">URI</h4><p id="deh_02_0022__p59525213239">GET /v1.0/{project_id}/dedicated-hosts/{dedicated_host_id}/servers</p>
<p id="deh_02_0022__p04449354231"><a href="#deh_02_0022__table572214121015">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="deh_02_0022__table572214121015"></a><a name="table572214121015"></a><table cellpadding="4" cellspacing="0" summary="" id="deh_02_0022__table572214121015" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters description</caption><thead align="left"><tr id="deh_02_0022__row572516410109"><th align="left" class="cellrowborder" valign="top" width="21.23787621237876%" id="mcps1.3.2.4.2.5.1.1"><p id="deh_02_0022__p107252049107"><strong id="deh_02_0022__b1384105117371">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.44765523447655%" id="mcps1.3.2.4.2.5.1.2"><p id="deh_02_0022__p726975522919"><strong id="deh_02_0022__b45169521371">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.48755124487551%" id="mcps1.3.2.4.2.5.1.3"><p id="deh_02_0022__p072564201017"><strong id="deh_02_0022__b19376153153714">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30.826917308269174%" id="mcps1.3.2.4.2.5.1.4"><p id="deh_02_0022__p47253421017"><strong id="deh_02_0022__b1465915423717">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_02_0022__row107256481017"><td class="cellrowborder" valign="top" width="21.23787621237876%" headers="mcps1.3.2.4.2.5.1.1 "><p id="deh_02_0022__p1872514451016">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.44765523447655%" headers="mcps1.3.2.4.2.5.1.2 "><p id="deh_02_0022__p12269175511291">String</p>
</td>
<td class="cellrowborder" valign="top" width="24.48755124487551%" headers="mcps1.3.2.4.2.5.1.3 "><p id="deh_02_0022__p147251646108">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="30.826917308269174%" headers="mcps1.3.2.4.2.5.1.4 "><p id="deh_02_0022__p6725747104">Specifies the project ID.</p>
<p id="deh_02_0022__p7376194915119">For details about how to obtain the project ID, see <a href="https://docs.otc.t-systems.com/en-us/api/apiug/apig-en-api-180328009.html" target="_blank" rel="noopener noreferrer">Obtaining Required Information</a>.</p>
</td>
</tr>
<tr id="deh_02_0022__row184436404555"><td class="cellrowborder" valign="top" width="21.23787621237876%" headers="mcps1.3.2.4.2.5.1.1 "><p id="deh_02_0022__p164455404556">dedicated_host_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.44765523447655%" headers="mcps1.3.2.4.2.5.1.2 "><p id="deh_02_0022__p29241051175512">String</p>
</td>
<td class="cellrowborder" valign="top" width="24.48755124487551%" headers="mcps1.3.2.4.2.5.1.3 "><p id="deh_02_0022__p1592535185519">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="30.826917308269174%" headers="mcps1.3.2.4.2.5.1.4 "><p id="deh_02_0022__p1544524011550">Specifies the DeH ID.</p>
<p id="deh_02_0022__p858154817367">You can obtain the DeH ID from the DeH console or using the <a href="deh_02_0020.html">Querying DeHs</a> API.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="deh_02_0022__section60100823"><h4 class="sectiontitle">Request</h4><ul id="deh_02_0022__ul887813256236"><li id="deh_02_0022__li138781325112314">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="deh_02_0022__table18900131133217" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="deh_02_0022__row1490010111322"><th align="left" class="cellrowborder" valign="top" width="16.89%" id="mcps1.3.3.2.1.1.2.6.1.1"><p id="deh_02_0022__p19198201311324"><strong id="deh_02_0022__b10668203213382">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.629999999999999%" id="mcps1.3.3.2.1.1.2.6.1.2"><p id="deh_02_0022__p1198181311323"><strong id="deh_02_0022__b14694733183813">In</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.27%" id="mcps1.3.3.2.1.1.2.6.1.3"><p id="deh_02_0022__p719881343216"><strong id="deh_02_0022__b775353410384">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.84%" id="mcps1.3.3.2.1.1.2.6.1.4"><p id="deh_02_0022__p51981138327"><strong id="deh_02_0022__b1108270840">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.37%" id="mcps1.3.3.2.1.1.2.6.1.5"><p id="deh_02_0022__p819916134329"><strong id="deh_02_0022__b19418183673813">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_02_0022__row109009111326"><td class="cellrowborder" valign="top" width="16.89%" headers="mcps1.3.3.2.1.1.2.6.1.1 "><p id="deh_02_0022__p171997138323">limit</p>
</td>
<td class="cellrowborder" valign="top" width="15.629999999999999%" headers="mcps1.3.3.2.1.1.2.6.1.2 "><p id="deh_02_0022__p11199121343220">query</p>
</td>
<td class="cellrowborder" valign="top" width="15.27%" headers="mcps1.3.3.2.1.1.2.6.1.3 "><p id="deh_02_0022__p7199313113219">String</p>
</td>
<td class="cellrowborder" valign="top" width="13.84%" headers="mcps1.3.3.2.1.1.2.6.1.4 "><p id="deh_02_0022__p9199181373213">No</p>
</td>
<td class="cellrowborder" valign="top" width="38.37%" headers="mcps1.3.3.2.1.1.2.6.1.5 "><p id="deh_02_0022__p1199913183220">Specifies the number of records displayed per page.</p>
</td>
</tr>
<tr id="deh_02_0022__row490114117328"><td class="cellrowborder" valign="top" width="16.89%" headers="mcps1.3.3.2.1.1.2.6.1.1 "><p id="deh_02_0022__p191991113123218">marker</p>
</td>
<td class="cellrowborder" valign="top" width="15.629999999999999%" headers="mcps1.3.3.2.1.1.2.6.1.2 "><p id="deh_02_0022__p219981383214">query</p>
</td>
<td class="cellrowborder" valign="top" width="15.27%" headers="mcps1.3.3.2.1.1.2.6.1.3 "><p id="deh_02_0022__p11199111311326">String</p>
</td>
<td class="cellrowborder" valign="top" width="13.84%" headers="mcps1.3.3.2.1.1.2.6.1.4 "><p id="deh_02_0022__p101998131326">No</p>
</td>
<td class="cellrowborder" valign="top" width="38.37%" headers="mcps1.3.3.2.1.1.2.6.1.5 "><p id="deh_02_0022__p91997135323">Specifies the ID of the last record on the previous page. If the <strong id="deh_02_0022__b5191173710123">marker</strong> value is invalid, status code 400 is returned.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="deh_02_0022__li61819292233">Example request<pre class="screen" id="deh_02_0022__screen193606312093">GET https://{Endpoint}/v1.0/9c53a566cb3443ab910cf0daebca90c4/dedicated-hosts/ab910cf0daebca90c4001/servers</pre>
</li></ul>
</div>
<div class="section" id="deh_02_0022__section4036497"><h4 class="sectiontitle">Response</h4><ul id="deh_02_0022__ul153691556122318"><li id="deh_02_0022__li336985682311">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="deh_02_0022__table11556848173211" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="deh_02_0022__row5557104814329"><th align="left" class="cellrowborder" valign="top" width="20.04%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="deh_02_0022__p1212325919325"><strong id="deh_02_0022__b1893867141310">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.02%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="deh_02_0022__p2012311591328"><strong id="deh_02_0022__b52413901320">In</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.11%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="deh_02_0022__p1012335910327"><strong id="deh_02_0022__b5621110101318">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="37.830000000000005%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="deh_02_0022__p1712316597326"><strong id="deh_02_0022__b446881121312">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_02_0022__row755724811327"><td class="cellrowborder" valign="top" width="20.04%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="deh_02_0022__p10123205917329">servers</p>
</td>
<td class="cellrowborder" valign="top" width="21.02%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="deh_02_0022__p11123155915329">body</p>
</td>
<td class="cellrowborder" valign="top" width="21.11%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="deh_02_0022__p1112355917328">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="37.830000000000005%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="deh_02_0022__p412355919328">Specifies the server object.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="deh_02_0022__table15834205233319" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="deh_02_0022__b73206122">server</strong> field description</caption><thead align="left"><tr id="deh_02_0022__row10834185217331"><th align="left" class="cellrowborder" valign="top" width="17.97179717971797%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="deh_02_0022__p550218161346"><strong id="deh_02_0022__b183211215125">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.83218321832183%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="deh_02_0022__p1750212166345"><strong id="deh_02_0022__b1498116513018">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.196019601960195%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="deh_02_0022__p1650215163343"><strong id="deh_02_0022__b236410713016">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_02_0022__row1883565216332"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p18502181620343">addresses</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p10503181693420">Object (string:array)</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p550361611341">Specifies the network attribute of the ECS.</p>
<p id="deh_02_0022__p750310166341">For details, see the <strong id="deh_02_0022__b8524955191716">addresses</strong> field description.</p>
</td>
</tr>
<tr id="deh_02_0022__row14835852143312"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p25031216143414">created</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p19503616113413">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p1850311618345">Specifies the time when the ECS was created.</p>
</td>
</tr>
<tr id="deh_02_0022__row58359522339"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p18503121611344">flavor</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p17503816103413">Object (string:string)</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p19503616163417">Specifies the ECS flavor.</p>
</td>
</tr>
<tr id="deh_02_0022__row128354524334"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p10504151693420">id</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p20504416123410">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p1504101614340">Specifies the ECS ID in UUID format.</p>
</td>
</tr>
<tr id="deh_02_0022__row58351352193319"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p1504151614345">name</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p155041416123410">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p18504171653411">Specifies the ECS name.</p>
</td>
</tr>
<tr id="deh_02_0022__row1983525233310"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p1350416169346">status</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p14504316103417">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p12504121611349">Specifies the ECS status.</p>
<p id="deh_02_0022__p10504171613413">Options:</p>
<p id="deh_02_0022__p65046167344"><strong id="deh_02_0022__b45471440141818">ACTIVE</strong>, <strong id="deh_02_0022__b11548640121810">BUILD</strong>, <strong id="deh_02_0022__b1854924061820">DELETED</strong>, <strong id="deh_02_0022__b15552240121819">ERROR</strong>, <strong id="deh_02_0022__b155531440101814">HARD_REBOOT</strong>, <strong id="deh_02_0022__b355413405185">MIGRATING</strong>, <strong id="deh_02_0022__b9555174011188">PASSWORD</strong>, <strong id="deh_02_0022__b755654061816">PAUSED</strong>, <strong id="deh_02_0022__b185571140191819">REBOOT</strong>, <strong id="deh_02_0022__b1155864071814">REBUILD</strong>, <strong id="deh_02_0022__b16559144011183">RESIZE</strong>, <strong id="deh_02_0022__b856014051812">REVERT_RESIZE</strong>, <strong id="deh_02_0022__b256184081816">SHUTOFF</strong>, <strong id="deh_02_0022__b856219409187">SHELVED</strong>, <strong id="deh_02_0022__b6563184071811">SHELVED_OFFLOADED</strong>, <strong id="deh_02_0022__b95641940141820">SOFT_DELETED</strong>, <strong id="deh_02_0022__b65652401188">SUSPENDED</strong>, and <strong id="deh_02_0022__b115661403187">VERIFY_RESIZE</strong></p>
</td>
</tr>
<tr id="deh_02_0022__row12836195215330"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p1250414163348">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p6504161693418">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p3504131613344">Specifies the ECS tenant ID in UUID format.</p>
</td>
</tr>
<tr id="deh_02_0022__row158366529334"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p12505616113418">updated</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p1750591620343">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p8505016203415">Specifies the time when the ECS was updated last time.</p>
</td>
</tr>
<tr id="deh_02_0022__row138363522338"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p2505201617341">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p6505131611348">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p18505141613349">Specifies the ID of the user who has created the ECS. The value is in UUID format.</p>
</td>
</tr>
<tr id="deh_02_0022__row12836205220334"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p5505161653410">task_state</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p85052164343">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p850516168340">Specifies the ECS task status.</p>
</td>
</tr>
<tr id="deh_02_0022__row783635213332"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p850501673416">image</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p250591614343">Object (string:string)</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p1550551616343">Specifies the ECS image.</p>
</td>
</tr>
<tr id="deh_02_0022__row083725253314"><td class="cellrowborder" valign="top" width="17.97179717971797%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="deh_02_0022__p165051116123411">metadata</p>
</td>
<td class="cellrowborder" valign="top" width="21.83218321832183%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="deh_02_0022__p950581623419">Object (string:string)</p>
</td>
<td class="cellrowborder" valign="top" width="60.196019601960195%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="deh_02_0022__p135051216193420">Specifies the ECS metadata.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="deh_02_0022__li11341859202313">Example response<pre class="screen" id="deh_02_0022__screen10438909154110">{
"servers": [
{
"addresses": {
"68269e6e-4a27-441b-8029-35373ad50bd9": [
{
"addr": "192.168.0.3",
"version": 4
}
]
},
"created": "2012-09-07T16:56:37Z",
"flavor": {
"id": "1"
},
"id": "05184ba3-00ba-4fbc-b7a2-03b62b884931",
"metadata": {
"os_type": "Linux"
},
"name": "new-server-test",
"status": "ACTIVE",
"tenant_id": "openstack",
"updated": "2012-09-07T16:56:37Z",
"user_id": "fake",
"task_state": "",
"image": {
"id": "1ce5800a-e487-4c1b-b264-3353a39e2b4b"
}
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="deh_02_0022__section56925253"><h4 class="sectiontitle">Status Code</h4><p id="deh_02_0022__p5847780">See <a href="deh_02_0016.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="deh_02_0017.html">API</a></div>
</div>
</div>