doc-exports/docs/deh/api-ref/deh_05_0903.html
Zaoxu, Li 1c7fe15e7b deh_api_1215
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com>
Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
2024-09-27 15:02:29 +00:00

118 lines
8.5 KiB
HTML

<a name="deh_05_0903"></a><a name="deh_05_0903"></a>
<h1 class="topictitle1">Querying Tags of a DeH</h1>
<div id="body1539073522350"><div class="section" id="deh_05_0903__section54478915181842"><h4 class="sectiontitle">Function</h4><ul id="deh_05_0903__ul246771516486"><li id="deh_05_0903__li56841145121014">This API is used to query tags of a DeH.</li></ul>
<ul id="deh_05_0903__ul319691018485"><li id="deh_05_0903__li2881125315108">Tag Management Service (TMS) uses this API to query all tags of a DeH.</li></ul>
</div>
<div class="section" id="deh_05_0903__en-us_topic_0057972838_section58912114"><h4 class="sectiontitle">URI</h4><p id="deh_05_0903__p18887195216117">GET /v1.0/{project_id}/dedicated-host-tags/{dedicated_host_id}/tags</p>
<p id="deh_05_0903__p1220425619391"><a href="#deh_05_0903__table291625114015">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="deh_05_0903__table291625114015"></a><a name="table291625114015"></a><table cellpadding="4" cellspacing="0" summary="" id="deh_05_0903__table291625114015" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters description</caption><thead align="left"><tr id="deh_05_0903__row291610574011"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.1"><p id="deh_05_0903__p64521444164912"><strong id="deh_05_0903__b11812174710154">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.2"><p id="deh_05_0903__p16452114494915"><strong id="deh_05_0903__b618354941512">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.3"><p id="deh_05_0903__p69548610432"><strong id="deh_05_0903__b11103250201516">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.4.2.5.1.4"><p id="deh_05_0903__p94521344104916"><strong id="deh_05_0903__b1259175131515">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_05_0903__row69161956409"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="deh_05_0903__p14452174415495">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.2 "><p id="deh_05_0903__p134521443499">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="deh_05_0903__p59527664313">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="deh_05_0903__p10452244104914">Specifies the project ID.</p>
<p id="deh_05_0903__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_05_0903__row129169504014"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.1 "><p id="deh_05_0903__p3452144416495">dedicated_host_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.2 "><p id="deh_05_0903__p6452124416491">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.3 "><p id="deh_05_0903__p095086134310">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.4.2.5.1.4 "><p id="deh_05_0903__p1945284419497">Specifies the DeH ID.</p>
<p id="deh_05_0903__p858154817367">You can obtain the value from the DeH console or using the API in <a href="deh_02_0020.html">Querying DeHs</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="deh_05_0903__en-us_topic_0057972838_section60446980"><h4 class="sectiontitle">Request</h4><p id="deh_05_0903__p83124441414">None</p>
</div>
<div class="section" id="deh_05_0903__section40529449"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="deh_05_0903__table07162219477" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="deh_05_0903__row47292204712"><th align="left" class="cellrowborder" valign="top" width="23.002300230023003%" id="mcps1.3.4.2.2.4.1.1"><p id="deh_05_0903__p15958163412475"><strong id="deh_05_0903__b172826101614">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.99239923992399%" id="mcps1.3.4.2.2.4.1.2"><p id="deh_05_0903__p695823454716"><strong id="deh_05_0903__b771127141611">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.00530053005301%" id="mcps1.3.4.2.2.4.1.3"><p id="deh_05_0903__p795883419479"><strong id="deh_05_0903__b1865285162">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_05_0903__row167311223479"><td class="cellrowborder" valign="top" width="23.002300230023003%" headers="mcps1.3.4.2.2.4.1.1 "><p id="deh_05_0903__p1295953413478">tags</p>
</td>
<td class="cellrowborder" valign="top" width="23.99239923992399%" headers="mcps1.3.4.2.2.4.1.2 "><p id="deh_05_0903__p79591234174718">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="53.00530053005301%" headers="mcps1.3.4.2.2.4.1.3 "><p id="deh_05_0903__p159591834194710">Specifies the list of tags.</p>
<p id="deh_05_0903__p14801334144510">For details, see <a href="#deh_05_0903__table20667652184712">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="deh_05_0903__table20667652184712"></a><a name="table20667652184712"></a><table cellpadding="4" cellspacing="0" summary="" id="deh_05_0903__table20667652184712" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="deh_05_0903__b841718267387">tag</strong> field description</caption><thead align="left"><tr id="deh_05_0903__row12668145216475"><th align="left" class="cellrowborder" valign="top" width="22.82228222822282%" id="mcps1.3.4.3.2.4.1.1"><p id="deh_05_0903__p12281578489"><strong id="deh_05_0903__b2911728112313">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.172417241724172%" id="mcps1.3.4.3.2.4.1.2"><p id="deh_05_0903__p428177164816"><strong id="deh_05_0903__b9116181713164">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.00530053005301%" id="mcps1.3.4.3.2.4.1.3"><p id="deh_05_0903__p2289720487"><strong id="deh_05_0903__b8334174712917">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="deh_05_0903__row10668852154714"><td class="cellrowborder" valign="top" width="22.82228222822282%" headers="mcps1.3.4.3.2.4.1.1 "><p id="deh_05_0903__p1229137154817">key</p>
</td>
<td class="cellrowborder" valign="top" width="24.172417241724172%" headers="mcps1.3.4.3.2.4.1.2 "><p id="deh_05_0903__p8296713486">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.00530053005301%" headers="mcps1.3.4.3.2.4.1.3 "><p id="deh_05_0903__p11293717485">Specifies the tag key.</p>
</td>
</tr>
<tr id="deh_05_0903__row16668125294713"><td class="cellrowborder" valign="top" width="22.82228222822282%" headers="mcps1.3.4.3.2.4.1.1 "><p id="deh_05_0903__p112918764813">value</p>
</td>
<td class="cellrowborder" valign="top" width="24.172417241724172%" headers="mcps1.3.4.3.2.4.1.2 "><p id="deh_05_0903__p129197184819">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.00530053005301%" headers="mcps1.3.4.3.2.4.1.3 "><p id="deh_05_0903__p162917717481">Specifies the tag value.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="deh_05_0903__section1768432015261"><h4 class="sectiontitle">Example Request</h4><p id="deh_05_0903__p5710134251617">Query the tags of the DeH <strong id="deh_05_0903__b73745432287">74259164-e63a-4ad9-9c77-a1bd2c9aa187</strong>.</p>
<pre class="screen" id="deh_05_0903__screen131583424119">GET https://{Endpoint}/v1.0/9c53a566cb3443ab910cf0daebca90c4/dedicated-host-tags/74259164-e63a-4ad9-9c77-a1bd2c9aa187/tags</pre>
</div>
<div class="section" id="deh_05_0903__section156132912611"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="deh_05_0903__screen14210321463">{
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}</pre>
</div>
<div class="section" id="deh_05_0903__section9992350"><h4 class="sectiontitle">Status Code</h4><p id="deh_05_0903__p5641212">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_05_0900.html">DeH Tag Management</a></div>
</div>
</div>