Put Object Retention (Flex WORM only)
Places an Object Retention configuration on an object.
Request Syntax
PUT /{bucket}/{Key+}?retention&versionId=VersionId HTTP/1.1
Host: msdps3.server:8443
x-amz-bypass-governance-retention: BypassGovernanceRetention
Content-MD5: ContentMD5
<?xml version="1.0" encoding="UTF-8"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Mode>string</Mode>
<RetainUntilDate>timestamp</RetainUntilDate>
</Retention>
Request Parameters
Bucket
The bucket name that contains the object you want to apply this Object Retention configuration to.
Required: Yes
Type: String
Key
The key name for the object that you want to apply this Object Retention configuration to.
Required: Yes
Type: String
versionId
The version ID for the object that you want to apply this Object Retention configuration to.
x-amz-bypass-governance-retention
Indicates whether this action should bypass Governance mode restrictions.
Request Body
Retention
Root level tag for the Retention parameters.
Required: Yes
Mode
Indicates the Retention mode for the specified object.
Valid Values: GOVERNANCE, COMPLIANCE
Required: No
Type: String
RetainUntilDate
The date on which this Object Lock Retention will expire.
Required: No
Type: Timestamp
Response Syntax
HTTP/1.1 200
Possible Error Response
Success
HTTP status code 200.
AccessDenied
Request was rejected because user authentication failed.
HTTP status code 403.
NoSuchBucket
The specified bucket does not exist.
HTTP status code 404.
InternalError
Request failed because of an internal server error.
HTTP status code 500.
InvalidRequest
The error may occur for some reasons. For details, please refer the error messages.
HTTP status code 400.