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));

  • Field Details

  • Constructor Details

    • ListBucketOptions

      public ListBucketOptions()
  • Method Details

    • 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()
      Overrides:
      clone in class Object