Files
doc-exports/docs/obs/umn/obs_03_0131.html
zhangyue 19668ae97b OBS UMN DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2025-05-20 13:11:00 +00:00

65 lines
6.2 KiB
HTML

<a name="obs_03_0131"></a><a name="obs_03_0131"></a>
<h1 class="topictitle1">Limiting the Time When Objects in a Bucket Are Accessible</h1>
<div id="body1557026128762"><p id="obs_03_0131__p13527855125217">You can configure the bucket policy to limit the time when objects in a bucket are accessible. In the following example, the access time window is from 2019-03-26T12:00:00Z to 2019-03-26T15:00:00Z.</p>
<div class="section" id="obs_03_0131__section105631818154812"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0131__ol2841821194810"><li id="obs_03_0131__li884202113483"><span>In the bucket list, click the bucket you want to operate to go to the <strong id="obs_03_0131__obs_03_0307_b5948183711913">Objects</strong> page.</span></li><li id="obs_03_0131__li61722017207"><span>In the navigation pane, choose <strong id="obs_03_0131__b475191192019">Permissions</strong> &gt; <strong id="obs_03_0131__b1076112206">Bucket Policies</strong>.</span></li><li id="obs_03_0131__li516619375538"><span>Click <strong id="obs_03_0131__b65301222256">Create</strong>.</span></li><li id="obs_03_0131__li175411318101914"><span>Configure the following parameters in the <strong id="obs_03_0131__b19959851203014">Create Bucket Policy</strong> dialog box.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_03_0131__table6375112782815" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for limiting the time when objects in the bucket are accessible</caption><thead align="left"><tr id="obs_03_0131__row6375927132818"><th align="left" class="cellrowborder" valign="top" width="21.84%" id="mcps1.3.2.2.4.2.1.2.3.1.1"><p id="obs_03_0131__p133488763413">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="78.16%" id="mcps1.3.2.2.4.2.1.2.3.1.2"><p id="obs_03_0131__p63751027152820">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_03_0131__row1391771711228"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p9469193163418">Configuration method</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><p id="obs_03_0131__p69178170221">Choose <strong id="obs_03_0131__b174371319324">Visual Editor</strong>.</p>
</td>
</tr>
<tr id="obs_03_0131__row17375102752819"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p646913317348">Policy Name</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><p id="obs_03_0131__p83758278280">Enter a custom name.</p>
</td>
</tr>
<tr id="obs_03_0131__row133751227142812"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p147892408148">Effect</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><p id="obs_03_0131__p1150132882414">Allow</p>
</td>
</tr>
<tr id="obs_03_0131__row33867294264"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p43864290269">Principal</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><p id="obs_03_0131__p1730441212225">Select <strong id="obs_03_0131__b665215389328">All accounts</strong>.</p>
</td>
</tr>
<tr id="obs_03_0131__row15368143312619"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p13681533112618">Resources</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><p id="obs_03_0131__p18815220252">Select <strong id="obs_03_0131__b11251139143419">Entire bucket (including the objects in it)</strong>.</p>
</td>
</tr>
<tr id="obs_03_0131__row747010261281"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p12471112612810">Actions</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><p id="obs_03_0131__p158112036122717">Select <strong id="obs_03_0131__b61124413718">Customize</strong> and then <strong id="obs_03_0131__b9112134193715">*</strong> (indicating all actions).</p>
<div class="note" id="obs_03_0131__note18841115175112"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_03_0131__p288417158518">Selecting <strong id="obs_03_0131__b26717451136">*</strong> may cause resources to be deleted. To avoid this risk, select <strong id="obs_03_0131__b2691945337">Get*</strong> that indicates all read permissions.</p>
</div></div>
</td>
</tr>
<tr id="obs_03_0131__row3326453134518"><td class="cellrowborder" valign="top" width="21.84%" headers="mcps1.3.2.2.4.2.1.2.3.1.1 "><p id="obs_03_0131__p63271953124516">Conditions</p>
</td>
<td class="cellrowborder" valign="top" width="78.16%" headers="mcps1.3.2.2.4.2.1.2.3.1.2 "><ul id="obs_03_0131__ul1247872365213"><li id="obs_03_0131__li139271724155212">Condition 1:<ul id="obs_03_0131__ul15871113116521"><li id="obs_03_0131__li047812335214">Condition Operator: DateGreaterThan</li><li id="obs_03_0131__li1647811237523">Key: CurrentTime</li><li id="obs_03_0131__li154781923195211">Value: 2019-03-26T12:00:00Z (UTC format)</li></ul>
</li><li id="obs_03_0131__li1311144017523">Condition 2:<ul id="obs_03_0131__ul11126659195217"><li id="obs_03_0131__li186695563523">Condition Operator: DateLessThan</li><li id="obs_03_0131__li1066905615214">Key: CurrentTime</li><li id="obs_03_0131__li1066985611529">Value: 2019-03-26T15:00:00Z (UTC format)</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="obs_03_0131__li1258419325301"><span>Click <strong id="obs_03_0131__b1892062117557">Create</strong> in the lower right corner.</span></li></ol>
</div>
<div class="section" id="obs_03_0131__section159232335471"><h4 class="sectiontitle">Verification</h4><p id="obs_03_0131__p1589143714477">During the specified time period, any user can access the specified resources in the bucket. Outside the specified time period, only the bucket owner can access the bucket.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0127.html">Application Cases</a></div>
</div>
</div>