The ListObjectsResponse contains the list of S3Objects in the bucket and
any headers returned by S3.
Declaration Syntax
C# |
public class ListObjectsResponse : S3Response
Members
All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
ListObjectsResponse()()()() | Initializes a new instance of the ListObjectsResponse class | |
AmazonId2 |
Gets and sets the AmazonId2 property.
This property corresponds to the x-amz-id-2 header in the HTTP response from the Amazon S3 service. The value of this header is used for internal troubleshooting purposes.
(Inherited from S3Response.) | |
CommonPrefix | Obsolete.
Returns the list of common prefixes returned by S3.
This property has been deprecated. Please use the
CommonPrefixes property instead.
CommonPrefixes | |
CommonPrefixes |
Gets the CommonPrefixes property.
A response can contain CommonPrefixes only if you specify a delimiter.
When you do, CommonPrefixes contains all (if there are any) keys between
Prefix and the next occurrence of the string specified by delimiter. In effect,
CommonPrefixes lists keys that act like subdirectories in the directory specified
by Prefix. For example, if prefix is notes/ and delimiter is a slash (/), in
notes/summer/july, the common prefix is notes/summer/.
| |
Delimiter |
Gets and sets the Delimiter property.
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.
| |
Dispose()()()() |
Disposes of all managed and unmanaged resources.
(Inherited from S3Response.) | |
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.) | |
Headers |
Gets and sets the Headers property.
Information like the request-id, the amz-id-2 are
retrieved fro the Headers and presented to the user
via properties of the response object.
(Inherited from S3Response.) | |
IsTruncated |
Gets and Sets the IsTruncated property.
This property governs whether
this is the last set of items that match the
specified criteria or whether you need to make
another call to S3 to retrieve more keys.
| |
MaxKeys |
Gets and sets the MaxKeys property.
This is the maximum number of keys in the S3Objects collection.
The value is derived from the MaxKeys parameter to ListObjectsRequest.
| |
Metadata |
Gets and sets the Metadata property.
(Inherited from S3Response.) | |
Name |
Gets and sets the Name property.
The bucket's name.
| |
NextMarker |
Gets and sets the NextMarker property.
NextMarker is set by S3 only if a Delimiter was specified
in the original ListObjects request. If a delimiter was
not specified, the AWS SDK for .NET returns the last Key
of the List of Objects retrieved from S3 as the NextMarker.
| |
Prefix |
Gets and sets the Prefix property.
Keys that begin with the indicated prefix are listed.
| |
RequestId |
Gets and sets the RequestId property.
(Inherited from S3Response.) | |
ResponseStream |
Gets and sets the ResponseStream property. This property
only has a valid value for GetObjectResponses. In order to
use this stream without leaking the underlying resource, please
wrap access to the stream within a using block.
(Inherited from S3Response.)CopyC# | |
ResponseXml |
Gets and sets the ResponseXml property. This is the
original xml response received from S3
(Inherited from S3Response.) | |
S3Objects |
Gets the S3Objects property. This is a list of
objects in the bucket that match your search criteria.
| |
StatusCode |
Gets the HTTP Status code from the service response.
(Inherited from S3Response.) | |
ToString()()()() |
String Representation of this object. Overrides Object.ToString()
(Inherited from S3Response.) |
Examples
This example shows how to list all objects in a bucket.
CopyListObjects sample
// 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);
Inheritance Hierarchy
Object | ||
S3Response | ||
ListObjectsResponse |
See Also