doc-exports/docs/cce/api-ref/cce_02_0244.html
Dong, Qiu Jian 3bfd56205d CCE API update -20240401 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2024-04-16 09:26:07 +00:00

215 lines
14 KiB
HTML

<a name="cce_02_0244"></a><a name="cce_02_0244"></a>
<h1 class="topictitle1">Listing All Nodes in a Cluster</h1>
<div id="body1521448221833"><div class="section" id="cce_02_0244__section1686113493165"><h4 class="sectiontitle">Function</h4><p id="cce_02_0244__p209621357141610">This API is used to obtain details about all nodes in a cluster with a specified cluster ID.</p>
</div>
<div class="section" id="cce_02_0244__section8403243161416"><h4 class="sectiontitle">URI</h4><p id="cce_02_0244__p23575517439">GET /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes</p>
<p id="cce_02_0244__p2037362514220"><a href="#cce_02_0244__table2027961241820">Table 1</a> describes the parameters of the API.</p>
<div class="tablenoborder"><a name="cce_02_0244__table2027961241820"></a><a name="table2027961241820"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0244__table2027961241820" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="cce_02_0244__row122809120186"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.4.1.1"><p id="cce_02_0244__p91421758131813">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.04%" id="mcps1.3.2.4.2.4.1.2"><p id="cce_02_0244__p101421758131816">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.96%" id="mcps1.3.2.4.2.4.1.3"><p id="cce_02_0244__p19143115818187">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0244__row32801312121810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.4.1.1 "><p id="cce_02_0244__p1714415589184">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="12.04%" headers="mcps1.3.2.4.2.4.1.2 "><p id="cce_02_0244__p814518580186">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="67.96%" headers="mcps1.3.2.4.2.4.1.3 "><p id="cce_02_0244__p5145175891811">Project ID. For details about how to obtain the project ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
</td>
</tr>
<tr id="cce_02_0244__row1649094164612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.4.1.1 "><p id="cce_02_0244__p749015414462">cluster_id</p>
</td>
<td class="cellrowborder" valign="top" width="12.04%" headers="mcps1.3.2.4.2.4.1.2 "><p id="cce_02_0244__p1849084134615">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="67.96%" headers="mcps1.3.2.4.2.4.1.3 "><p id="cce_02_0244__p8491141114617">Cluster ID. For details about how to obtain the cluster ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="cce_02_0244__section947084713911"><h4 class="sectiontitle">Request</h4><p id="cce_02_0244__p17793161499"><strong id="cce_02_0244__b4442205054519">Request parameters</strong>:</p>
<p id="cce_02_0244__p357395144511"><a href="#cce_02_0244__table13638079467">Table 2</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="cce_02_0244__table13638079467"></a><a name="table13638079467"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0244__table13638079467" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="cce_02_0244__en-us_topic_0102499074_row55001954122614"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.4.1.1"><p id="cce_02_0244__en-us_topic_0102499074_p115009545264">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.4.2.4.1.2"><p id="cce_02_0244__en-us_topic_0102499074_p175001547265">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61%" id="mcps1.3.3.4.2.4.1.3"><p id="cce_02_0244__en-us_topic_0102499074_p16500154162611">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0244__en-us_topic_0102499074_row199801811203412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.4.1.1 "><p id="cce_02_0244__en-us_topic_0102499074_p69808112344">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.4.2.4.1.2 "><p id="cce_02_0244__en-us_topic_0102499074_p3980111103414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="61%" headers="mcps1.3.3.4.2.4.1.3 "><p id="cce_02_0244__en-us_topic_0102499074_p169801011203416">Message body type (format). Possible values:</p>
<ul id="cce_02_0244__en-us_topic_0102499074_ul7385444163617"><li id="cce_02_0244__en-us_topic_0102499074_li18385114483612">application/json;charset=utf-8</li><li id="cce_02_0244__en-us_topic_0102499074_li3516132853714">application/json</li></ul>
</td>
</tr>
<tr id="cce_02_0244__en-us_topic_0102499074_row3500125412260"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.4.1.1 "><p id="cce_02_0244__en-us_topic_0102499074_p105001654202618">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.4.2.4.1.2 "><p id="cce_02_0244__en-us_topic_0102499074_p20500954182618">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="61%" headers="mcps1.3.3.4.2.4.1.3 "><p id="cce_02_0244__p18824197845">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 on how to obtain a user token, see <a href="cce_02_0004.html">API Usage Guidelines</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="cce_02_0244__p1611232212217"><strong id="cce_02_0244__b18637103252113">Example request</strong>:</p>
<p id="cce_02_0244__p10992402120">N/A</p>
</div>
<div class="section" id="cce_02_0244__section61819725020"><h4 class="sectiontitle">Response</h4><p id="cce_02_0244__en-us_topic_0079614900_p2018733"><strong id="cce_02_0244__b178106474810">Response parameters</strong>:</p>
<p id="cce_02_0244__p16966318249"><a href="#cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_ref458774242">Table 3</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_ref458774242"></a><a name="en-us_topic_0079616779_en-us_topic_0079614912_ref458774242"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_ref458774242" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_row38450714"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_p27500114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="cce_02_0244__p1654581422214">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.4.4.2.4.1.3"><p id="cce_02_0244__p125451914132219">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_row48220637"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_02_0244__p44731858185518">kind</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_02_0244__p57145269553">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_02_0244__p12712326175517">API type. The value is fixed to <strong id="cce_02_0244__b1228811372347">List</strong>.</p>
</td>
</tr>
<tr id="cce_02_0244__row1698782994313"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_02_0244__p144741580551">apiVersion</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_02_0244__p6707526185513">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_02_0244__p1770492695518">API version. The value is fixed at <strong id="cce_02_0244__b2014526754165210">v3</strong>.</p>
</td>
</tr>
<tr id="cce_02_0244__en-us_topic_0079616779_en-us_topic_0079614912_row28135397"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="cce_02_0244__p9274125074915">items</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="cce_02_0244__p861959163213">Object</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.4.4.2.4.1.3 "><p id="cce_02_0244__p256924217343">A list of details for all nodes in the current cluster. You can filter nodes by <strong id="cce_02_0244__b1799063512516">items.metadata.name</strong>. For more information, see <a href="cce_02_0243.html#cce_02_0243__en-us_topic_0079616779_en-us_topic_0079614912_ref458774242">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="cce_02_0244__en-us_topic_0079614900_p24465425"><strong id="cce_02_0244__b1066914526119">Example response</strong>:</p>
</div>
<pre class="screen" id="cce_02_0244__screen1242411171173">{
"kind": "List",
"apiVersion": "v3",
"items": [
{
"kind": "Node",
"apiversion": "v3",
"metadata": {
"name": "myhost",
"uid": "4d1ecb2c-229a-11e8-9c75-0255ac100ceb",
"creationTimestamp": "2020-02-02 07:37:24.005071325 +0000 UTC",
"updateTimestamp": "2020-02-02 07:44:04.965500815 +0000 UTC",
"annotations": {
"kubernetes.io/node-pool.id": "eu-de-01#s1.medium#EulerOS 2.5"
}
},
"spec": {
"flavor": "s1.medium",
"az": "eu-de-01",
"os": "EulerOS 2.5",
"login": {
"sshKey": "KeyPair-demo"
},
"rootVolume": {
"volumetype": "SAS",
"size": 40
},
"dataVolumes": [
{
"volumetype": "SAS",
"size": 100
}
],
<span id="cce_02_0244__ph104451541163212"> "storage": {</span>
<span id="cce_02_0244__ph3445134117325"> "storageSelectors": [</span>
<span id="cce_02_0244__ph18445164114321"> {</span>
<span id="cce_02_0244__ph16445641113214"> "name": "cceUse",</span>
<span id="cce_02_0244__ph10445741153213"> "storageType": "evs",</span>
<span id="cce_02_0244__ph11445154116327"> "matchLabels": {</span>
<span id="cce_02_0244__ph2445341123210"> "size": "100",</span>
<span id="cce_02_0244__ph144451741153210"> "volumeType": "SAS",</span>
<span id="cce_02_0244__ph844504143219"> "count": "1"</span>
<span id="cce_02_0244__ph54459419323"> }</span>
<span id="cce_02_0244__ph1944615410327"> }</span>
<span id="cce_02_0244__ph144468413329"> ],</span>
<span id="cce_02_0244__ph16446241183217"> "storageGroups": [</span>
<span id="cce_02_0244__ph84461841203212"> {</span>
<span id="cce_02_0244__ph3446341183213"> "name": "vgpaas",</span>
<span id="cce_02_0244__ph244618413325"> "selectorNames": [</span>
<span id="cce_02_0244__ph16446341133213"> "cceUse"</span>
<span id="cce_02_0244__ph044684173216"> ],</span>
<span id="cce_02_0244__ph17446641123212"> "cceManaged": true,</span>
<span id="cce_02_0244__ph644611418329"> "virtualSpaces": [</span>
<span id="cce_02_0244__ph84467414328"> {</span>
<span id="cce_02_0244__ph044614113216"> "name": "runtime",</span>
<span id="cce_02_0244__ph144613416321"> "size": "90%"</span>
<span id="cce_02_0244__ph944714111327"> },</span>
<span id="cce_02_0244__ph18447114193211"> {</span>
<span id="cce_02_0244__ph844784119320"> "name": "kubernetes",</span>
<span id="cce_02_0244__ph14447941133217"> "size": "10%"</span>
<span id="cce_02_0244__ph1644764115329"> }</span>
<span id="cce_02_0244__ph144716415325"> ]</span>
<span id="cce_02_0244__ph194478415325"> }</span>
<span id="cce_02_0244__ph344714416321"> ]</span>
<span id="cce_02_0244__ph12447114113214"> },</span>
"publicIP": {
"eip": {
"bandwidth": {}
}
},
"nodeNicSpec": {
"primaryNic": {
"subnetId": "c90b3ce5-e1f1-4c87-a006-644d78846438"
}
},
"billingMode": 0
},
"status": {
"phase": "Active",
"serverId": "456789abc-9368-46f3-8f29-d1a95622a568",
"publicIP": "10.34.56.78",
"privateIP": "192.168.1.23"
}
}
]
}</pre>
<div class="section" id="cce_02_0244__s50f1049a6a4d404c895cf636eb8f3bf1"><h4 class="sectiontitle">Status Code</h4><p id="cce_02_0244__en-us_topic_0079614900_p21869221"><a href="#cce_02_0244__en-us_topic_0079614900_table46761928">Table 4</a> describes the status code of this API.</p>
<div class="tablenoborder"><a name="cce_02_0244__en-us_topic_0079614900_table46761928"></a><a name="en-us_topic_0079614900_table46761928"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_02_0244__en-us_topic_0079614900_table46761928" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="cce_02_0244__en-us_topic_0079614900_row33254664"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.2.3.1.1"><p id="cce_02_0244__p55616028205955">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.2.3.1.2"><p id="cce_02_0244__p8604418205955">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="cce_02_0244__en-us_topic_0079614900_row41084259"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.3.1.1 "><p id="cce_02_0244__en-us_topic_0079614900_p39490674">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.3.1.2 "><p id="cce_02_0244__en-us_topic_0079614900_p44628050">Information about all the nodes in the specified cluster is successfully obtained.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="cce_02_0244__p347213715512">For details about error status codes, see <a href="cce_02_0084.html">Status Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_02_0092.html">Cluster Management</a></div>
</div>
</div>