Struct bonsaidb::keystorage::s3::aws_sdk_s3::operation::delete_objects::builders::DeleteObjectsFluentBuilder
pub struct DeleteObjectsFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to DeleteObjects
.
This action enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this action provides a suitable alternative to sending individual delete requests, reducing per-request overhead.
The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a delete action and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, Amazon S3 returns the result as deleted.
The action supports two modes for the response: verbose and quiet. By default, the action uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete action encountered an error. For a successful deletion, the action does not return any information about the delete in the response body.
When performing this action on an MFA Delete enabled bucket, that attempts to delete any versioned objects, you must include an MFA token. If you do not provide one, the entire request will fail, even if there are non-versioned objects you are trying to delete. If you provide an invalid token, whether there are versioned keys in the request or not, the entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA Delete.
Finally, the Content-MD5 header is required for all Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your request body has not been altered in transit.
The following operations are related to DeleteObjects
:
Implementations§
§impl DeleteObjectsFluentBuilder
impl DeleteObjectsFluentBuilder
pub fn as_input(&self) -> &DeleteObjectsInputBuilder
pub fn as_input(&self) -> &DeleteObjectsInputBuilder
Access the DeleteObjects as a reference.
pub async fn send(
self
) -> impl Future<Output = Result<DeleteObjectsOutput, SdkError<DeleteObjectsError, Response<SdkBody>>>>
pub async fn send( self ) -> impl Future<Output = Result<DeleteObjectsOutput, SdkError<DeleteObjectsError, Response<SdkBody>>>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
pub async fn customize(
self
) -> impl Future<Output = Result<CustomizableOperation<DeleteObjectsOutput, DeleteObjectsError, DeleteObjectsFluentBuilder>, SdkError<DeleteObjectsError, Response>>>
pub async fn customize( self ) -> impl Future<Output = Result<CustomizableOperation<DeleteObjectsOutput, DeleteObjectsError, DeleteObjectsFluentBuilder>, SdkError<DeleteObjectsError, Response>>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn bucket(self, input: impl Into<String>) -> DeleteObjectsFluentBuilder
pub fn bucket(self, input: impl Into<String>) -> DeleteObjectsFluentBuilder
The bucket name containing the objects to delete.
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 with 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.
pub fn set_bucket(self, input: Option<String>) -> DeleteObjectsFluentBuilder
pub fn set_bucket(self, input: Option<String>) -> DeleteObjectsFluentBuilder
The bucket name containing the objects to delete.
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 with 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.
pub fn get_bucket(&self) -> &Option<String>
pub fn get_bucket(&self) -> &Option<String>
The bucket name containing the objects to delete.
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 with 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.
pub fn delete(self, input: Delete) -> DeleteObjectsFluentBuilder
pub fn delete(self, input: Delete) -> DeleteObjectsFluentBuilder
Container for the request.
pub fn set_delete(self, input: Option<Delete>) -> DeleteObjectsFluentBuilder
pub fn set_delete(self, input: Option<Delete>) -> DeleteObjectsFluentBuilder
Container for the request.
pub fn get_delete(&self) -> &Option<Delete>
pub fn get_delete(&self) -> &Option<Delete>
Container for the request.
pub fn mfa(self, input: impl Into<String>) -> DeleteObjectsFluentBuilder
pub fn mfa(self, input: impl Into<String>) -> DeleteObjectsFluentBuilder
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.
pub fn set_mfa(self, input: Option<String>) -> DeleteObjectsFluentBuilder
pub fn set_mfa(self, input: Option<String>) -> DeleteObjectsFluentBuilder
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.
pub fn get_mfa(&self) -> &Option<String>
pub fn get_mfa(&self) -> &Option<String>
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA delete enabled.
pub fn request_payer(self, input: RequestPayer) -> DeleteObjectsFluentBuilder
pub fn request_payer(self, input: RequestPayer) -> DeleteObjectsFluentBuilder
Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.
pub fn set_request_payer(
self,
input: Option<RequestPayer>
) -> DeleteObjectsFluentBuilder
pub fn set_request_payer( self, input: Option<RequestPayer> ) -> DeleteObjectsFluentBuilder
Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.
pub fn get_request_payer(&self) -> &Option<RequestPayer>
pub fn get_request_payer(&self) -> &Option<RequestPayer>
Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination Amazon S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.
pub fn bypass_governance_retention(
self,
input: bool
) -> DeleteObjectsFluentBuilder
pub fn bypass_governance_retention( self, input: bool ) -> DeleteObjectsFluentBuilder
Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention
permission.
pub fn set_bypass_governance_retention(
self,
input: Option<bool>
) -> DeleteObjectsFluentBuilder
pub fn set_bypass_governance_retention( self, input: Option<bool> ) -> DeleteObjectsFluentBuilder
Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention
permission.
pub fn get_bypass_governance_retention(&self) -> &Option<bool>
pub fn get_bypass_governance_retention(&self) -> &Option<bool>
Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention
permission.
pub fn expected_bucket_owner(
self,
input: impl Into<String>
) -> DeleteObjectsFluentBuilder
pub fn expected_bucket_owner( self, input: impl Into<String> ) -> DeleteObjectsFluentBuilder
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
pub fn set_expected_bucket_owner(
self,
input: Option<String>
) -> DeleteObjectsFluentBuilder
pub fn set_expected_bucket_owner( self, input: Option<String> ) -> DeleteObjectsFluentBuilder
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
pub fn get_expected_bucket_owner(&self) -> &Option<String>
pub fn get_expected_bucket_owner(&self) -> &Option<String>
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden
(access denied).
pub fn checksum_algorithm(
self,
input: ChecksumAlgorithm
) -> DeleteObjectsFluentBuilder
pub fn checksum_algorithm( self, input: ChecksumAlgorithm ) -> DeleteObjectsFluentBuilder
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more information, see Checking object integrity in the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
parameter.
This checksum algorithm must be the same for all parts and it match the checksum value supplied in the CreateMultipartUpload
request.
pub fn set_checksum_algorithm(
self,
input: Option<ChecksumAlgorithm>
) -> DeleteObjectsFluentBuilder
pub fn set_checksum_algorithm( self, input: Option<ChecksumAlgorithm> ) -> DeleteObjectsFluentBuilder
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more information, see Checking object integrity in the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
parameter.
This checksum algorithm must be the same for all parts and it match the checksum value supplied in the CreateMultipartUpload
request.
pub fn get_checksum_algorithm(&self) -> &Option<ChecksumAlgorithm>
pub fn get_checksum_algorithm(&self) -> &Option<ChecksumAlgorithm>
Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum
or x-amz-trailer
header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request
. For more information, see Checking object integrity in the Amazon S3 User Guide.
If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm
parameter.
This checksum algorithm must be the same for all parts and it match the checksum value supplied in the CreateMultipartUpload
request.
Trait Implementations§
§impl Clone for DeleteObjectsFluentBuilder
impl Clone for DeleteObjectsFluentBuilder
§fn clone(&self) -> DeleteObjectsFluentBuilder
fn clone(&self) -> DeleteObjectsFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more