forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
202 lines
14 KiB
HTML
202 lines
14 KiB
HTML
<a name="GetLabels"></a><a name="GetLabels"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining Node Labels</h1>
|
|
<div id="body32001227"><div class="section" id="GetLabels__section11699132013199"><h4 class="sectiontitle">Function</h4><p id="GetLabels__p769992041919">This API is used to obtain the labels of all nodes in a cluster.</p>
|
|
</div>
|
|
<div class="section" id="GetLabels__en-us_topic_0000002421907080_atuogenerate_2"><h4 class="sectiontitle">URI</h4><p id="GetLabels__p1770016207191">GET /api/v3/projects/{project_id}/clusters/{cluster_id}/labels</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetLabels__table1700172011910" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="GetLabels__row8700142081910"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="GetLabels__p117003203195">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="GetLabels__p177005207193">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="GetLabels__p1700142014191">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="GetLabels__p167003209192">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetLabels__row3700162001916"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="GetLabels__p1770082017193">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="GetLabels__p9700142012196">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="GetLabels__p1701152015191">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="GetLabels__p19701132017194"><strong id="GetLabels__b870132011191">Details</strong>:</p>
|
|
<p id="GetLabels__p107010201198">Project ID. For details about how to obtain the value, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
|
|
<p id="GetLabels__p177011520191915"><strong id="GetLabels__b15701162012192">Constraints</strong>:</p>
|
|
<p id="GetLabels__p9701120151912">None</p>
|
|
<p id="GetLabels__p47011720131910"><strong id="GetLabels__b5701192017199">Options</strong>:</p>
|
|
<p id="GetLabels__p7701142081913">Project IDs of the account</p>
|
|
<p id="GetLabels__p12701152091916"><strong id="GetLabels__b070132061919">Default value</strong>:</p>
|
|
<p id="GetLabels__p3701720131918">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetLabels__row8700220161919"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="GetLabels__p197011320171918">cluster_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="GetLabels__p15701920101913">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="GetLabels__p127017202197">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="GetLabels__p6701120181917"><strong id="GetLabels__b16701020151916">Details</strong>:</p>
|
|
<p id="GetLabels__p1570102011915">Cluster ID. For details about how to obtain the value, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
|
|
<p id="GetLabels__p12702220151912"><strong id="GetLabels__b1170282010190">Constraints</strong>:</p>
|
|
<p id="GetLabels__p18702820171913">None</p>
|
|
<p id="GetLabels__p177025204196"><strong id="GetLabels__b1702320101918">Options</strong>:</p>
|
|
<p id="GetLabels__p127024204195">Cluster IDs</p>
|
|
<p id="GetLabels__p107024205195"><strong id="GetLabels__b13702192010199">Default value</strong>:</p>
|
|
<p id="GetLabels__p87021200196">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetLabels__section17702220131913"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetLabels__en-us_topic_0000002421907080_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="GetLabels__row16702192011916"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="GetLabels__p770252081919">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="GetLabels__p1670352017199">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="GetLabels__p187031620111915">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="GetLabels__p170372020196">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetLabels__row670292091910"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="GetLabels__p7703112012197">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="GetLabels__p4703192016199">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="GetLabels__p87039204199">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="GetLabels__p14703920171913"><strong id="GetLabels__b3703122011195">Details</strong>:</p>
|
|
<p id="GetLabels__p7703162061912">The request body type or format</p>
|
|
<p id="GetLabels__p17031720161917"><strong id="GetLabels__b1370318209198">Constraints</strong>:</p>
|
|
<p id="GetLabels__p37038206192">The GET method is not verified.</p>
|
|
<p id="GetLabels__p27031220201916"><strong id="GetLabels__b570362021913">Options</strong>:</p>
|
|
<ul id="GetLabels__ul1370318205191"><li id="GetLabels__li20703112012195"><p id="GetLabels__p170342081919"><a name="GetLabels__li20703112012195"></a><a name="li20703112012195"></a>application/json</p>
|
|
</li><li id="GetLabels__li1570312201191"><p id="GetLabels__p47031207195"><a name="GetLabels__li1570312201191"></a><a name="li1570312201191"></a>application/json;charset=utf-8</p>
|
|
</li><li id="GetLabels__li77031220181915"><p id="GetLabels__p1670362019192"><a name="GetLabels__li77031220181915"></a><a name="li77031220181915"></a>application/x-pem-file</p>
|
|
</li><li id="GetLabels__li1770319204190"><p id="GetLabels__p1870342010193"><a name="GetLabels__li1770319204190"></a><a name="li1770319204190"></a>multipart/form-data (used when the <strong id="GetLabels__b2703112015198">FormData</strong> parameter is present)</p>
|
|
</li></ul>
|
|
<p id="GetLabels__p137039209193"><strong id="GetLabels__b1970372071912">Default value</strong>:</p>
|
|
<p id="GetLabels__p770432020192">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetLabels__row20702172017199"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="GetLabels__p17041420101912">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="GetLabels__p127041520161918">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="GetLabels__p207041520171911">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="GetLabels__p9704720131918"><strong id="GetLabels__b97041420121911">Details</strong>:</p>
|
|
<p id="GetLabels__p670418209196">Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see <a href="cce_02_0004.html">Obtaining a User Token</a>.</p>
|
|
<p id="GetLabels__p19704202081919"><strong id="GetLabels__b970432010192">Constraints</strong>:</p>
|
|
<p id="GetLabels__p670432081917">None</p>
|
|
<p id="GetLabels__p870452071913"><strong id="GetLabels__b147041420201913">Options</strong>:</p>
|
|
<p id="GetLabels__p11704132041916">N/A</p>
|
|
<p id="GetLabels__p16704202010196"><strong id="GetLabels__b670422011198">Default value</strong>:</p>
|
|
<p id="GetLabels__p1070413209197">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetLabels__section870414206198"><h4 class="sectiontitle">Response Parameters</h4><p id="GetLabels__p1470414203199"><strong id="GetLabels__b1070412001919">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetLabels__en-us_topic_0000002421907080_response_GetLabelsResponseBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="GetLabels__row19704162011198"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="GetLabels__p370515202195">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="GetLabels__p2705192081920">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="GetLabels__p670542031912">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetLabels__row3704182041913"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="GetLabels__p370592017194">kind</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="GetLabels__p17705122011191">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="GetLabels__p67051420191911"><strong id="GetLabels__b57051820101913">Definition</strong></p>
|
|
<p id="GetLabels__p1070592018193">API type</p>
|
|
<p id="GetLabels__p4705112071913"><strong id="GetLabels__b127051420111920">Constraints</strong></p>
|
|
<p id="GetLabels__p1670512013194">N/A</p>
|
|
<p id="GetLabels__p1070592071912"><strong id="GetLabels__b670562012196">Range</strong></p>
|
|
<p id="GetLabels__p37051620201910">N/A</p>
|
|
<p id="GetLabels__p77051620151911"><strong id="GetLabels__b17705320171910">Default Value</strong></p>
|
|
<p id="GetLabels__p47051920141912">Labels</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetLabels__row15704520151912"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="GetLabels__p9705192041914">apiVersion</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="GetLabels__p11705020121918">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="GetLabels__p157051220191915"><strong id="GetLabels__b770512021914">Definition</strong></p>
|
|
<p id="GetLabels__p3705220101912">API version</p>
|
|
<p id="GetLabels__p470582018198"><strong id="GetLabels__b137051206193">Constraints</strong></p>
|
|
<p id="GetLabels__p1670532031910">N/A</p>
|
|
<p id="GetLabels__p1570562011919"><strong id="GetLabels__b11705520121910">Range</strong></p>
|
|
<p id="GetLabels__p370511201191">N/A</p>
|
|
<p id="GetLabels__p07051120131918"><strong id="GetLabels__b0705320101911">Default Value</strong></p>
|
|
<p id="GetLabels__p1670552016198">v3</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="GetLabels__row67042020111911"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="GetLabels__p18706132019190">spec</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="GetLabels__p18706102018197">Map<String,Map<String,Array<String>>></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="GetLabels__p15706520131911"><strong id="GetLabels__b187061220151919">Definition</strong></p>
|
|
<p id="GetLabels__p570622061912">Node label, which is classified by node pool.</p>
|
|
<ul id="GetLabels__ul1706820141912"><li id="GetLabels__li1670672001910"><p id="GetLabels__p97061020121920"><a name="GetLabels__li1670672001910"></a><a name="li1670672001910"></a><strong id="GetLabels__b1970662091912">key</strong> indicates the node pool ID. The value for the default node pool is <strong id="GetLabels__b270613203197">DefaultPool</strong>.</p>
|
|
</li><li id="GetLabels__li67061020111912"><p id="GetLabels__p11706920151919"><a name="GetLabels__li67061020111912"></a><a name="li67061020111912"></a><strong id="GetLabels__b1470622081913">value</strong> indicates the label in the format of key-value pairs. <strong id="GetLabels__b570610202199">key</strong> indicates the label key, and <strong id="GetLabels__b670620202198">value</strong> indicates the value list corresponding to the label key.</p>
|
|
</li></ul>
|
|
<p id="GetLabels__p1706520131916"><strong id="GetLabels__b147069205193">Constraints</strong></p>
|
|
<p id="GetLabels__p10706132012196">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetLabels__section97068208191"><h4 class="sectiontitle">Example Requests</h4><p id="GetLabels__p57060200191">None</p>
|
|
</div>
|
|
<div class="section" id="GetLabels__section157067203199"><h4 class="sectiontitle">Example Responses</h4><p id="GetLabels__p7706220131914"><strong id="GetLabels__b1770682051914">Status code: 200</strong></p>
|
|
<p id="GetLabels__p270617207192">The node labels have been obtained.</p>
|
|
<pre class="screen" id="GetLabels__screen127061320131917">{
|
|
"kind" : "Labels",
|
|
"apiVersion" : "v3",
|
|
"spec" : {
|
|
"nodePoolId" : {
|
|
"key1" : [ "value1", "value2" ]
|
|
},
|
|
"DefaultPool" : {
|
|
"key2" : [ "value1", "value2" ]
|
|
}
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="GetLabels__section1170762014194"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="GetLabels__en-us_topic_0000002421907080_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="GetLabels__row470792071915"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="GetLabels__p1470712018192">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="GetLabels__p11707420171912">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="GetLabels__row1270732018193"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="GetLabels__p1770719202199">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="GetLabels__p11707202018192">The node labels have been obtained.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="GetLabels__section6707142016199"><h4 class="sectiontitle">Error Codes</h4><p id="GetLabels__p1670712209195">See <a href="cce_02_0250.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="tags_lifecycle_management.html">Tag Management</a></div>
|
|
</div>
|
|
</div>
|
|
|