public class ListObjectsV2Request extends AmazonWebServiceRequest implements Serializable, ExpectedBucketOwnerRequest
NOOP
Constructor and Description |
---|
ListObjectsV2Request() |
Modifier and Type | Method and Description |
---|---|
String |
getBucketName()
Bucket name to list.
|
String |
getContinuationToken()
Gets the optional continuation token.
|
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
ListObjectsV2Result.getCommonPrefixes() list. |
String |
getEncodingType()
Gets the optional
encodingType parameter indicating the
encoding method to be applied on the response. |
String |
getExpectedBucketOwner()
Returns he account id of the expected bucket owner.
|
Integer |
getMaxKeys()
Gets the optional
maxKeys parameter indicating the maximum number of keys to
include in the response. |
List<String> |
getOptionalObjectAttributes()
Gets the optional object attribute parameter indicating that customer also need
some extra information about an object in the response like Restore Status.
|
String |
getPrefix()
Gets the optional prefix parameter and restricts the response to keys
that begin with the specified prefix.
|
String |
getStartAfter()
Returns optional parameter indicating where you want Amazon S3 to start the object
listing from.
|
boolean |
isFetchOwner()
Returns if fetch owner is set.
|
boolean |
isRequesterPays()
Returns true if the user has enabled Requester Pays option when
conducting this operation from Requester Pays Bucket; else false.
|
void |
setBucketName(String bucketName)
Bucket name to list.
|
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 the
ListObjectsV2Result.getCommonPrefixes() list. |
void |
setEncodingType(String encodingType)
Sets the optional
encodingType parameter indicating the
encoding method to be applied on the response. |
void |
setExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
void |
setFetchOwner(boolean fetchOwner)
Sets the optional fetch owner flag.
|
void |
setMaxKeys(Integer maxKeys)
Sets the optional
maxKeys parameter indicating the maximum number of keys to
include in the response. |
void |
setOptionalObjectAttributes(List<String> optionalObjectAttributes)
Sets the optional object attribute parameter indicating that customer also need
some extra information about an object in the response like Restore Status.
|
void |
setPrefix(String prefix)
Sets the optional prefix parameter, restricting the response to keys that
begin with the specified prefix.
|
void |
setRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
void |
setStartAfter(String startAfter)
Sets the optional parameter indicating where you want Amazon S3 to start the object
listing from.
|
ListObjectsV2Request |
withBucketName(String bucketName)
Bucket name to list.
|
ListObjectsV2Request |
withContinuationToken(String continuationToken)
Sets the optional continuation token.
|
ListObjectsV2Request |
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 the
ListObjectsV2Result.getCommonPrefixes() list. |
ListObjectsV2Request |
withEncodingType(String encodingType)
Sets the optional
encodingType parameter indicating the
encoding method to be applied on the response. |
ListObjectsV2Request |
withExpectedBucketOwner(String expectedBucketOwner)
Set the account id of the expected bucket owner.
|
ListObjectsV2Request |
withFetchOwner(boolean fetchOwner)
Sets the optional fetch owner flag.
|
ListObjectsV2Request |
withMaxKeys(Integer maxKeys)
Sets the optional
maxKeys parameter indicating the maximum number of keys to
include in the response. |
ListObjectsV2Request |
withOptionalObjectAttributes(List<String> optionalObjectAttributes)
Sets the optional object attribute parameter indicating that customer also need
some extra information about an object in the response like Restore Status.
|
ListObjectsV2Request |
withPrefix(String prefix)
Sets the optional prefix parameter restricting the response to keys that
begin with the specified prefix.
|
ListObjectsV2Request |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
ListObjectsV2Request |
withStartAfter(String startAfter)
Sets the optional parameter indicating where you want Amazon S3 to start the object
listing from.
|
addHandlerContext, clone, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public String getExpectedBucketOwner()
ExpectedBucketOwnerRequest
403 (Access Denied)
error.getExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public ListObjectsV2Request withExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.withExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public void setExpectedBucketOwner(String expectedBucketOwner)
ExpectedBucketOwnerRequest
403 (Access Denied)
error.setExpectedBucketOwner
in interface ExpectedBucketOwnerRequest
public String getBucketName()
Bucket name to list.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts in the
Amazon S3 User Guide.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
hostname. The S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts
in the Amazon S3 User Guide.
public void setBucketName(String bucketName)
Bucket name to list.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts in the
Amazon S3 User Guide.
bucketName
- Bucket name to list.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
hostname. The S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts
in the Amazon S3 User Guide.
public ListObjectsV2Request withBucketName(String bucketName)
Bucket name to list.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The
S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts in the
Amazon S3 User Guide.
bucketName
- Bucket name to list.
When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.
When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts
hostname. The S3 on Outposts hostname takes the form
AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com
.
When you use this action using S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts
access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts
in the Amazon S3 User Guide.
ListObjectsV2Request
, enabling additional method
calls to be chained together.public String getDelimiter()
ListObjectsV2Result.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.ListObjectsV2Result.getCommonPrefixes()
list.public void setDelimiter(String delimiter)
ListObjectsV2Result.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 ListObjectsV2Result.getCommonPrefixes()
list.public ListObjectsV2Request withDelimiter(String delimiter)
ListObjectsV2Result.getCommonPrefixes()
list.
Returns this ListObjectsV2Request
, 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 ListObjectsV2Result.getCommonPrefixes()
list.ListObjectsV2Request
, enabling additional method
calls to be chained together.public String getEncodingType()
encodingType
parameter indicating the
encoding method to be applied on the response.public void setEncodingType(String encodingType)
encodingType
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.encodingType
- The encoding method to be applied on the response. Valid
values: null (not encoded) or "url".public ListObjectsV2Request withEncodingType(String encodingType)
encodingType
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 this ListObjectsV2Request
, enabling additional method calls
to be chained together.encodingType
- The encoding method to be applied on the response. Valid
values: null (not encoded) or "url".public Integer getMaxKeys()
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.public void setMaxKeys(Integer maxKeys)
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.public ListObjectsV2Request withMaxKeys(Integer maxKeys)
maxKeys
parameter indicating the maximum number of keys to
include in the response.
Returns this ListObjectsV2Request
, enabling additional method
calls to be chained together.maxKeys
- The optional parameter indicating the maximum number of keys
to include in the response.ListObjectsV2Request
, enabling additional method
calls to be chained together.getMaxKeys()
,
setMaxKeys(Integer)
public String getPrefix()
setPrefix(String)
public void setPrefix(String prefix)
prefix
- The optional prefix parameter, restricting the response to keys
that begin with the specified prefix.getPrefix()
public ListObjectsV2Request withPrefix(String prefix)
ListObjectsV2Request
, enabling additional method
calls to be chained together.prefix
- The optional prefix parameter restricting the response to keys
that begin with the specified prefix.ListObjectsV2Request
, enabling additional method
calls to be chained together.getPrefix()
,
setPrefix(String)
public String getContinuationToken()
public void setContinuationToken(String continuationToken)
continuationToken
- The optional continuation token to associate with this request.public ListObjectsV2Request withContinuationToken(String continuationToken)
continuationToken
- The optional continuation token to associate with this request.ListObjectsV2Request
, enabling additional method
calls to be chained together.public boolean isFetchOwner()
public void setFetchOwner(boolean fetchOwner)
fetchOwner
- Set to true if the owner field should be included in resultspublic ListObjectsV2Request withFetchOwner(boolean fetchOwner)
fetchOwner
- Set to true if the owner field should be included in resultsListObjectsV2Request
, enabling additional method
calls to be chained together.public String getStartAfter()
public void setStartAfter(String startAfter)
startAfter
- The optional startAfter parameter. This can be any key in the bucket.public ListObjectsV2Request withStartAfter(String startAfter)
startAfter
- The optional startAfter parameter. This can be any key in the bucket.ListObjectsV2Request
, enabling additional method
calls to be chained together.public boolean isRequesterPays()
If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket
public void setRequesterPays(boolean isRequesterPays)
If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
isRequesterPays
- Enable Requester Pays option for the operation.public ListObjectsV2Request withRequesterPays(boolean isRequesterPays)
If a bucket is enabled for Requester Pays, then any attempt to upload or download an object from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket.
isRequesterPays
- Enable Requester Pays option for the operation.public List<String> getOptionalObjectAttributes()
setOptionalObjectAttributes(List)
,
withOptionalObjectAttributes(List)
public ListObjectsV2Request withOptionalObjectAttributes(List<String> optionalObjectAttributes)
optionalObjectAttributes
- The optional parameter indicating to include
some extra object information in the response.
Valid values: null or "RestoreStatus".getOptionalObjectAttributes()
,
setOptionalObjectAttributes(List)
public void setOptionalObjectAttributes(List<String> optionalObjectAttributes)
optionalObjectAttributes
- The optional parameter indicating to include
some extra object information in the response.
Valid values: null or "RestoreStatus".getOptionalObjectAttributes()
,
withOptionalObjectAttributes(List)