aws_sdk_s3/operation/complete_multipart_upload/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::complete_multipart_upload::_complete_multipart_upload_output::CompleteMultipartUploadOutputBuilder;
3
4pub use crate::operation::complete_multipart_upload::_complete_multipart_upload_input::CompleteMultipartUploadInputBuilder;
5
6impl crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadInputBuilder {
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::complete_multipart_upload::CompleteMultipartUploadOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.complete_multipart_upload();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CompleteMultipartUpload`.
24///
25/// <p>Completes a multipart upload by assembling previously uploaded parts.</p>
26/// <p>You first initiate the multipart upload and then upload all parts using the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> operation or the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> operation. After successfully uploading all relevant parts of an upload, you call this <code>CompleteMultipartUpload</code> operation to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the CompleteMultipartUpload request, you must provide the parts list and ensure that the parts list is complete. The CompleteMultipartUpload API operation concatenates the parts that you provide in the list. For each part in the list, you must provide the <code>PartNumber</code> value and the <code>ETag</code> value that are returned after that part was uploaded.</p>
27/// <p>The processing of a CompleteMultipartUpload request could take several minutes to finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a <code>200 OK</code> response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. A request could fail after the initial <code>200 OK</code> response has been sent. This means that a <code>200 OK</code> response can contain either a success or an error. The error response might be embedded in the <code>200 OK</code> response. If you call this API operation directly, make sure to design your application to parse the contents of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).</p>
28/// <p>Note that if <code>CompleteMultipartUpload</code> fails, applications should be prepared to retry any failed requests (including 500 error responses). For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html">Amazon S3 Error Best Practices</a>.</p><important>
29/// <p>You can't use <code>Content-Type: application/x-www-form-urlencoded</code> for the CompleteMultipartUpload requests. Also, if you don't provide a <code>Content-Type</code> header, <code>CompleteMultipartUpload</code> can still return a <code>200 OK</code> response.</p>
30/// </important>
31/// <p>For more information about multipart uploads, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html">Uploading Objects Using Multipart Upload</a> in the <i>Amazon S3 User Guide</i>.</p><note>
32/// <p><b>Directory buckets</b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p>
33/// </note>
34/// <dl>
35/// <dt>
36/// Permissions
37/// </dt>
38/// <dd>
39/// <ul>
40/// <li>
41/// <p><b>General purpose bucket permissions</b> - For information about permissions required to use the multipart upload API, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html">Multipart Upload and Permissions</a> in the <i>Amazon S3 User Guide</i>.</p>
42/// <p>If you provide an <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html">additional checksum value</a> in your <code>MultipartUpload</code> requests and the object is encrypted with Key Management Service, you must have permission to use the <code>kms:Decrypt</code> action for the <code>CompleteMultipartUpload</code> request to succeed.</p></li>
43/// <li>
44/// <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>
45/// <p>If the object is encrypted with 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>
46/// </ul>
47/// </dd>
48/// <dt>
49/// Special errors
50/// </dt>
51/// <dd>
52/// <ul>
53/// <li>
54/// <p>Error Code: <code>EntityTooSmall</code></p>
55/// <ul>
56/// <li>
57/// <p>Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part.</p></li>
58/// <li>
59/// <p>HTTP Status Code: 400 Bad Request</p></li>
60/// </ul></li>
61/// <li>
62/// <p>Error Code: <code>InvalidPart</code></p>
63/// <ul>
64/// <li>
65/// <p>Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified ETag might not have matched the uploaded part's ETag.</p></li>
66/// <li>
67/// <p>HTTP Status Code: 400 Bad Request</p></li>
68/// </ul></li>
69/// <li>
70/// <p>Error Code: <code>InvalidPartOrder</code></p>
71/// <ul>
72/// <li>
73/// <p>Description: The list of parts was not in ascending order. The parts list must be specified in order by part number.</p></li>
74/// <li>
75/// <p>HTTP Status Code: 400 Bad Request</p></li>
76/// </ul></li>
77/// <li>
78/// <p>Error Code: <code>NoSuchUpload</code></p>
79/// <ul>
80/// <li>
81/// <p>Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.</p></li>
82/// <li>
83/// <p>HTTP Status Code: 404 Not Found</p></li>
84/// </ul></li>
85/// </ul>
86/// </dd>
87/// <dt>
88/// HTTP Host header syntax
89/// </dt>
90/// <dd>
91/// <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>
92/// </dd>
93/// </dl>
94/// <p>The following operations are related to <code>CompleteMultipartUpload</code>:</p>
95/// <ul>
96/// <li>
97/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
98/// <li>
99/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
100/// <li>
101/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
102/// <li>
103/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
104/// <li>
105/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
106/// </ul><important>
107/// <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>
108/// </important>
109#[derive(::std::clone::Clone, ::std::fmt::Debug)]
110pub struct CompleteMultipartUploadFluentBuilder {
111 handle: ::std::sync::Arc<crate::client::Handle>,
112 inner: crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadInputBuilder,
113 config_override: ::std::option::Option<crate::config::Builder>,
114}
115impl
116 crate::client::customize::internal::CustomizableSend<
117 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
118 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
119 > for CompleteMultipartUploadFluentBuilder
120{
121 fn send(
122 self,
123 config_override: crate::config::Builder,
124 ) -> crate::client::customize::internal::BoxFuture<
125 crate::client::customize::internal::SendResult<
126 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
127 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
128 >,
129 > {
130 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
131 }
132}
133impl CompleteMultipartUploadFluentBuilder {
134 /// Creates a new `CompleteMultipartUploadFluentBuilder`.
135 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
136 Self {
137 handle,
138 inner: ::std::default::Default::default(),
139 config_override: ::std::option::Option::None,
140 }
141 }
142 /// Access the CompleteMultipartUpload as a reference.
143 pub fn as_input(&self) -> &crate::operation::complete_multipart_upload::builders::CompleteMultipartUploadInputBuilder {
144 &self.inner
145 }
146 /// Sends the request and returns the response.
147 ///
148 /// If an error occurs, an `SdkError` will be returned with additional details that
149 /// can be matched against.
150 ///
151 /// By default, any retryable failures will be retried twice. Retry behavior
152 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
153 /// set when configuring the client.
154 pub async fn send(
155 self,
156 ) -> ::std::result::Result<
157 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
158 ::aws_smithy_runtime_api::client::result::SdkError<
159 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
160 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
161 >,
162 > {
163 let input = self
164 .inner
165 .build()
166 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
167 let runtime_plugins = crate::operation::complete_multipart_upload::CompleteMultipartUpload::operation_runtime_plugins(
168 self.handle.runtime_plugins.clone(),
169 &self.handle.conf,
170 self.config_override,
171 );
172 crate::operation::complete_multipart_upload::CompleteMultipartUpload::orchestrate(&runtime_plugins, input).await
173 }
174
175 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
176 pub fn customize(
177 self,
178 ) -> crate::client::customize::CustomizableOperation<
179 crate::operation::complete_multipart_upload::CompleteMultipartUploadOutput,
180 crate::operation::complete_multipart_upload::CompleteMultipartUploadError,
181 Self,
182 > {
183 crate::client::customize::CustomizableOperation::new(self)
184 }
185 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
186 self.set_config_override(::std::option::Option::Some(config_override.into()));
187 self
188 }
189
190 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
191 self.config_override = config_override;
192 self
193 }
194 /// <p>Name of the bucket to which the multipart upload was initiated.</p>
195 /// <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>
196 /// <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>
197 /// <p>Object Lambda access points are not supported by directory buckets.</p>
198 /// </note>
199 /// <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>
200 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201 self.inner = self.inner.bucket(input.into());
202 self
203 }
204 /// <p>Name of the bucket to which the multipart upload was initiated.</p>
205 /// <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>
206 /// <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>
207 /// <p>Object Lambda access points are not supported by directory buckets.</p>
208 /// </note>
209 /// <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>
210 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211 self.inner = self.inner.set_bucket(input);
212 self
213 }
214 /// <p>Name of the bucket to which the multipart upload was initiated.</p>
215 /// <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>
216 /// <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>
217 /// <p>Object Lambda access points are not supported by directory buckets.</p>
218 /// </note>
219 /// <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>
220 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
221 self.inner.get_bucket()
222 }
223 /// <p>Object key for which the multipart upload was initiated.</p>
224 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.inner = self.inner.key(input.into());
226 self
227 }
228 /// <p>Object key for which the multipart upload was initiated.</p>
229 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.inner = self.inner.set_key(input);
231 self
232 }
233 /// <p>Object key for which the multipart upload was initiated.</p>
234 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
235 self.inner.get_key()
236 }
237 /// <p>The container for the multipart upload request information.</p>
238 pub fn multipart_upload(mut self, input: crate::types::CompletedMultipartUpload) -> Self {
239 self.inner = self.inner.multipart_upload(input);
240 self
241 }
242 /// <p>The container for the multipart upload request information.</p>
243 pub fn set_multipart_upload(mut self, input: ::std::option::Option<crate::types::CompletedMultipartUpload>) -> Self {
244 self.inner = self.inner.set_multipart_upload(input);
245 self
246 }
247 /// <p>The container for the multipart upload request information.</p>
248 pub fn get_multipart_upload(&self) -> &::std::option::Option<crate::types::CompletedMultipartUpload> {
249 self.inner.get_multipart_upload()
250 }
251 /// <p>ID for the initiated multipart upload.</p>
252 pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
253 self.inner = self.inner.upload_id(input.into());
254 self
255 }
256 /// <p>ID for the initiated multipart upload.</p>
257 pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
258 self.inner = self.inner.set_upload_id(input);
259 self
260 }
261 /// <p>ID for the initiated multipart upload.</p>
262 pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
263 self.inner.get_upload_id()
264 }
265 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
266 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267 self.inner = self.inner.checksum_crc32(input.into());
268 self
269 }
270 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
271 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272 self.inner = self.inner.set_checksum_crc32(input);
273 self
274 }
275 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
276 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
277 self.inner.get_checksum_crc32()
278 }
279 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
280 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281 self.inner = self.inner.checksum_crc32_c(input.into());
282 self
283 }
284 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
285 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286 self.inner = self.inner.set_checksum_crc32_c(input);
287 self
288 }
289 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
290 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
291 self.inner.get_checksum_crc32_c()
292 }
293 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
294 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
295 self.inner = self.inner.checksum_crc64_nvme(input.into());
296 self
297 }
298 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
299 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300 self.inner = self.inner.set_checksum_crc64_nvme(input);
301 self
302 }
303 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
304 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
305 self.inner.get_checksum_crc64_nvme()
306 }
307 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
308 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
309 self.inner = self.inner.checksum_sha1(input.into());
310 self
311 }
312 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
313 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
314 self.inner = self.inner.set_checksum_sha1(input);
315 self
316 }
317 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
318 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
319 self.inner.get_checksum_sha1()
320 }
321 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
322 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
323 self.inner = self.inner.checksum_sha256(input.into());
324 self
325 }
326 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
327 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
328 self.inner = self.inner.set_checksum_sha256(input);
329 self
330 }
331 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
332 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
333 self.inner.get_checksum_sha256()
334 }
335 /// <p>This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the <code>CreateMultipartUpload</code> request, it’ll result in a <code>BadDigest</code> error. For more information, see Checking object integrity in the Amazon S3 User Guide.</p>
336 pub fn checksum_type(mut self, input: crate::types::ChecksumType) -> Self {
337 self.inner = self.inner.checksum_type(input);
338 self
339 }
340 /// <p>This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the <code>CreateMultipartUpload</code> request, it’ll result in a <code>BadDigest</code> error. For more information, see Checking object integrity in the Amazon S3 User Guide.</p>
341 pub fn set_checksum_type(mut self, input: ::std::option::Option<crate::types::ChecksumType>) -> Self {
342 self.inner = self.inner.set_checksum_type(input);
343 self
344 }
345 /// <p>This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. If the checksum type doesn’t match the checksum type that was specified for the object during the <code>CreateMultipartUpload</code> request, it’ll result in a <code>BadDigest</code> error. For more information, see Checking object integrity in the Amazon S3 User Guide.</p>
346 pub fn get_checksum_type(&self) -> &::std::option::Option<crate::types::ChecksumType> {
347 self.inner.get_checksum_type()
348 }
349 /// <p>The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an <code>HTTP 400 InvalidRequest</code> error.</p>
350 pub fn mpu_object_size(mut self, input: i64) -> Self {
351 self.inner = self.inner.mpu_object_size(input);
352 self
353 }
354 /// <p>The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an <code>HTTP 400 InvalidRequest</code> error.</p>
355 pub fn set_mpu_object_size(mut self, input: ::std::option::Option<i64>) -> Self {
356 self.inner = self.inner.set_mpu_object_size(input);
357 self
358 }
359 /// <p>The expected total object size of the multipart upload request. If there’s a mismatch between the specified object size value and the actual object size value, it results in an <code>HTTP 400 InvalidRequest</code> error.</p>
360 pub fn get_mpu_object_size(&self) -> &::std::option::Option<i64> {
361 self.inner.get_mpu_object_size()
362 }
363 /// <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>
364 /// <p>This functionality is not supported for directory buckets.</p>
365 /// </note>
366 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
367 self.inner = self.inner.request_payer(input);
368 self
369 }
370 /// <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>
371 /// <p>This functionality is not supported for directory buckets.</p>
372 /// </note>
373 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
374 self.inner = self.inner.set_request_payer(input);
375 self
376 }
377 /// <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>
378 /// <p>This functionality is not supported for directory buckets.</p>
379 /// </note>
380 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
381 self.inner.get_request_payer()
382 }
383 /// <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>
384 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385 self.inner = self.inner.expected_bucket_owner(input.into());
386 self
387 }
388 /// <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>
389 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
390 self.inner = self.inner.set_expected_bucket_owner(input);
391 self
392 }
393 /// <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>
394 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
395 self.inner.get_expected_bucket_owner()
396 }
397 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
398 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag, re-initiate the multipart upload with <code>CreateMultipartUpload</code>, and re-upload each part.</p>
399 /// <p>Expects the ETag value as a string.</p>
400 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
401 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402 self.inner = self.inner.if_match(input.into());
403 self
404 }
405 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
406 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag, re-initiate the multipart upload with <code>CreateMultipartUpload</code>, and re-upload each part.</p>
407 /// <p>Expects the ETag value as a string.</p>
408 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
409 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410 self.inner = self.inner.set_if_match(input);
411 self
412 }
413 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
414 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag, re-initiate the multipart upload with <code>CreateMultipartUpload</code>, and re-upload each part.</p>
415 /// <p>Expects the ETag value as a string.</p>
416 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
417 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
418 self.inner.get_if_match()
419 }
420 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
421 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
422 /// <p>Expects the '*' (asterisk) character.</p>
423 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
424 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
425 self.inner = self.inner.if_none_match(input.into());
426 self
427 }
428 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
429 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
430 /// <p>Expects the '*' (asterisk) character.</p>
431 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
432 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
433 self.inner = self.inner.set_if_none_match(input);
434 self
435 }
436 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
437 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should re-initiate the multipart upload with <code>CreateMultipartUpload</code> and re-upload each part.</p>
438 /// <p>Expects the '*' (asterisk) character.</p>
439 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
440 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
441 self.inner.get_if_none_match()
442 }
443 /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
444 /// <p>This functionality is not supported for directory buckets.</p>
445 /// </note>
446 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
447 self.inner = self.inner.sse_customer_algorithm(input.into());
448 self
449 }
450 /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
451 /// <p>This functionality is not supported for directory buckets.</p>
452 /// </note>
453 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
454 self.inner = self.inner.set_sse_customer_algorithm(input);
455 self
456 }
457 /// <p>The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
458 /// <p>This functionality is not supported for directory buckets.</p>
459 /// </note>
460 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
461 self.inner.get_sse_customer_algorithm()
462 }
463 /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
464 /// <p>This functionality is not supported for directory buckets.</p>
465 /// </note>
466 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
467 self.inner = self.inner.sse_customer_key(input.into());
468 self
469 }
470 /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
471 /// <p>This functionality is not supported for directory buckets.</p>
472 /// </note>
473 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
474 self.inner = self.inner.set_sse_customer_key(input);
475 self
476 }
477 /// <p>The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
478 /// <p>This functionality is not supported for directory buckets.</p>
479 /// </note>
480 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
481 self.inner.get_sse_customer_key()
482 }
483 /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
484 /// <p>This functionality is not supported for directory buckets.</p>
485 /// </note>
486 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
487 self.inner = self.inner.sse_customer_key_md5(input.into());
488 self
489 }
490 /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
491 /// <p>This functionality is not supported for directory buckets.</p>
492 /// </note>
493 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
494 self.inner = self.inner.set_sse_customer_key_md5(input);
495 self
496 }
497 /// <p>The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html">Protecting data using SSE-C keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
498 /// <p>This functionality is not supported for directory buckets.</p>
499 /// </note>
500 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
501 self.inner.get_sse_customer_key_md5()
502 }
503}