Locks a retention policy.
Usage notes
To lock a retention policy, you must have the
oss:CompleteBucketWorm
permission. For more information, see Attach a custom policy to a RAM user.By default, a time-based policy is in the InProgress state after the policy is created for a bucket. The policy remains in this state 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 policy cannot be deleted and the retention period specified by the retention policy can only be extended.
24 hours after the retention policy is enabled: If the retention policy is not locked, the policy becomes invalid.
Command syntax
ossutil api complete-bucket-worm --bucket value --worm-id value [flags]
Parameter | Type | Description |
--bucket | string | The name of the bucket. |
--worm-id | string | The ID of the retention policy. |
For more information, see Command-line options.
Examples
Lock the "123" retention policy for the examplebucket bucket.
ossutil api complete-bucket-worm --bucket examplebucket --worm-id 123