versitygw icon indicating copy to clipboard operation
versitygw copied to clipboard

[Feature] - conditional reads

Open benmcclelland opened this issue 5 months ago • 0 comments

Describe the solution you'd like https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-reads.html

The following S3 APIs support using conditional reads:

  • GetObject
  • HeadObject
  • CopyObject

Additional context GetObject

If-Match — Return the object only if its ETag matches the one provided. If-Modified-Since — Return the object only if it has been modified since the time specified. If-None-Match — Return the object only if its ETag does not matches the one provided. If-Unmodified-Since — Return the object only if it has not been modified since the time specified. For more information about these headers, errors returned, and the order S3 handles multiple conditional headers in a single request, see GetObject in the Amazon Simple Storage Service API Reference.

HeadObject

If-Match — Return the object only if its ETag matches the one provided. If-Modified-Since — Return the object only if it has been modified since the time specified. If-None-Match — Return the object only if its ETag does not matches the one provided. If-Unmodified-Since — Return the object only if it has not been modified since the time specified. For more information about these headers, errors returned, and the order S3 handles multiple conditional headers in a single request, see HeadObject in the Amazon Simple Storage Service API Reference.

CopyObject

x-amz-copy-source-if-match — Copies the source object only if its ETag matches the one provided. x-amz-copy-source-if-modified-since — Copies the source object only if it has been modified since the time specified. x-amz-copy-source-if-none-match — Copies the source object only if its ETag does not matches the one provided. x-amz-copy-source-if-unmodified-since — Copies the source object only if it has not been modified since the time specified.

benmcclelland avatar Sep 19 '24 22:09 benmcclelland