我正在 S3 之上实现一个文件管理器,我目前正在尝试通过 LifeCycles 实现无缝冰川存档。LifeCycles 的 S3 方面非常简单。但是我找不到将返回密钥的实际存储类的方法。它显然是可用的,因为 S3 控制面板显示了它。
在存储类的文档中,他们提到应该存在这个元数据对象(S3 Using Metadata):
x-amz-storage-class 用于存储对象的存储类。
headObject 文档提到它应该返回元数据,但是当我运行它时,没有返回元数据块。
Delete-Marker: "",
Accept-Ranges: "bytes",
Expiration: "",
Restore: "",
Last-Modified: "Mon, 08 Sep 2014 20:27:39 GMT",
Content-Length: "3976807",
ETag: "0359f81b950a395d3f4ee0bf****",
Missing-Meta: "",
Version-Id: "Mb96ZF0dm506eXP***",
Cache-Control: "",
Content-Disposition: "",
Content-Encoding: "",
Content-Language: "",
Content-Type: "video/x-ms-wmv",
Expires: "",
Website-Redirect-Location: "",
Server-Side-Encryption: "",
SSECustomerAlgorithm: "",
SSECustomerKeyMD5: "",
Request-Id: "43AD99D48F****E"
同时,文档声称 Metadata 应该是返回的字段之一:
Metadata => (associative-array<string>)
Associative array of <string> keys mapping to (string) values. Each array key should be changed to an appropriate <string>.
A map of metadata to store with the object in S3.
<string> => (string)
The metadata value.
仅供参考,我正在使用此文档 AWS SDK for PHP
任何建议都值得赞赏,因为目前我发现的唯一解决方案是运行 getObject (这是不可行的,因为它会下载整个对象)或在每次调用时运行 restoreObject 并检查其异常代码。但这意味着在不恢复密钥的情况下无法检查密钥的状态(如果已存档)
谢谢你。