Deletes an unlocked retention policy from a bucket.
Usage notes
This operation requires the
oss:AbortBucketWormpermission. For more information, see Attach a custom policy to a RAM user.A time-based retention policy enters the InProgress state immediately after creation. It remains in this state for 24 hours, during which the policy protects the data in the bucket.
If the retention policy is not locked within 24 hours, it becomes invalid.
While the retention policy is unlocked and within the 24-hour window, the bucket owner and authorized users can delete it. Once locked, the protection period cannot be shortened and the policy cannot be deleted. The protection period can only be extended.
If a bucket contains objects within the protection period, you cannot delete the bucket or its retention policy. Deleting a bucket also deletes its retention policy. Only the bucket owner can delete a bucket, and only when the bucket is empty.
Command syntax
ossutil api abort-bucket-worm --bucket value [flags]Parameter | Type | Description |
| string | The name of the bucket. |
For more information, see Command-line options.
Examples
Delete the unlocked retention policy of the examplebucket bucket:
ossutil api abort-bucket-worm --bucket examplebucket