doc-exports/docs/evs/umn/evs_01_0090.html
zhangyue d05287d5d6 EVS UMN DOC
Reviewed-by: Miskanin, Jan <jan.miskanin@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2024-05-09 07:19:17 +00:00

53 lines
3.8 KiB
HTML

<a name="evs_01_0090"></a><a name="evs_01_0090"></a>
<h1 class="topictitle1">EVS Custom Policies</h1>
<div id="body1558951798067"><p id="evs_01_0090__p15129174583212">You can create custom policies to supplement the system-defined policies of EVS. For the actions supported for custom policies, see section "Permissions Policies and Supported Actions" in the <em id="evs_01_0090__i1531111175813">Elastic Volume Service API Reference</em>.</p>
<p id="evs_01_0090__p569531211911">You can create custom policies in either of the following ways:</p>
<ul id="evs_01_0090__ul86954122914"><li id="evs_01_0090__li96954121693">Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.<div class="fignone" id="evs_01_0090__fig12962142615110"><span class="figcap"><b>Figure 1 </b>Create Custom Policy</span><br><span><img id="evs_01_0090__image7963182615115" src="en-us_image_0000001242362390.jpg"></span></div>
</li><li id="evs_01_0090__li146961512299">JSON: Edit JSON policies from scratch or based on an existing policy.<p id="evs_01_0090__p82911030103912"><a name="evs_01_0090__li146961512299"></a><a name="li146961512299"></a>For operation details, see section "Creating a Custom Policy" in the <em id="evs_01_0090__i91221245145818">Identity and Access Management User Guide</em>. The following section contains examples of common EVS custom policies.</p>
</li></ul>
<div class="section" id="evs_01_0090__section1737354083912"><h4 class="sectiontitle">Example Custom Policies</h4><ul id="evs_01_0090__ul10599543275"><li id="evs_01_0090__li059155412270">Example 1: Allowing users to create disks.<pre class="screen" id="evs_01_0090__screen8627276358">{
"Version": "1.1",
"Statement": [
{
"Action": [
"evs:volumes:list",
"evs:volumes:get",
"evs:quotas:get",
"evs:volumeTags:list",
"evs:types:get",
"evs:volumes:create",
"ecs:cloudServerFlavors:get",
"ecs:cloudServers:list",
"bss:balance:view",
"bss:order:pay",
"bss:order:update"
],
"Effect": "Allow"
}
]
}</pre>
</li><li id="evs_01_0090__li12616055102711">Example 2: Denying disk deletion<p id="evs_01_0090__p1892813119464"><a name="evs_01_0090__li12616055102711"></a><a name="li12616055102711"></a>A policy with only "Deny" permissions must be used in conjunction with other policies to take effect. If the permissions assigned to a user contain both "Allow" and "Deny", the "Deny" permissions take precedence over the "Allow" permissions.</p>
<p id="evs_01_0090__p86981712192910">The following method can be used if you need to assign permissions of the <strong id="evs_01_0090__b920272173119">EVS FullAccess</strong> policy to a user but you want to prevent the user from deleting EVS disks. Create a custom policy for denying disk deletion, and attach both policies to the group to which the user belongs. Then, the user can perform all operations on disks except deleting disks. The following is an example of a deny policy:</p>
<pre class="screen" id="evs_01_0090__screen20918315153320">{
"Version": "1.1",
"Statement": [
{
"Effect": "Deny",
"Action": [
"evs:volumes:delete"
]
}
]
}</pre>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="evs_01_0087.html">Permissions Management</a></div>
</div>
</div>