Here’s a sample PUT request that stores an object named quarterly_rpts/Q4_2019.ppt in the finance bucket. In this example, the retention value of the object is set to five days past the time when the object was stored.
The example also shows the response headers HCP returns while versioning is enabled for the bucket and while versioning is disabled for the bucket.
Request with s3curl command line
./s3curl.pl --id=lgreen --put=/quarterly_rpts/Q4_2019.ppt -- -k
"https://finance.europe.hcp.example.com/quarterly_rpts/Q4_2019.ppt"
-H "x-hcp-retention: A+5d"
Request headers
PUT /quarterly_rpts/Q4_2019.ppt HTTP/1.1
Host: finance.europe.hcp.example.com
Date: Fri, 20 Jan 2017 17:19:26 +0000
Authorization: AWS bGdyZWVu:HbkRBWvyO3YQO55Bm0VS3RMatvg=
Content-Length: 235813
x-hcp-retention: A+5d
Response headers with versioning enabled
HTTP/1.1 200 OK
Date: Fri, 20 Jan 2017 17:19:26 GMT
x-amz-version-id: 87288727469825
ETag: "617e8ef649d40cda1f7f3ca81c97a06a"
Content-Length: 0
Response headers with versioning disabled
HTTP/1.1 200 OK
Date: Fri, 20 Jan 2017 17:19:26 GMT
ETag: "617e8ef649d40cda1f7f3ca81c97a06a"
Content-Length: 0
© 2015, 2020 Hitachi Vantara LLC. All rights reserved.