doc-exports/docs/iam/api-ref/iam_02_0022.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

171 lines
11 KiB
HTML

<a name="iam_02_0022"></a><a name="iam_02_0022"></a>
<h1 class="topictitle1">Querying the Operation Protection Policy</h1>
<div id="body1597737539340"><div class="section" id="iam_02_0022__section7420526191911"><h4 class="sectiontitle">Function</h4><p id="iam_02_0022__p8526192661912">This API is used to query the operation protection policy.</p>
</div>
<div class="section" id="iam_02_0022__section20421122610196"><h4 class="sectiontitle">URI</h4><p id="iam_02_0022__p15526162619198">GET /v3.0/OS-SECURITYPOLICY/domains/{domain_id}/protect-policy</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0022__table194214264192" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="iam_02_0022__row1252612661914"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="iam_02_0022__p10526826141918">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_0022__p115261926121912">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_0022__p1352652610194">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_0022__p952692661918">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0022__row552616261195"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="iam_02_0022__p1452612651914">domain_id</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="iam_02_0022__p10526626101912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="iam_02_0022__p105265265197">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="iam_02_0022__p20526826141912">Domain ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0022__section144271826101913"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0022__table9428182619194" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_02_0022__row252652601920"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_02_0022__p6526142620196">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_0022__p6526192614199">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_02_0022__p652602613194">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_02_0022__p125266267193">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0022__row1452662601914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0022__p1852613264190">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_0022__p25263267192">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0022__p1352619268192">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0022__p17526162651915">Token with <strong id="iam_02_0022__b98833084712">Security Administrator</strong> permissions.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0022__section1743310261195"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0022__table15434192651919" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_02_0022__row2052710265190"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_02_0022__p35271261190">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_0022__p145271526161915">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_0022__p105277267196">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0022__row35271262198"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_02_0022__p052714268191"><a href="#iam_02_0022__table1543815262192">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_0022__p175272266195">object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_02_0022__p652742611191">Operation protection policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0022__table1543815262192"></a><a name="table1543815262192"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0022__table1543815262192" frame="border" border="1" rules="all"><caption><b>Table 4 </b>protect_policy</caption><thead align="left"><tr id="iam_02_0022__row1252712263198"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_02_0022__p1527172691918">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_0022__p852732691912">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_0022__p552762651917">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0022__row35271026161915"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0022__p4527326171915">operation_protection</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0022__p7527122617196">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0022__p2527182617191">Indicates whether operation protection has been enabled. The value can be <strong id="iam_02_0022__b181573664416">true</strong> or <strong id="iam_02_0022__b8820536174410">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="iam_02_0022__section14442726181914"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_02_0022__screen5527182616197">GET https://sample.domain.com/v3.0/OS-SECURITYPOLICY/domains/{domain_id}/protect-policy</pre>
</div>
<div class="section" id="iam_02_0022__section1444382671911"><h4 class="sectiontitle">Example Response</h4><p id="iam_02_0022__p5527102611915"><strong id="iam_02_0022__b11136408443">Status code: 200</strong></p>
<p id="iam_02_0022__p2527826181915">The request is successful.</p>
<pre class="screen" id="iam_02_0022__screen1527192612194">{
"protect_policy" : {
"operation_protection" : false
}
}</pre>
</div>
<p id="iam_02_0022__p780019499199"><strong id="iam_02_0022__b1981204118444">Status code: 403</strong></p>
<p id="iam_02_0022__p48001649191920">Access denied.</p>
<ul id="iam_02_0022__ul5800184917195"><li id="iam_02_0022__li680004912198">Example 1</li></ul>
<pre class="screen" id="iam_02_0022__screen3919454121911">{
"error_msg" : "You are not authorized to perform the requested action.",
"error_code" : "IAM.0002"
}</pre>
<ul id="iam_02_0022__ul157802056161912"><li id="iam_02_0022__li1478019561199">Example 2</li></ul>
<pre class="screen" id="iam_02_0022__screen65716010206">{
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
"error_code" : "IAM.0003"
}</pre>
<p id="iam_02_0022__p108001549161913"><strong id="iam_02_0022__b20215194515444">Status code: 404</strong></p>
<p id="iam_02_0022__p10800124912190">The requested resource cannot be found.</p>
<pre class="screen" id="iam_02_0022__screen48005496196">{
"error_msg" : "Could not find %(target)s: %(target_id)s.",
"error_code" : "IAM.0004"
}</pre>
<p id="iam_02_0022__p38001449131917"><strong id="iam_02_0022__b5209247154411">Status code: 500</strong></p>
<p id="iam_02_0022__p10800164971913">Internal server error.</p>
<pre class="screen" id="iam_02_0022__screen12800204913196">{
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
"error_code" : "IAM.0006"
}</pre>
<div class="section" id="iam_02_0022__section3458112620193"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0022__table12458202691915" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0022__row852792612193"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.19.2.1.3.1.1"><p id="iam_02_0022__p2527182619190">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.19.2.1.3.1.2"><p id="iam_02_0022__p20527162611919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0022__row4527826181919"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0022__p15271526171914">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0022__p55271326161913">The request is successful.</p>
</td>
</tr>
<tr id="iam_02_0022__row2052715268196"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0022__p552711264199">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0022__p12527142611199">Authentication failed.</p>
</td>
</tr>
<tr id="iam_02_0022__row165271226201920"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0022__p1452792651914">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0022__p652717261194">Access denied.</p>
</td>
</tr>
<tr id="iam_02_0022__row2052792610199"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0022__p1352715264195">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0022__p19527626151919">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="iam_02_0022__row185271726181912"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0022__p8527526131911">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0022__p152732614196">Internal server error.</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>