forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
26 lines
3.2 KiB
HTML
26 lines
3.2 KiB
HTML
<a name="obs_03_0118"></a><a name="obs_03_0118"></a>
|
|
|
|
<h1 class="topictitle1">Resources</h1>
|
|
<div id="body1557026128761"><p id="obs_03_0118__p27361558140">The resources a bucket policy is applied to can be the current entire bucket or objects in the bucket.</p>
|
|
<p id="obs_03_0118__p3201152310539">Resources can be specified in either of the following ways:</p>
|
|
<ul id="obs_03_0118__ul18201323125311"><li id="obs_03_0118__li1620132355317"><strong id="obs_03_0118__b184419873610">Include</strong>: The bucket policy applies to specified OBS resources.</li><li id="obs_03_0118__li152011423195316"><strong id="obs_03_0118__b171841311113612">Exclude</strong>: The bucket policy applies to OBS resources except the specified ones.</li></ul>
|
|
<div class="section" id="obs_03_0118__section530512714414"><h4 class="sectiontitle">Applying a Bucket Policy to a Bucket</h4><p id="obs_03_0118__p7692111610414">To specify the current bucket as the resource, keep the resource text box empty. When configuring actions for the policy, select bucket related actions.</p>
|
|
</div>
|
|
<div class="section" id="obs_03_0118__section20650152864119"><h4 class="sectiontitle">Applying a Bucket Policy to Specified Objects</h4><p id="obs_03_0118__p1020118236532">To apply the bucket policy to specified objects in a bucket, object-related actions must be configured in the policy. The configuration format is as follows:</p>
|
|
<ul id="obs_03_0118__ul1620119232537"><li id="obs_03_0118__li72011823155312">For an object, enter the object name (including its folder name if any). If you want to specify the <strong id="obs_03_0118__b154714332175">example.jpg</strong> file in the <strong id="obs_03_0118__b1747193381719">imgs-folder</strong> folder in the bucket, enter the following content in the resource text box:<p id="obs_03_0118__p182671834115620"><strong id="obs_03_0118__b91131952600">imgs-folder/example.jpg</strong></p>
|
|
</li><li id="obs_03_0118__li8201623115313">For an object set, the wildcard asterisk (*) should be used. The asterisk * indicates an empty string or any combination of multiple characters. The format rules are as follows:<ul id="obs_03_0118__ul15201192315537"><li id="obs_03_0118__li1220282315531">Use only one asterisk (*) to indicate all objects in a bucket.</li><li id="obs_03_0118__li52024233535">Use <em id="obs_03_0118__i890588937102746">Object name prefix</em>* to indicate objects starting with this prefix in a bucket. For example,<p id="obs_03_0118__p148641724165711">imgs*</p>
|
|
</li></ul>
|
|
<ul id="obs_03_0118__ul1520213232535"><li id="obs_03_0118__li7202112335317">Use *<em id="obs_03_0118__i1404821761103152">Object name suffix</em> to indicate objects ending with this suffix in a bucket. For example,<p id="obs_03_0118__p19330184135712">*.jpg</p>
|
|
</li></ul>
|
|
</li></ul>
|
|
<div class="note" id="obs_03_0118__note1484124911416"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_03_0118__p11485104918419">Use commas (,) to separate one object (or object set) from another.</p>
|
|
</div></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0074.html">Bucket Policy Parameters</a></div>
|
|
</div>
|
|
</div>
|
|
|