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

6.2 KiB

Limiting the Time When Objects in a Bucket Are Accessible

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.

Procedure

  1. In the bucket list, click the bucket you want to operate to go to the Objects page.
  2. In the navigation pane, choose Permissions > Bucket Policies.
  3. Click Create.
  4. Configure the following parameters in the Create Bucket Policy dialog box.

    Table 1 Parameters for limiting the time when objects in the bucket are accessible

    Parameter

    Description

    Configuration method

    Choose Visual Editor.

    Policy Name

    Enter a custom name.

    Effect

    Allow

    Principal

    Select All accounts.

    Resources

    Select Entire bucket (including the objects in it).

    Actions

    Select Customize and then * (indicating all actions).

    NOTE:

    Selecting * may cause resources to be deleted. To avoid this risk, select Get* that indicates all read permissions.

    Conditions

    • Condition 1:
      • Condition Operator: DateGreaterThan
      • Key: CurrentTime
      • Value: 2019-03-26T12:00:00Z (UTC format)
    • Condition 2:
      • Condition Operator: DateLessThan
      • Key: CurrentTime
      • Value: 2019-03-26T15:00:00Z (UTC format)

  5. Click Create in the lower right corner.

Verification

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.