Object Lock Configuration Reference
An Object Lock configuration is a JSON file in which you define the Object Lock rules you want to apply to a bucket that has the Object Lock feature enabled. With an Object Lock configuration, you can apply a default retention date after which your objects will no longer be protected. This default retention date can be expressed either in days or years.
This page describes the elements you can specify in an Object Lock configuration file. Once you have written the file, you need to apply it to your bucket. For more information, see Configuring a Default Object Lock on Your Bucket.
You can also specify these elements as an inline JSON string. |
To create an Object Lock configuration, you need to create a JSON file following this structure:
{
"ObjectLockEnabled": "Enabled",
"Rule": {
"DefaultRetention": {
"Mode": "string",
"Days": integer
}
}
}
This file contains the following attributes:
Attribute | Required | Description | ||
---|---|---|---|---|
|
Yes |
Indicates that Object Lock has been enabled on the bucket. The value must always be set to |
||
|
Yes |
The specific retention rule applied as default for objects placed in the buckets. |
||
|
Yes |
Defines the default retention parameters for new objects placed in the bucket. |
||
|
Yes |
Specifies the retention mode for the bucket. The value is always
|
||
|
Yes |
The period, in days or years, after which your objects will no longer be protected. The minimum is one day, and the expiration is calculated from the exact time each object is uploaded to the bucket. For example, if the default retention for your bucket is one day and you upload an object at 06:00 UTC, the object will be locked until the next day, at 06:00 UTC.
|
Related Pages