forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Jawei, Li <lijiawei5@huawei.com> Co-committed-by: Jawei, Li <lijiawei5@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 resource can be the current entire bucket, an object, or a set of 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>: Indicates that the policy takes effect only on the specified OBS resources.</li><li id="obs_03_0118__li152011423195316"><strong id="obs_03_0118__b171841311113612">Exclude</strong>: Indicates that the bucket policy takes effect on all OBS resources except the specified ones.</li></ul>
|
|
<div class="section" id="obs_03_0118__section530512714414"><h4 class="sectiontitle">Specifying Bucket Resources</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">Specifying Object Resources</h4><p id="obs_03_0118__p1020118236532">When objects in the bucket are specified as the resources, actions configured in the bucket policy must be object related actions. The following are examples of how to specify objects as resources.</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). For example, if the specified resource is 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">imgs-folder/example.jpg</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>
|
|
|