PUT Object retention
Places an Object Retention configuration on an object.
Request Syntax
PUT /<object-key>?retention&versionId=<version-id>HTTP/1.1 Host:<bucket-name>.s3.amazonaws.com Date:<Thu, 15 Nov 2016 00:17:21 GMT>Authorization:<authorization-string>(see Authenticating Requests (AWS Signature Version 4))
URI Request Parameters
- versionId
-
The version ID of the object version that you want to put a retention period on.
Request Body
For more information about the request elements that this operation uses, see ObjectLockRetention.
Example Request Body:
<Retention> <Mode>GOVERNANCE</Mode> <RetainUntilDate>2020-01-05T00:00:00.000Z</RetainUntilDate> </Retention>
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
Related Resources
Locking Objects in the Amazon Simple Storage Service Developer Guide.


