OSS uses the Write Once Read Many (WORM) retention policy to specify the protection period of objects in a bucket. During the protection period, the protected objects cannot be modified or deleted.
Background information
- A bucket cannot have both versioning and retention policies configured at the same time. If versioning is enabled for a bucket, you cannot configure retention policies for the bucket. For more information about versioning, see Overview.
- For more information about the retention policy, see Retention policy.
Procedure
Calculate the expiration time for objects
You can calculate the expiration time by adding the retention period and last update time of objects in buckets. For example, the retention policy for Bucket A specifies the retention period as 10 days. The last update time of an object in the bucket is 12:00 on March 1, 2019. The object expires at 12:01 on March 11, 2019. For more information about the rules of the compliant retention policy, see the "Rules" section in Compliant retention policy.