com.amazonaws.services.s3.model

## クラス ListObjectsRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.s3.model.ListObjectsRequest

-     public class ListObjectsRequest
      extends AmazonWebServiceRequest

  Contains options to return a list of summary information about the objects in the specified bucket. Depending on the request parameters, additional information is returned, such as common prefixes if a delimiter was specified. List results are always returned in lexicographic (alphabetical) order.

  Buckets can contain a virtually unlimited number of keys, and the complete results of a list query can be extremely large. To manage large result sets, Amazon S3 uses pagination to split them into multiple responses. Always check the `ObjectListing.isTruncated()` method to see if the returned listing is complete, or if callers need to make additional calls to get more results. Alternatively, use the `AmazonS3Client.listNextBatchOfObjects(ObjectListing)` method as an easy way to get the next page of object listings.

  Calling `setDelimiter(String)` sets the delimiter, allowing groups of keys that share the delimiter-terminated prefix to be included in the returned listing. This allows applications to organize and browse their keys hierarchically, similar to how a file system organizes files into directories. These common prefixes can be retrieved through the `ObjectListing.getCommonPrefixes()` method.

  For example, consider a bucket that contains the following keys:

  - "foo/bar/baz"
  - "foo/bar/bash"
  - "foo/bar/bang"
  - "foo/boo"
  If calling `listObjects` with a prefix value of "foo/" and a delimiter value of "/" on this bucket, an `ObjectListing` is returned that contains one key ("foo/boo") and one entry in the common prefixes list ("foo/bar/"). To see deeper into the virtual hierarchy, make another call to `listObjects` setting the prefix parameter to any interesting common prefix to list the individual keys under that prefix.

  The total number of keys in a bucket doesn't substantially affect list performance, nor does the presence or absence of additional request parameters.

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `ListObjectsRequest()` Constructs a new `ListObjectsRequest` object.
    `ListObjectsRequest(java.lang.String bucketName, java.lang.String prefix, java.lang.String marker, java.lang.String delimiter, java.lang.Integer maxKeys)` Constructs a new `ListObjectsRequest` object and initializes all required and optional object fields.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getBucketName()` Gets the name of the Amazon S3 bucket whose objects are to be listed.
    `java.lang.String` | `getDelimiter()` Gets the optional delimiter parameter that causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element in the `ObjectListing.getCommonPrefixes()` list.
    `java.lang.String` | `getMarker()` Gets the optional marker parameter indicating where in the bucket to begin listing.
    `java.lang.Integer` | `getMaxKeys()` Gets the optional `maxKeys` parameter indicating the maximum number of keys to include in the response.
    `java.lang.String` | `getPrefix()` Gets the optional prefix parameter and restricts the response to keys that begin with the specified prefix.
    `void` | `setBucketName(java.lang.String bucketName)` Sets the name of the Amazon S3 bucket whose objects are to be listed.
    `void` | `setDelimiter(java.lang.String delimiter)` Sets the optional delimiter parameter that causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element in the `ObjectListing.getCommonPrefixes()` list.
    `void` | `setMarker(java.lang.String marker)` Sets the optional marker parameter indicating where in the bucket to begin listing.
    `void` | `setMaxKeys(java.lang.Integer maxKeys)` Sets the optional `maxKeys` parameter indicating the maximum number of keys to include in the response.
    `void` | `setPrefix(java.lang.String prefix)` Sets the optional prefix parameter, restricting the response to keys that begin with the specified prefix.
    `ListObjectsRequest` | `withBucketName(java.lang.String bucketName)` Sets the name of the Amazon S3 bucket whose objects are to be listed.
    `ListObjectsRequest` | `withDelimiter(java.lang.String delimiter)` Sets the optional delimiter parameter that 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 `ObjectListing.getCommonPrefixes()` list.
    `ListObjectsRequest` | `withMarker(java.lang.String marker)` Sets the optional marker parameter indicating where in the bucket to begin listing.
    `ListObjectsRequest` | `withMaxKeys(java.lang.Integer maxKeys)` Sets the optional `maxKeys` parameter indicating the maximum number of keys to include in the response.
    `ListObjectsRequest` | `withPrefix(java.lang.String prefix)` Sets the optional prefix parameter restricting the response to keys that begin with the specified prefix.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### ListObjectsRequest

          public ListObjectsRequest()

      Constructs a new `ListObjectsRequest` object. The caller must populate the object fields before the request is ready to be executed.
      関連項目:
        `ListObjectsRequest(String, String, String, String, Integer)`

    - #### ListObjectsRequest

          public ListObjectsRequest(java.lang.String bucketName,
                            java.lang.String prefix,
                            java.lang.String marker,
                            java.lang.String delimiter,
                            java.lang.Integer maxKeys)

      Constructs a new `ListObjectsRequest` object and initializes all required and optional object fields.
      パラメータ:
        `bucketName` - The name of the bucket whose objects are to be listed.
        `prefix` - The prefix restricting what keys will be listed.
        `marker` - The key marker indicating where listing results should begin.
        `delimiter` - The delimiter for condensing common prefixes in the returned listing results.
        `maxKeys` - The maximum number of results to return.
      関連項目:
        `ListObjectsRequest()`

  - ### メソッドの詳細

    - #### getBucketName

          public java.lang.String getBucketName()

      Gets the name of the Amazon S3 bucket whose objects are to be listed.
      戻り値:
        The name of the Amazon S3 bucket whose objects are to be listed.
      関連項目:
        `setBucketName(String)`, `withBucketName(String)`

    - #### setBucketName

          public void setBucketName(java.lang.String bucketName)

      Sets the name of the Amazon S3 bucket whose objects are to be listed.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket whose objects are to be listed.
      関連項目:
        `getBucketName()`, `withBucketName(String)`

    - #### withBucketName

          public ListObjectsRequest withBucketName(java.lang.String bucketName)

      Sets the name of the Amazon S3 bucket whose objects are to be listed. Returns this `ListObjectsRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket whose objects are to be listed.
      戻り値:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getBucketName()`, `setBucketName(String)`

    - #### getPrefix

          public java.lang.String getPrefix()

      Gets the optional prefix parameter and restricts the response to keys that begin with the specified prefix. Use prefixes to separate a bucket into different sets of keys, similar to how a file system organizes files into directories.
      戻り値:
        The optional prefix parameter restricting the response to keys that begin with the specified prefix.
      関連項目:
        `setPrefix(String)`

    - #### setPrefix

          public void setPrefix(java.lang.String prefix)

      Sets the optional prefix parameter, restricting the response to keys that begin with the specified prefix.
      パラメータ:
        `prefix` - The optional prefix parameter, restricting the response to keys that begin with the specified prefix.
      関連項目:
        `getPrefix()`

    - #### withPrefix

          public ListObjectsRequest withPrefix(java.lang.String prefix)

      Sets the optional prefix parameter restricting the response to keys that begin with the specified prefix. Returns this `ListObjectsRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `prefix` - The optional prefix parameter restricting the response to keys that begin with the specified prefix.
      戻り値:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getPrefix()`, `setPrefix(String)`

    - #### getMarker

          public java.lang.String getMarker()

      Gets the optional marker parameter indicating where in the bucket to begin listing. The list will only include keys that occur lexicographically after the marker.
      戻り値:
        The optional marker parameter indicating where in the bucket to begin listing. The list will only include keys that occur lexicographically after the marker.
      関連項目:
        `setMarker(String)`, `withMarker(String)`

    - #### setMarker

          public void setMarker(java.lang.String marker)

      Sets the optional marker parameter indicating where in the bucket to begin listing. The list will only include keys that occur lexicographically after the marker.
      パラメータ:
        `marker` - The optional marker parameter indicating where in the bucket to begin listing. The list will only include keys that occur lexicographically after the marker.
      関連項目:
        `getMarker()`, `withMarker(String)`

    - #### withMarker

          public ListObjectsRequest withMarker(java.lang.String marker)

      Sets the optional marker parameter indicating where in the bucket to begin listing. Returns this `ListObjectsRequest`, enabling additional method calls to be chained together. The list will only include keys that occur lexicographically after the marker.
      パラメータ:
        `marker` - The optional parameter indicating where in the bucket to begin listing. The list will only include keys that occur lexicographically after the marker.
      戻り値:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getMarker()`, `setMarker(String)`

    - #### getDelimiter

          public java.lang.String getDelimiter()

      Gets the optional delimiter parameter that causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element in the `ObjectListing.getCommonPrefixes()` list. These combined keys are not returned elsewhere in the response. The most commonly used delimiter is "/", which simulates a hierarchical organization similar to a file system directory structure.
      戻り値:
        The optional delimiter parameter that causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element in the `ObjectListing.getCommonPrefixes()` list.
      関連項目:
        `setDelimiter(String)`, `withDelimiter(String)`

    - #### setDelimiter

          public void setDelimiter(java.lang.String delimiter)

      Sets the optional delimiter parameter that causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element in the `ObjectListing.getCommonPrefixes()` list.
      パラメータ:
        `delimiter` - The optional delimiter parameter that causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be combined into a single result element in the `ObjectListing.getCommonPrefixes()` list.
      関連項目:
        `getDelimiter()`, `withDelimiter(String)`

    - #### withDelimiter

          public ListObjectsRequest withDelimiter(java.lang.String delimiter)

      Sets the optional delimiter parameter that 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 `ObjectListing.getCommonPrefixes()` list. Returns this `ListObjectsRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `delimiter` - The optional delimiter parameter that 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 `ObjectListing.getCommonPrefixes()` list.
      戻り値:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getDelimiter()`, `setDelimiter(String)`

    - #### getMaxKeys

          public java.lang.Integer getMaxKeys()

      Gets the optional `maxKeys` parameter indicating the maximum number of keys to include in the response. Amazon S3 might return fewer keys than specified, but will never return more. Even if the optional parameter is not specified, Amazon S3 will limit the number of results in the response.
      戻り値:
        The optional parameter indicating the maximum number of keys to include in the response.
      関連項目:
        `setMaxKeys(Integer)`, `withMaxKeys(Integer)`

    - #### setMaxKeys

          public void setMaxKeys(java.lang.Integer maxKeys)

      Sets the optional `maxKeys` parameter indicating the maximum number of keys to include in the response.
      パラメータ:
        `maxKeys` - The optional parameter indicating the maximum number of keys to include in the response.
      関連項目:
        `getMaxKeys()`, `withMaxKeys(Integer)`

    - #### withMaxKeys

          public ListObjectsRequest withMaxKeys(java.lang.Integer maxKeys)

      Sets the optional `maxKeys` parameter indicating the maximum number of keys to include in the response. Returns this `ListObjectsRequest`, enabling additional method calls to be chained together.
      パラメータ:
        `maxKeys` - The optional parameter indicating the maximum number of keys to include in the response.
      戻り値:
        This `ListObjectsRequest`, enabling additional method calls to be chained together.
      関連項目:
        `getMaxKeys()`, `setMaxKeys(Integer)`