forked from docs/doc-exports
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>
85 lines
7.4 KiB
HTML
85 lines
7.4 KiB
HTML
<a name="EN-US_TOPIC_0065817714"></a><a name="EN-US_TOPIC_0065817714"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining <span id="text1422615309522">ECS</span> Metadata with a Specified Key</h1>
|
|
<div id="body1499652824862"><div class="section" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_section56350203"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p40174512">This API is used to obtain <span id="EN-US_TOPIC_0065817714__text5302202823013">ECS</span> metadata with a specified key.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_section37389779"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p17816132418199">GET /v2.1/{project_id}/servers/{server_id}/metadata/{key}</p>
|
|
<p id="EN-US_TOPIC_0065817714__p011347318">GET /v2/{project_id}/servers/{server_id}/metadata/{key}</p>
|
|
<div class="p" id="EN-US_TOPIC_0065817714__p1162384518224"><a href="#EN-US_TOPIC_0065817714__en-us_topic_0057973169_table32475667">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0065817714__en-us_topic_0057973169_table32475667"></a><a name="en-us_topic_0057973169_table32475667"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_table32475667" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_row44937496"><th align="left" class="cellrowborder" valign="top" width="22.24%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0065817714__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.87%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0065817714__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.88999999999999%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0065817714__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_row1664874"><td class="cellrowborder" valign="top" width="22.24%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p637140">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p51608407">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.88999999999999%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817714__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_row41565035"><td class="cellrowborder" valign="top" width="22.24%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p11324657">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p44882061">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.88999999999999%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p11568292">Specifies the <span id="EN-US_TOPIC_0065817714__text472305263010">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_row1922793418562"><td class="cellrowborder" valign="top" width="22.24%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p1922793475613">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.87%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p122714346560">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.88999999999999%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p2022718345561">Specifies the <span id="EN-US_TOPIC_0065817714__text1396473235212">ECS</span> metadata key.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_section10950734"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p53519844">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_section31447750"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0065817714__p187131526192318"><a href="#EN-US_TOPIC_0065817714__en-us_topic_0057973169_table40140147">Table 2</a> describes the response parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0065817714__en-us_topic_0057973169_table40140147"></a><a name="en-us_topic_0057973169_table40140147"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_table40140147" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_row18362576"><th align="left" class="cellrowborder" valign="top" width="29.752975297529748%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p10973688">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.752975297529748%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p16453549">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.49404940494049%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_p40683740">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_row7048614"><td class="cellrowborder" valign="top" width="29.752975297529748%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973165_p48441714">meta</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.752975297529748%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0065817714__p91831743181514">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.49404940494049%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973165_p13467047">Specifies the user-defined metadata key-value pair.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_section14594295"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0065817714__p3921139102813">Obtain the metadata with a specified key of an ECS.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0065817714__screen1344831732410">GET https://{endpoint}/v2/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1
|
|
GET https://{endpoint}/v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0065817714__section148361253124314"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0065817714__screen14840653164315">{
|
|
"meta": {
|
|
"key1": "value1"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0065817714__en-us_topic_0057973169_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_0065817681.html">Metadata Management</a></div>
|
|
</div>
|
|
</div>
|
|
|