Here’s a sample HEAD request that checks the existence of a version of the object named AcctgBestPractices.doc, which has custom metadata. The request is being made while versioning is enabled for the bucket.
Request with s3curl command line
./s3curl.pl --id=lgreen --head -- -k
"https://finance.europe.hcp.example.com/AcctgBestPractices.doc
?versionId=87288758401473"
Request headers
HEAD /AcctgBestPractices.doc?versionId=87288815588289 HTTP/1.1
Host: finance.europe.hcp.example.com
Date: Fri, 07 February 2020 17:19:26 +0000
Authorization: AWS bGdyZWVu:EUa2evHNUtlw8Xu/1iFdGgWSDc8=
Response headers
HTTP/1.1 200 OK
Date: Fri, 07 February 2020 17:19:26 GMT
ETag: "26aa5129552e57fc64e10aa5b3911ee2"
Accept-Ranges: bytes
x-amz-version-id: 87288758401473
Last-Modified: Sun, 29 May 2016 14:56:05 GMT
x-amz-meta-author: P.D. Grey,Morgan White,Paris Black
Content-Type: application/msword
Content-Length: 3206178
© 2015, 2020 Hitachi Vantara LLC. All rights reserved.