aws_sdk_s3_transfer_manager/operation/upload/builders.rs
1/*
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6use std::sync::Arc;
7
8use crate::types::FailedMultipartUploadPolicy;
9
10use super::{ChecksumStrategy, UploadHandle, UploadInputBuilder};
11
12/// Fluent builder for constructing a single object upload transfer
13#[derive(Debug)]
14pub struct UploadFluentBuilder {
15 handle: Arc<crate::client::Handle>,
16 inner: UploadInputBuilder,
17}
18
19impl UploadFluentBuilder {
20 pub(crate) fn new(handle: Arc<crate::client::Handle>) -> Self {
21 Self {
22 handle,
23 inner: ::std::default::Default::default(),
24 }
25 }
26
27 /// Initiate an upload transfer for a single object
28 #[tracing::instrument(skip_all, level = "debug", name = "initiate-upload", fields(
29 bucket = self.inner.bucket.as_deref().unwrap_or_default(),
30 key = self.inner.key.as_deref().unwrap_or_default(),
31 ))]
32
33 pub fn initiate(self) -> Result<UploadHandle, crate::error::Error> {
34 let input = self.inner.build()?;
35 crate::operation::upload::Upload::orchestrate(self.handle, input)
36 }
37
38 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
39 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
40 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
41 /// <ul>
42 /// <li>
43 /// <p>This functionality is not supported for directory buckets.</p></li>
44 /// <li>
45 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
46 /// </ul>
47 /// </note>
48 pub fn acl(mut self, input: aws_sdk_s3::types::ObjectCannedAcl) -> Self {
49 self.inner = self.inner.acl(input);
50 self
51 }
52 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
53 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
54 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
55 /// <ul>
56 /// <li>
57 /// <p>This functionality is not supported for directory buckets.</p></li>
58 /// <li>
59 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
60 /// </ul>
61 /// </note>
62 pub fn set_acl(mut self, input: Option<aws_sdk_s3::types::ObjectCannedAcl>) -> Self {
63 self.inner = self.inner.set_acl(input);
64 self
65 }
66 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
67 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
68 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
69 /// <ul>
70 /// <li>
71 /// <p>This functionality is not supported for directory buckets.</p></li>
72 /// <li>
73 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
74 /// </ul>
75 /// </note>
76 pub fn get_acl(&self) -> &Option<aws_sdk_s3::types::ObjectCannedAcl> {
77 self.inner.get_acl()
78 }
79 /// <p>Object data.</p>
80 pub fn body(mut self, input: crate::io::InputStream) -> Self {
81 self.inner = self.inner.body(input);
82 self
83 }
84 /// <p>Object data.</p>
85 pub fn set_body(mut self, input: Option<crate::io::InputStream>) -> Self {
86 self.inner = self.inner.set_body(input);
87 self
88 }
89
90 /// <p>Object data.</p>
91 pub fn get_body(&self) -> &Option<crate::io::InputStream> {
92 self.inner.get_body()
93 }
94
95 /// <p>The bucket name to which the PUT action was initiated.</p>
96 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
97 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
98 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
99 /// </note>
100 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
101 /// This field is required.
102 pub fn bucket(mut self, input: impl Into<String>) -> Self {
103 self.inner = self.inner.bucket(input.into());
104 self
105 }
106 /// <p>The bucket name to which the PUT action was initiated.</p>
107 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
108 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
109 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
110 /// </note>
111 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
112 pub fn set_bucket(mut self, input: Option<String>) -> Self {
113 self.inner = self.inner.set_bucket(input);
114 self
115 }
116 /// <p>The bucket name to which the PUT action was initiated.</p>
117 /// <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>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-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>
118 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. 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>
119 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
120 /// </note>
121 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon 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 through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, 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>
122 pub fn get_bucket(&self) -> Option<&str> {
123 self.inner.get_bucket()
124 }
125 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
126 pub fn cache_control(mut self, input: impl Into<String>) -> Self {
127 self.inner = self.inner.cache_control(input);
128 self
129 }
130 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
131 pub fn set_cache_control(mut self, input: Option<String>) -> Self {
132 self.inner = self.inner.set_cache_control(input);
133 self
134 }
135 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
136 pub fn get_cache_control(&self) -> Option<&str> {
137 self.inner.get_cache_control()
138 }
139 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
140 pub fn content_disposition(mut self, input: impl Into<String>) -> Self {
141 self.inner = self.inner.content_disposition(input);
142 self
143 }
144 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
145 pub fn set_content_disposition(mut self, input: Option<String>) -> Self {
146 self.inner = self.inner.set_content_disposition(input);
147 self
148 }
149 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
150 pub fn get_content_disposition(&self) -> Option<&str> {
151 self.inner.get_content_disposition()
152 }
153 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
154 pub fn content_encoding(mut self, input: impl Into<String>) -> Self {
155 self.inner = self.inner.content_encoding(input);
156 self
157 }
158 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
159 pub fn set_content_encoding(mut self, input: Option<String>) -> Self {
160 self.inner = self.inner.set_content_encoding(input);
161 self
162 }
163 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
164 pub fn get_content_encoding(&self) -> Option<&str> {
165 self.inner.get_content_encoding()
166 }
167 /// <p>The language the content is in.</p>
168 pub fn content_language(mut self, input: impl Into<String>) -> Self {
169 self.inner = self.inner.content_language(input);
170 self
171 }
172 /// <p>The language the content is in.</p>
173 pub fn set_content_language(mut self, input: Option<String>) -> Self {
174 self.inner = self.inner.set_content_language(input);
175 self
176 }
177 /// <p>The language the content is in.</p>
178 pub fn get_content_language(&self) -> Option<&str> {
179 self.inner.get_content_language()
180 }
181 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
182 pub fn content_length(mut self, input: i64) -> Self {
183 self.inner = self.inner.content_length(input);
184 self
185 }
186 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
187 pub fn set_content_length(mut self, input: Option<i64>) -> Self {
188 self.inner = self.inner.set_content_length(input);
189 self
190 }
191 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
192 pub fn get_content_length(&self) -> &Option<i64> {
193 self.inner.get_content_length()
194 }
195 /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
196 /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
197 /// </note> <note>
198 /// <p>This functionality is not supported for directory buckets.</p>
199 /// </note>
200 pub fn content_md5(mut self, input: impl Into<String>) -> Self {
201 self.inner = self.inner.content_md5(input);
202 self
203 }
204 /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
205 /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
206 /// </note> <note>
207 /// <p>This functionality is not supported for directory buckets.</p>
208 /// </note>
209 pub fn set_content_md5(mut self, input: Option<String>) -> Self {
210 self.inner = self.inner.set_content_md5(input);
211 self
212 }
213 /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
214 /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
215 /// </note> <note>
216 /// <p>This functionality is not supported for directory buckets.</p>
217 /// </note>
218 pub fn get_content_md5(&self) -> Option<&str> {
219 self.inner.get_content_md5()
220 }
221 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
222 pub fn content_type(mut self, input: impl Into<String>) -> Self {
223 self.inner = self.inner.content_type(input);
224 self
225 }
226 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
227 pub fn set_content_type(mut self, input: Option<String>) -> Self {
228 self.inner = self.inner.set_content_type(input);
229 self
230 }
231 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
232 pub fn get_content_type(&self) -> Option<&str> {
233 self.inner.get_content_type()
234 }
235
236 #[doc = std::include_str!("checksum_strategy.md")]
237 pub fn checksum_strategy(mut self, input: ChecksumStrategy) -> Self {
238 self.inner = self.inner.checksum_strategy(input);
239 self
240 }
241
242 #[doc = std::include_str!("checksum_strategy.md")]
243 pub fn set_checksum_strategy(mut self, input: Option<ChecksumStrategy>) -> Self {
244 self.inner = self.inner.set_checksum_strategy(input);
245 self
246 }
247
248 #[doc = std::include_str!("checksum_strategy.md")]
249 pub fn get_checksum_strategy(&self) -> Option<&ChecksumStrategy> {
250 self.inner.get_checksum_strategy()
251 }
252 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
253 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
254 self.inner = self.inner.expires(input);
255 self
256 }
257 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
258 pub fn set_expires(mut self, input: Option<::aws_smithy_types::DateTime>) -> Self {
259 self.inner = self.inner.set_expires(input);
260 self
261 }
262 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
263 pub fn get_expires(&self) -> &Option<::aws_smithy_types::DateTime> {
264 self.inner.get_expires()
265 }
266 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
267 /// <ul>
268 /// <li>
269 /// <p>This functionality is not supported for directory buckets.</p></li>
270 /// <li>
271 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
272 /// </ul>
273 /// </note>
274 pub fn grant_full_control(mut self, input: impl Into<String>) -> Self {
275 self.inner = self.inner.grant_full_control(input);
276 self
277 }
278 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
279 /// <ul>
280 /// <li>
281 /// <p>This functionality is not supported for directory buckets.</p></li>
282 /// <li>
283 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
284 /// </ul>
285 /// </note>
286 pub fn set_grant_full_control(mut self, input: Option<String>) -> Self {
287 self.inner = self.inner.set_grant_full_control(input);
288 self
289 }
290 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
291 /// <ul>
292 /// <li>
293 /// <p>This functionality is not supported for directory buckets.</p></li>
294 /// <li>
295 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
296 /// </ul>
297 /// </note>
298 pub fn get_grant_full_control(&self) -> Option<&str> {
299 self.inner.get_grant_full_control()
300 }
301 /// <p>Allows grantee to read the object data and its metadata.</p><note>
302 /// <ul>
303 /// <li>
304 /// <p>This functionality is not supported for directory buckets.</p></li>
305 /// <li>
306 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
307 /// </ul>
308 /// </note>
309 pub fn grant_read(mut self, input: impl Into<String>) -> Self {
310 self.inner = self.inner.grant_read(input);
311 self
312 }
313 /// <p>Allows grantee to read the object data and its metadata.</p><note>
314 /// <ul>
315 /// <li>
316 /// <p>This functionality is not supported for directory buckets.</p></li>
317 /// <li>
318 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
319 /// </ul>
320 /// </note>
321 pub fn set_grant_read(mut self, input: Option<String>) -> Self {
322 self.inner = self.inner.set_grant_read(input);
323 self
324 }
325 /// <p>Allows grantee to read the object data and its metadata.</p><note>
326 /// <ul>
327 /// <li>
328 /// <p>This functionality is not supported for directory buckets.</p></li>
329 /// <li>
330 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
331 /// </ul>
332 /// </note>
333 pub fn get_grant_read(&self) -> Option<&str> {
334 self.inner.get_grant_read()
335 }
336 /// <p>Allows grantee to read the object ACL.</p><note>
337 /// <ul>
338 /// <li>
339 /// <p>This functionality is not supported for directory buckets.</p></li>
340 /// <li>
341 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
342 /// </ul>
343 /// </note>
344 pub fn grant_read_acp(mut self, input: impl Into<String>) -> Self {
345 self.inner = self.inner.grant_read_acp(input);
346 self
347 }
348 /// <p>Allows grantee to read the object ACL.</p><note>
349 /// <ul>
350 /// <li>
351 /// <p>This functionality is not supported for directory buckets.</p></li>
352 /// <li>
353 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
354 /// </ul>
355 /// </note>
356 pub fn set_grant_read_acp(mut self, input: Option<String>) -> Self {
357 self.inner = self.inner.set_grant_read_acp(input);
358 self
359 }
360 /// <p>Allows grantee to read the object ACL.</p><note>
361 /// <ul>
362 /// <li>
363 /// <p>This functionality is not supported for directory buckets.</p></li>
364 /// <li>
365 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
366 /// </ul>
367 /// </note>
368 pub fn get_grant_read_acp(&self) -> Option<&str> {
369 self.inner.get_grant_read_acp()
370 }
371 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
372 /// <ul>
373 /// <li>
374 /// <p>This functionality is not supported for directory buckets.</p></li>
375 /// <li>
376 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
377 /// </ul>
378 /// </note>
379 pub fn grant_write_acp(mut self, input: impl Into<String>) -> Self {
380 self.inner = self.inner.grant_write_acp(input);
381 self
382 }
383 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
384 /// <ul>
385 /// <li>
386 /// <p>This functionality is not supported for directory buckets.</p></li>
387 /// <li>
388 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
389 /// </ul>
390 /// </note>
391 pub fn set_grant_write_acp(mut self, input: Option<String>) -> Self {
392 self.inner = self.inner.set_grant_write_acp(input);
393 self
394 }
395 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
396 /// <ul>
397 /// <li>
398 /// <p>This functionality is not supported for directory buckets.</p></li>
399 /// <li>
400 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
401 /// </ul>
402 /// </note>
403 pub fn get_grant_write_acp(&self) -> Option<&str> {
404 self.inner.get_grant_write_acp()
405 }
406 /// <p>Object key for which the PUT action was initiated.</p>
407 /// This field is required.
408 pub fn key(mut self, input: impl Into<String>) -> Self {
409 self.inner = self.inner.key(input);
410 self
411 }
412 /// <p>Object key for which the PUT action was initiated.</p>
413 pub fn set_key(mut self, input: Option<String>) -> Self {
414 self.inner = self.inner.set_key(input);
415 self
416 }
417 /// <p>Object key for which the PUT action was initiated.</p>
418 pub fn get_key(&self) -> Option<&str> {
419 self.inner.get_key()
420 }
421 /// Adds a key-value pair to `metadata`.
422 ///
423 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
424 ///
425 /// <p>A map of metadata to store with the object in S3.</p>
426 pub fn metadata(mut self, k: impl Into<String>, v: impl Into<String>) -> Self {
427 self.inner = self.inner.metadata(k, v);
428 self
429 }
430 /// <p>A map of metadata to store with the object in S3.</p>
431 pub fn set_metadata(
432 mut self,
433 input: Option<::std::collections::HashMap<String, String>>,
434 ) -> Self {
435 self.inner = self.inner.set_metadata(input);
436 self
437 }
438 /// <p>A map of metadata to store with the object in S3.</p>
439 pub fn get_metadata(&self) -> &Option<::std::collections::HashMap<String, String>> {
440 self.inner.get_metadata()
441 }
442 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
443 /// <p><b>General purpose buckets </b> - You have four 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 or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. 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>
444 /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
445 pub fn server_side_encryption(
446 mut self,
447 input: aws_sdk_s3::types::ServerSideEncryption,
448 ) -> Self {
449 self.inner = self.inner.server_side_encryption(input);
450 self
451 }
452 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
453 /// <p><b>General purpose buckets </b> - You have four 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 or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. 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>
454 /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
455 pub fn set_server_side_encryption(
456 mut self,
457 input: Option<aws_sdk_s3::types::ServerSideEncryption>,
458 ) -> Self {
459 self.inner = self.inner.set_server_side_encryption(input);
460 self
461 }
462 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
463 /// <p><b>General purpose buckets </b> - You have four 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 or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. 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>
464 /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
465 pub fn get_server_side_encryption(&self) -> &Option<aws_sdk_s3::types::ServerSideEncryption> {
466 self.inner.get_server_side_encryption()
467 }
468 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
469 /// <ul>
470 /// <li>
471 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
472 /// <li>
473 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
474 /// </ul>
475 /// </note>
476 pub fn storage_class(mut self, input: aws_sdk_s3::types::StorageClass) -> Self {
477 self.inner = self.inner.storage_class(input);
478 self
479 }
480 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
481 /// <ul>
482 /// <li>
483 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
484 /// <li>
485 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
486 /// </ul>
487 /// </note>
488 pub fn set_storage_class(mut self, input: Option<aws_sdk_s3::types::StorageClass>) -> Self {
489 self.inner = self.inner.set_storage_class(input);
490 self
491 }
492 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
493 /// <ul>
494 /// <li>
495 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
496 /// <li>
497 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
498 /// </ul>
499 /// </note>
500 pub fn get_storage_class(&self) -> &Option<aws_sdk_s3::types::StorageClass> {
501 self.inner.get_storage_class()
502 }
503 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
504 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
505 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
506 /// <p>In the following example, the request header sets the object redirect to another website:</p>
507 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
508 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
509 /// <p>This functionality is not supported for directory buckets.</p>
510 /// </note>
511 pub fn website_redirect_location(mut self, input: impl Into<String>) -> Self {
512 self.inner = self.inner.website_redirect_location(input);
513 self
514 }
515 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
516 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
517 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
518 /// <p>In the following example, the request header sets the object redirect to another website:</p>
519 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
520 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
521 /// <p>This functionality is not supported for directory buckets.</p>
522 /// </note>
523 pub fn set_website_redirect_location(mut self, input: Option<String>) -> Self {
524 self.inner = self.inner.set_website_redirect_location(input);
525 self
526 }
527 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
528 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
529 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
530 /// <p>In the following example, the request header sets the object redirect to another website:</p>
531 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
532 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</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 get_website_redirect_location(&self) -> Option<&str> {
536 self.inner.get_website_redirect_location()
537 }
538 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
539 /// <p>This functionality is not supported for directory buckets.</p>
540 /// </note>
541 pub fn sse_customer_algorithm(mut self, input: impl Into<String>) -> Self {
542 self.inner = self.inner.sse_customer_algorithm(input);
543 self
544 }
545 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
546 /// <p>This functionality is not supported for directory buckets.</p>
547 /// </note>
548 pub fn set_sse_customer_algorithm(mut self, input: Option<String>) -> Self {
549 self.inner = self.inner.set_sse_customer_algorithm(input);
550 self
551 }
552 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
553 /// <p>This functionality is not supported for directory buckets.</p>
554 /// </note>
555 pub fn get_sse_customer_algorithm(&self) -> Option<&str> {
556 self.inner.get_sse_customer_algorithm()
557 }
558 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
559 /// <p>This functionality is not supported for directory buckets.</p>
560 /// </note>
561 pub fn sse_customer_key(mut self, input: impl Into<String>) -> Self {
562 self.inner = self.inner.sse_customer_key(input);
563 self
564 }
565 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
566 /// <p>This functionality is not supported for directory buckets.</p>
567 /// </note>
568 pub fn set_sse_customer_key(mut self, input: Option<String>) -> Self {
569 self.inner = self.inner.set_sse_customer_key(input);
570 self
571 }
572 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon S3 does not store the encryption key. The key must be appropriate for use with the algorithm specified in the <code>x-amz-server-side-encryption-customer-algorithm</code> header.</p><note>
573 /// <p>This functionality is not supported for directory buckets.</p>
574 /// </note>
575 pub fn get_sse_customer_key(&self) -> Option<&str> {
576 self.inner.get_sse_customer_key()
577 }
578 /// <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>
579 /// <p>This functionality is not supported for directory buckets.</p>
580 /// </note>
581 pub fn sse_customer_key_md5(mut self, input: impl Into<String>) -> Self {
582 self.inner = self.inner.sse_customer_key_md5(input);
583 self
584 }
585 /// <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>
586 /// <p>This functionality is not supported for directory buckets.</p>
587 /// </note>
588 pub fn set_sse_customer_key_md5(mut self, input: Option<String>) -> Self {
589 self.inner = self.inner.set_sse_customer_key_md5(input);
590 self
591 }
592 /// <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>
593 /// <p>This functionality is not supported for directory buckets.</p>
594 /// </note>
595 pub fn get_sse_customer_key_md5(&self) -> Option<&str> {
596 self.inner.get_sse_customer_key_md5()
597 }
598 /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
599 /// <p>This functionality is not supported for directory buckets.</p>
600 /// </note>
601 pub fn sse_kms_key_id(mut self, input: impl Into<String>) -> Self {
602 self.inner = self.inner.sse_kms_key_id(input);
603 self
604 }
605 /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
606 /// <p>This functionality is not supported for directory buckets.</p>
607 /// </note>
608 pub fn set_sse_kms_key_id(mut self, input: Option<String>) -> Self {
609 self.inner = self.inner.set_sse_kms_key_id(input);
610 self
611 }
612 /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
613 /// <p>This functionality is not supported for directory buckets.</p>
614 /// </note>
615 pub fn get_sse_kms_key_id(&self) -> Option<&str> {
616 self.inner.get_sse_kms_key_id()
617 }
618 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
619 /// <p>This functionality is not supported for directory buckets.</p>
620 /// </note>
621 pub fn sse_kms_encryption_context(mut self, input: impl Into<String>) -> Self {
622 self.inner = self.inner.sse_kms_encryption_context(input);
623 self
624 }
625 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
626 /// <p>This functionality is not supported for directory buckets.</p>
627 /// </note>
628 pub fn set_sse_kms_encryption_context(mut self, input: Option<String>) -> Self {
629 self.inner = self.inner.set_sse_kms_encryption_context(input);
630 self
631 }
632 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
633 /// <p>This functionality is not supported for directory buckets.</p>
634 /// </note>
635 pub fn get_sse_kms_encryption_context(&self) -> Option<&str> {
636 self.inner.get_sse_kms_encryption_context()
637 }
638 /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
639 /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
640 /// <p>This functionality is not supported for directory buckets.</p>
641 /// </note>
642 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
643 self.inner = self.inner.bucket_key_enabled(input);
644 self
645 }
646 /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
647 /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
648 /// <p>This functionality is not supported for directory buckets.</p>
649 /// </note>
650 pub fn set_bucket_key_enabled(mut self, input: Option<bool>) -> Self {
651 self.inner = self.inner.set_bucket_key_enabled(input);
652 self
653 }
654 /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
655 /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
656 /// <p>This functionality is not supported for directory buckets.</p>
657 /// </note>
658 pub fn get_bucket_key_enabled(&self) -> &Option<bool> {
659 self.inner.get_bucket_key_enabled()
660 }
661 /// <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>
662 /// <p>This functionality is not supported for directory buckets.</p>
663 /// </note>
664 pub fn request_payer(mut self, input: aws_sdk_s3::types::RequestPayer) -> Self {
665 self.inner = self.inner.request_payer(input);
666 self
667 }
668 /// <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>
669 /// <p>This functionality is not supported for directory buckets.</p>
670 /// </note>
671 pub fn set_request_payer(mut self, input: Option<aws_sdk_s3::types::RequestPayer>) -> Self {
672 self.inner = self.inner.set_request_payer(input);
673 self
674 }
675 /// <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>
676 /// <p>This functionality is not supported for directory buckets.</p>
677 /// </note>
678 pub fn get_request_payer(&self) -> &Option<aws_sdk_s3::types::RequestPayer> {
679 self.inner.get_request_payer()
680 }
681 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
682 /// <p>This functionality is not supported for directory buckets.</p>
683 /// </note>
684 pub fn tagging(mut self, input: impl Into<String>) -> Self {
685 self.inner = self.inner.tagging(input);
686 self
687 }
688 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
689 /// <p>This functionality is not supported for directory buckets.</p>
690 /// </note>
691 pub fn set_tagging(mut self, input: Option<String>) -> Self {
692 self.inner = self.inner.set_tagging(input);
693 self
694 }
695 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
696 /// <p>This functionality is not supported for directory buckets.</p>
697 /// </note>
698 pub fn get_tagging(&self) -> Option<&str> {
699 self.inner.get_tagging()
700 }
701 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
702 /// <p>This functionality is not supported for directory buckets.</p>
703 /// </note>
704 pub fn object_lock_mode(mut self, input: aws_sdk_s3::types::ObjectLockMode) -> Self {
705 self.inner = self.inner.object_lock_mode(input);
706 self
707 }
708 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
709 /// <p>This functionality is not supported for directory buckets.</p>
710 /// </note>
711 pub fn set_object_lock_mode(
712 mut self,
713 input: Option<aws_sdk_s3::types::ObjectLockMode>,
714 ) -> Self {
715 self.inner = self.inner.set_object_lock_mode(input);
716 self
717 }
718 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
719 /// <p>This functionality is not supported for directory buckets.</p>
720 /// </note>
721 pub fn get_object_lock_mode(&self) -> &Option<aws_sdk_s3::types::ObjectLockMode> {
722 self.inner.get_object_lock_mode()
723 }
724 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
725 /// <p>This functionality is not supported for directory buckets.</p>
726 /// </note>
727 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
728 self.inner = self.inner.object_lock_retain_until_date(input);
729 self
730 }
731 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
732 /// <p>This functionality is not supported for directory buckets.</p>
733 /// </note>
734 pub fn set_object_lock_retain_until_date(
735 mut self,
736 input: Option<::aws_smithy_types::DateTime>,
737 ) -> Self {
738 self.inner = self.inner.set_object_lock_retain_until_date(input);
739 self
740 }
741 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
742 /// <p>This functionality is not supported for directory buckets.</p>
743 /// </note>
744 pub fn get_object_lock_retain_until_date(&self) -> &Option<::aws_smithy_types::DateTime> {
745 self.inner.get_object_lock_retain_until_date()
746 }
747 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
748 /// <p>This functionality is not supported for directory buckets.</p>
749 /// </note>
750 pub fn object_lock_legal_hold_status(
751 mut self,
752 input: aws_sdk_s3::types::ObjectLockLegalHoldStatus,
753 ) -> Self {
754 self.inner = self.inner.object_lock_legal_hold_status(input);
755 self
756 }
757 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
758 /// <p>This functionality is not supported for directory buckets.</p>
759 /// </note>
760 pub fn set_object_lock_legal_hold_status(
761 mut self,
762 input: Option<aws_sdk_s3::types::ObjectLockLegalHoldStatus>,
763 ) -> Self {
764 self.inner = self.inner.set_object_lock_legal_hold_status(input);
765 self
766 }
767 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
768 /// <p>This functionality is not supported for directory buckets.</p>
769 /// </note>
770 pub fn get_object_lock_legal_hold_status(
771 &self,
772 ) -> &Option<aws_sdk_s3::types::ObjectLockLegalHoldStatus> {
773 self.inner.get_object_lock_legal_hold_status()
774 }
775 /// <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>
776 pub fn expected_bucket_owner(mut self, input: impl Into<String>) -> Self {
777 self.inner = self.inner.expected_bucket_owner(input);
778 self
779 }
780 /// <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>
781 pub fn set_expected_bucket_owner(mut self, input: Option<String>) -> Self {
782 self.inner = self.inner.set_expected_bucket_owner(input);
783 self
784 }
785 /// <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>
786 pub fn get_expected_bucket_owner(&self) -> Option<&str> {
787 self.inner.get_expected_bucket_owner()
788 }
789
790 /// The policy that describes how to handle a failed multipart upload.
791 pub fn failed_multipart_upload_policy(mut self, input: FailedMultipartUploadPolicy) -> Self {
792 self.inner = self.inner.failed_multipart_upload_policy(input);
793 self
794 }
795
796 /// The policy that describes how to handle a failed multipart upload.
797 pub fn set_failed_multipart_upload_policy(
798 mut self,
799 input: Option<FailedMultipartUploadPolicy>,
800 ) -> Self {
801 self.inner = self.inner.set_failed_multipart_upload_policy(input);
802 self
803 }
804
805 /// The policy that describes how to handle a failed multipart upload.
806 pub fn get_failed_multipart_upload_policy(&self) -> &Option<FailedMultipartUploadPolicy> {
807 self.inner.get_failed_multipart_upload_policy()
808 }
809}
810
811impl crate::operation::upload::input::UploadInputBuilder {
812 /// Initiate an upload transfer for a single object with this input using the given client.
813 pub fn initiate_with(
814 self,
815 client: &crate::Client,
816 ) -> Result<UploadHandle, crate::error::Error> {
817 let mut fluent_builder = client.upload();
818 fluent_builder.inner = self;
819 fluent_builder.initiate()
820 }
821}