AbortBucketWorm is used to delete an unlocked retention policy.

Usage notes

By default, a time-based policy is in the InProgress state after the policy is created for a bucket. The state remains valid for 24 hours. Within the validity period, 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. To delete the retention policy of a bucket, the bucket must be empty. Only the bucket owner can delete the retention policy.

Examples

  • Sample requests
    DELETE /? worm HTTP/1.1
    Date: GMT Date
    Host: BucketName.oss.aliyuncs.com
    Authorization: SignatureValue
  • HTTP/1.1 204 NoContent
    x-oss-request-id: RequestId
    Date: Date