aws_sdk_s3/operation/delete_object/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_object::_delete_object_output::DeleteObjectOutputBuilder;
3
4pub use crate::operation::delete_object::_delete_object_input::DeleteObjectInputBuilder;
5
6impl crate::operation::delete_object::builders::DeleteObjectInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::delete_object::DeleteObjectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::delete_object::DeleteObjectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.delete_object();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DeleteObject`.
24///
25/// <p>Removes an object from a bucket. The behavior depends on the bucket's versioning state:</p>
26/// <ul>
27/// <li>
28/// <p>If bucket versioning is not enabled, the operation permanently deletes the object.</p></li>
29/// <li>
30/// <p>If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s <code>versionId</code> in the request. For more information about versioning-enabled buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html">Deleting object versions from a versioning-enabled bucket</a>.</p></li>
31/// <li>
32/// <p>If bucket versioning is suspended, the operation removes the object that has a null <code>versionId</code>, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null <code>versionId</code>, and all versions of the object have a <code>versionId</code>, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a <code>versionId</code>, you must include the object’s <code>versionId</code> in the request. For more information about versioning-suspended buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html">Deleting objects from versioning-suspended buckets</a>.</p></li>
33/// </ul><note>
34/// <ul>
35/// <li>
36/// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the <code>null</code> value of the version ID is supported by directory buckets. You can only specify <code>null</code> to the <code>versionId</code> query parameter in the request.</p></li>
37/// <li>
38/// <p><b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p></li>
39/// </ul>
40/// </note>
41/// <p>To remove a specific version, you must use the <code>versionId</code> query parameter. Using this query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 sets the response header <code>x-amz-delete-marker</code> to true.</p>
42/// <p>If the object you want to delete is in a bucket where the bucket versioning configuration is MFA Delete enabled, you must include the <code>x-amz-mfa</code> request header in the DELETE <code>versionId</code> request. Requests that include <code>x-amz-mfa</code> must use HTTPS. For more information about MFA Delete, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html">Using MFA Delete</a> in the <i>Amazon S3 User Guide</i>. To see sample requests that use versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete">Sample Request</a>.</p><note>
43/// <p><b>Directory buckets</b> - MFA delete is not supported by directory buckets.</p>
44/// </note>
45/// <p>You can delete objects by explicitly calling DELETE Object or calling (<a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html">PutBucketLifecycle</a>) 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 <code>s3:DeleteObject</code>, <code>s3:DeleteObjectVersion</code>, and <code>s3:PutLifeCycleConfiguration</code> actions.</p><note>
46/// <p><b>Directory buckets</b> - S3 Lifecycle is not supported by directory buckets.</p>
47/// </note>
48/// <dl>
49/// <dt>
50/// Permissions
51/// </dt>
52/// <dd>
53/// <ul>
54/// <li>
55/// <p><b>General purpose bucket permissions</b> - The following permissions are required in your policies when your <code>DeleteObjects</code> request includes specific headers.</p>
56/// <ul>
57/// <li>
58/// <p><b> <code>s3:DeleteObject</code> </b> - To delete an object from a bucket, you must always have the <code>s3:DeleteObject</code> permission.</p></li>
59/// <li>
60/// <p><b> <code>s3:DeleteObjectVersion</code> </b> - To delete a specific version of an object from a versioning-enabled bucket, you must have the <code>s3:DeleteObjectVersion</code> permission.</p></li>
61/// </ul></li>
62/// <li>
63/// <p><b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a>.</p></li>
64/// </ul>
65/// </dd>
66/// <dt>
67/// HTTP Host header syntax
68/// </dt>
69/// <dd>
70/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p>
71/// </dd>
72/// </dl>
73/// <p>The following action is related to <code>DeleteObject</code>:</p>
74/// <ul>
75/// <li>
76/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
77/// </ul>
78#[derive(::std::clone::Clone, ::std::fmt::Debug)]
79pub struct DeleteObjectFluentBuilder {
80 handle: ::std::sync::Arc<crate::client::Handle>,
81 inner: crate::operation::delete_object::builders::DeleteObjectInputBuilder,
82 config_override: ::std::option::Option<crate::config::Builder>,
83}
84impl
85 crate::client::customize::internal::CustomizableSend<
86 crate::operation::delete_object::DeleteObjectOutput,
87 crate::operation::delete_object::DeleteObjectError,
88 > for DeleteObjectFluentBuilder
89{
90 fn send(
91 self,
92 config_override: crate::config::Builder,
93 ) -> crate::client::customize::internal::BoxFuture<
94 crate::client::customize::internal::SendResult<
95 crate::operation::delete_object::DeleteObjectOutput,
96 crate::operation::delete_object::DeleteObjectError,
97 >,
98 > {
99 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
100 }
101}
102impl DeleteObjectFluentBuilder {
103 /// Creates a new `DeleteObjectFluentBuilder`.
104 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
105 Self {
106 handle,
107 inner: ::std::default::Default::default(),
108 config_override: ::std::option::Option::None,
109 }
110 }
111 /// Access the DeleteObject as a reference.
112 pub fn as_input(&self) -> &crate::operation::delete_object::builders::DeleteObjectInputBuilder {
113 &self.inner
114 }
115 /// Sends the request and returns the response.
116 ///
117 /// If an error occurs, an `SdkError` will be returned with additional details that
118 /// can be matched against.
119 ///
120 /// By default, any retryable failures will be retried twice. Retry behavior
121 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
122 /// set when configuring the client.
123 pub async fn send(
124 self,
125 ) -> ::std::result::Result<
126 crate::operation::delete_object::DeleteObjectOutput,
127 ::aws_smithy_runtime_api::client::result::SdkError<
128 crate::operation::delete_object::DeleteObjectError,
129 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
130 >,
131 > {
132 let input = self
133 .inner
134 .build()
135 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
136 let runtime_plugins = crate::operation::delete_object::DeleteObject::operation_runtime_plugins(
137 self.handle.runtime_plugins.clone(),
138 &self.handle.conf,
139 self.config_override,
140 );
141 crate::operation::delete_object::DeleteObject::orchestrate(&runtime_plugins, input).await
142 }
143
144 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
145 pub fn customize(
146 self,
147 ) -> crate::client::customize::CustomizableOperation<
148 crate::operation::delete_object::DeleteObjectOutput,
149 crate::operation::delete_object::DeleteObjectError,
150 Self,
151 > {
152 crate::client::customize::CustomizableOperation::new(self)
153 }
154 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
155 self.set_config_override(::std::option::Option::Some(config_override.into()));
156 self
157 }
158
159 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
160 self.config_override = config_override;
161 self
162 }
163 ///
164 /// Creates a presigned request for this operation.
165 ///
166 /// The `presigning_config` provides additional presigning-specific config values, such as the
167 /// amount of time the request should be valid for after creation.
168 ///
169 /// Presigned requests can be given to other users or applications to access a resource or perform
170 /// an operation without having access to the AWS security credentials.
171 ///
172 /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
173 /// the presigned request can only be valid for as long as the credentials used to create it are.
174 ///
175 #[allow(unused_mut)]
176 pub async fn presigned(
177 mut self,
178 presigning_config: crate::presigning::PresigningConfig,
179 ) -> ::std::result::Result<
180 crate::presigning::PresignedRequest,
181 ::aws_smithy_runtime_api::client::result::SdkError<
182 crate::operation::delete_object::DeleteObjectError,
183 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
184 >,
185 > {
186 let runtime_plugins = crate::operation::delete_object::DeleteObject::operation_runtime_plugins(
187 self.handle.runtime_plugins.clone(),
188 &self.handle.conf,
189 self.config_override,
190 )
191 .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
192 presigning_config,
193 ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
194 ));
195
196 let input = self
197 .inner
198 .build()
199 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
200 let mut context = crate::operation::delete_object::DeleteObject::orchestrate_with_stop_point(
201 &runtime_plugins,
202 input,
203 ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
204 )
205 .await
206 .map_err(|err| {
207 err.map_service_error(|err| {
208 err.downcast::<crate::operation::delete_object::DeleteObjectError>()
209 .expect("correct error type")
210 })
211 })?;
212 let request = context.take_request().expect("request set before transmit");
213 crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
214 }
215 /// <p>The bucket name of the bucket containing the object.</p>
216 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
217 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
218 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
219 /// </note>
220 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
221 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.inner = self.inner.bucket(input.into());
223 self
224 }
225 /// <p>The bucket name of the bucket containing the object.</p>
226 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
227 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
228 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
229 /// </note>
230 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
231 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232 self.inner = self.inner.set_bucket(input);
233 self
234 }
235 /// <p>The bucket name of the bucket containing the object.</p>
236 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
237 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
238 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
239 /// </note>
240 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
241 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
242 self.inner.get_bucket()
243 }
244 /// <p>Key name of the object to delete.</p>
245 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246 self.inner = self.inner.key(input.into());
247 self
248 }
249 /// <p>Key name of the object to delete.</p>
250 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
251 self.inner = self.inner.set_key(input);
252 self
253 }
254 /// <p>Key name of the object to delete.</p>
255 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
256 self.inner.get_key()
257 }
258 /// <p>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.</p><note>
259 /// <p>This functionality is not supported for directory buckets.</p>
260 /// </note>
261 pub fn mfa(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262 self.inner = self.inner.mfa(input.into());
263 self
264 }
265 /// <p>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.</p><note>
266 /// <p>This functionality is not supported for directory buckets.</p>
267 /// </note>
268 pub fn set_mfa(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.inner = self.inner.set_mfa(input);
270 self
271 }
272 /// <p>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.</p><note>
273 /// <p>This functionality is not supported for directory buckets.</p>
274 /// </note>
275 pub fn get_mfa(&self) -> &::std::option::Option<::std::string::String> {
276 self.inner.get_mfa()
277 }
278 /// <p>Version ID used to reference a specific version of the object.</p><note>
279 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
280 /// </note>
281 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
282 self.inner = self.inner.version_id(input.into());
283 self
284 }
285 /// <p>Version ID used to reference a specific version of the object.</p><note>
286 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
287 /// </note>
288 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289 self.inner = self.inner.set_version_id(input);
290 self
291 }
292 /// <p>Version ID used to reference a specific version of the object.</p><note>
293 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
294 /// </note>
295 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
296 self.inner.get_version_id()
297 }
298 /// <p>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 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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
299 /// <p>This functionality is not supported for directory buckets.</p>
300 /// </note>
301 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
302 self.inner = self.inner.request_payer(input);
303 self
304 }
305 /// <p>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 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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
306 /// <p>This functionality is not supported for directory buckets.</p>
307 /// </note>
308 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
309 self.inner = self.inner.set_request_payer(input);
310 self
311 }
312 /// <p>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 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 <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
313 /// <p>This functionality is not supported for directory buckets.</p>
314 /// </note>
315 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
316 self.inner.get_request_payer()
317 }
318 /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the <code>s3:BypassGovernanceRetention</code> permission.</p><note>
319 /// <p>This functionality is not supported for directory buckets.</p>
320 /// </note>
321 pub fn bypass_governance_retention(mut self, input: bool) -> Self {
322 self.inner = self.inner.bypass_governance_retention(input);
323 self
324 }
325 /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the <code>s3:BypassGovernanceRetention</code> permission.</p><note>
326 /// <p>This functionality is not supported for directory buckets.</p>
327 /// </note>
328 pub fn set_bypass_governance_retention(mut self, input: ::std::option::Option<bool>) -> Self {
329 self.inner = self.inner.set_bypass_governance_retention(input);
330 self
331 }
332 /// <p>Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the <code>s3:BypassGovernanceRetention</code> permission.</p><note>
333 /// <p>This functionality is not supported for directory buckets.</p>
334 /// </note>
335 pub fn get_bypass_governance_retention(&self) -> &::std::option::Option<bool> {
336 self.inner.get_bypass_governance_retention()
337 }
338 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
339 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340 self.inner = self.inner.expected_bucket_owner(input.into());
341 self
342 }
343 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
344 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345 self.inner = self.inner.set_expected_bucket_owner(input);
346 self
347 }
348 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
349 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
350 self.inner.get_expected_bucket_owner()
351 }
352 /// <p>The <code>If-Match</code> header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the ETag matches or if the object doesn't exist, the operation will return a <code>204 Success (No Content) response</code>.</p>
353 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p><note>
354 /// <p>This functionality is only supported for directory buckets.</p>
355 /// </note>
356 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
357 self.inner = self.inner.if_match(input.into());
358 self
359 }
360 /// <p>The <code>If-Match</code> header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the ETag matches or if the object doesn't exist, the operation will return a <code>204 Success (No Content) response</code>.</p>
361 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p><note>
362 /// <p>This functionality is only supported for directory buckets.</p>
363 /// </note>
364 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365 self.inner = self.inner.set_if_match(input);
366 self
367 }
368 /// <p>The <code>If-Match</code> header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the ETag matches or if the object doesn't exist, the operation will return a <code>204 Success (No Content) response</code>.</p>
369 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p><note>
370 /// <p>This functionality is only supported for directory buckets.</p>
371 /// </note>
372 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
373 self.inner.get_if_match()
374 }
375 /// <p>If present, the object is deleted only if its modification times matches the provided <code>Timestamp</code>. If the <code>Timestamp</code> values do not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Timestamp</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
376 /// <p>This functionality is only supported for directory buckets.</p>
377 /// </note>
378 pub fn if_match_last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
379 self.inner = self.inner.if_match_last_modified_time(input);
380 self
381 }
382 /// <p>If present, the object is deleted only if its modification times matches the provided <code>Timestamp</code>. If the <code>Timestamp</code> values do not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Timestamp</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
383 /// <p>This functionality is only supported for directory buckets.</p>
384 /// </note>
385 pub fn set_if_match_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
386 self.inner = self.inner.set_if_match_last_modified_time(input);
387 self
388 }
389 /// <p>If present, the object is deleted only if its modification times matches the provided <code>Timestamp</code>. If the <code>Timestamp</code> values do not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Timestamp</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
390 /// <p>This functionality is only supported for directory buckets.</p>
391 /// </note>
392 pub fn get_if_match_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
393 self.inner.get_if_match_last_modified_time()
394 }
395 /// <p>If present, the object is deleted only if its size matches the provided size in bytes. If the <code>Size</code> value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Size</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
396 /// <p>This functionality is only supported for directory buckets.</p>
397 /// </note> <important>
398 /// <p>You can use the <code>If-Match</code>, <code>x-amz-if-match-last-modified-time</code> and <code>x-amz-if-match-size</code> conditional headers in conjunction with each-other or individually.</p>
399 /// </important>
400 pub fn if_match_size(mut self, input: i64) -> Self {
401 self.inner = self.inner.if_match_size(input);
402 self
403 }
404 /// <p>If present, the object is deleted only if its size matches the provided size in bytes. If the <code>Size</code> value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Size</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
405 /// <p>This functionality is only supported for directory buckets.</p>
406 /// </note> <important>
407 /// <p>You can use the <code>If-Match</code>, <code>x-amz-if-match-last-modified-time</code> and <code>x-amz-if-match-size</code> conditional headers in conjunction with each-other or individually.</p>
408 /// </important>
409 pub fn set_if_match_size(mut self, input: ::std::option::Option<i64>) -> Self {
410 self.inner = self.inner.set_if_match_size(input);
411 self
412 }
413 /// <p>If present, the object is deleted only if its size matches the provided size in bytes. If the <code>Size</code> value does not match, the operation returns a <code>412 Precondition Failed</code> error. If the <code>Size</code> matches or if the object doesn’t exist, the operation returns a <code>204 Success (No Content)</code> response.</p><note>
414 /// <p>This functionality is only supported for directory buckets.</p>
415 /// </note> <important>
416 /// <p>You can use the <code>If-Match</code>, <code>x-amz-if-match-last-modified-time</code> and <code>x-amz-if-match-size</code> conditional headers in conjunction with each-other or individually.</p>
417 /// </important>
418 pub fn get_if_match_size(&self) -> &::std::option::Option<i64> {
419 self.inner.get_if_match_size()
420 }
421}
422
423impl crate::client::customize::internal::CustomizablePresigned<crate::operation::delete_object::DeleteObjectError> for DeleteObjectFluentBuilder {
424 fn presign(
425 self,
426 config_override: crate::config::Builder,
427 presigning_config: crate::presigning::PresigningConfig,
428 ) -> crate::client::customize::internal::BoxFuture<
429 crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::delete_object::DeleteObjectError>,
430 > {
431 ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
432 }
433}