Files
doc-exports/docs/ucs/api-ref/RegisterClusterGroup.html
qiujiandong1 535e30e292 UCS API initial update 20250523 version
Reviewed-by: Gergo-Bence Lorincz <a200452876@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2026-02-23 09:12:31 +00:00

206 lines
14 KiB
HTML

<a name="RegisterClusterGroup"></a><a name="RegisterClusterGroup"></a>
<h1 class="topictitle1">Creating a Fleet</h1>
<div id="body1521315101599"><div class="section" id="RegisterClusterGroup__section72131110798"><h4 class="sectiontitle">Function</h4><p id="RegisterClusterGroup__p1721491016915">This API is used to create a fleet. You can select clusters during fleet creation.</p>
</div>
<div class="section" id="RegisterClusterGroup__section10215310992"><h4 class="sectiontitle">URI</h4><p id="RegisterClusterGroup__p821713101598">POST /v1/clustergroups</p>
</div>
<div class="section" id="RegisterClusterGroup__section1021816109911"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RegisterClusterGroup__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the request header</caption><thead align="left"><tr id="RegisterClusterGroup__row421913101691"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="RegisterClusterGroup__p16221810795">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="RegisterClusterGroup__p1322218107914">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="RegisterClusterGroup__p192237101892">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="RegisterClusterGroup__p102247104919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RegisterClusterGroup__row1221951011913"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="RegisterClusterGroup__p162257101694">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="RegisterClusterGroup__p322641017919">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="RegisterClusterGroup__p62271610798">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="RegisterClusterGroup__p1266617331861">Identity authentication information. 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.</p>
</td>
</tr>
<tr id="RegisterClusterGroup__row531295912010"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="RegisterClusterGroup__p20110172212422">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="RegisterClusterGroup__p411018227429">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="RegisterClusterGroup__p7110152218429">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="RegisterClusterGroup__p12110172216422">Message body type (format). Only <strong id="RegisterClusterGroup__b205283810641720">application/json</strong> is supported.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RegisterClusterGroup__request_RegisterClusterGroup" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request body</caption><thead align="left"><tr id="RegisterClusterGroup__row72322109916"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="RegisterClusterGroup__p1423414101919">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="RegisterClusterGroup__p623515102918">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="RegisterClusterGroup__p42362010897">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="RegisterClusterGroup__p2238410693">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RegisterClusterGroup__row2023241019918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="RegisterClusterGroup__p1623941018916">metadata</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="RegisterClusterGroup__p1224017101691">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="RegisterClusterGroup__p1024113102915"><a href="#RegisterClusterGroup__request_RegisterClusterGroupObjectMeta">RegisterClusterGroupObjectMeta</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="RegisterClusterGroup__p1724221015912">Fleet metadata information</p>
</td>
</tr>
<tr id="RegisterClusterGroup__row11232181013916"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="RegisterClusterGroup__p7243141013915">spec</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="RegisterClusterGroup__p6244121018915">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="RegisterClusterGroup__p524619102912"><a href="#RegisterClusterGroup__request_RegisterClusterGroupSpec">RegisterClusterGroupSpec</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="RegisterClusterGroup__p92471510598">Attributes</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RegisterClusterGroup__request_RegisterClusterGroupObjectMeta"></a><a name="request_RegisterClusterGroupObjectMeta"></a><table cellpadding="4" cellspacing="0" summary="" id="RegisterClusterGroup__request_RegisterClusterGroupObjectMeta" frame="border" border="1" rules="all"><caption><b>Table 3 </b>RegisterClusterGroupObjectMeta</caption><thead align="left"><tr id="RegisterClusterGroup__row424816100920"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="RegisterClusterGroup__p425081010918">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="RegisterClusterGroup__p1525191013917">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="RegisterClusterGroup__p11252210293">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="RegisterClusterGroup__p142531510791">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RegisterClusterGroup__row3248410296"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="RegisterClusterGroup__p1725420102912">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="RegisterClusterGroup__p1255131012918">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="RegisterClusterGroup__p1256181016918">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="RegisterClusterGroup__p2025719109919">Fleet name</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RegisterClusterGroup__request_RegisterClusterGroupSpec"></a><a name="request_RegisterClusterGroupSpec"></a><table cellpadding="4" cellspacing="0" summary="" id="RegisterClusterGroup__request_RegisterClusterGroupSpec" frame="border" border="1" rules="all"><caption><b>Table 4 </b>RegisterClusterGroupSpec</caption><thead align="left"><tr id="RegisterClusterGroup__row17258121015914"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.1"><p id="RegisterClusterGroup__p126017104920">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.2"><p id="RegisterClusterGroup__p13261181014917">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.3"><p id="RegisterClusterGroup__p19262210795">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.5.2.5.1.4"><p id="RegisterClusterGroup__p1826410103919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RegisterClusterGroup__row7258110894"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="RegisterClusterGroup__p1265610491">clusterIds</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="RegisterClusterGroup__p626615108911">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="RegisterClusterGroup__p1126715107914">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="RegisterClusterGroup__p20268111014914">IDs of associated clusters</p>
</td>
</tr>
<tr id="RegisterClusterGroup__row1625812101298"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="RegisterClusterGroup__p162690102095">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="RegisterClusterGroup__p12708101392">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="RegisterClusterGroup__p1727221019912">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="RegisterClusterGroup__p1027318103911">Fleet description</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RegisterClusterGroup__section32741310695"><h4 class="sectiontitle">Response Parameters</h4><p id="RegisterClusterGroup__p10275910295"><strong id="RegisterClusterGroup__b195751261743956">Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RegisterClusterGroup__response_ClusterGroupResp" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameter in the response body</caption><thead align="left"><tr id="RegisterClusterGroup__row142767101098"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="RegisterClusterGroup__p9278181010920">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="RegisterClusterGroup__p152801010599">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="RegisterClusterGroup__p3281111016912">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RegisterClusterGroup__row527620109916"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="RegisterClusterGroup__p1328241013912">uid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="RegisterClusterGroup__p13283210492">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="RegisterClusterGroup__p128411012911">Fleet UID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RegisterClusterGroup__section228517105911"><h4 class="sectiontitle">Example Requests</h4><p id="RegisterClusterGroup__p228611108918">Creating a fleet and (optional) adding clusters to the fleet</p>
<pre class="screen" id="RegisterClusterGroup__screen102897101990">{
"metadata" : {
"name" : "group02281605"
},
"spec" : {
"clusterIds" : [ "514c1a3c-8ec7-11ec-b384-0255ac100189", "d4804da3-8f03-11ec-b384-0255ac100189" ],
"description" : "aaaaaaaaa"
}
}</pre>
</div>
<div class="section" id="RegisterClusterGroup__section1129911012916"><h4 class="sectiontitle">Example Responses</h4><p id="RegisterClusterGroup__p123001108911"><strong id="RegisterClusterGroup__b71302980043956">Status code: 201</strong></p>
<p id="RegisterClusterGroup__p1130113100919">The UID of the fleet that has been created is returned.</p>
<pre class="screen" id="RegisterClusterGroup__screen1630241015915">{
"uid" : "6efb4a18-2fa4-11ee-ad1d-0255ac1001c4"
}</pre>
</div>
<div class="section" id="RegisterClusterGroup__section630510101795"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RegisterClusterGroup__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="RegisterClusterGroup__row203061710893"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="RegisterClusterGroup__p143074102916">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="RegisterClusterGroup__p12308310497">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RegisterClusterGroup__row23061610596"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="RegisterClusterGroup__p163099103917">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="RegisterClusterGroup__p153103101914">The UID of the fleet that has been created is returned.</p>
</td>
</tr>
<tr id="RegisterClusterGroup__row17306910896"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="RegisterClusterGroup__p14312181011912">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="RegisterClusterGroup__p931316102916">Client request error. The server could not execute the request.</p>
</td>
</tr>
<tr id="RegisterClusterGroup__row1330613103910"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="RegisterClusterGroup__p12314171012920">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="RegisterClusterGroup__p8315151016910">The server refused the request.</p>
</td>
</tr>
<tr id="RegisterClusterGroup__row103061310194"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="RegisterClusterGroup__p1231619101191">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="RegisterClusterGroup__p531715107911">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RegisterClusterGroup__section3318110895"><h4 class="sectiontitle">Error Codes</h4><p id="RegisterClusterGroup__p03190101499">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000001.html">Fleets</a></div>
</div>
</div>