文档中心 > 列举桶
列举桶

最近更新时间:2022-09-29

以下代码用于列举所有的桶:

s3.listBuckets(AWSRequest.init()).continueWith(block: { (task) -> Any? in
if let error = task.error {
   print("list bucket failed with error: (\(error))")
} else {
   let buckets = task.result?.buckets
   print(buckets!)
   print("list bucket completed.")
}
return nil
})