Object lock keeps a locked object version from being overwritten or deleted until its retention ends. The default lock puts a retention on every new object uploaded to the bucket.
Before you begin
Section titled “Before you begin”- A bucket created with Enable Object Lock. You can turn object lock on only while you create the bucket. To get it on an existing bucket, create a new bucket with object lock and copy the objects across. See Create a bucket. On a bucket created with object lock off, the Object Lock tab shows “Object lock is not enabled on this bucket”.
- Permission to update datasets in the project. A Member gets it through a policy that allows updating datasets.
Set the default retention
Section titled “Set the default retention”Object lock supports the governance mode only.
- In the list, select the bucket’s row and open the Object Lock tab.
- Tick Enable Governance Lock on the objects of this bucket.
- Enter the Retention period in days, from 1 to 36,500. Any other value shows “Enter a value between 1 and 36500”.
- Select Save.
The tab then shows “Governance Lock is enabled on this bucket” and the Retention period. The retention counts from the upload date and applies to new objects only. When you change it, objects already stored and objects already under another retention stay as they are.
Change or remove the default lock
Section titled “Change or remove the default lock”To change the retention period, edit it on the Object Lock tab. To remove the lock, select Remove Lock and confirm. The default lock then stops applying to new uploads, and the portal shows “Governance lock removed successfully”. Versions that already took a retention keep it, and you can still set a custom lock on a single version.
Remove the default lock before you delete the bucket. To lock one version, see Lock one object version or place a legal hold. For help with a message, see Troubleshooting TIR Object Storage.