public class DeleteObjectsRequest extends AmazonWebServiceRequest
Modifier and Type | Class and Description |
---|---|
static class |
DeleteObjectsRequest.KeyVersion
A key to delete, with an optional version attribute.
|
Constructor and Description |
---|
DeleteObjectsRequest(java.lang.String bucketName)
Constructs a new
DeleteObjectsRequest , specifying the objects'
bucket name. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBucketName()
Gets the name of the Amazon S3 bucket containing the object(s) to delete.
|
java.util.List<DeleteObjectsRequest.KeyVersion> |
getKeys()
Returns the list of keys to delete from this bucket.
|
MultiFactorAuthentication |
getMfa()
Gets the optional Multi-Factor Authentication information included with
this request.
|
boolean |
getQuiet()
Returns the quiet element for this request.
|
boolean |
isRequesterPays()
Returns true if the user has enabled Requester Pays option when
conducting this operation from Requester Pays Bucket; else false.
|
void |
setBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket containing the object(s) to delete.
|
void |
setKeys(java.util.List<DeleteObjectsRequest.KeyVersion> keys)
Sets the list of keys to delete from this bucket, clearing any existing
list of keys.
|
void |
setMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with
this request.
|
void |
setQuiet(boolean quiet)
Sets the quiet element for this request.
|
void |
setRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
DeleteObjectsRequest |
withBucketName(java.lang.String bucketName)
Sets the name of the Amazon S3 bucket containing the object(s) to delete
and returns this object, enabling additional method calls to be chained
together.
|
DeleteObjectsRequest |
withKeys(java.util.List<DeleteObjectsRequest.KeyVersion> keys)
Sets the list of keys to delete from this bucket, clearing any existing
list of keys.
|
DeleteObjectsRequest |
withKeys(java.lang.String... keys)
Convenience method to specify a set of keys without versions.
|
DeleteObjectsRequest |
withMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with
this request Returns this, enabling additional method calls to be chained
together.
|
DeleteObjectsRequest |
withQuiet(boolean quiet)
Sets the quiet element for this request.
|
DeleteObjectsRequest |
withRequesterPays(boolean isRequesterPays)
Used for conducting this operation from a Requester Pays Bucket.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public DeleteObjectsRequest(java.lang.String bucketName)
DeleteObjectsRequest
, specifying the objects'
bucket name.bucketName
- The name of the Amazon S3 bucket containing the
object(s) to delete.public java.lang.String getBucketName()
setBucketName(String)
public void setBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket containing the
object(s) to delete.getBucketName()
public DeleteObjectsRequest withBucketName(java.lang.String bucketName)
bucketName
- The name of the Amazon S3 bucket containing the
object(s) to delete.DeleteObjectsRequest
object, enabling
additional method calls to be chained together.public MultiFactorAuthentication getMfa()
Gets the optional Multi-Factor Authentication information included with this request.
Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
public void setMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with this request.
Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration.
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
mfa
- The optional Multi-Factor Authentication information to
include with this request.public DeleteObjectsRequest withMfa(MultiFactorAuthentication mfa)
Sets the optional Multi-Factor Authentication information to include with this request Returns this, enabling additional method calls to be chained together.
Multi-Factor Authentication is required when deleting an object version from a bucket which has MFADelete enabled in its bucket versioning configuration
See BucketVersioningConfiguration.setMfaDeleteEnabled(Boolean)
for more information on MFADelete.
mfa
- The optional Multi-Factor Authentication information to
include with this request.public void setQuiet(boolean quiet)
public boolean getQuiet()
public DeleteObjectsRequest withQuiet(boolean quiet)
public void setKeys(java.util.List<DeleteObjectsRequest.KeyVersion> keys)
keys
- The list of keys to delete from this bucketpublic DeleteObjectsRequest withKeys(java.util.List<DeleteObjectsRequest.KeyVersion> keys)
keys
- The list of keys to delete from this bucketpublic java.util.List<DeleteObjectsRequest.KeyVersion> getKeys()
public DeleteObjectsRequest withKeys(java.lang.String... keys)
withKeys(List)
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 DeleteObjectsRequest 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.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.