Package com.amazonaws.services.s3.model
Class ListObjectsV2Request
java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.s3.model.ListObjectsV2Request
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
Request to retrieve a listing of objects in an S3 bucket.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the Amazon S3 bucket whose objects are to be listed.Gets the optional continuation token.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 theListObjectsV2Result.getCommonPrefixes()
list.Gets the optionalencodingType
parameter indicating the encoding method to be applied on the response.Gets the optionalmaxKeys
parameter indicating the maximum number of keys to include in the response.Gets the optional prefix parameter and restricts the response to keys that begin with the specified prefix.Returns optional parameter indicating where you want Amazon S3 to start the object listing from.boolean
Returns if fetch owner is set.void
setBucketName
(String bucketName) Sets the name of the Amazon S3 bucket whose objects are to be listed.void
setContinuationToken
(String continuationToken) Sets the optional continuation token.void
setDelimiter
(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 theListObjectsV2Result.getCommonPrefixes()
list.void
setEncodingType
(String encodingType) Sets the optionalencodingType
parameter indicating the encoding method to be applied on the response.void
setFetchOwner
(boolean fetchOwner) Sets the optional fetch owner flag.void
setMaxKeys
(Integer maxKeys) Sets the optionalmaxKeys
parameter indicating the maximum number of keys to include in the response.void
Sets the optional prefix parameter, restricting the response to keys that begin with the specified prefix.void
setStartAfter
(String startAfter) Sets the optional parameter indicating where you want Amazon S3 to start the object listing from.withBucketName
(String bucketName) Sets the name of the Amazon S3 bucket whose objects are to be listed.withContinuationToken
(String continuationToken) Sets the optional continuation token.withDelimiter
(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 theListObjectsV2Result.getCommonPrefixes()
list.withEncodingType
(String encodingType) Sets the optionalencodingType
parameter indicating the encoding method to be applied on the response.withFetchOwner
(boolean fetchOwner) Sets the optional fetch owner flag.withMaxKeys
(Integer maxKeys) Sets the optionalmaxKeys
parameter indicating the maximum number of keys to include in the response.withPrefix
(String prefix) Sets the optional prefix parameter restricting the response to keys that begin with the specified prefix.withStartAfter
(String startAfter) Sets the optional parameter indicating where you want Amazon S3 to start the object listing from.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
ListObjectsV2Request
public ListObjectsV2Request()
-
-
Method Details
-
getBucketName
Gets the name of the Amazon S3 bucket whose objects are to be listed.- Returns:
- The name of the Amazon S3 bucket whose objects are to be listed.
-
setBucketName
Sets the name of the Amazon S3 bucket whose objects are to be listed.- Parameters:
bucketName
- The name of the Amazon S3 bucket whose objects are to be listed.
-
withBucketName
Sets the name of the Amazon S3 bucket whose objects are to be listed. Returns thisListObjectsV2Request
, enabling additional method calls to be chained together.- Parameters:
bucketName
- The name of the Amazon S3 bucket whose objects are to be listed.- Returns:
- This
ListObjectsV2Request
, enabling additional method calls to be chained together.
-
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 theListObjectsV2Result.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.- Returns:
- 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
ListObjectsV2Result.getCommonPrefixes()
list.
-
setDelimiter
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 theListObjectsV2Result.getCommonPrefixes()
list.- Parameters:
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 theListObjectsV2Result.getCommonPrefixes()
list.
-
withDelimiter
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 theListObjectsV2Result.getCommonPrefixes()
list. Returns thisListObjectsRequest
, enabling additional method calls to be chained together.- Parameters:
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 theListObjectsV2Result.getCommonPrefixes()
list.- Returns:
- This
ListObjectsRequest
, enabling additional method calls to be chained together.
-
getEncodingType
Gets the optionalencodingType
parameter indicating the encoding method to be applied on the response.- Returns:
- The encoding method to be applied on the response.
-
setEncodingType
Sets the optionalencodingType
parameter indicating the encoding method to be applied on the response. An object key can contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response.- Parameters:
encodingType
- The encoding method to be applied on the response. Valid values: null (not encoded) or "url".
-
withEncodingType
Sets the optionalencodingType
parameter indicating the encoding method to be applied on the response. An object key can contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. Returns thisListObjectsV2Request
, enabling additional method calls to be chained together.- Parameters:
encodingType
- The encoding method to be applied on the response. Valid values: null (not encoded) or "url".
-
getMaxKeys
Gets the optionalmaxKeys
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.- Returns:
- The optional parameter indicating the maximum number of keys to include in the response.
-
setMaxKeys
Sets the optionalmaxKeys
parameter indicating the maximum number of keys to include in the response.- Parameters:
maxKeys
- The optional parameter indicating the maximum number of keys to include in the response.
-
withMaxKeys
Sets the optionalmaxKeys
parameter indicating the maximum number of keys to include in the response. Returns thisListObjectsV2Request
, enabling additional method calls to be chained together.- Parameters:
maxKeys
- The optional parameter indicating the maximum number of keys to include in the response.- Returns:
- This
ListObjectsV2Request
, enabling additional method calls to be chained together. - See Also:
-
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.- Returns:
- The optional prefix parameter restricting the response to keys that begin with the specified prefix.
- See Also:
-
setPrefix
Sets the optional prefix parameter, restricting the response to keys that begin with the specified prefix.- Parameters:
prefix
- The optional prefix parameter, restricting the response to keys that begin with the specified prefix.- See Also:
-
withPrefix
Sets the optional prefix parameter restricting the response to keys that begin with the specified prefix. Returns thisListObjectsV2Request
, enabling additional method calls to be chained together.- Parameters:
prefix
- The optional prefix parameter restricting the response to keys that begin with the specified prefix.- Returns:
- This
ListObjectsV2Request
, enabling additional method calls to be chained together. - See Also:
-
getContinuationToken
Gets the optional continuation token. Continuation token allows a list to be continued from a specific point. ContinuationToken is provided in truncated list results.- Returns:
- The optional continuation token associated with this request.
-
setContinuationToken
Sets the optional continuation token. Continuation token allows a list to be continued from a specific point. ContinuationToken is provided in truncated list results.- Parameters:
continuationToken
- The optional continuation token to associate with this request.
-
withContinuationToken
Sets the optional continuation token. Continuation token allows a list to be continued from a specific point. ContinuationToken is provided in truncated list results.- Parameters:
continuationToken
- The optional continuation token to associate with this request.- Returns:
- This
ListObjectsV2Request
, enabling additional method calls to be chained together.
-
isFetchOwner
public boolean isFetchOwner()Returns if fetch owner is set. The owner field is not present in ListObjectsV2 results by default. If this flag is set to true the owner field will be included.- Returns:
- whether fetchOwner is set
-
setFetchOwner
public void setFetchOwner(boolean fetchOwner) Sets the optional fetch owner flag. The owner field is not present in ListObjectsV2 results by default. If this flag is set to true the owner field will be included.- Parameters:
fetchOwner
- Set to true if the owner field should be included in results
-
withFetchOwner
Sets the optional fetch owner flag. The owner field is not present in ListObjectsV2 results by default. If this flag is set to true the owner field will be included.- Parameters:
fetchOwner
- Set to true if the owner field should be included in results- Returns:
- This
ListObjectsV2Request
, enabling additional method calls to be chained together.
-
getStartAfter
Returns optional parameter indicating where you want Amazon S3 to start the object listing from. This can be any key in the bucket.- Returns:
- the optional startAfter parameter
-
setStartAfter
Sets the optional parameter indicating where you want Amazon S3 to start the object listing from. This can be any key in the bucket.- Parameters:
startAfter
- The optional startAfter parameter. This can be any key in the bucket.
-
withStartAfter
Sets the optional parameter indicating where you want Amazon S3 to start the object listing from. This can be any key in the bucket.- Parameters:
startAfter
- The optional startAfter parameter. This can be any key in the bucket.- Returns:
- This
ListObjectsV2Request
, enabling additional method calls to be chained together.
-