ListBucket命令是否保证结果按键排序? [英] Does the ListBucket command guarantee the results are sorted by key?

查看:42
本文介绍了ListBucket命令是否保证结果按键排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调用S3 ListBucket命令(通过REST或SOAP API)时,结果集是否按任何特定顺序返回?考虑到对象键和标记的性质,我希望结果集始终按对象键排序.但是我还没有任何文档可以证实这一点.

When calling the S3 ListBucket 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.

推荐答案

更新:Amazon更改了其文档,如下所示.

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) order List results are always returned in UTF-8 binary order.

这篇关于ListBucket命令是否保证结果按键排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆