aws_sdk_s3/operation/upload_part/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::upload_part::_upload_part_output::UploadPartOutputBuilder;
3
4pub use crate::operation::upload_part::_upload_part_input::UploadPartInputBuilder;
5
6impl crate::operation::upload_part::builders::UploadPartInputBuilder {
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::upload_part::UploadPartOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::upload_part::UploadPartError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.upload_part();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UploadPart`.
24///
25/// <p>Uploads a part in a multipart upload.</p><note>
26/// <p>In this operation, you provide new data as a part of an object in your request. However, you have an option to specify your existing Amazon S3 object as a data source for the part you are uploading. To upload a part from an existing object, you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> operation.</p>
27/// </note>
28/// <p>You must initiate a multipart upload (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a>) before you can upload any part. In response to your initiate request, Amazon S3 returns an upload ID, a unique identifier that you must include in your upload part request.</p>
29/// <p>Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten.</p>
30/// <p>For information about maximum and minimum part sizes and other multipart upload specifications, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html">Multipart upload limits</a> in the <i>Amazon S3 User Guide</i>.</p><note>
31/// <p>After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.</p>
32/// </note>
33/// <p>For more information on multipart uploads, go to <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html">Multipart Upload Overview</a> in the <i>Amazon S3 User Guide </i>.</p><note>
34/// <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>
35/// </note>
36/// <dl>
37/// <dt>
38/// Permissions
39/// </dt>
40/// <dd>
41/// <ul>
42/// <li>
43/// <p><b>General purpose bucket permissions</b> - To perform a multipart upload with encryption using an Key Management Service key, the requester must have permission to the <code>kms:Decrypt</code> and <code>kms:GenerateDataKey</code> actions on the key. The requester must also have permissions for the <code>kms:GenerateDataKey</code> action for the <code>CreateMultipartUpload</code> API. Then, the requester needs permissions for the <code>kms:Decrypt</code> action on the <code>UploadPart</code> and <code>UploadPartCopy</code> APIs.</p>
44/// <p>These permissions are required because Amazon S3 must decrypt and read data from the encrypted file parts before it completes the multipart upload. For more information about KMS permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using server-side encryption with KMS</a> in the <i>Amazon S3 User Guide</i>. For information about the 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> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> in the <i>Amazon S3 User Guide</i>.</p></li>
45/// <li>
46/// <p><b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a>.</p>
47/// <p>If 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>
48/// </ul>
49/// </dd>
50/// <dt>
51/// Data integrity
52/// </dt>
53/// <dd>
54/// <p><b>General purpose bucket</b> - To ensure that data is not corrupted traversing the network, specify the <code>Content-MD5</code> header in the upload part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is signed with Signature Version 4, then Amazon Web Services S3 uses the <code>x-amz-content-sha256</code> header as a checksum instead of <code>Content-MD5</code>. For more information see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html">Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature Version 4)</a>.</p><note>
55/// <p><b>Directory buckets</b> - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.</p>
56/// </note>
57/// </dd>
58/// <dt>
59/// Encryption
60/// </dt>
61/// <dd>
62/// <ul>
63/// <li>
64/// <p><b>General purpose bucket</b> - Server-side encryption is for data encryption at rest. Amazon S3 encrypts your data as it writes it to disks in its data centers and decrypts it when you access it. You have mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest using server-side encryption with other key options. The option you use depends on whether you want to use KMS keys (SSE-KMS) or provide your own encryption key (SSE-C).</p>
65/// <p>Server-side encryption is supported by the S3 Multipart Upload operations. Unless you are using a customer-provided encryption key (SSE-C), you don't need to specify the encryption parameters in each UploadPart request. Instead, you only need to specify the server-side encryption parameters in the initial Initiate Multipart request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a>.</p><note>
66/// <p>If you have server-side encryption with customer-provided keys (SSE-C) blocked for your general purpose bucket, you will get an HTTP 403 Access Denied error when you specify the SSE-C request headers while writing new data to your bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/blocking-unblocking-s3-c-encryption-gpb.html">Blocking or unblocking SSE-C for a general purpose bucket</a>.</p>
67/// </note>
68/// <p>If you request server-side encryption using a customer-provided encryption key (SSE-C) in your initiate multipart upload request, you must provide identical encryption information in each part upload using the following request headers.</p>
69/// <ul>
70/// <li>
71/// <p>x-amz-server-side-encryption-customer-algorithm</p></li>
72/// <li>
73/// <p>x-amz-server-side-encryption-customer-key</p></li>
74/// <li>
75/// <p>x-amz-server-side-encryption-customer-key-MD5</p></li>
76/// </ul>
77/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
78/// <li>
79/// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>).</p></li>
80/// </ul>
81/// </dd>
82/// <dt>
83/// Special errors
84/// </dt>
85/// <dd>
86/// <ul>
87/// <li>
88/// <p>Error Code: <code>NoSuchUpload</code></p>
89/// <ul>
90/// <li>
91/// <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>
92/// <li>
93/// <p>HTTP Status Code: 404 Not Found</p></li>
94/// <li>
95/// <p>SOAP Fault Code Prefix: Client</p></li>
96/// </ul></li>
97/// </ul>
98/// </dd>
99/// <dt>
100/// HTTP Host header syntax
101/// </dt>
102/// <dd>
103/// <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>
104/// </dd>
105/// </dl>
106/// <p>The following operations are related to <code>UploadPart</code>:</p>
107/// <ul>
108/// <li>
109/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
110/// <li>
111/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
112/// <li>
113/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
114/// <li>
115/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
116/// <li>
117/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
118/// </ul><important>
119/// <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>
120/// </important>
121#[derive(::std::fmt::Debug)]
122pub struct UploadPartFluentBuilder {
123 handle: ::std::sync::Arc<crate::client::Handle>,
124 inner: crate::operation::upload_part::builders::UploadPartInputBuilder,
125 config_override: ::std::option::Option<crate::config::Builder>,
126}
127impl
128 crate::client::customize::internal::CustomizableSend<
129 crate::operation::upload_part::UploadPartOutput,
130 crate::operation::upload_part::UploadPartError,
131 > for UploadPartFluentBuilder
132{
133 fn send(
134 self,
135 config_override: crate::config::Builder,
136 ) -> crate::client::customize::internal::BoxFuture<
137 crate::client::customize::internal::SendResult<
138 crate::operation::upload_part::UploadPartOutput,
139 crate::operation::upload_part::UploadPartError,
140 >,
141 > {
142 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
143 }
144}
145impl UploadPartFluentBuilder {
146 /// Creates a new `UploadPartFluentBuilder`.
147 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
148 Self {
149 handle,
150 inner: ::std::default::Default::default(),
151 config_override: ::std::option::Option::None,
152 }
153 }
154 /// Access the UploadPart as a reference.
155 pub fn as_input(&self) -> &crate::operation::upload_part::builders::UploadPartInputBuilder {
156 &self.inner
157 }
158 /// Sends the request and returns the response.
159 ///
160 /// If an error occurs, an `SdkError` will be returned with additional details that
161 /// can be matched against.
162 ///
163 /// By default, any retryable failures will be retried twice. Retry behavior
164 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
165 /// set when configuring the client.
166 pub async fn send(
167 self,
168 ) -> ::std::result::Result<
169 crate::operation::upload_part::UploadPartOutput,
170 ::aws_smithy_runtime_api::client::result::SdkError<
171 crate::operation::upload_part::UploadPartError,
172 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
173 >,
174 > {
175 let input = self
176 .inner
177 .build()
178 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
179 let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
180 self.handle.runtime_plugins.clone(),
181 &self.handle.conf,
182 self.config_override,
183 );
184 crate::operation::upload_part::UploadPart::orchestrate(&runtime_plugins, input).await
185 }
186
187 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
188 pub fn customize(
189 self,
190 ) -> crate::client::customize::CustomizableOperation<
191 crate::operation::upload_part::UploadPartOutput,
192 crate::operation::upload_part::UploadPartError,
193 Self,
194 > {
195 crate::client::customize::CustomizableOperation::new(self)
196 }
197 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
198 self.set_config_override(::std::option::Option::Some(config_override.into()));
199 self
200 }
201
202 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
203 self.config_override = config_override;
204 self
205 }
206 ///
207 /// Creates a presigned request for this operation.
208 ///
209 /// The `presigning_config` provides additional presigning-specific config values, such as the
210 /// amount of time the request should be valid for after creation.
211 ///
212 /// Presigned requests can be given to other users or applications to access a resource or perform
213 /// an operation without having access to the AWS security credentials.
214 ///
215 /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
216 /// the presigned request can only be valid for as long as the credentials used to create it are.
217 ///
218 #[allow(unused_mut)]
219 pub async fn presigned(
220 mut self,
221 presigning_config: crate::presigning::PresigningConfig,
222 ) -> ::std::result::Result<
223 crate::presigning::PresignedRequest,
224 ::aws_smithy_runtime_api::client::result::SdkError<
225 crate::operation::upload_part::UploadPartError,
226 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
227 >,
228 > {
229 let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
230 self.handle.runtime_plugins.clone(),
231 &self.handle.conf,
232 self.config_override,
233 )
234 .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
235 presigning_config,
236 ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
237 ));
238
239 let input = self
240 .inner
241 .build()
242 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
243 let mut context = crate::operation::upload_part::UploadPart::orchestrate_with_stop_point(
244 &runtime_plugins,
245 input,
246 ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
247 )
248 .await
249 .map_err(|err| {
250 err.map_service_error(|err| {
251 err.downcast::<crate::operation::upload_part::UploadPartError>()
252 .expect("correct error type")
253 })
254 })?;
255 let request = context.take_request().expect("request set before transmit");
256 crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
257 }
258 /// <p>Object data.</p>
259 pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
260 self.inner = self.inner.body(input);
261 self
262 }
263 /// <p>Object data.</p>
264 pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
265 self.inner = self.inner.set_body(input);
266 self
267 }
268 /// <p>Object data.</p>
269 pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
270 self.inner.get_body()
271 }
272 /// <p>The name of the bucket to which the multipart upload was initiated.</p>
273 /// <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>
274 /// <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>
275 /// <p>Object Lambda access points are not supported by directory buckets.</p>
276 /// </note>
277 /// <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>
278 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
279 self.inner = self.inner.bucket(input.into());
280 self
281 }
282 /// <p>The name of the bucket to which the multipart upload was initiated.</p>
283 /// <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>
284 /// <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>
285 /// <p>Object Lambda access points are not supported by directory buckets.</p>
286 /// </note>
287 /// <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>
288 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289 self.inner = self.inner.set_bucket(input);
290 self
291 }
292 /// <p>The name of the bucket to which the multipart upload was initiated.</p>
293 /// <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>
294 /// <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>
295 /// <p>Object Lambda access points are not supported by directory buckets.</p>
296 /// </note>
297 /// <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>
298 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
299 self.inner.get_bucket()
300 }
301 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
302 pub fn content_length(mut self, input: i64) -> Self {
303 self.inner = self.inner.content_length(input);
304 self
305 }
306 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
307 pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
308 self.inner = self.inner.set_content_length(input);
309 self
310 }
311 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
312 pub fn get_content_length(&self) -> &::std::option::Option<i64> {
313 self.inner.get_content_length()
314 }
315 /// <p>The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p><note>
316 /// <p>This functionality is not supported for directory buckets.</p>
317 /// </note>
318 pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
319 self.inner = self.inner.content_md5(input.into());
320 self
321 }
322 /// <p>The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p><note>
323 /// <p>This functionality is not supported for directory buckets.</p>
324 /// </note>
325 pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
326 self.inner = self.inner.set_content_md5(input);
327 self
328 }
329 /// <p>The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated when using the command from the CLI. This parameter is required if object lock parameters are specified.</p><note>
330 /// <p>This functionality is not supported for directory buckets.</p>
331 /// </note>
332 pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
333 self.inner.get_content_md5()
334 }
335 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum</code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. 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>
336 /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
337 /// <p>This checksum algorithm must be the same for all parts and it match the checksum value supplied in the <code>CreateMultipartUpload</code> request.</p>
338 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
339 self.inner = self.inner.checksum_algorithm(input);
340 self
341 }
342 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum</code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. 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>
343 /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
344 /// <p>This checksum algorithm must be the same for all parts and it match the checksum value supplied in the <code>CreateMultipartUpload</code> request.</p>
345 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
346 self.inner = self.inner.set_checksum_algorithm(input);
347 self
348 }
349 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum</code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>. 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>
350 /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
351 /// <p>This checksum algorithm must be the same for all parts and it match the checksum value supplied in the <code>CreateMultipartUpload</code> request.</p>
352 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
353 self.inner.get_checksum_algorithm()
354 }
355 /// <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>
356 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
357 self.inner = self.inner.checksum_crc32(input.into());
358 self
359 }
360 /// <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>
361 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
362 self.inner = self.inner.set_checksum_crc32(input);
363 self
364 }
365 /// <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>
366 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
367 self.inner.get_checksum_crc32()
368 }
369 /// <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>
370 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
371 self.inner = self.inner.checksum_crc32_c(input.into());
372 self
373 }
374 /// <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>
375 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
376 self.inner = self.inner.set_checksum_crc32_c(input);
377 self
378 }
379 /// <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>
380 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
381 self.inner.get_checksum_crc32_c()
382 }
383 /// <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 part. 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>
384 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385 self.inner = self.inner.checksum_crc64_nvme(input.into());
386 self
387 }
388 /// <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 part. 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>
389 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
390 self.inner = self.inner.set_checksum_crc64_nvme(input);
391 self
392 }
393 /// <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 part. 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>
394 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
395 self.inner.get_checksum_crc64_nvme()
396 }
397 /// <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>
398 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
399 self.inner = self.inner.checksum_sha1(input.into());
400 self
401 }
402 /// <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>
403 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
404 self.inner = self.inner.set_checksum_sha1(input);
405 self
406 }
407 /// <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>
408 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
409 self.inner.get_checksum_sha1()
410 }
411 /// <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>
412 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
413 self.inner = self.inner.checksum_sha256(input.into());
414 self
415 }
416 /// <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>
417 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
418 self.inner = self.inner.set_checksum_sha256(input);
419 self
420 }
421 /// <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>
422 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
423 self.inner.get_checksum_sha256()
424 }
425 /// <p>Object key for which the multipart upload was initiated.</p>
426 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
427 self.inner = self.inner.key(input.into());
428 self
429 }
430 /// <p>Object key for which the multipart upload was initiated.</p>
431 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
432 self.inner = self.inner.set_key(input);
433 self
434 }
435 /// <p>Object key for which the multipart upload was initiated.</p>
436 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
437 self.inner.get_key()
438 }
439 /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
440 pub fn part_number(mut self, input: i32) -> Self {
441 self.inner = self.inner.part_number(input);
442 self
443 }
444 /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
445 pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
446 self.inner = self.inner.set_part_number(input);
447 self
448 }
449 /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
450 pub fn get_part_number(&self) -> &::std::option::Option<i32> {
451 self.inner.get_part_number()
452 }
453 /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
454 pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
455 self.inner = self.inner.upload_id(input.into());
456 self
457 }
458 /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
459 pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
460 self.inner = self.inner.set_upload_id(input);
461 self
462 }
463 /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
464 pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
465 self.inner.get_upload_id()
466 }
467 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
468 /// <p>This functionality is not supported for directory buckets.</p>
469 /// </note>
470 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
471 self.inner = self.inner.sse_customer_algorithm(input.into());
472 self
473 }
474 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
475 /// <p>This functionality is not supported for directory buckets.</p>
476 /// </note>
477 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
478 self.inner = self.inner.set_sse_customer_algorithm(input);
479 self
480 }
481 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
482 /// <p>This functionality is not supported for directory buckets.</p>
483 /// </note>
484 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
485 self.inner.get_sse_customer_algorithm()
486 }
487 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
488 /// <p>This functionality is not supported for directory buckets.</p>
489 /// </note>
490 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
491 self.inner = self.inner.sse_customer_key(input.into());
492 self
493 }
494 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
495 /// <p>This functionality is not supported for directory buckets.</p>
496 /// </note>
497 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
498 self.inner = self.inner.set_sse_customer_key(input);
499 self
500 }
501 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm header</code>. This must be the same encryption key specified in the initiate multipart upload request.</p><note>
502 /// <p>This functionality is not supported for directory buckets.</p>
503 /// </note>
504 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
505 self.inner.get_sse_customer_key()
506 }
507 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
508 /// <p>This functionality is not supported for directory buckets.</p>
509 /// </note>
510 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
511 self.inner = self.inner.sse_customer_key_md5(input.into());
512 self
513 }
514 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
515 /// <p>This functionality is not supported for directory buckets.</p>
516 /// </note>
517 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
518 self.inner = self.inner.set_sse_customer_key_md5(input);
519 self
520 }
521 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
522 /// <p>This functionality is not supported for directory buckets.</p>
523 /// </note>
524 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
525 self.inner.get_sse_customer_key_md5()
526 }
527 /// <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>
528 /// <p>This functionality is not supported for directory buckets.</p>
529 /// </note>
530 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
531 self.inner = self.inner.request_payer(input);
532 self
533 }
534 /// <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>
535 /// <p>This functionality is not supported for directory buckets.</p>
536 /// </note>
537 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
538 self.inner = self.inner.set_request_payer(input);
539 self
540 }
541 /// <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>
542 /// <p>This functionality is not supported for directory buckets.</p>
543 /// </note>
544 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
545 self.inner.get_request_payer()
546 }
547 /// <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>
548 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
549 self.inner = self.inner.expected_bucket_owner(input.into());
550 self
551 }
552 /// <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>
553 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
554 self.inner = self.inner.set_expected_bucket_owner(input);
555 self
556 }
557 /// <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>
558 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
559 self.inner.get_expected_bucket_owner()
560 }
561}
562
563impl crate::client::customize::internal::CustomizablePresigned<crate::operation::upload_part::UploadPartError> for UploadPartFluentBuilder {
564 fn presign(
565 self,
566 config_override: crate::config::Builder,
567 presigning_config: crate::presigning::PresigningConfig,
568 ) -> crate::client::customize::internal::BoxFuture<
569 crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::upload_part::UploadPartError>,
570 > {
571 ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
572 }
573}