ListObjects 命令是否保证结果按关键字排序? [英] Does the ListObjects command guarantee the results are sorted by key?
问题描述
在调用 S3 ListObjects 命令(通过 REST 或 SOAP API)时,结果集是否以任何特定顺序返回?鉴于对象键和标记的性质,我希望结果集始终按对象键排序.但我没有看到任何文件证实这一点.
When calling the S3 ListObjects command (via either REST or SOAP API), is the result set returned in any particular order? I would expect, given the nature of object keys and markers, that the result set is always sorted by object key. But I haven't seen any documentation confirming this.
推荐答案
更新:亚马逊已更改其文档,如下所示.
Update: Amazon has changed their documentation as shown below.
它们按字母顺序返回.列表结果始终以 UTF-8 二进制顺序返回.请参阅 http://docs.aws.amazon.com/AmazonS3/latest/dev/ListingKeysUsingAPIs.html
They are returned alphabetically. List results are always returned in UTF-8 binary order. See http://docs.aws.amazon.com/AmazonS3/latest/dev/ListingKeysUsingAPIs.html
Amazon S3 公开了一个列表操作可以让你枚举键装在一个桶里.键是选择按桶列出和字首.例如,考虑一个桶包含一个键的命名字典"对于每个英文单词.你可能会让调用以列出其中的所有键以字母q"开头的存储桶.列表结果始终返回字典(字母)顺序 列表结果总是以 UTF-8 二进制顺序返回.
Amazon S3 exposes a list operation that lets you enumerate the keys contained in a bucket. Keys are selected for listing by bucket and prefix. For example, consider a bucket named 'dictionary' that contains a key for every English word. You might make a call to list all the keys in that bucket that start with the letter "q".
List results are always returned in lexicographic (alphabetical) orderList results are always returned in UTF-8 binary order.
这篇关于ListObjects 命令是否保证结果按关键字排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!