Package org.jclouds.s3.options
Class ListBucketOptions
- java.lang.Object
-
- org.jclouds.http.options.BaseHttpRequestOptions
-
- org.jclouds.s3.options.ListBucketOptions
-
- All Implemented Interfaces:
Cloneable
,HttpRequestOptions
public class ListBucketOptions extends BaseHttpRequestOptions implements Cloneable
Contains options supported in the REST API for the GET bucket operation.Usage
The recommended way to instantiate a GetBucketOptions object is to statically import GetBucketOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):import static org.jclouds.s3.commands.options.GetBucketOptions.Builder.* S3Client connection = // get connection ListBucketResponse bucket = connection.listBucket("bucketName",withPrefix("home/users").maxKeys(1000));
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListBucketOptions.Builder
-
Field Summary
Fields Modifier and Type Field Description static ListBucketOptions
NONE
-
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, pathSuffix, payload, queryParameters
-
-
Constructor Summary
Constructors Constructor Description ListBucketOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListBucketOptions
afterMarker(String marker)
Indicates where in the bucket to begin listing.ListBucketOptions
clone()
ListBucketOptions
delimiter(String 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.String
getDelimiter()
String
getMarker()
Integer
getMaxResults()
String
getPrefix()
ListBucketOptions
maxResults(int maxKeys)
The maximum number of keys you'd like to see in the response body.ListBucketOptions
withPrefix(String prefix)
Limits the response to keys which begin with the indicated prefix.-
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildPathSuffix, buildQueryParameters, buildRequestHeaders, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstQueryOrNull, hashCode, replaceHeader, toString
-
-
-
-
Field Detail
-
NONE
public static final ListBucketOptions NONE
-
-
Method Detail
-
withPrefix
public ListBucketOptions withPrefix(String 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.
-
getPrefix
public String getPrefix()
-
afterMarker
public ListBucketOptions afterMarker(String 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.
-
getMarker
public String getMarker()
-
maxResults
public ListBucketOptions maxResults(int 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.
-
getMaxResults
public Integer getMaxResults()
-
delimiter
public ListBucketOptions delimiter(String 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.
-
getDelimiter
public String getDelimiter()
-
clone
public ListBucketOptions clone()
-
-