Struct bonsaidb::keystorage::s3::aws_sdk_s3::operation::delete_object::builders::DeleteObjectFluentBuilder
pub struct DeleteObjectFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to DeleteObject
.
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn't a null version, Amazon S3 does not remove any objects but will still respond that the command was successful.
To remove a specific version, you must use the version Id subresource. Using this subresource permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header, x-amz-delete-marker
, to true.
If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the x-amz-mfa
request header in the DELETE versionId
request. Requests that include x-amz-mfa
must use HTTPS.
For more information about MFA Delete, see Using MFA Delete. To see sample requests that use versioning, see Sample Request.
You can delete objects by explicitly calling DELETE Object or configure its lifecycle (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block users or accounts from removing or deleting objects from your bucket, you must deny them the s3:DeleteObject
, s3:DeleteObjectVersion
, and s3:PutLifeCycleConfiguration
actions.
The following action is related to DeleteObject
:
Implementations§
§impl DeleteObjectFluentBuilder
impl DeleteObjectFluentBuilder
pub fn as_input(&self) -> &DeleteObjectInputBuilder
pub fn as_input(&self) -> &DeleteObjectInputBuilder
Access the DeleteObject as a reference.
pub async fn send(
self
) -> impl Future<Output = Result<DeleteObjectOutput, SdkError<DeleteObjectError, Response<SdkBody>>>>
pub async fn send( self ) -> impl Future<Output = Result<DeleteObjectOutput, SdkError<DeleteObjectError, 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<DeleteObjectOutput, DeleteObjectError, DeleteObjectFluentBuilder>, SdkError<DeleteObjectError, Response>>>
pub async fn customize( self ) -> impl Future<Output = Result<CustomizableOperation<DeleteObjectOutput, DeleteObjectError, DeleteObjectFluentBuilder>, SdkError<DeleteObjectError, Response>>>
Consumes this builder, creating a customizable operation that can be modified before being sent.
pub async fn presigned(
self,
presigning_config: PresigningConfig
) -> impl Future<Output = Result<PresignedRequest, SdkError<DeleteObjectError, Response<SdkBody>>>>
pub async fn presigned( self, presigning_config: PresigningConfig ) -> impl Future<Output = Result<PresignedRequest, SdkError<DeleteObjectError, Response<SdkBody>>>>
Creates a presigned request for this operation.
The presigning_config
provides additional presigning-specific config values, such as the
amount of time the request should be valid for after creation.
Presigned requests can be given to other users or applications to access a resource or perform an operation without having access to the AWS security credentials.
Important: If you’re using credentials that can expire, such as those from STS AssumeRole or SSO, then the presigned request can only be valid for as long as the credentials used to create it are.
pub fn bucket(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
pub fn bucket(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
The bucket name of the bucket containing the object.
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>) -> DeleteObjectFluentBuilder
pub fn set_bucket(self, input: Option<String>) -> DeleteObjectFluentBuilder
The bucket name of the bucket containing the object.
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 of the bucket containing the object.
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 key(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
pub fn key(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
Key name of the object to delete.
pub fn set_key(self, input: Option<String>) -> DeleteObjectFluentBuilder
pub fn set_key(self, input: Option<String>) -> DeleteObjectFluentBuilder
Key name of the object to delete.
pub fn mfa(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
pub fn mfa(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
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>) -> DeleteObjectFluentBuilder
pub fn set_mfa(self, input: Option<String>) -> DeleteObjectFluentBuilder
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 version_id(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
pub fn version_id(self, input: impl Into<String>) -> DeleteObjectFluentBuilder
VersionId used to reference a specific version of the object.
pub fn set_version_id(self, input: Option<String>) -> DeleteObjectFluentBuilder
pub fn set_version_id(self, input: Option<String>) -> DeleteObjectFluentBuilder
VersionId used to reference a specific version of the object.
pub fn get_version_id(&self) -> &Option<String>
pub fn get_version_id(&self) -> &Option<String>
VersionId used to reference a specific version of the object.
pub fn request_payer(self, input: RequestPayer) -> DeleteObjectFluentBuilder
pub fn request_payer(self, input: RequestPayer) -> DeleteObjectFluentBuilder
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>
) -> DeleteObjectFluentBuilder
pub fn set_request_payer( self, input: Option<RequestPayer> ) -> DeleteObjectFluentBuilder
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
) -> DeleteObjectFluentBuilder
pub fn bypass_governance_retention( self, input: bool ) -> DeleteObjectFluentBuilder
Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the s3:BypassGovernanceRetention
permission.
pub fn set_bypass_governance_retention(
self,
input: Option<bool>
) -> DeleteObjectFluentBuilder
pub fn set_bypass_governance_retention( self, input: Option<bool> ) -> DeleteObjectFluentBuilder
Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. 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>
Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the s3:BypassGovernanceRetention
permission.
pub fn expected_bucket_owner(
self,
input: impl Into<String>
) -> DeleteObjectFluentBuilder
pub fn expected_bucket_owner( self, input: impl Into<String> ) -> DeleteObjectFluentBuilder
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>
) -> DeleteObjectFluentBuilder
pub fn set_expected_bucket_owner( self, input: Option<String> ) -> DeleteObjectFluentBuilder
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).
Trait Implementations§
§impl Clone for DeleteObjectFluentBuilder
impl Clone for DeleteObjectFluentBuilder
§fn clone(&self) -> DeleteObjectFluentBuilder
fn clone(&self) -> DeleteObjectFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more