Object Lock With the Wasabi S3 API
    • 06 Jun 2024
    • 1 Minute to read
    • PDF

    Object Lock With the Wasabi S3 API

    • PDF

    Article summary

    You can add or update the object lock settings for an object using the tags described below.

    Tag

    Description

    Mode

    This tag should be either COMPLIANCE or GOVERNANCE, which are not case-sensitive.

    RetainUntilDate

    This defines the retention time for an object. The object cannot be deleted before this time. Note that the retention time must be in the future.

    LegalHold

    This should be either ON or OFF, which is not case-sensitive.

    The following is an example of setting the object locking configuration on an object:

    PUT https://s3.wasabisys.com/qa.objectlock.002/beta_vpn.png?retention&versionId= 001617181245457483475-4ylsTbqqvP
    
    <Retention>
    
         <Mode>compliance</Mode>
    
         <RetainUntilDate>2021-04-06T09:00:45Z</RetainUntilDate>
    
    </Retention>

    The following is an example of setting legal hold for an object:

    PUT https://s3.wasabisys.com/qa.objectlock.002/beta_vpn.png?legal-hold&versionId=001617181245457483475-4ylsTbqqvP
    
    <LegalHold>
    
         <Status>ON</Status>
    
    </LegalHold>

    The following is an example of setting governance mode for an object:

    PUT https://s3.wasabisys.com/qa.objectlock.002/public/ACL.PNG?retention
    
    <Retention>
    
         <Mode>governance</Mode>
    
         <RetainUntilDate>2021-05-20T09:00:45Z</RetainUntilDate>
    
    </Retention>

    The “x-amz-bypass-governance-retention =true” header must be included whenever you want to override governance settings for an object.