listBuckets
inline suspend fun S3Client.listBuckets(crossinline block: ListBucketsRequest.Builder.() -> Unit): ListBucketsResponse
This operation is not supported by directory buckets.
Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the s3:ListAllMyBuckets
permission.
For information about Amazon S3 buckets, see Creating, configuring, and working with Amazon S3 buckets.
Samples
fun main() {
//sampleStart
// The following example returns all the buckets owned by the sender of this request.
val resp = s3Client.listBuckets()
//sampleEnd
}