Object Lock Configuration (ObjectLockConfiguration)
| Field name | Type | Required | Description |
|---|---|---|---|
| enabled | Boolean | yes | The only valid value is true. |
| last_modified | String, ISO-8601 in yyyy-MM-dd'T'HH:mm:ss.SSS'Z' | yes | This is the timestamp of the last change to Object Lock configuration. |
| default_retention | ObjectLockDefaultRetention | no | This is the default retention for the bucket. It is applied to objects written to the bucket unless Object Lock protection (legal hold or retention) is specified with request headers at the time of write. |
The following code is an example of an "object_lock_configuration" blob where a bucket is enabled for Object Lock without Default Retention:
"object_lock_configuration": {
"last_modified": "2022-11-21T15:04:33.152Z",
"enabled": true,
}
The following code is an example of an "object_lock_configuration" blob where a bucket is enabled for Object Lock with Default Retention:
"object_lock_configuration": {
"last_modified": "2022-11-21T15:04:33.152Z",
"enabled": true,
"default_retention": {
"mode": "COMPLIANCE",
"days": 1
}
}