Wasabi supports an object lock that prevents the deletion or overwrite of object versions for a fixed amount of time or indefinitely.
Tag | Description |
---|---|
ObjectLockConfiguration | This is the mandatory root-level tag for object lock configuration. |
ObjectLockEnabled | This tag must be configured as Enabled. |
Rule | This specifies the object lock rule for a bucket. It requires both a mode and a period. The period can be either Days or Years, but you must select one. You cannot specify Days and Years at the same time. |
The object lock settings for a bucket are specified using the “?object-lock” query string along with the object lock settings as the XML body in the request. For example:
PUT https://s3.wasabisys.com/qa.objectlock.002/?object-lock HTTP/1.1
<ObjectLockConfiguration>
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>COMPLIANCE</Mode>
<Days>10</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
The object lock settings for a bucket can be retrieved by getting the bucket with the “?object-lock” query string. For example:
GET https://s3.wasabisys.com/qa.objectlock.002/?object-lock HTTP/1.1
Response body:
<?xml version="1.0" encoding="UTF-8"?>
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>COMPLIANCE</Mode>
<Days>10</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
There are also object lock settings for each object described in Operations on Objects.
The object lock settings for a bucket can be cleared using "?object-lock" query string. For example:
PUT https://s3.wasabisys.com/qa.objectlock.002/?object-lock HTTP/1.1
Response body:
<ObjectLockConfiguration>
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode></Mode>
<Days></Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>