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

221 lines
18 KiB
HTML

<a name="UpdateRule"></a><a name="UpdateRule"></a>
<h1 class="topictitle1">Updating a Permission Policy</h1>
<div id="body8662426"><div class="section" id="UpdateRule__en-us_topic_0000002506043778_section581515641420"><h4 class="sectiontitle">Function</h4><p id="UpdateRule__en-us_topic_0000002506043778_p1681656121418">This API is used to update a permission policy.</p>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section1381718615145"><h4 class="sectiontitle">URI</h4><p id="UpdateRule__en-us_topic_0000002506043778_p178181861144">PUT /v1/permissions/rules/{ruleid}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateRule__en-us_topic_0000002506043778_table188211667146" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameter</caption><thead align="left"><tr id="UpdateRule__en-us_topic_0000002506043778_row981910611141"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="UpdateRule__en-us_topic_0000002506043778_p98218641416">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="UpdateRule__en-us_topic_0000002506043778_p118228619147">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="UpdateRule__en-us_topic_0000002506043778_p88231268147">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="UpdateRule__en-us_topic_0000002506043778_p178241562140">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateRule__en-us_topic_0000002506043778_row118191967148"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p9825186141413">ruleid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p782616621414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p188275611140">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p6828861143">Permission policy ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section1083013621417"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateRule__en-us_topic_0000002506043778_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="UpdateRule__en-us_topic_0000002506043778_row683118620146"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="UpdateRule__en-us_topic_0000002506043778_p48337620145">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="UpdateRule__en-us_topic_0000002506043778_p28341614141">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="UpdateRule__en-us_topic_0000002506043778_p128361360149">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="UpdateRule__en-us_topic_0000002506043778_p1583776201412">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateRule__en-us_topic_0000002506043778_row98316621411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p1883810616147">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p1983966111413">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p16839169144">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p138411469144">Identity authentication information</p>
<p id="UpdateRule__en-us_topic_0000002506043778_p168424615148">Minimum length: <strong id="UpdateRule__en-us_topic_0000002506043778_b61110280341436">1</strong></p>
<p id="UpdateRule__en-us_topic_0000002506043778_p1384316611420">Maximum length: <strong id="UpdateRule__en-us_topic_0000002506043778_b38937488241456">16384</strong></p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row485013548229"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p20110172212422">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p411018227429">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p7110152218429">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p12110172216422">Request body type or format</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateRule__en-us_topic_0000002506043778_request_UpdateRuleRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter in the request body</caption><thead align="left"><tr id="UpdateRule__en-us_topic_0000002506043778_row198441611149"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="UpdateRule__en-us_topic_0000002506043778_p108464671413">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="UpdateRule__en-us_topic_0000002506043778_p28477619145">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="UpdateRule__en-us_topic_0000002506043778_p1584814619144">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="UpdateRule__en-us_topic_0000002506043778_p184916121413">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateRule__en-us_topic_0000002506043778_row484515615143"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p6850136101419">spec</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p585113641415">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p148538611143"><a href="#UpdateRule__en-us_topic_0000002506043778_request_RuleSpec">RuleSpec</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p985415661416">Details about the permission policy. UCS creates or updates the permission policy by <strong id="UpdateRule__en-us_topic_0000002506043778_b101520416941725">spec</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="UpdateRule__en-us_topic_0000002506043778_request_RuleSpec"></a><a name="en-us_topic_0000002506043778_request_RuleSpec"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateRule__en-us_topic_0000002506043778_request_RuleSpec" frame="border" border="1" rules="all"><caption><b>Table 4 </b>RuleSpec</caption><thead align="left"><tr id="UpdateRule__en-us_topic_0000002506043778_row14855868141"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="UpdateRule__en-us_topic_0000002506043778_p685736121415">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="UpdateRule__en-us_topic_0000002506043778_p19858106101420">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="UpdateRule__en-us_topic_0000002506043778_p1985918681413">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="UpdateRule__en-us_topic_0000002506043778_p178618681411">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateRule__en-us_topic_0000002506043778_row985515610147"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p986256111417">iamuserids</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p14863196151416">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p68641262143">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p58659661414">Information of IAM users associated with a permission policy</p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row78559661413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p186612618142">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p2086736151419">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p2086876181418">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p148698651410">Permission policy type. The value can be <strong id="UpdateRule__en-us_topic_0000002506043778_b101182176063156">readonly</strong>, <strong id="UpdateRule__en-us_topic_0000002506043778_b61691093063156">develop</strong>, <strong id="UpdateRule__en-us_topic_0000002506043778_b156569917763156">admin</strong>, or <strong id="UpdateRule__en-us_topic_0000002506043778_b23282041663156">custom</strong>.</p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row13855267141"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p18870156151414">contents</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p5871262147">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p1287211612146">Array of <a href="#UpdateRule__en-us_topic_0000002506043778_request_Content">Content</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p208741669140">Permission policy content</p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row085566101418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p487412671419">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p287519610142">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p38777610145">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p188783611145">Permission policy description</p>
<p id="UpdateRule__en-us_topic_0000002506043778_p198791466147">Minimum length: <strong id="UpdateRule__en-us_topic_0000002506043778_b169840279263217">0</strong></p>
<p id="UpdateRule__en-us_topic_0000002506043778_p118804615149">Maximum length: <strong id="UpdateRule__en-us_topic_0000002506043778_b31090672463222">255</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="UpdateRule__en-us_topic_0000002506043778_request_Content"></a><a name="en-us_topic_0000002506043778_request_Content"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateRule__en-us_topic_0000002506043778_request_Content" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Content</caption><thead align="left"><tr id="UpdateRule__en-us_topic_0000002506043778_row1788111617145"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.1"><p id="UpdateRule__en-us_topic_0000002506043778_p4884116141420">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.2"><p id="UpdateRule__en-us_topic_0000002506043778_p14885196111413">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.3"><p id="UpdateRule__en-us_topic_0000002506043778_p1688610651414">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.5.2.5.1.4"><p id="UpdateRule__en-us_topic_0000002506043778_p5886667140">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateRule__en-us_topic_0000002506043778_row9882166191418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p1388714617144">verbs</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p488986131410">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p58901262145">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p13891136121419">Action list</p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row198825617144"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p589226131413">resources</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p188931864140">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="UpdateRule__en-us_topic_0000002506043778_p168948661414">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="UpdateRule__en-us_topic_0000002506043778_p989626121412">Resource list</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section1989786101410"><h4 class="sectiontitle">Response Parameters</h4><p id="UpdateRule__en-us_topic_0000002506043778_p0898136131411">None</p>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section68998620143"><h4 class="sectiontitle">Example Requests</h4><p id="UpdateRule__en-us_topic_0000002506043778_p89011367141">Updating a permission policy</p>
<pre class="screen" id="UpdateRule__en-us_topic_0000002506043778_screen2090318616148">{
"spec" : {
"iamUserIDs" : [ "978ff70ec1494a5680f6218faa3567d9", "5acdb44b47ba4bd79783ad40e5346783" ],
"type" : "custom",
"description" : "this is description"
}
}</pre>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section690915610145"><h4 class="sectiontitle">Example Responses</h4><p id="UpdateRule__en-us_topic_0000002506043778_p191113631412">None</p>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section591213651413"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateRule__en-us_topic_0000002506043778_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="UpdateRule__en-us_topic_0000002506043778_row9913196111410"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="UpdateRule__en-us_topic_0000002506043778_p19148617146">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="UpdateRule__en-us_topic_0000002506043778_p1791616681416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="UpdateRule__en-us_topic_0000002506043778_row1913146131418"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p49171463144">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p391819618148">The permission policy has been updated.</p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row18913063146"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p0919176141414">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p59208613147">Client request error. The server could not execute the request.</p>
</td>
</tr>
<tr id="UpdateRule__en-us_topic_0000002506043778_row291376131410"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateRule__en-us_topic_0000002506043778_p149221163147">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateRule__en-us_topic_0000002506043778_p1392312621419">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="UpdateRule__en-us_topic_0000002506043778_section49241861148"><h4 class="sectiontitle">Error Codes</h4><p id="UpdateRule__en-us_topic_0000002506043778_p1292610611148">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_300000002.html">Permissions</a></div>
</div>
</div>