Put Bucket Object Lock
Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.
PUT /?object-lock HTTP/1.1
Host: {bucket}.{region}.cdn77-storage.comRequest Entities
| Name | Description |
|---|---|
ObjectLockConfigurationrequirednone | A container for the request. |
ObjectLockEnabledrequiredstring | Indicates whether this bucket has an Object Lock configuration enabled. |
Rulenone | The Object Lock rule in place for the specified bucket. |
DefaultRetentionnone | The default retention period applied to new objects placed in the specified bucket. |
Moderequiredstring | The default Object Lock retention mode. Valid Values: GOVERNANCE/COMPLIANCE |
Daysinteger | The number of days specified for the default retention period. |
Yearsinteger | The number of years specified for the default retention period. |
HTTP Response
| HTTP Status | Description |
|---|---|
400none | The XML is malformed |
409none | The bucket object lock is not enabled |
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Days>5</Days>
<Mode>COMPLIANCE</Mode>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>Updated on 13th November, 2026