我可以将 bucketName
存储桶中的 maxKeys
项列出为:
new ListObjectsV2Request().withBucketName(bucketName).withMaxKeys(maxKeys)
如果存储桶中的对象多于 maxKeys
,我想获取“maxKeys”最旧的对象。
如何获取最旧的 maxKeys
个?有没有办法向我的列表请求添加排序参数?
最佳答案
没有。 ListObjects
API 调用没有排序参数。
来自Listing object keys programmatically - Amazon Simple Storage Service :
List results are always returned in UTF-8 binary order.
(引用文献:Does the ListBucket command guarantee the results are sorted by key?)
关于java - S3 ListObjectsV2Request 排序参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66211483/