List buckets


Example: Listing Buckets using the s3Client.listBuckets() method

AmazonS3 s3Client = new AmazonS3Client();
s3Client.setEndpoint(`https://systemname.example.com`);

List<Bucket> Buckets = s3Client.listBuckets(); 1

for (Bucket b : Buckets) { 2
  System.out.println(`Found: `+b.getName()); 3
}

1 Get a list of Buckets.
2 For each bucket…
3 Display `Found: ` then the name of the Bucket.