doc-exports/docs/iam/api-ref/iam_02_0021.html
Wei, Hongmin 80f18fd272 IAM API 2.6 Version
Reviewed-by: Kabai, Zoltán Gábor <zoltan-gabor.kabai@t-systems.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2023-08-03 03:34:59 +00:00

229 lines
14 KiB
HTML

<a name="iam_02_0021"></a><a name="iam_02_0021"></a>
<h1 class="topictitle1">Modifying the Operation Protection Policy</h1>
<div id="body1597732796855"><div class="section" id="iam_02_0021__section643416615196"><h4 class="sectiontitle">Function</h4><p id="iam_02_0021__p35284615194">This API is provided for the administrator to modify the operation protection policy.</p>
</div>
<div class="section" id="iam_02_0021__section1643406161919"><h4 class="sectiontitle">URI</h4><p id="iam_02_0021__p952819691916">PUT /v3.0/OS-SECURITYPOLICY/domains/{domain_id}/protect-policy</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table13435146181916" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="iam_02_0021__row4528468192"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_02_0021__p55283618199">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.2.5.1.2"><p id="iam_02_0021__p952876201913">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="iam_02_0021__p45281561191">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.2.5.1.4"><p id="iam_02_0021__p115288661913">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row652856191917"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_02_0021__p35282611918">domain_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_02_0021__p65281863196">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_02_0021__p14528560199">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_02_0021__p1252810671911">Domain ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0021__section84381363191"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table20439769192" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_02_0021__row75281612192"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_02_0021__p352886121910">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_02_0021__p155289611913">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.91%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_02_0021__p95287681911">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.09%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_02_0021__p55286601919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row2052814616195"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0021__p4528469199">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_02_0021__p852812671911">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.91%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0021__p19528126171912">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.09%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0021__p1652818611194">Token with <strong id="iam_02_0021__b123726281587">Security Administrator</strong> permissions.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table1444216615197" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the request body</caption><thead align="left"><tr id="iam_02_0021__row13528106131911"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="iam_02_0021__p85283615194">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.3.2.5.1.2"><p id="iam_02_0021__p952817651915">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="iam_02_0021__p052812621917">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.5.1.4"><p id="iam_02_0021__p20528368192">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row752812611195"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="iam_02_0021__p45288618199"><a href="#iam_02_0021__table54451161197">protect_policy</a></p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.3.2.5.1.2 "><p id="iam_02_0021__p552818611913">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="iam_02_0021__p1952913661916">object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="iam_02_0021__p25291568193">Operation protection policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0021__table54451161197"></a><a name="table54451161197"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table54451161197" frame="border" border="1" rules="all"><caption><b>Table 4 </b>protect_policy</caption><thead align="left"><tr id="iam_02_0021__row195291961196"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="iam_02_0021__p452919621913">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.4.2.5.1.2"><p id="iam_02_0021__p45291565198">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="iam_02_0021__p1852926171917">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.4.2.5.1.4"><p id="iam_02_0021__p17529263194">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row7529067192"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="iam_02_0021__p14529160195">operation_protection</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.4.2.5.1.2 "><p id="iam_02_0021__p145291762195">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="iam_02_0021__p2052986161910">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.4.2.5.1.4 "><p id="iam_02_0021__p65296616198">Indicates whether operation protection has been enabled. The value can be <strong id="iam_02_0021__b332393516427">true</strong> or <strong id="iam_02_0021__b113281035134218">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0021__section10447106181910"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table84487613191" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_02_0021__row15298611199"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_02_0021__p15529664193">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.2"><p id="iam_02_0021__p1952919601910">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.2.2.4.1.3"><p id="iam_02_0021__p6529146161916">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row11529156171914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_02_0021__p152917631919"><a href="#iam_02_0021__table345114671913">protect_policy</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="iam_02_0021__p19529661197">object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_02_0021__p195293631913">Operation protection policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0021__table345114671913"></a><a name="table345114671913"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table345114671913" frame="border" border="1" rules="all"><caption><b>Table 6 </b>protect_policy</caption><thead align="left"><tr id="iam_02_0021__row15529661198"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_02_0021__p0529196161911">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="iam_02_0021__p13529196151918">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="iam_02_0021__p25299691915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row1752966141913"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0021__p85297691912">operation_protection</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0021__p25297621910">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0021__p1052917671918">Indicates whether operation protection has been enabled. The value can be <strong id="iam_02_0021__b92391554312">true</strong> or <strong id="iam_02_0021__b192871514437">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0021__section145316611191"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_02_0021__screen1452914617198">PUT https://sample.domain.com/v3.0/OS-SECURITYPOLICY/domains/{domain_id}/protect-policy
{
"protect_policy" : {
"operation_protection" : true
}
}</pre>
</div>
<div class="section" id="iam_02_0021__section4455266195"><h4 class="sectiontitle">Example Response</h4><p id="iam_02_0021__p165299615197"><strong id="iam_02_0021__b1997219134320">Status code: 200</strong></p>
<p id="iam_02_0021__p2052917610196">The request is successful.</p>
<pre class="screen" id="iam_02_0021__screen252915615198">{
"protect_policy" : {
"operation_protection" : false
}
}</pre>
</div>
<p id="iam_02_0021__p056634715612"><strong id="iam_02_0021__b155312016436">Status code: 400</strong></p>
<p id="iam_02_0021__p135661547115619">The request body is abnormal.</p>
<ul id="iam_02_0021__ul3566104719563"><li id="iam_02_0021__li12566114795611">Example 1</li></ul>
<pre class="screen" id="iam_02_0021__screen1293371345713">{
"error_msg" : "'%(key)s' is a required property.",
"error_code" : "IAM.0072"
}</pre>
<ul id="iam_02_0021__ul1797111145577"><li id="iam_02_0021__li6971181413573">Example 2</li></ul>
<pre class="screen" id="iam_02_0021__screen457619105718">{
"error_msg" : "Invalid input for field '%(key)s'. The value is '%(value)s'.",
"error_code" : "IAM.0073"
}</pre>
<p id="iam_02_0021__p45671847165610"><strong id="iam_02_0021__b78833235435">Status code: 403</strong></p>
<p id="iam_02_0021__p13567204719561">Access denied.</p>
<ul id="iam_02_0021__ul456764711567"><li id="iam_02_0021__li17567247165618">Example 1</li></ul>
<pre class="screen" id="iam_02_0021__screen166387545563">{
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
"error_code" : "IAM.0003"
}</pre>
<ul id="iam_02_0021__ul181455511567"><li id="iam_02_0021__li1814655115618">Example 2</li></ul>
<pre class="screen" id="iam_02_0021__screen153799596568">{
"error_msg" : "You are not authorized to perform the requested action.",
"error_code" : "IAM.0002"
}</pre>
<p id="iam_02_0021__p15567184735610"><strong id="iam_02_0021__b97121948114319">Status code: 500</strong></p>
<p id="iam_02_0021__p956716470560">The system is abnormal.</p>
<pre class="screen" id="iam_02_0021__screen3567104715561">{
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
"error_code" : "IAM.0006"
}</pre>
<div class="section" id="iam_02_0021__section6460116201913"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0021__table946036101910" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0021__row4529116191912"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.22.2.1.3.1.1"><p id="iam_02_0021__p155291569196">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.22.2.1.3.1.2"><p id="iam_02_0021__p1752916681915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0021__row052914641917"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.22.2.1.3.1.1 "><p id="iam_02_0021__p1552912601910">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.22.2.1.3.1.2 "><p id="iam_02_0021__p16530136101914">The request is successful.</p>
</td>
</tr>
<tr id="iam_02_0021__row11530136181911"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.22.2.1.3.1.1 "><p id="iam_02_0021__p17530567198">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.22.2.1.3.1.2 "><p id="iam_02_0021__p353036171917">The request body is abnormal.</p>
</td>
</tr>
<tr id="iam_02_0021__row1553010661912"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.22.2.1.3.1.1 "><p id="iam_02_0021__p185301265191">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.22.2.1.3.1.2 "><p id="iam_02_0021__p155301166192">Authentication failed.</p>
</td>
</tr>
<tr id="iam_02_0021__row10530196191914"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.22.2.1.3.1.1 "><p id="iam_02_0021__p15530064197">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.22.2.1.3.1.2 "><p id="iam_02_0021__p12530156191912">Access denied.</p>
</td>
</tr>
<tr id="iam_02_0021__row195304613198"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.22.2.1.3.1.1 "><p id="iam_02_0021__p45305631911">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.22.2.1.3.1.2 "><p id="iam_02_0021__p3530665195">The system is abnormal.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="iam_02_0020.html">Security Settings</a></div>
</div>
</div>