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>
66/// <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>
67/// <ul>
68/// <li>
69/// <p>x-amz-server-side-encryption-customer-algorithm</p></li>
70/// <li>
71/// <p>x-amz-server-side-encryption-customer-key</p></li>
72/// <li>
73/// <p>x-amz-server-side-encryption-customer-key-MD5</p></li>
74/// </ul>
75/// <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>
76/// <li>
77/// <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>
78/// </ul>
79/// </dd>
80/// <dt>
81/// Special errors
82/// </dt>
83/// <dd>
84/// <ul>
85/// <li>
86/// <p>Error Code: <code>NoSuchUpload</code></p>
87/// <ul>
88/// <li>
89/// <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>
90/// <li>
91/// <p>HTTP Status Code: 404 Not Found</p></li>
92/// <li>
93/// <p>SOAP Fault Code Prefix: Client</p></li>
94/// </ul></li>
95/// </ul>
96/// </dd>
97/// <dt>
98/// HTTP Host header syntax
99/// </dt>
100/// <dd>
101/// <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>
102/// </dd>
103/// </dl>
104/// <p>The following operations are related to <code>UploadPart</code>:</p>
105/// <ul>
106/// <li>
107/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html">CreateMultipartUpload</a></p></li>
108/// <li>
109/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
110/// <li>
111/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
112/// <li>
113/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
114/// <li>
115/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
116/// </ul><important>
117/// <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>
118/// </important>
119#[derive(::std::fmt::Debug)]
120pub struct UploadPartFluentBuilder {
121    handle: ::std::sync::Arc<crate::client::Handle>,
122    inner: crate::operation::upload_part::builders::UploadPartInputBuilder,
123    config_override: ::std::option::Option<crate::config::Builder>,
124}
125impl
126    crate::client::customize::internal::CustomizableSend<
127        crate::operation::upload_part::UploadPartOutput,
128        crate::operation::upload_part::UploadPartError,
129    > for UploadPartFluentBuilder
130{
131    fn send(
132        self,
133        config_override: crate::config::Builder,
134    ) -> crate::client::customize::internal::BoxFuture<
135        crate::client::customize::internal::SendResult<
136            crate::operation::upload_part::UploadPartOutput,
137            crate::operation::upload_part::UploadPartError,
138        >,
139    > {
140        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
141    }
142}
143impl UploadPartFluentBuilder {
144    /// Creates a new `UploadPartFluentBuilder`.
145    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
146        Self {
147            handle,
148            inner: ::std::default::Default::default(),
149            config_override: ::std::option::Option::None,
150        }
151    }
152    /// Access the UploadPart as a reference.
153    pub fn as_input(&self) -> &crate::operation::upload_part::builders::UploadPartInputBuilder {
154        &self.inner
155    }
156    /// Sends the request and returns the response.
157    ///
158    /// If an error occurs, an `SdkError` will be returned with additional details that
159    /// can be matched against.
160    ///
161    /// By default, any retryable failures will be retried twice. Retry behavior
162    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
163    /// set when configuring the client.
164    pub async fn send(
165        self,
166    ) -> ::std::result::Result<
167        crate::operation::upload_part::UploadPartOutput,
168        ::aws_smithy_runtime_api::client::result::SdkError<
169            crate::operation::upload_part::UploadPartError,
170            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
171        >,
172    > {
173        let input = self
174            .inner
175            .build()
176            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
177        let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
178            self.handle.runtime_plugins.clone(),
179            &self.handle.conf,
180            self.config_override,
181        );
182        crate::operation::upload_part::UploadPart::orchestrate(&runtime_plugins, input).await
183    }
184
185    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
186    pub fn customize(
187        self,
188    ) -> crate::client::customize::CustomizableOperation<
189        crate::operation::upload_part::UploadPartOutput,
190        crate::operation::upload_part::UploadPartError,
191        Self,
192    > {
193        crate::client::customize::CustomizableOperation::new(self)
194    }
195    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
196        self.set_config_override(::std::option::Option::Some(config_override.into()));
197        self
198    }
199
200    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
201        self.config_override = config_override;
202        self
203    }
204    ///
205    /// Creates a presigned request for this operation.
206    ///
207    /// The `presigning_config` provides additional presigning-specific config values, such as the
208    /// amount of time the request should be valid for after creation.
209    ///
210    /// Presigned requests can be given to other users or applications to access a resource or perform
211    /// an operation without having access to the AWS security credentials.
212    ///
213    /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
214    /// the presigned request can only be valid for as long as the credentials used to create it are.
215    ///
216    #[allow(unused_mut)]
217    pub async fn presigned(
218        mut self,
219        presigning_config: crate::presigning::PresigningConfig,
220    ) -> ::std::result::Result<
221        crate::presigning::PresignedRequest,
222        ::aws_smithy_runtime_api::client::result::SdkError<
223            crate::operation::upload_part::UploadPartError,
224            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
225        >,
226    > {
227        let runtime_plugins = crate::operation::upload_part::UploadPart::operation_runtime_plugins(
228            self.handle.runtime_plugins.clone(),
229            &self.handle.conf,
230            self.config_override,
231        )
232        .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
233            presigning_config,
234            ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
235        ));
236
237        let input = self
238            .inner
239            .build()
240            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
241        let mut context = crate::operation::upload_part::UploadPart::orchestrate_with_stop_point(
242            &runtime_plugins,
243            input,
244            ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
245        )
246        .await
247        .map_err(|err| {
248            err.map_service_error(|err| {
249                err.downcast::<crate::operation::upload_part::UploadPartError>()
250                    .expect("correct error type")
251            })
252        })?;
253        let request = context.take_request().expect("request set before transmit");
254        crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
255    }
256    /// <p>Object data.</p>
257    pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
258        self.inner = self.inner.body(input);
259        self
260    }
261    /// <p>Object data.</p>
262    pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
263        self.inner = self.inner.set_body(input);
264        self
265    }
266    /// <p>Object data.</p>
267    pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
268        self.inner.get_body()
269    }
270    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
271    /// <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>
272    /// <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>
273    /// <p>Object Lambda access points are not supported by directory buckets.</p>
274    /// </note>
275    /// <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>
276    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
277        self.inner = self.inner.bucket(input.into());
278        self
279    }
280    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
281    /// <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>
282    /// <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>
283    /// <p>Object Lambda access points are not supported by directory buckets.</p>
284    /// </note>
285    /// <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>
286    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287        self.inner = self.inner.set_bucket(input);
288        self
289    }
290    /// <p>The name of the bucket to which the multipart upload was initiated.</p>
291    /// <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>
292    /// <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>
293    /// <p>Object Lambda access points are not supported by directory buckets.</p>
294    /// </note>
295    /// <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>
296    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
297        self.inner.get_bucket()
298    }
299    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
300    pub fn content_length(mut self, input: i64) -> Self {
301        self.inner = self.inner.content_length(input);
302        self
303    }
304    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
305    pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
306        self.inner = self.inner.set_content_length(input);
307        self
308    }
309    /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.</p>
310    pub fn get_content_length(&self) -> &::std::option::Option<i64> {
311        self.inner.get_content_length()
312    }
313    /// <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>
314    /// <p>This functionality is not supported for directory buckets.</p>
315    /// </note>
316    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317        self.inner = self.inner.content_md5(input.into());
318        self
319    }
320    /// <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>
321    /// <p>This functionality is not supported for directory buckets.</p>
322    /// </note>
323    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
324        self.inner = self.inner.set_content_md5(input);
325        self
326    }
327    /// <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>
328    /// <p>This functionality is not supported for directory buckets.</p>
329    /// </note>
330    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
331        self.inner.get_content_md5()
332    }
333    /// <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>
334    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
335    /// <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>
336    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
337        self.inner = self.inner.checksum_algorithm(input);
338        self
339    }
340    /// <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>
341    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
342    /// <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>
343    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
344        self.inner = self.inner.set_checksum_algorithm(input);
345        self
346    }
347    /// <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>
348    /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
349    /// <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>
350    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
351        self.inner.get_checksum_algorithm()
352    }
353    /// <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>
354    pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
355        self.inner = self.inner.checksum_crc32(input.into());
356        self
357    }
358    /// <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>
359    pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
360        self.inner = self.inner.set_checksum_crc32(input);
361        self
362    }
363    /// <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>
364    pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
365        self.inner.get_checksum_crc32()
366    }
367    /// <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>
368    pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
369        self.inner = self.inner.checksum_crc32_c(input.into());
370        self
371    }
372    /// <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>
373    pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
374        self.inner = self.inner.set_checksum_crc32_c(input);
375        self
376    }
377    /// <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>
378    pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
379        self.inner.get_checksum_crc32_c()
380    }
381    /// <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>
382    pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383        self.inner = self.inner.checksum_crc64_nvme(input.into());
384        self
385    }
386    /// <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>
387    pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388        self.inner = self.inner.set_checksum_crc64_nvme(input);
389        self
390    }
391    /// <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>
392    pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
393        self.inner.get_checksum_crc64_nvme()
394    }
395    /// <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>
396    pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
397        self.inner = self.inner.checksum_sha1(input.into());
398        self
399    }
400    /// <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>
401    pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
402        self.inner = self.inner.set_checksum_sha1(input);
403        self
404    }
405    /// <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>
406    pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
407        self.inner.get_checksum_sha1()
408    }
409    /// <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>
410    pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
411        self.inner = self.inner.checksum_sha256(input.into());
412        self
413    }
414    /// <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>
415    pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
416        self.inner = self.inner.set_checksum_sha256(input);
417        self
418    }
419    /// <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>
420    pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
421        self.inner.get_checksum_sha256()
422    }
423    /// <p>Object key for which the multipart upload was initiated.</p>
424    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
425        self.inner = self.inner.key(input.into());
426        self
427    }
428    /// <p>Object key for which the multipart upload was initiated.</p>
429    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
430        self.inner = self.inner.set_key(input);
431        self
432    }
433    /// <p>Object key for which the multipart upload was initiated.</p>
434    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
435        self.inner.get_key()
436    }
437    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
438    pub fn part_number(mut self, input: i32) -> Self {
439        self.inner = self.inner.part_number(input);
440        self
441    }
442    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
443    pub fn set_part_number(mut self, input: ::std::option::Option<i32>) -> Self {
444        self.inner = self.inner.set_part_number(input);
445        self
446    }
447    /// <p>Part number of part being uploaded. This is a positive integer between 1 and 10,000.</p>
448    pub fn get_part_number(&self) -> &::std::option::Option<i32> {
449        self.inner.get_part_number()
450    }
451    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
452    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
453        self.inner = self.inner.upload_id(input.into());
454        self
455    }
456    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
457    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
458        self.inner = self.inner.set_upload_id(input);
459        self
460    }
461    /// <p>Upload ID identifying the multipart upload whose part is being uploaded.</p>
462    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
463        self.inner.get_upload_id()
464    }
465    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
466    /// <p>This functionality is not supported for directory buckets.</p>
467    /// </note>
468    pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
469        self.inner = self.inner.sse_customer_algorithm(input.into());
470        self
471    }
472    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
473    /// <p>This functionality is not supported for directory buckets.</p>
474    /// </note>
475    pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
476        self.inner = self.inner.set_sse_customer_algorithm(input);
477        self
478    }
479    /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
480    /// <p>This functionality is not supported for directory buckets.</p>
481    /// </note>
482    pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
483        self.inner.get_sse_customer_algorithm()
484    }
485    /// <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>
486    /// <p>This functionality is not supported for directory buckets.</p>
487    /// </note>
488    pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
489        self.inner = self.inner.sse_customer_key(input.into());
490        self
491    }
492    /// <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>
493    /// <p>This functionality is not supported for directory buckets.</p>
494    /// </note>
495    pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
496        self.inner = self.inner.set_sse_customer_key(input);
497        self
498    }
499    /// <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>
500    /// <p>This functionality is not supported for directory buckets.</p>
501    /// </note>
502    pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
503        self.inner.get_sse_customer_key()
504    }
505    /// <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>
506    /// <p>This functionality is not supported for directory buckets.</p>
507    /// </note>
508    pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
509        self.inner = self.inner.sse_customer_key_md5(input.into());
510        self
511    }
512    /// <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>
513    /// <p>This functionality is not supported for directory buckets.</p>
514    /// </note>
515    pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
516        self.inner = self.inner.set_sse_customer_key_md5(input);
517        self
518    }
519    /// <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>
520    /// <p>This functionality is not supported for directory buckets.</p>
521    /// </note>
522    pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
523        self.inner.get_sse_customer_key_md5()
524    }
525    /// <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>
526    /// <p>This functionality is not supported for directory buckets.</p>
527    /// </note>
528    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
529        self.inner = self.inner.request_payer(input);
530        self
531    }
532    /// <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>
533    /// <p>This functionality is not supported for directory buckets.</p>
534    /// </note>
535    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
536        self.inner = self.inner.set_request_payer(input);
537        self
538    }
539    /// <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>
540    /// <p>This functionality is not supported for directory buckets.</p>
541    /// </note>
542    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
543        self.inner.get_request_payer()
544    }
545    /// <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>
546    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
547        self.inner = self.inner.expected_bucket_owner(input.into());
548        self
549    }
550    /// <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>
551    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
552        self.inner = self.inner.set_expected_bucket_owner(input);
553        self
554    }
555    /// <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>
556    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
557        self.inner.get_expected_bucket_owner()
558    }
559}
560
561impl crate::client::customize::internal::CustomizablePresigned<crate::operation::upload_part::UploadPartError> for UploadPartFluentBuilder {
562    fn presign(
563        self,
564        config_override: crate::config::Builder,
565        presigning_config: crate::presigning::PresigningConfig,
566    ) -> crate::client::customize::internal::BoxFuture<
567        crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::upload_part::UploadPartError>,
568    > {
569        ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
570    }
571}