aws_sdk_s3/operation/head_object/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::head_object::_head_object_output::HeadObjectOutputBuilder;
3
4pub use crate::operation::head_object::_head_object_input::HeadObjectInputBuilder;
5
6impl crate::operation::head_object::builders::HeadObjectInputBuilder {
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::head_object::HeadObjectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::head_object::HeadObjectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.head_object();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `HeadObject`.
24///
25/// <p>The <code>HEAD</code> operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.</p><note>
26/// <p>A <code>HEAD</code> request has the same options as a <code>GET</code> operation on an object. The response is identical to the <code>GET</code> response except that there is no response body. Because of this, if the <code>HEAD</code> request generates an error, it returns a generic code, such as <code>400 Bad Request</code>, <code>403 Forbidden</code>, <code>404 Not Found</code>, <code>405 Method Not Allowed</code>, <code>412 Precondition Failed</code>, or <code>304 Not Modified</code>. It's not possible to retrieve the exact exception of these error codes.</p>
27/// </note>
28/// <p>Request headers are limited to 8 KB in size. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html">Common Request Headers</a>.</p>
29/// <dl>
30/// <dt>
31/// Permissions
32/// </dt>
33/// <dd>
34/// <p></p>
35/// <ul>
36/// <li>
37/// <p><b>General purpose bucket permissions</b> - To use <code>HEAD</code>, you must have the <code>s3:GetObject</code> permission. You need the relevant read object (or version) permission for this operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and condition keys for Amazon S3</a> in the <i>Amazon S3 User Guide</i>. For more information about the permissions to S3 API operations by S3 resource types, see <a href="/AmazonS3/latest/userguide/using-with-s3-policy-actions.html">Required permissions for Amazon S3 API operations</a> in the <i>Amazon S3 User Guide</i>.</p>
38/// <p>If the object you request doesn't exist, the error that Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p>
39/// <ul>
40/// <li>
41/// <p>If you have the <code>s3:ListBucket</code> permission on the bucket, Amazon S3 returns an HTTP status code <code>404 Not Found</code> error.</p></li>
42/// <li>
43/// <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 returns an HTTP status code <code>403 Forbidden</code> error.</p></li>
44/// </ul></li>
45/// <li>
46/// <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>
47/// <p>If you enable <code>x-amz-checksum-mode</code> in the request and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p></li>
48/// </ul>
49/// </dd>
50/// <dt>
51/// Encryption
52/// </dt>
53/// <dd>
54/// <note>
55/// <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for <code>HEAD</code> requests if your object uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side encryption with Amazon S3 managed encryption keys (SSE-S3). The <code>x-amz-server-side-encryption</code> header is used when you <code>PUT</code> an object to S3 and want to specify the encryption method. If you include this header in a <code>HEAD</code> request for an object that uses these types of keys, you’ll get an HTTP <code>400 Bad Request</code> error. It's because the encryption method can't be changed when you retrieve the object.</p>
56/// </note>
57/// <p>If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers to provide the encryption key for the server to be able to retrieve the object's metadata. The headers are:</p>
58/// <ul>
59/// <li>
60/// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
61/// <li>
62/// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
63/// <li>
64/// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
65/// </ul>
66/// <p>For more information about SSE-C, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Server-Side Encryption (Using Customer-Provided Encryption Keys)</a> in the <i>Amazon S3 User Guide</i>.</p><note>
67/// <p><b>Directory bucket </b> - For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
68/// </note>
69/// </dd>
70/// <dt>
71/// Versioning
72/// </dt>
73/// <dd>
74/// <ul>
75/// <li>
76/// <p>If the current version of the object is a delete marker, Amazon S3 behaves as if the object was deleted and includes <code>x-amz-delete-marker: true</code> in the response.</p></li>
77/// <li>
78/// <p>If the specified version is a delete marker, the response returns a <code>405 Method Not Allowed</code> error and the <code>Last-Modified: timestamp</code> response header.</p></li>
79/// </ul><note>
80/// <ul>
81/// <li>
82/// <p><b>Directory buckets</b> - Delete marker is not supported for directory buckets.</p></li>
83/// <li>
84/// <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>
85/// </ul>
86/// </note>
87/// </dd>
88/// <dt>
89/// HTTP Host header syntax
90/// </dt>
91/// <dd>
92/// <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><note>
93/// <p>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>
94/// </note>
95/// </dd>
96/// </dl>
97/// <p>The following actions are related to <code>HeadObject</code>:</p>
98/// <ul>
99/// <li>
100/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
101/// <li>
102/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html">GetObjectAttributes</a></p></li>
103/// </ul><important>
104/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
105/// </important>
106#[derive(::std::clone::Clone, ::std::fmt::Debug)]
107pub struct HeadObjectFluentBuilder {
108 handle: ::std::sync::Arc<crate::client::Handle>,
109 inner: crate::operation::head_object::builders::HeadObjectInputBuilder,
110 config_override: ::std::option::Option<crate::config::Builder>,
111}
112impl
113 crate::client::customize::internal::CustomizableSend<
114 crate::operation::head_object::HeadObjectOutput,
115 crate::operation::head_object::HeadObjectError,
116 > for HeadObjectFluentBuilder
117{
118 fn send(
119 self,
120 config_override: crate::config::Builder,
121 ) -> crate::client::customize::internal::BoxFuture<
122 crate::client::customize::internal::SendResult<
123 crate::operation::head_object::HeadObjectOutput,
124 crate::operation::head_object::HeadObjectError,
125 >,
126 > {
127 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
128 }
129}
130impl HeadObjectFluentBuilder {
131 /// Creates a new `HeadObjectFluentBuilder`.
132 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
133 Self {
134 handle,
135 inner: ::std::default::Default::default(),
136 config_override: ::std::option::Option::None,
137 }
138 }
139 /// Access the HeadObject as a reference.
140 pub fn as_input(&self) -> &crate::operation::head_object::builders::HeadObjectInputBuilder {
141 &self.inner
142 }
143 /// Sends the request and returns the response.
144 ///
145 /// If an error occurs, an `SdkError` will be returned with additional details that
146 /// can be matched against.
147 ///
148 /// By default, any retryable failures will be retried twice. Retry behavior
149 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
150 /// set when configuring the client.
151 pub async fn send(
152 self,
153 ) -> ::std::result::Result<
154 crate::operation::head_object::HeadObjectOutput,
155 ::aws_smithy_runtime_api::client::result::SdkError<
156 crate::operation::head_object::HeadObjectError,
157 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
158 >,
159 > {
160 let input = self
161 .inner
162 .build()
163 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
164 let runtime_plugins = crate::operation::head_object::HeadObject::operation_runtime_plugins(
165 self.handle.runtime_plugins.clone(),
166 &self.handle.conf,
167 self.config_override,
168 );
169 crate::operation::head_object::HeadObject::orchestrate(&runtime_plugins, input).await
170 }
171
172 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
173 pub fn customize(
174 self,
175 ) -> crate::client::customize::CustomizableOperation<
176 crate::operation::head_object::HeadObjectOutput,
177 crate::operation::head_object::HeadObjectError,
178 Self,
179 > {
180 crate::client::customize::CustomizableOperation::new(self)
181 }
182 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
183 self.set_config_override(::std::option::Option::Some(config_override.into()));
184 self
185 }
186
187 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
188 self.config_override = config_override;
189 self
190 }
191 ///
192 /// Creates a presigned request for this operation.
193 ///
194 /// The `presigning_config` provides additional presigning-specific config values, such as the
195 /// amount of time the request should be valid for after creation.
196 ///
197 /// Presigned requests can be given to other users or applications to access a resource or perform
198 /// an operation without having access to the AWS security credentials.
199 ///
200 /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
201 /// the presigned request can only be valid for as long as the credentials used to create it are.
202 ///
203 #[allow(unused_mut)]
204 pub async fn presigned(
205 mut self,
206 presigning_config: crate::presigning::PresigningConfig,
207 ) -> ::std::result::Result<
208 crate::presigning::PresignedRequest,
209 ::aws_smithy_runtime_api::client::result::SdkError<
210 crate::operation::head_object::HeadObjectError,
211 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
212 >,
213 > {
214 let runtime_plugins = crate::operation::head_object::HeadObject::operation_runtime_plugins(
215 self.handle.runtime_plugins.clone(),
216 &self.handle.conf,
217 self.config_override,
218 )
219 .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
220 presigning_config,
221 ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
222 ));
223
224 let input = self
225 .inner
226 .build()
227 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
228 let mut context = crate::operation::head_object::HeadObject::orchestrate_with_stop_point(
229 &runtime_plugins,
230 input,
231 ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
232 )
233 .await
234 .map_err(|err| {
235 err.map_service_error(|err| {
236 err.downcast::<crate::operation::head_object::HeadObjectError>()
237 .expect("correct error type")
238 })
239 })?;
240 let request = context.take_request().expect("request set before transmit");
241 crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
242 }
243 /// <p>The name of the bucket that contains the object.</p>
244 /// <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>
245 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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>
246 /// <p>Object Lambda access points are not supported by directory buckets.</p>
247 /// </note>
248 /// <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>
249 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250 self.inner = self.inner.bucket(input.into());
251 self
252 }
253 /// <p>The name of the bucket that contains the object.</p>
254 /// <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>
255 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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>
256 /// <p>Object Lambda access points are not supported by directory buckets.</p>
257 /// </note>
258 /// <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>
259 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260 self.inner = self.inner.set_bucket(input);
261 self
262 }
263 /// <p>The name of the bucket that contains the object.</p>
264 /// <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>
265 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. 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>
266 /// <p>Object Lambda access points are not supported by directory buckets.</p>
267 /// </note>
268 /// <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>
269 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
270 self.inner.get_bucket()
271 }
272 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
273 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
274 /// <ul>
275 /// <li>
276 /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
277 /// <li>
278 /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
279 /// </ul>
280 /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
281 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
282 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283 self.inner = self.inner.if_match(input.into());
284 self
285 }
286 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
287 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
288 /// <ul>
289 /// <li>
290 /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
291 /// <li>
292 /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
293 /// </ul>
294 /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
295 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
296 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
297 self.inner = self.inner.set_if_match(input);
298 self
299 }
300 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error.</p>
301 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
302 /// <ul>
303 /// <li>
304 /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
305 /// <li>
306 /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
307 /// </ul>
308 /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
309 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
310 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
311 self.inner.get_if_match()
312 }
313 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
314 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
315 /// <ul>
316 /// <li>
317 /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
318 /// <li>
319 /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
320 /// </ul>
321 /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
322 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
323 pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
324 self.inner = self.inner.if_modified_since(input);
325 self
326 }
327 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
328 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
329 /// <ul>
330 /// <li>
331 /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
332 /// <li>
333 /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
334 /// </ul>
335 /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
336 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
337 pub fn set_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
338 self.inner = self.inner.set_if_modified_since(input);
339 self
340 }
341 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error.</p>
342 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
343 /// <ul>
344 /// <li>
345 /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
346 /// <li>
347 /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
348 /// </ul>
349 /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
350 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
351 pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
352 self.inner.get_if_modified_since()
353 }
354 /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
355 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
356 /// <ul>
357 /// <li>
358 /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
359 /// <li>
360 /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
361 /// </ul>
362 /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
363 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
364 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
365 self.inner = self.inner.if_none_match(input.into());
366 self
367 }
368 /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
369 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
370 /// <ul>
371 /// <li>
372 /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
373 /// <li>
374 /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
375 /// </ul>
376 /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
377 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
378 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
379 self.inner = self.inner.set_if_none_match(input);
380 self
381 }
382 /// <p>Return the object only if its entity tag (ETag) is different from the one specified; otherwise, return a 304 (not modified) error.</p>
383 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:</p>
384 /// <ul>
385 /// <li>
386 /// <p><code>If-None-Match</code> condition evaluates to <code>false</code>, and;</p></li>
387 /// <li>
388 /// <p><code>If-Modified-Since</code> condition evaluates to <code>true</code>;</p></li>
389 /// </ul>
390 /// <p>Then Amazon S3 returns the <code>304 Not Modified</code> response code.</p>
391 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
392 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
393 self.inner.get_if_none_match()
394 }
395 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
396 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
397 /// <ul>
398 /// <li>
399 /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
400 /// <li>
401 /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
402 /// </ul>
403 /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
404 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
405 pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
406 self.inner = self.inner.if_unmodified_since(input);
407 self
408 }
409 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
410 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
411 /// <ul>
412 /// <li>
413 /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
414 /// <li>
415 /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
416 /// </ul>
417 /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
418 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
419 pub fn set_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
420 self.inner = self.inner.set_if_unmodified_since(input);
421 self
422 }
423 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a 412 (precondition failed) error.</p>
424 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows:</p>
425 /// <ul>
426 /// <li>
427 /// <p><code>If-Match</code> condition evaluates to <code>true</code>, and;</p></li>
428 /// <li>
429 /// <p><code>If-Unmodified-Since</code> condition evaluates to <code>false</code>;</p></li>
430 /// </ul>
431 /// <p>Then Amazon S3 returns <code>200 OK</code> and the data requested.</p>
432 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
433 pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
434 self.inner.get_if_unmodified_since()
435 }
436 /// <p>The object key.</p>
437 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
438 self.inner = self.inner.key(input.into());
439 self
440 }
441 /// <p>The object key.</p>
442 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
443 self.inner = self.inner.set_key(input);
444 self
445 }
446 /// <p>The object key.</p>
447 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
448 self.inner.get_key()
449 }
450 /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
451 pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
452 self.inner = self.inner.range(input.into());
453 self
454 }
455 /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
456 pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
457 self.inner = self.inner.set_range(input);
458 self
459 }
460 /// <p>HeadObject returns only the metadata for an object. If the Range is satisfiable, only the <code>ContentLength</code> is affected in the response. If the Range is not satisfiable, S3 returns a <code>416 - Requested Range Not Satisfiable</code> error.</p>
461 pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
462 self.inner.get_range()
463 }
464 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
465 pub fn response_cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
466 self.inner = self.inner.response_cache_control(input.into());
467 self
468 }
469 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
470 pub fn set_response_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
471 self.inner = self.inner.set_response_cache_control(input);
472 self
473 }
474 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
475 pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
476 self.inner.get_response_cache_control()
477 }
478 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
479 pub fn response_content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
480 self.inner = self.inner.response_content_disposition(input.into());
481 self
482 }
483 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
484 pub fn set_response_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
485 self.inner = self.inner.set_response_content_disposition(input);
486 self
487 }
488 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
489 pub fn get_response_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
490 self.inner.get_response_content_disposition()
491 }
492 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
493 pub fn response_content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
494 self.inner = self.inner.response_content_encoding(input.into());
495 self
496 }
497 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
498 pub fn set_response_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
499 self.inner = self.inner.set_response_content_encoding(input);
500 self
501 }
502 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
503 pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
504 self.inner.get_response_content_encoding()
505 }
506 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
507 pub fn response_content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
508 self.inner = self.inner.response_content_language(input.into());
509 self
510 }
511 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
512 pub fn set_response_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
513 self.inner = self.inner.set_response_content_language(input);
514 self
515 }
516 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
517 pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
518 self.inner.get_response_content_language()
519 }
520 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
521 pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
522 self.inner = self.inner.response_content_type(input.into());
523 self
524 }
525 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
526 pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
527 self.inner = self.inner.set_response_content_type(input);
528 self
529 }
530 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
531 pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
532 self.inner.get_response_content_type()
533 }
534 /// <p>Sets the <code>Expires</code> header of the response.</p>
535 pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
536 self.inner = self.inner.response_expires(input);
537 self
538 }
539 /// <p>Sets the <code>Expires</code> header of the response.</p>
540 pub fn set_response_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
541 self.inner = self.inner.set_response_expires(input);
542 self
543 }
544 /// <p>Sets the <code>Expires</code> header of the response.</p>
545 pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
546 self.inner.get_response_expires()
547 }
548 /// <p>Version ID used to reference a specific version of the object.</p><note>
549 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
550 /// </note>
551 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
552 self.inner = self.inner.version_id(input.into());
553 self
554 }
555 /// <p>Version ID used to reference a specific version of the object.</p><note>
556 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
557 /// </note>
558 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
559 self.inner = self.inner.set_version_id(input);
560 self
561 }
562 /// <p>Version ID used to reference a specific version of the object.</p><note>
563 /// <p>For directory buckets in this API operation, only the <code>null</code> value of the version ID is supported.</p>
564 /// </note>
565 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
566 self.inner.get_version_id()
567 }
568 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
569 /// <p>This functionality is not supported for directory buckets.</p>
570 /// </note>
571 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
572 self.inner = self.inner.sse_customer_algorithm(input.into());
573 self
574 }
575 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
576 /// <p>This functionality is not supported for directory buckets.</p>
577 /// </note>
578 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
579 self.inner = self.inner.set_sse_customer_algorithm(input);
580 self
581 }
582 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
583 /// <p>This functionality is not supported for directory buckets.</p>
584 /// </note>
585 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
586 self.inner.get_sse_customer_algorithm()
587 }
588 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
589 /// <p>This functionality is not supported for directory buckets.</p>
590 /// </note>
591 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
592 self.inner = self.inner.sse_customer_key(input.into());
593 self
594 }
595 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
596 /// <p>This functionality is not supported for directory buckets.</p>
597 /// </note>
598 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
599 self.inner = self.inner.set_sse_customer_key(input);
600 self
601 }
602 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
603 /// <p>This functionality is not supported for directory buckets.</p>
604 /// </note>
605 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
606 self.inner.get_sse_customer_key()
607 }
608 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
609 /// <p>This functionality is not supported for directory buckets.</p>
610 /// </note>
611 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
612 self.inner = self.inner.sse_customer_key_md5(input.into());
613 self
614 }
615 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
616 /// <p>This functionality is not supported for directory buckets.</p>
617 /// </note>
618 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
619 self.inner = self.inner.set_sse_customer_key_md5(input);
620 self
621 }
622 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
623 /// <p>This functionality is not supported for directory buckets.</p>
624 /// </note>
625 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
626 self.inner.get_sse_customer_key_md5()
627 }
628 /// <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>
629 /// <p>This functionality is not supported for directory buckets.</p>
630 /// </note>
631 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
632 self.inner = self.inner.request_payer(input);
633 self
634 }
635 /// <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>
636 /// <p>This functionality is not supported for directory buckets.</p>
637 /// </note>
638 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
639 self.inner = self.inner.set_request_payer(input);
640 self
641 }
642 /// <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>
643 /// <p>This functionality is not supported for directory buckets.</p>
644 /// </note>
645 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
646 self.inner.get_request_payer()
647 }
648 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
649 pub fn part_number(mut self, input: i32) -> Self {
650 self.inner = self.inner.part_number(input);
651 self
652 }
653 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
654 pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
655 self.inner = self.inner.set_part_number(input);
656 self
657 }
658 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.</p>
659 pub fn get_part_number(&self) -> &::std::option::Option<i32> {
660 self.inner.get_part_number()
661 }
662 /// <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>
663 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
664 self.inner = self.inner.expected_bucket_owner(input.into());
665 self
666 }
667 /// <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>
668 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
669 self.inner = self.inner.set_expected_bucket_owner(input);
670 self
671 }
672 /// <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>
673 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
674 self.inner.get_expected_bucket_owner()
675 }
676 /// <p>To retrieve the checksum, this parameter must be enabled.</p>
677 /// <p><b>General purpose buckets</b> - If you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
678 /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
679 pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
680 self.inner = self.inner.checksum_mode(input);
681 self
682 }
683 /// <p>To retrieve the checksum, this parameter must be enabled.</p>
684 /// <p><b>General purpose buckets</b> - If you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
685 /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
686 pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
687 self.inner = self.inner.set_checksum_mode(input);
688 self
689 }
690 /// <p>To retrieve the checksum, this parameter must be enabled.</p>
691 /// <p><b>General purpose buckets</b> - If you enable checksum mode and the object is uploaded with a <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">checksum</a> and encrypted with an Key Management Service (KMS) key, you must have permission to use the <code>kms:Decrypt</code> action to retrieve the checksum.</p>
692 /// <p><b>Directory buckets</b> - If you enable <code>ChecksumMode</code> and the object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key to retrieve the checksum of the object.</p>
693 pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
694 self.inner.get_checksum_mode()
695 }
696}
697
698impl crate::client::customize::internal::CustomizablePresigned<crate::operation::head_object::HeadObjectError> for HeadObjectFluentBuilder {
699 fn presign(
700 self,
701 config_override: crate::config::Builder,
702 presigning_config: crate::presigning::PresigningConfig,
703 ) -> crate::client::customize::internal::BoxFuture<
704 crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::head_object::HeadObjectError>,
705 > {
706 ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
707 }
708}