The parameters to list the object keys in a bucket.
| C# |
public class ListObjectsRequest : S3Request
| All Members | Constructors | Methods | Properties | ||
| Icon | Member | Description |
|---|---|---|
| ListObjectsRequest()()()() | Initializes a new instance of the ListObjectsRequest 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.) | |
| BucketName |
The name of the bucket containing the objects whose keys are to be listed.
| |
| Delimiter |
Causes keys that contain the same string between the prefix and the
first occurrence of the delimiter to be rolled up into a single result
element in the CommonPrefixes collection. These rolled-up keys are not
returned elsewhere in the response.
| |
| Equals(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.) | |
| Marker |
Indicates where in the bucket to begin listing. The list will only
include keys that occur lexicographically after marker. This is
convenient for pagination: to get the next page of results use the
last key of the current page as the marker.
| |
| MaxKeys |
The maximum number of keys you'd like to see in the response body. The
server might return fewer than this many keys, but will not return more.
| |
| Prefix |
Limits the response to keys which begin with the indicated prefix. You can
use prefixes to separate a bucket into different sets of keys in a way similar
to how a file system uses folders.
| |
| ReadWriteTimeout |
Overrides the default HttpWebRequest ReadWriteTimeout value.
(Inherited from S3Request.) | |
| Timeout |
Overrides the default HttpWebRequest timeout value.
(Inherited from S3Request.) | |
| ToString()()()() | (Inherited from S3Request.) | |
| WithBucketName(String) |
Sets the name of the bucket containing the objects whose keys are to be listed.
| |
| WithDelimiter(String) |
Causes keys that contain the same string between the prefix and the
first occurrence of the delimiter to be rolled up into a single result
element in the CommonPrefixes collection. These rolled-up keys are not
returned elsewhere in the response.
| |
| WithInputStream(Stream) |
Sets an input stream for the request; content for the request will be read from the stream.
(Inherited from S3Request.) | |
| WithMarker(String) |
Indicates where in the bucket to begin listing. The list will only
include keys that occur lexicographically after marker. This is
convenient for pagination: to get the next page of results use the
last key of the current page as the marker.
| |
| WithMaxKeys(Int32) |
The maximum number of keys you'd like to see in the response body. The
server might return fewer than this many keys, but will not return more.
| |
| WithPrefix(String) |
Limits the response to keys which begin with the indicated prefix. You can
use prefixes to separate a bucket into different sets of keys in a way similar
to how a file system uses folders.
| |
| WithReadWriteTimeout(Int32) |
Overrides the default HttpWebRequest ReadWriteTimeout value.
(Inherited from S3Request.) | |
| WithTimeout(Int32) |
Overrides the default HttpWebRequest timeout value.
(Inherited from S3Request.) |
This example shows how to list all objects in a bucket.
// Create a client AmazonS3Client client = new AmazonS3Client(); // List all objects ListObjectsRequest listRequest = new ListObjectsRequest { BucketName = "SampleBucket", }; ListObjectsResponse listResponse; do { // Get a list of objects listResponse = client.ListObjects(listRequest); foreach (S3Object obj in listResponse.S3Objects) { Console.WriteLine("Object - " + obj.Key); Console.WriteLine(" Size - " + obj.Size); Console.WriteLine(" LastModified - " + obj.LastModified); Console.WriteLine(" Storage class - " + obj.StorageClass); } // Set the marker property listRequest.Marker = listResponse.NextMarker; } while (listResponse.IsTruncated);