Class DeleteObjectsRequest
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A key to delete, with an optional version attribute. -
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionDeleteObjectsRequest
(String bucketName) Constructs a newDeleteObjectsRequest
, specifying the objects' bucket name. -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the Amazon S3 bucket containing the object(s) to delete.getKeys()
Returns the list of keys to delete from this bucket.getMfa()
Gets the optional Multi-Factor Authentication information included with this request.boolean
getQuiet()
Returns the quiet element for this request.boolean
Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.void
setBucketName
(String bucketName) Sets the name of the Amazon S3 bucket containing the object(s) to delete.void
Sets the list of keys to delete from this bucket, clearing any existing list of keys.void
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.withBucketName
(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.Convenience method to specify a set of keys without versions.Sets the list of keys to delete from this bucket, clearing any existing list of keys.Sets the optional Multi-Factor Authentication information to include with this request Returns this, enabling additional method calls to be chained together.withQuiet
(boolean quiet) Sets the quiet element for this request.withRequesterPays
(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket.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
-
DeleteObjectsRequest
Constructs a newDeleteObjectsRequest
, specifying the objects' bucket name.- Parameters:
bucketName
- The name of the Amazon S3 bucket containing the object(s) to delete.
-
-
Method Details
-
getBucketName
Gets the name of the Amazon S3 bucket containing the object(s) to delete.- Returns:
- The name of the Amazon S3 bucket containing the object(s) to delete.
- See Also:
-
setBucketName
Sets the name of the Amazon S3 bucket containing the object(s) to delete.- Parameters:
bucketName
- The name of the Amazon S3 bucket containing the object(s) to delete.- See Also:
-
withBucketName
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.- Parameters:
bucketName
- The name of the Amazon S3 bucket containing the object(s) to delete.- Returns:
- The updated
DeleteObjectsRequest
object, enabling additional method calls to be chained together.
-
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.- Returns:
- The optional Multi-Factor Authentication information included with this request.
-
setMfa
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.- Parameters:
mfa
- The optional Multi-Factor Authentication information to include with this request.
-
withMfa
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.- Parameters:
mfa
- The optional Multi-Factor Authentication information to include with this request.- Returns:
- this, enabling additional method calls to be chained together.
-
setQuiet
public void setQuiet(boolean quiet) Sets the quiet element for this request. When true, only errors will be returned in the service response. -
getQuiet
public boolean getQuiet()Returns the quiet element for this request. When true, only errors will be returned in the service response. -
withQuiet
Sets the quiet element for this request. When true, only errors will be returned in the service response.- Returns:
- this, to chain multiple calls together.
-
setKeys
Sets the list of keys to delete from this bucket, clearing any existing list of keys.- Parameters:
keys
- The list of keys to delete from this bucket
-
withKeys
Sets the list of keys to delete from this bucket, clearing any existing list of keys.- Parameters:
keys
- The list of keys to delete from this bucket- Returns:
- this, to chain multiple calls togethers.
-
getKeys
Returns the list of keys to delete from this bucket. -
withKeys
Convenience method to specify a set of keys without versions.- See Also:
-
isRequesterPays
public boolean isRequesterPays()Returns true if the user has enabled Requester Pays option when conducting this operation from Requester Pays Bucket; else false.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
- Returns:
- true if the user has enabled Requester Pays option for conducting this operation from Requester Pays Bucket.
-
setRequesterPays
public void setRequesterPays(boolean isRequesterPays) Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket.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.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.
-
withRequesterPays
Used for conducting this operation from a Requester Pays Bucket. If set the requester is charged for requests from the bucket. It returns this updated DeleteObjectsRequest object so that additional method calls can be chained together.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.
- Parameters:
isRequesterPays
- Enable Requester Pays option for the operation.- Returns:
- The updated DeleteObjectsRequest object.
-