AWS SDK for .NET Documentation
ListBuckets Method
AmazonAmazon.S3AmazonS3ListBuckets()()()() Did this page help you?   Yes   No    Tell us about it...
Return a list of all of the buckets owned by the authenticated sender of the request.
Declaration Syntax
C#
ListBucketsResponse ListBuckets()
Return Value
Returns a ListBucketsResponse with the response from S3.
Examples

This example shows how to list all buckets.

CopyListBuckets sample
// Create a client
AmazonS3Client client = new AmazonS3Client();

// Issue call
ListBucketsResponse response = client.ListBuckets();

// View response data
Console.WriteLine("Buckets owner - {0}", response.Owner.DisplayName);
foreach (S3Bucket bucket in response.Buckets)
{
    Console.WriteLine("Bucket {0}, Created on {1}", bucket.BucketName, bucket.CreationDate);
}
Exceptions

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)