AWS SDK for .NET Documentation
ListBucketsRequest Class
AmazonAmazon.S3.ModelListBucketsRequest Did this page help you?   Yes   No    Tell us about it...
The parameters to list the available buckets for the user.
Declaration Syntax
C#
public class ListBucketsRequest : S3Request
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
ListBucketsRequest()()()()
Initializes a new instance of the ListBucketsRequest class

AddHeader(String, String)
Adds the header to the collection of headers for the request.
(Inherited from S3Request.)
AddHeaders(NameValueCollection)
Adds all of the specified key/value pairs into the request headers collection.
(Inherited from S3Request.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
InputStream
Input stream for the request; content for the request will be read from the stream.
(Inherited from S3Request.)
ReadWriteTimeout
Overrides the default HttpWebRequest ReadWriteTimeout value.
(Inherited from S3Request.)
Timeout
Overrides the default HttpWebRequest timeout value.
(Inherited from S3Request.)
ToString()()()() (Inherited from S3Request.)
WithInputStream(Stream) Obsolete.
Sets an input stream for the request; content for the request will be read from the stream.
(Inherited from S3Request.)
WithReadWriteTimeout(Int32) Obsolete.
Overrides the default HttpWebRequest ReadWriteTimeout value.
(Inherited from S3Request.)
WithTimeout(Int32) Obsolete.
Overrides the default HttpWebRequest timeout value.
(Inherited from S3Request.)
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);
}
Inheritance Hierarchy
Object
S3Request
 ListBucketsRequest

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