All Products
Search
Document Center

Object Storage Service:AbortBucketWorm

Last Updated:Sep 13, 2023

Deletes an unlocked retention policy.

Usage notes

By default, a time-based retention policy is in the InProgress state after the policy is created for a bucket. The state remains valid for 24 hours. Within the 24 hours, the retention policy protects the data in the bucket.

  • In the 24-hour window after the retention policy is enabled: If the retention policy is not locked, the bucket owner and authorized users can delete this policy. If the retention policy is locked, the protection period of the policy cannot be shortened and the policy cannot be deleted. The protection period can only be prolonged.

  • 24 hours after the retention policy is enabled: If the retention policy is not locked, the policy becomes invalid.

If a bucket contains objects that are within the protection period, you cannot delete the bucket or its retention policy. If a bucket is deleted, the retention policy of the bucket is also deleted. Only the bucket owner can delete a bucket when the bucket is empty.

Examples

  • Sample requests

    DELETE /?worm HTTP/1.1
    Date: Mon, 3 Aug 2020 03:15:40 GMT
    Host: BucketName.oss.aliyuncs.com
    Authorization: OSS qn6qrrqxo2oawuk53otf****:77Dvh5wQgIjWjwO/KyRt8dOP****
  • Sample responses

    HTTP/1.1 204 NoContent
    Server: AliyunOSS
    Date: Tue, 22 Aug 2023 09:10:20 GMT
    Content-Length: 0
    Connection: keep-alive
    x-oss-request-id: 5C06A3B67B8B5A3DA422299D
    x-oss-server-time: 130