HCP Tenant Management Help


Example: Enabling versioning for a bucket

Here’s a sample PUT request that enables versioning for the finance bucket. The versioning request body is in a file named versioning.xml.

Request body

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
     <Status>Enabled</Status>
</VersioningConfiguration>

Request with s3curl command line

./s3curl.pl --id=lgreen --put versioning.xml -- -k
     "https://europe.hcp.example.com/finance?versioning"

Request headers

PUT /finance?versioning HTTP/1.1
Host: europe.hcp.example.com
Date: Fri, 10 May 2019 17:19:26 +0000
Authorization: AWS bGdyZWVu:ETdibK607bVlNdxb0aKCttJU33U=
Content-Length: 182

Response headers

HTTP/1.1 200 OK
Date: Fri, 10 May 2019 17:19:26 GMT
Location: /finance
Content-Length: 0

© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.