Files
doc-exports/docs/ucs/api-ref/UpdateClusterRules.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

171 lines
14 KiB
HTML

<a name="UpdateClusterRules"></a><a name="UpdateClusterRules"></a>
<h1 class="topictitle1">Associating a Cluster with Permission Policies</h1>
<div id="body8662426"><div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section112011215185712"><h4 class="sectiontitle">Function</h4><p id="UpdateClusterRules__en-us_topic_0000002506203600_p321118156578">This API is used to associate a cluster with permission policies.</p>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section2021221512574"><h4 class="sectiontitle">URI</h4><p id="UpdateClusterRules__en-us_topic_0000002506203600_p13212715115716">PUT /v1/clusters/{clusterid}/associatedrules</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateClusterRules__en-us_topic_0000002506203600_table132144158575" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameter</caption><thead align="left"><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row82131915185713"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1214121535710">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p13214215125719">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p20214171535714">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p721416159579">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row1321317154570"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1321531525713">clusterid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p13220201518578">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1122161520574">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p3221121595718">Cluster ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section52211615135712"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateClusterRules__en-us_topic_0000002506203600_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row62221615175710"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p192231815185711">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p11224121515720">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p19224131512574">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p2229161525716">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row19222815145719"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p5230715115718">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p7230815125713">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p923091555717">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p12301615135716">Identity authentication information</p>
</td>
</tr>
<tr id="UpdateClusterRules__en-us_topic_0000002506203600_row846135818194"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p20110172212422">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p411018227429">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p7110152218429">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p12110172216422">Request body type or format</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateClusterRules__en-us_topic_0000002506203600_request_UpdateAssociatedRulesRequest" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter in the request body</caption><thead align="left"><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row8231101510571"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p182321115115714">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p82321215135716">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p5243171515710">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p6243015125716">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row923114151575"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p224391510576">ruleIDNamespaces</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p142447152574">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1924491515717">Array of <a href="#UpdateClusterRules__en-us_topic_0000002506203600_request_RuleIDNamespaces">RuleIDNamespaces</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p19245101545719">Permission policy ID and namespaces related to the permission policy</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="UpdateClusterRules__en-us_topic_0000002506203600_request_RuleIDNamespaces"></a><a name="en-us_topic_0000002506203600_request_RuleIDNamespaces"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateClusterRules__en-us_topic_0000002506203600_request_RuleIDNamespaces" frame="border" border="1" rules="all"><caption><b>Table 4 </b>RuleIDNamespaces</caption><thead align="left"><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row724561565714"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p42511615115714">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p182521154575">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p02521615115716">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p625231565718">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row13245101511573"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p02531315135712">ruleIDs</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1825317155572">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p9253121511579">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p02538155572">Permission policy IDs</p>
</td>
</tr>
<tr id="UpdateClusterRules__en-us_topic_0000002506203600_row9245315185711"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p13254121515713">namespaces</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p7254115185710">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p52552156578">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p10255715175719">Namespaces related to permission policies</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section1726281545714"><h4 class="sectiontitle">Response Parameters</h4><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1263171515576">None</p>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section9263131520571"><h4 class="sectiontitle">Example Requests</h4><p id="UpdateClusterRules__en-us_topic_0000002506203600_p16264151535720">Associating a cluster with permission policies</p>
<pre class="screen" id="UpdateClusterRules__en-us_topic_0000002506203600_screen9264615185717">{
"ruleIDNamespaces" : [ {
"ruleIDs" : [ "f6434332-60d6-11ed-a847-0255ac10003f" ],
"namespaces" : [ "default", "xxxxx" ]
} ]
}</pre>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section122658151575"><h4 class="sectiontitle">Example Responses</h4><p id="UpdateClusterRules__en-us_topic_0000002506203600_p726619156572">None</p>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section132661515115714"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateClusterRules__en-us_topic_0000002506203600_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row102771115175719"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p227831520574">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1127891535713">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateClusterRules__en-us_topic_0000002506203600_row102771715125713"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p527911512571">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p1427911155574">The cluster has been associated with permission policies.</p>
</td>
</tr>
<tr id="UpdateClusterRules__en-us_topic_0000002506203600_row7277131514575"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p42801315195717">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p2280171514575">Client request error. The server could not execute the request.</p>
</td>
</tr>
<tr id="UpdateClusterRules__en-us_topic_0000002506203600_row4277215185711"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p15280315165715">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p15286191575713">The server refused the request.</p>
</td>
</tr>
<tr id="UpdateClusterRules__en-us_topic_0000002506203600_row11277215155715"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p192871415145715">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateClusterRules__en-us_topic_0000002506203600_p228712156577">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateClusterRules__en-us_topic_0000002506203600_section17287121565713"><h4 class="sectiontitle">Error Codes</h4><p id="UpdateClusterRules__en-us_topic_0000002506203600_p72876153572">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000002551763211.html">UCS Cluster</a></div>
</div>
</div>