对于 AWS/S3 的 PUT 请求,“If-Match”或“x-goog-if- Generation-match”等效项

Dan*_*edy 5 amazon-web-services cloud-storage

对于发送到 Amazon S3 Blob 存储的 PUT 请求,是否存在与“If-Match”(Azure) 或“x-goog-if- Generation-match”(Google Storage) 等效的等效项?

这两个标头都执行相同的操作 - 它们允许您指定覆盖对象的 PUT 请求仅在覆盖对象的特定先前版本时才应成功。细节:

https://learn.microsoft.com/en-us/azure/storage/common/storage-concurrency?toc=/azure/storage/blobs/toc.json#optimistic-concurrency-for-blobs-and-containers

https://cloud.google.com/storage/docs/xml-api/reference-headers#xgoogif Generationmatch

谢谢!

jel*_*csc 3

不幸的是,S3 不支持条件 PUT。您需要与其他 AWS 服务(例如 DynamoDB)合作才能实现此类行为。