Delete an unlocked retention policy
Deletes an unlocked time-based retention policy from a bucket.
Usage notes
-
To delete an unlocked retention policy, you must have the
oss:AbortBucketWormpermission. For more information, see Grant a custom policy. -
By default, a time-based retention policy enters the InProgress state when created. The policy remains in this state for 24 hours, during which data in the bucket is protected.
-
24 hours after the retention policy is enabled: If the retention policy is not locked, the policy becomes invalid.
-
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.
-
-
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.
Command syntax
ossutil api abort-bucket-worm --bucket value [flags]
|
Parameter |
Type |
Description |
|
--bucket |
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