aws_sdk_s3/operation/get_object/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_object::_get_object_output::GetObjectOutputBuilder;
3
4pub use crate::operation::get_object::_get_object_input::GetObjectInputBuilder;
5
6impl crate::operation::get_object::builders::GetObjectInputBuilder {
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::get_object::GetObjectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_object::GetObjectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_object();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetObject`.
24///
25/// <p>Retrieves an object from Amazon S3.</p>
26/// <p>In the <code>GetObject</code> request, specify the full key name for the object.</p>
27/// <p><b>General purpose buckets</b> - Both the virtual-hosted-style requests and the path-style requests are supported. For a virtual hosted-style request example, if you have the object <code>photos/2006/February/sample.jpg</code>, specify the object key name as <code>/photos/2006/February/sample.jpg</code>. For a path-style request example, if you have the object <code>photos/2006/February/sample.jpg</code> in the bucket named <code>examplebucket</code>, specify the object key name as <code>/examplebucket/photos/2006/February/sample.jpg</code>. For more information about request types, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket">HTTP Host Header Bucket Specification</a> in the <i>Amazon S3 User Guide</i>.</p>
28/// <p><b>Directory buckets</b> - Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object <code>photos/2006/February/sample.jpg</code> in the bucket named <code>amzn-s3-demo-bucket--usw2-az1--x-s3</code>, specify the object key name as <code>/photos/2006/February/sample.jpg</code>. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>bucket-name</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>
29/// <dl>
30/// <dt>
31/// Permissions
32/// </dt>
33/// <dd>
34/// <ul>
35/// <li>
36/// <p><b>General purpose bucket permissions</b> - You must have the required permissions in a policy. To use <code>GetObject</code>, you must have the <code>READ</code> access to the object (or version). If you grant <code>READ</code> access to the anonymous user, the <code>GetObject</code> operation returns the object without using an authorization header. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html">Specifying permissions in a policy</a> in the <i>Amazon S3 User Guide</i>.</p>
37/// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p>
38/// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p>
39/// <p>If the object that you request doesn’t exist, the error that Amazon S3 returns depends on whether you also have the <code>s3:ListBucket</code> permission.</p>
40/// <ul>
41/// <li>
42/// <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>
43/// <li>
44/// <p>If you don’t have the <code>s3:ListBucket</code> permission, Amazon S3 returns an HTTP status code <code>403 Access Denied</code> error.</p></li>
45/// </ul></li>
46/// <li>
47/// <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>
48/// <p>If the object is encrypted using SSE-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.</p></li>
49/// </ul>
50/// </dd>
51/// <dt>
52/// Storage classes
53/// </dt>
54/// <dd>
55/// <p>If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you must first restore a copy using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a>. Otherwise, this operation returns an <code>InvalidObjectState</code> error. For information about restoring archived objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html">Restoring Archived Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
56/// <p><b>Directory buckets </b> - Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p>
57/// </dd>
58/// <dt>
59/// Encryption
60/// </dt>
61/// <dd>
62/// <p>Encryption request headers, like <code>x-amz-server-side-encryption</code>, should not be sent for the <code>GetObject</code> requests, if your object uses server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your <code>GetObject</code> requests for the object that uses these types of keys, you’ll get an HTTP <code>400 Bad Request</code> error.</p>
63/// <p><b>Directory buckets</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>
64/// </dd>
65/// <dt>
66/// Overriding response header values through the request
67/// </dt>
68/// <dd>
69/// <p>There are times when you want to override certain response header values of a <code>GetObject</code> response. For example, you might override the <code>Content-Disposition</code> response header value through your <code>GetObject</code> request.</p>
70/// <p>You can override values for a set of response headers. These modified response header values are included only in a successful response, that is, when the HTTP status code <code>200 OK</code> is returned. The headers you can override using the following query parameters in the request are a subset of the headers that Amazon S3 accepts when you create an object.</p>
71/// <p>The response headers that you can override for the <code>GetObject</code> response are <code>Cache-Control</code>, <code>Content-Disposition</code>, <code>Content-Encoding</code>, <code>Content-Language</code>, <code>Content-Type</code>, and <code>Expires</code>.</p>
72/// <p>To override values for a set of response headers in the <code>GetObject</code> response, you can use the following query parameters in the request.</p>
73/// <ul>
74/// <li>
75/// <p><code>response-cache-control</code></p></li>
76/// <li>
77/// <p><code>response-content-disposition</code></p></li>
78/// <li>
79/// <p><code>response-content-encoding</code></p></li>
80/// <li>
81/// <p><code>response-content-language</code></p></li>
82/// <li>
83/// <p><code>response-content-type</code></p></li>
84/// <li>
85/// <p><code>response-expires</code></p></li>
86/// </ul><note>
87/// <p>When you use these parameters, you must sign the request by using either an Authorization header or a presigned URL. These parameters cannot be used with an unsigned (anonymous) request.</p>
88/// </note>
89/// </dd>
90/// <dt>
91/// HTTP Host header syntax
92/// </dt>
93/// <dd>
94/// <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>
95/// </dd>
96/// </dl>
97/// <p>The following operations are related to <code>GetObject</code>:</p>
98/// <ul>
99/// <li>
100/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a></p></li>
101/// <li>
102/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html">GetObjectAcl</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 GetObjectFluentBuilder {
108 handle: ::std::sync::Arc<crate::client::Handle>,
109 inner: crate::operation::get_object::builders::GetObjectInputBuilder,
110 config_override: ::std::option::Option<crate::config::Builder>,
111}
112impl crate::client::customize::internal::CustomizableSend<crate::operation::get_object::GetObjectOutput, crate::operation::get_object::GetObjectError>
113 for GetObjectFluentBuilder
114{
115 fn send(
116 self,
117 config_override: crate::config::Builder,
118 ) -> crate::client::customize::internal::BoxFuture<
119 crate::client::customize::internal::SendResult<crate::operation::get_object::GetObjectOutput, crate::operation::get_object::GetObjectError>,
120 > {
121 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
122 }
123}
124impl GetObjectFluentBuilder {
125 /// Creates a new `GetObjectFluentBuilder`.
126 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
127 Self {
128 handle,
129 inner: ::std::default::Default::default(),
130 config_override: ::std::option::Option::None,
131 }
132 }
133 /// Access the GetObject as a reference.
134 pub fn as_input(&self) -> &crate::operation::get_object::builders::GetObjectInputBuilder {
135 &self.inner
136 }
137 /// Sends the request and returns the response.
138 ///
139 /// If an error occurs, an `SdkError` will be returned with additional details that
140 /// can be matched against.
141 ///
142 /// By default, any retryable failures will be retried twice. Retry behavior
143 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
144 /// set when configuring the client.
145 pub async fn send(
146 self,
147 ) -> ::std::result::Result<
148 crate::operation::get_object::GetObjectOutput,
149 ::aws_smithy_runtime_api::client::result::SdkError<
150 crate::operation::get_object::GetObjectError,
151 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
152 >,
153 > {
154 let input = self
155 .inner
156 .build()
157 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
158 let runtime_plugins = crate::operation::get_object::GetObject::operation_runtime_plugins(
159 self.handle.runtime_plugins.clone(),
160 &self.handle.conf,
161 self.config_override,
162 );
163 crate::operation::get_object::GetObject::orchestrate(&runtime_plugins, input).await
164 }
165
166 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
167 pub fn customize(
168 self,
169 ) -> crate::client::customize::CustomizableOperation<
170 crate::operation::get_object::GetObjectOutput,
171 crate::operation::get_object::GetObjectError,
172 Self,
173 > {
174 crate::client::customize::CustomizableOperation::new(self)
175 }
176 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
177 self.set_config_override(::std::option::Option::Some(config_override.into()));
178 self
179 }
180
181 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
182 self.config_override = config_override;
183 self
184 }
185 ///
186 /// Creates a presigned request for this operation.
187 ///
188 /// The `presigning_config` provides additional presigning-specific config values, such as the
189 /// amount of time the request should be valid for after creation.
190 ///
191 /// Presigned requests can be given to other users or applications to access a resource or perform
192 /// an operation without having access to the AWS security credentials.
193 ///
194 /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
195 /// the presigned request can only be valid for as long as the credentials used to create it are.
196 ///
197 #[allow(unused_mut)]
198 pub async fn presigned(
199 mut self,
200 presigning_config: crate::presigning::PresigningConfig,
201 ) -> ::std::result::Result<
202 crate::presigning::PresignedRequest,
203 ::aws_smithy_runtime_api::client::result::SdkError<
204 crate::operation::get_object::GetObjectError,
205 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
206 >,
207 > {
208 let runtime_plugins = crate::operation::get_object::GetObject::operation_runtime_plugins(
209 self.handle.runtime_plugins.clone(),
210 &self.handle.conf,
211 self.config_override,
212 )
213 .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
214 presigning_config,
215 ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
216 ));
217
218 let input = self
219 .inner
220 .build()
221 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
222 let mut context = crate::operation::get_object::GetObject::orchestrate_with_stop_point(
223 &runtime_plugins,
224 input,
225 ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
226 )
227 .await
228 .map_err(|err| {
229 err.map_service_error(|err| {
230 err.downcast::<crate::operation::get_object::GetObjectError>()
231 .expect("correct error type")
232 })
233 })?;
234 let request = context.take_request().expect("request set before transmit");
235 crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
236 }
237 /// <p>The bucket name containing the object.</p>
238 /// <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>
239 /// <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>
240 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
241 /// <p>Object Lambda access points are not supported by directory buckets.</p>
242 /// </note>
243 /// <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>
244 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245 self.inner = self.inner.bucket(input.into());
246 self
247 }
248 /// <p>The bucket name containing the object.</p>
249 /// <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>
250 /// <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>
251 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
252 /// <p>Object Lambda access points are not supported by directory buckets.</p>
253 /// </note>
254 /// <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>
255 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
256 self.inner = self.inner.set_bucket(input);
257 self
258 }
259 /// <p>The bucket name containing the object.</p>
260 /// <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>
261 /// <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>
262 /// <p><b>Object Lambda access points</b> - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-object-lambda.<i>Region</i>.amazonaws.com.</p><note>
263 /// <p>Object Lambda access points are not supported by directory buckets.</p>
264 /// </note>
265 /// <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>
266 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
267 self.inner.get_bucket()
268 }
269 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
270 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
271 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
272 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273 self.inner = self.inner.if_match(input.into());
274 self
275 }
276 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
277 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
278 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
279 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
280 self.inner = self.inner.set_if_match(input);
281 self
282 }
283 /// <p>Return the object only if its entity tag (ETag) is the same as the one specified in this header; otherwise, return a <code>412 Precondition Failed</code> error.</p>
284 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
285 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
286 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
287 self.inner.get_if_match()
288 }
289 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
290 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
291 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
292 pub fn if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
293 self.inner = self.inner.if_modified_since(input);
294 self
295 }
296 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
297 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
298 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
299 pub fn set_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
300 self.inner = self.inner.set_if_modified_since(input);
301 self
302 }
303 /// <p>Return the object only if it has been modified since the specified time; otherwise, return a <code>304 Not Modified</code> error.</p>
304 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> status code.</p>
305 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
306 pub fn get_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
307 self.inner.get_if_modified_since()
308 }
309 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
310 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
311 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
312 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
313 self.inner = self.inner.if_none_match(input.into());
314 self
315 }
316 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
317 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
318 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
319 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320 self.inner = self.inner.set_if_none_match(input);
321 self
322 }
323 /// <p>Return the object only if its entity tag (ETag) is different from the one specified in this header; otherwise, return a <code>304 Not Modified</code> error.</p>
324 /// <p>If both of the <code>If-None-Match</code> and <code>If-Modified-Since</code> headers are present in the request as follows:<code> If-None-Match</code> condition evaluates to <code>false</code>, and; <code>If-Modified-Since</code> condition evaluates to <code>true</code>; then, S3 returns <code>304 Not Modified</code> HTTP status code.</p>
325 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
326 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
327 self.inner.get_if_none_match()
328 }
329 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
330 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
331 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
332 pub fn if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
333 self.inner = self.inner.if_unmodified_since(input);
334 self
335 }
336 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
337 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
338 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
339 pub fn set_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
340 self.inner = self.inner.set_if_unmodified_since(input);
341 self
342 }
343 /// <p>Return the object only if it has not been modified since the specified time; otherwise, return a <code>412 Precondition Failed</code> error.</p>
344 /// <p>If both of the <code>If-Match</code> and <code>If-Unmodified-Since</code> headers are present in the request as follows: <code>If-Match</code> condition evaluates to <code>true</code>, and; <code>If-Unmodified-Since</code> condition evaluates to <code>false</code>; then, S3 returns <code>200 OK</code> and the data requested.</p>
345 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>.</p>
346 pub fn get_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
347 self.inner.get_if_unmodified_since()
348 }
349 /// <p>Key of the object to get.</p>
350 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.inner = self.inner.key(input.into());
352 self
353 }
354 /// <p>Key of the object to get.</p>
355 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356 self.inner = self.inner.set_key(input);
357 self
358 }
359 /// <p>Key of the object to get.</p>
360 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
361 self.inner.get_key()
362 }
363 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
364 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
365 /// </note>
366 pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
367 self.inner = self.inner.range(input.into());
368 self
369 }
370 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
371 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
372 /// </note>
373 pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
374 self.inner = self.inner.set_range(input);
375 self
376 }
377 /// <p>Downloads the specified byte range of an object. For more information about the HTTP Range header, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-range">https://www.rfc-editor.org/rfc/rfc9110.html#name-range</a>.</p><note>
378 /// <p>Amazon S3 doesn't support retrieving multiple ranges of data per <code>GET</code> request.</p>
379 /// </note>
380 pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
381 self.inner.get_range()
382 }
383 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
384 pub fn response_cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385 self.inner = self.inner.response_cache_control(input.into());
386 self
387 }
388 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
389 pub fn set_response_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
390 self.inner = self.inner.set_response_cache_control(input);
391 self
392 }
393 /// <p>Sets the <code>Cache-Control</code> header of the response.</p>
394 pub fn get_response_cache_control(&self) -> &::std::option::Option<::std::string::String> {
395 self.inner.get_response_cache_control()
396 }
397 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
398 pub fn response_content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
399 self.inner = self.inner.response_content_disposition(input.into());
400 self
401 }
402 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
403 pub fn set_response_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
404 self.inner = self.inner.set_response_content_disposition(input);
405 self
406 }
407 /// <p>Sets the <code>Content-Disposition</code> header of the response.</p>
408 pub fn get_response_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
409 self.inner.get_response_content_disposition()
410 }
411 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
412 pub fn response_content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
413 self.inner = self.inner.response_content_encoding(input.into());
414 self
415 }
416 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
417 pub fn set_response_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
418 self.inner = self.inner.set_response_content_encoding(input);
419 self
420 }
421 /// <p>Sets the <code>Content-Encoding</code> header of the response.</p>
422 pub fn get_response_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
423 self.inner.get_response_content_encoding()
424 }
425 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
426 pub fn response_content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
427 self.inner = self.inner.response_content_language(input.into());
428 self
429 }
430 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
431 pub fn set_response_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
432 self.inner = self.inner.set_response_content_language(input);
433 self
434 }
435 /// <p>Sets the <code>Content-Language</code> header of the response.</p>
436 pub fn get_response_content_language(&self) -> &::std::option::Option<::std::string::String> {
437 self.inner.get_response_content_language()
438 }
439 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
440 pub fn response_content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
441 self.inner = self.inner.response_content_type(input.into());
442 self
443 }
444 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
445 pub fn set_response_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
446 self.inner = self.inner.set_response_content_type(input);
447 self
448 }
449 /// <p>Sets the <code>Content-Type</code> header of the response.</p>
450 pub fn get_response_content_type(&self) -> &::std::option::Option<::std::string::String> {
451 self.inner.get_response_content_type()
452 }
453 /// <p>Sets the <code>Expires</code> header of the response.</p>
454 pub fn response_expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
455 self.inner = self.inner.response_expires(input);
456 self
457 }
458 /// <p>Sets the <code>Expires</code> header of the response.</p>
459 pub fn set_response_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
460 self.inner = self.inner.set_response_expires(input);
461 self
462 }
463 /// <p>Sets the <code>Expires</code> header of the response.</p>
464 pub fn get_response_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
465 self.inner.get_response_expires()
466 }
467 /// <p>Version ID used to reference a specific version of the object.</p>
468 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
469 /// <ul>
470 /// <li>
471 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
472 /// <li>
473 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
474 /// <li>
475 /// <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>
476 /// </ul>
477 /// </note>
478 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
479 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
480 self.inner = self.inner.version_id(input.into());
481 self
482 }
483 /// <p>Version ID used to reference a specific version of the object.</p>
484 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
485 /// <ul>
486 /// <li>
487 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
488 /// <li>
489 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
490 /// <li>
491 /// <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>
492 /// </ul>
493 /// </note>
494 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
495 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
496 self.inner = self.inner.set_version_id(input);
497 self
498 }
499 /// <p>Version ID used to reference a specific version of the object.</p>
500 /// <p>By default, the <code>GetObject</code> operation returns the current version of an object. To return a different version, use the <code>versionId</code> subresource.</p><note>
501 /// <ul>
502 /// <li>
503 /// <p>If you include a <code>versionId</code> in your request header, you must have the <code>s3:GetObjectVersion</code> permission to access a specific version of an object. The <code>s3:GetObject</code> permission is not required in this scenario.</p></li>
504 /// <li>
505 /// <p>If you request the current version of an object without a specific <code>versionId</code> in the request header, only the <code>s3:GetObject</code> permission is required. The <code>s3:GetObjectVersion</code> permission is not required in this scenario.</p></li>
506 /// <li>
507 /// <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>
508 /// </ul>
509 /// </note>
510 /// <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html">PutBucketVersioning</a>.</p>
511 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
512 self.inner.get_version_id()
513 }
514 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
515 /// <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 GET the object, you must use the following headers:</p>
516 /// <ul>
517 /// <li>
518 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
519 /// <li>
520 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
521 /// <li>
522 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
523 /// </ul>
524 /// <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>
525 /// <p>This functionality is not supported for directory buckets.</p>
526 /// </note>
527 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
528 self.inner = self.inner.sse_customer_algorithm(input.into());
529 self
530 }
531 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
532 /// <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 GET the object, you must use the following headers:</p>
533 /// <ul>
534 /// <li>
535 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
536 /// <li>
537 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
538 /// <li>
539 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
540 /// </ul>
541 /// <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>
542 /// <p>This functionality is not supported for directory buckets.</p>
543 /// </note>
544 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
545 self.inner = self.inner.set_sse_customer_algorithm(input);
546 self
547 }
548 /// <p>Specifies the algorithm to use when decrypting the object (for example, <code>AES256</code>).</p>
549 /// <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 GET the object, you must use the following headers:</p>
550 /// <ul>
551 /// <li>
552 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
553 /// <li>
554 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
555 /// <li>
556 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
557 /// </ul>
558 /// <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>
559 /// <p>This functionality is not supported for directory buckets.</p>
560 /// </note>
561 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
562 self.inner.get_sse_customer_algorithm()
563 }
564 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
565 /// <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 GET the object, you must use the following headers:</p>
566 /// <ul>
567 /// <li>
568 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
569 /// <li>
570 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
571 /// <li>
572 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
573 /// </ul>
574 /// <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>
575 /// <p>This functionality is not supported for directory buckets.</p>
576 /// </note>
577 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
578 self.inner = self.inner.sse_customer_key(input.into());
579 self
580 }
581 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
582 /// <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 GET the object, you must use the following headers:</p>
583 /// <ul>
584 /// <li>
585 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
586 /// <li>
587 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
588 /// <li>
589 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
590 /// </ul>
591 /// <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>
592 /// <p>This functionality is not supported for directory buckets.</p>
593 /// </note>
594 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
595 self.inner = self.inner.set_sse_customer_key(input);
596 self
597 }
598 /// <p>Specifies the customer-provided encryption key that you originally provided for Amazon S3 to encrypt the data before storing it. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p>
599 /// <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 GET the object, you must use the following headers:</p>
600 /// <ul>
601 /// <li>
602 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
603 /// <li>
604 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
605 /// <li>
606 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
607 /// </ul>
608 /// <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>
609 /// <p>This functionality is not supported for directory buckets.</p>
610 /// </note>
611 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
612 self.inner.get_sse_customer_key()
613 }
614 /// <p>Specifies the 128-bit MD5 digest of the customer-provided 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>
615 /// <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 GET the object, you must use the following headers:</p>
616 /// <ul>
617 /// <li>
618 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
619 /// <li>
620 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
621 /// <li>
622 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
623 /// </ul>
624 /// <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>
625 /// <p>This functionality is not supported for directory buckets.</p>
626 /// </note>
627 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
628 self.inner = self.inner.sse_customer_key_md5(input.into());
629 self
630 }
631 /// <p>Specifies the 128-bit MD5 digest of the customer-provided 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>
632 /// <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 GET the object, you must use the following headers:</p>
633 /// <ul>
634 /// <li>
635 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
636 /// <li>
637 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
638 /// <li>
639 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
640 /// </ul>
641 /// <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>
642 /// <p>This functionality is not supported for directory buckets.</p>
643 /// </note>
644 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
645 self.inner = self.inner.set_sse_customer_key_md5(input);
646 self
647 }
648 /// <p>Specifies the 128-bit MD5 digest of the customer-provided 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>
649 /// <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 GET the object, you must use the following headers:</p>
650 /// <ul>
651 /// <li>
652 /// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
653 /// <li>
654 /// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
655 /// <li>
656 /// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
657 /// </ul>
658 /// <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>
659 /// <p>This functionality is not supported for directory buckets.</p>
660 /// </note>
661 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
662 self.inner.get_sse_customer_key_md5()
663 }
664 /// <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>
665 /// <p>This functionality is not supported for directory buckets.</p>
666 /// </note>
667 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
668 self.inner = self.inner.request_payer(input);
669 self
670 }
671 /// <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>
672 /// <p>This functionality is not supported for directory buckets.</p>
673 /// </note>
674 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
675 self.inner = self.inner.set_request_payer(input);
676 self
677 }
678 /// <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>
679 /// <p>This functionality is not supported for directory buckets.</p>
680 /// </note>
681 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
682 self.inner.get_request_payer()
683 }
684 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
685 pub fn part_number(mut self, input: i32) -> Self {
686 self.inner = self.inner.part_number(input);
687 self
688 }
689 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
690 pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
691 self.inner = self.inner.set_part_number(input);
692 self
693 }
694 /// <p>Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.</p>
695 pub fn get_part_number(&self) -> &::std::option::Option<i32> {
696 self.inner.get_part_number()
697 }
698 /// <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>
699 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
700 self.inner = self.inner.expected_bucket_owner(input.into());
701 self
702 }
703 /// <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>
704 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
705 self.inner = self.inner.set_expected_bucket_owner(input);
706 self
707 }
708 /// <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>
709 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
710 self.inner.get_expected_bucket_owner()
711 }
712 /// <p>To retrieve the checksum, this mode must be enabled.</p>
713 pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
714 self.inner = self.inner.checksum_mode(input);
715 self
716 }
717 /// <p>To retrieve the checksum, this mode must be enabled.</p>
718 pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
719 self.inner = self.inner.set_checksum_mode(input);
720 self
721 }
722 /// <p>To retrieve the checksum, this mode must be enabled.</p>
723 pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
724 self.inner.get_checksum_mode()
725 }
726}
727
728impl crate::client::customize::internal::CustomizablePresigned<crate::operation::get_object::GetObjectError> for GetObjectFluentBuilder {
729 fn presign(
730 self,
731 config_override: crate::config::Builder,
732 presigning_config: crate::presigning::PresigningConfig,
733 ) -> crate::client::customize::internal::BoxFuture<
734 crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::get_object::GetObjectError>,
735 > {
736 ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
737 }
738}