MENU
  • Dark

S3 Put Object Retention

  • Dark

Article Summary

PUThttps://s3.<your-region>.backblazeb2.com/<your-bucket-name>/<your-key>?retention

Places an Object Retention configuration on an object. For more information, see Enable Object Lock with the S3-Compatible API.

AUTHORIZATION AWS Signature

This request is using AWS Signature from collection Backblaze B2 Cloud Storage S3 Compatible API.

PARAMS

retention


versionId

Optional. Specifies a particular version of the object.

PATH VARIABLES

bucket

Required. The name of the bucket

key

Required. Key of the object to be written.

Body (raw XML)

XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Mode>COMPLIANCE</Mode>
    <RetainUntilDate>2022-02-02T23:56:06.538Z</RetainUntilDate>
</Retention>
Custom

Example Request

curl --location --request PUT 'https://s3.<your-region>.backblazeb2.com/my-bucket-name/object-1?retention=null' \
--data '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Mode>COMPLIANCE</Mode>
    <RetainUntilDate>2022-02-02T23:56:06.538Z</RetainUntilDate>
</Retention>'
Shell

Example Response

200 OK

Body

No response body

This request doesn't return any response body


Headers (8)

Cache-Control

max-age=0, no-cache, no-store

x-amz-request-id

56aa38410aaebdd

Content-Type


x-amz-id-2

aMa41BGZMOZMztjUfY9JmpzRnZLRjZmIQ

Content-Length

0

Date

Fri, 28 Jan 2022 23:14:48 GMT

Keep-Alive

timeout=5

Connection

keep-alive







Was this article helpful?