aws_sdk_s3/operation/create_multipart_upload/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_multipart_upload::_create_multipart_upload_output::CreateMultipartUploadOutputBuilder;
3
4pub use crate::operation::create_multipart_upload::_create_multipart_upload_input::CreateMultipartUploadInputBuilder;
5
6impl crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder {
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::create_multipart_upload::CreateMultipartUploadOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_multipart_upload::CreateMultipartUploadError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_multipart_upload();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateMultipartUpload`.
24///
25/// <p>This action initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a>). You also include this upload ID in the final request to either complete or abort the multipart upload request. For more information about multipart uploads, see <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>
26/// <p>After you initiate a multipart upload and upload one or more parts, to stop being charged for storing the uploaded parts, you must either complete or abort the multipart upload. Amazon S3 frees up the space used to store the parts and stops charging you for storing them only after you either complete or abort a multipart upload.</p>
27/// </note>
28/// <p>If you have configured a lifecycle rule to abort incomplete multipart uploads, the created multipart upload must be completed within the number of days specified in the bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible for an abort action and Amazon S3 aborts the multipart upload. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config">Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration</a>.</p><note>
29/// <ul>
30/// <li>
31/// <p><b>Directory buckets </b> - S3 Lifecycle is not supported by directory buckets.</p></li>
32/// <li>
33/// <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>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the <i>Amazon S3 User Guide</i>.</p></li>
34/// </ul>
35/// </note>
36/// <dl>
37/// <dt>
38/// Request signing
39/// </dt>
40/// <dd>
41/// <p>For request signing, multipart upload is just a series of regular requests. You initiate a multipart upload, send one or more requests to upload parts, and then complete the multipart upload process. You sign each request individually. There is nothing special about signing multipart upload requests. For more information about signing, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 User Guide</i>.</p>
42/// </dd>
43/// <dt>
44/// Permissions
45/// </dt>
46/// <dd>
47/// <ul>
48/// <li>
49/// <p><b>General purpose bucket permissions</b> - To perform a multipart upload with encryption using an Key Management Service (KMS) KMS 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. 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, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using server-side encryption with Amazon Web Services KMS</a> in the <i>Amazon S3 User Guide</i>.</p></li>
50/// <li>
51/// <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></li>
52/// </ul>
53/// </dd>
54/// <dt>
55/// Encryption
56/// </dt>
57/// <dd>
58/// <ul>
59/// <li>
60/// <p><b>General purpose buckets</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. Amazon S3 automatically encrypts all new objects that are uploaded to an S3 bucket. When doing a multipart upload, if you don't specify encryption information in your request, the encryption setting of the uploaded parts is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a default encryption configuration that uses server-side encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the uploaded parts. When you perform a CreateMultipartUpload operation, if you want to use a different type of encryption setting for the uploaded parts, you can request that Amazon S3 encrypts the object with a different encryption key (such as an Amazon S3 managed key, a KMS key, or a customer-provided key). When the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence. If you choose to provide your own encryption key, the request headers you provide in <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a> requests must match the headers you used in the <code>CreateMultipartUpload</code> request.</p>
61/// <ul>
62/// <li>
63/// <p>Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key (<code>aws/s3</code>) and KMS customer managed keys stored in Key Management Service (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, specify the following headers in the request.</p>
64/// <ul>
65/// <li>
66/// <p><code>x-amz-server-side-encryption</code></p></li>
67/// <li>
68/// <p><code>x-amz-server-side-encryption-aws-kms-key-id</code></p></li>
69/// <li>
70/// <p><code>x-amz-server-side-encryption-context</code></p></li>
71/// </ul><note>
72/// <ul>
73/// <li>
74/// <p>If you specify <code>x-amz-server-side-encryption:aws:kms</code>, but don't 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> key) in KMS to protect the data.</p></li>
75/// <li>
76/// <p>To perform a multipart upload with encryption by using an Amazon Web Services KMS key, the requester must have permission to the <code>kms:Decrypt</code> and <code>kms:GenerateDataKey*</code> actions on the key. 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, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions">Multipart upload API and permissions</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting data using server-side encryption with Amazon Web Services KMS</a> in the <i>Amazon S3 User Guide</i>.</p></li>
77/// <li>
78/// <p>If your Identity and Access Management (IAM) user or role is in the same Amazon Web Services account as the KMS key, then you must have these permissions on the key policy. If your IAM user or role is in a different account from the key, then you must have the permissions on both the key policy and your IAM user or role.</p></li>
79/// <li>
80/// <p>All <code>GET</code> and <code>PUT</code> requests for an object protected by KMS fail if you don't make them by using Secure Sockets Layer (SSL), Transport Layer Security (TLS), or Signature Version 4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p></li>
81/// </ul>
82/// </note>
83/// <p>For more information about server-side encryption with KMS keys (SSE-KMS), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html">Protecting Data Using Server-Side Encryption with KMS keys</a> in the <i>Amazon S3 User Guide</i>.</p></li>
84/// <li>
85/// <p>Use customer-provided encryption keys (SSE-C) – If you want to manage your own encryption keys, provide all the following headers in the request.</p>
86/// <ul>
87/// <li>
88/// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
89/// <li>
90/// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
91/// <li>
92/// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
93/// </ul>
94/// <p>For more information about server-side encryption with customer-provided encryption keys (SSE-C), see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html"> Protecting data using server-side encryption with customer-provided encryption keys (SSE-C)</a> in the <i>Amazon S3 User Guide</i>.</p></li>
95/// </ul></li>
96/// <li>
97/// <p><b>Directory buckets</b> -For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p></li>
98/// </ul>
99/// </dd>
100/// <dt>
101/// HTTP Host header syntax
102/// </dt>
103/// <dd>
104/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.</p>
105/// </dd>
106/// </dl>
107/// <p>The following operations are related to <code>CreateMultipartUpload</code>:</p>
108/// <ul>
109/// <li>
110/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
111/// <li>
112/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
113/// <li>
114/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
115/// <li>
116/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
117/// <li>
118/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
119/// </ul>
120#[derive(::std::clone::Clone, ::std::fmt::Debug)]
121pub struct CreateMultipartUploadFluentBuilder {
122 handle: ::std::sync::Arc<crate::client::Handle>,
123 inner: crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder,
124 config_override: ::std::option::Option<crate::config::Builder>,
125}
126impl
127 crate::client::customize::internal::CustomizableSend<
128 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
129 crate::operation::create_multipart_upload::CreateMultipartUploadError,
130 > for CreateMultipartUploadFluentBuilder
131{
132 fn send(
133 self,
134 config_override: crate::config::Builder,
135 ) -> crate::client::customize::internal::BoxFuture<
136 crate::client::customize::internal::SendResult<
137 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
138 crate::operation::create_multipart_upload::CreateMultipartUploadError,
139 >,
140 > {
141 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
142 }
143}
144impl CreateMultipartUploadFluentBuilder {
145 /// Creates a new `CreateMultipartUploadFluentBuilder`.
146 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
147 Self {
148 handle,
149 inner: ::std::default::Default::default(),
150 config_override: ::std::option::Option::None,
151 }
152 }
153 /// Access the CreateMultipartUpload as a reference.
154 pub fn as_input(&self) -> &crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder {
155 &self.inner
156 }
157 /// Sends the request and returns the response.
158 ///
159 /// If an error occurs, an `SdkError` will be returned with additional details that
160 /// can be matched against.
161 ///
162 /// By default, any retryable failures will be retried twice. Retry behavior
163 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
164 /// set when configuring the client.
165 pub async fn send(
166 self,
167 ) -> ::std::result::Result<
168 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
169 ::aws_smithy_runtime_api::client::result::SdkError<
170 crate::operation::create_multipart_upload::CreateMultipartUploadError,
171 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
172 >,
173 > {
174 let input = self
175 .inner
176 .build()
177 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
178 let runtime_plugins = crate::operation::create_multipart_upload::CreateMultipartUpload::operation_runtime_plugins(
179 self.handle.runtime_plugins.clone(),
180 &self.handle.conf,
181 self.config_override,
182 );
183 crate::operation::create_multipart_upload::CreateMultipartUpload::orchestrate(&runtime_plugins, input).await
184 }
185
186 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
187 pub fn customize(
188 self,
189 ) -> crate::client::customize::CustomizableOperation<
190 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
191 crate::operation::create_multipart_upload::CreateMultipartUploadError,
192 Self,
193 > {
194 crate::client::customize::CustomizableOperation::new(self)
195 }
196 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
197 self.set_config_override(::std::option::Option::Some(config_override.into()));
198 self
199 }
200
201 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
202 self.config_override = config_override;
203 self
204 }
205 /// <p>The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. 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>
206 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the new object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. One way to grant the permissions using the request headers is to specify a canned ACL with the <code>x-amz-acl</code> request header.</p><note>
207 /// <ul>
208 /// <li>
209 /// <p>This functionality is not supported for directory buckets.</p></li>
210 /// <li>
211 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
212 /// </ul>
213 /// </note>
214 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
215 self.inner = self.inner.acl(input);
216 self
217 }
218 /// <p>The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. 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>
219 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the new object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. One way to grant the permissions using the request headers is to specify a canned ACL with the <code>x-amz-acl</code> request header.</p><note>
220 /// <ul>
221 /// <li>
222 /// <p>This functionality is not supported for directory buckets.</p></li>
223 /// <li>
224 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
225 /// </ul>
226 /// </note>
227 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
228 self.inner = self.inner.set_acl(input);
229 self
230 }
231 /// <p>The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as <i>canned ACLs</i>. Each canned ACL has a predefined set of grantees and permissions. 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>
232 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the access control list (ACL) on the new object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>. One way to grant the permissions using the request headers is to specify a canned ACL with the <code>x-amz-acl</code> request header.</p><note>
233 /// <ul>
234 /// <li>
235 /// <p>This functionality is not supported for directory buckets.</p></li>
236 /// <li>
237 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
238 /// </ul>
239 /// </note>
240 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
241 self.inner.get_acl()
242 }
243 /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
244 /// <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>
245 /// <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>
246 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
247 /// </note>
248 /// <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>
249 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250 self.inner = self.inner.bucket(input.into());
251 self
252 }
253 /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
254 /// <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>
255 /// <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>
256 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
257 /// </note>
258 /// <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>
259 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260 self.inner = self.inner.set_bucket(input);
261 self
262 }
263 /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
264 /// <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>
265 /// <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>
266 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
267 /// </note>
268 /// <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>
269 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
270 self.inner.get_bucket()
271 }
272 /// <p>Specifies caching behavior along the request/reply chain.</p>
273 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
274 self.inner = self.inner.cache_control(input.into());
275 self
276 }
277 /// <p>Specifies caching behavior along the request/reply chain.</p>
278 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
279 self.inner = self.inner.set_cache_control(input);
280 self
281 }
282 /// <p>Specifies caching behavior along the request/reply chain.</p>
283 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
284 self.inner.get_cache_control()
285 }
286 /// <p>Specifies presentational information for the object.</p>
287 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
288 self.inner = self.inner.content_disposition(input.into());
289 self
290 }
291 /// <p>Specifies presentational information for the object.</p>
292 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
293 self.inner = self.inner.set_content_disposition(input);
294 self
295 }
296 /// <p>Specifies presentational information for the object.</p>
297 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
298 self.inner.get_content_disposition()
299 }
300 /// <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.</p><note>
301 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
302 /// </note>
303 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304 self.inner = self.inner.content_encoding(input.into());
305 self
306 }
307 /// <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.</p><note>
308 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
309 /// </note>
310 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311 self.inner = self.inner.set_content_encoding(input);
312 self
313 }
314 /// <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.</p><note>
315 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
316 /// </note>
317 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
318 self.inner.get_content_encoding()
319 }
320 /// <p>The language that the content is in.</p>
321 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322 self.inner = self.inner.content_language(input.into());
323 self
324 }
325 /// <p>The language that the content is in.</p>
326 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327 self.inner = self.inner.set_content_language(input);
328 self
329 }
330 /// <p>The language that the content is in.</p>
331 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
332 self.inner.get_content_language()
333 }
334 /// <p>A standard MIME type describing the format of the object data.</p>
335 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336 self.inner = self.inner.content_type(input.into());
337 self
338 }
339 /// <p>A standard MIME type describing the format of the object data.</p>
340 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
341 self.inner = self.inner.set_content_type(input);
342 self
343 }
344 /// <p>A standard MIME type describing the format of the object data.</p>
345 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
346 self.inner.get_content_type()
347 }
348 /// <p>The date and time at which the object is no longer cacheable.</p>
349 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
350 self.inner = self.inner.expires(input);
351 self
352 }
353 /// <p>The date and time at which the object is no longer cacheable.</p>
354 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
355 self.inner = self.inner.set_expires(input);
356 self
357 }
358 /// <p>The date and time at which the object is no longer cacheable.</p>
359 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
360 self.inner.get_expires()
361 }
362 /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
363 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
364 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
365 /// <ul>
366 /// <li>
367 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
368 /// <li>
369 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
370 /// <li>
371 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
372 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
373 /// <ul>
374 /// <li>
375 /// <p>US East (N. Virginia)</p></li>
376 /// <li>
377 /// <p>US West (N. California)</p></li>
378 /// <li>
379 /// <p>US West (Oregon)</p></li>
380 /// <li>
381 /// <p>Asia Pacific (Singapore)</p></li>
382 /// <li>
383 /// <p>Asia Pacific (Sydney)</p></li>
384 /// <li>
385 /// <p>Asia Pacific (Tokyo)</p></li>
386 /// <li>
387 /// <p>Europe (Ireland)</p></li>
388 /// <li>
389 /// <p>South America (São Paulo)</p></li>
390 /// </ul>
391 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
392 /// </note></li>
393 /// </ul>
394 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
395 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></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 grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404 self.inner = self.inner.grant_full_control(input.into());
405 self
406 }
407 /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
408 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
409 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
410 /// <ul>
411 /// <li>
412 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
413 /// <li>
414 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
415 /// <li>
416 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
417 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
418 /// <ul>
419 /// <li>
420 /// <p>US East (N. Virginia)</p></li>
421 /// <li>
422 /// <p>US West (N. California)</p></li>
423 /// <li>
424 /// <p>US West (Oregon)</p></li>
425 /// <li>
426 /// <p>Asia Pacific (Singapore)</p></li>
427 /// <li>
428 /// <p>Asia Pacific (Sydney)</p></li>
429 /// <li>
430 /// <p>Asia Pacific (Tokyo)</p></li>
431 /// <li>
432 /// <p>Europe (Ireland)</p></li>
433 /// <li>
434 /// <p>South America (São Paulo)</p></li>
435 /// </ul>
436 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
437 /// </note></li>
438 /// </ul>
439 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
440 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
441 /// <ul>
442 /// <li>
443 /// <p>This functionality is not supported for directory buckets.</p></li>
444 /// <li>
445 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
446 /// </ul>
447 /// </note>
448 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449 self.inner = self.inner.set_grant_full_control(input);
450 self
451 }
452 /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
453 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
454 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
455 /// <ul>
456 /// <li>
457 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
458 /// <li>
459 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
460 /// <li>
461 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
462 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
463 /// <ul>
464 /// <li>
465 /// <p>US East (N. Virginia)</p></li>
466 /// <li>
467 /// <p>US West (N. California)</p></li>
468 /// <li>
469 /// <p>US West (Oregon)</p></li>
470 /// <li>
471 /// <p>Asia Pacific (Singapore)</p></li>
472 /// <li>
473 /// <p>Asia Pacific (Sydney)</p></li>
474 /// <li>
475 /// <p>Asia Pacific (Tokyo)</p></li>
476 /// <li>
477 /// <p>Europe (Ireland)</p></li>
478 /// <li>
479 /// <p>South America (São Paulo)</p></li>
480 /// </ul>
481 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
482 /// </note></li>
483 /// </ul>
484 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
485 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
486 /// <ul>
487 /// <li>
488 /// <p>This functionality is not supported for directory buckets.</p></li>
489 /// <li>
490 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
491 /// </ul>
492 /// </note>
493 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
494 self.inner.get_grant_full_control()
495 }
496 /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
497 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
498 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
499 /// <ul>
500 /// <li>
501 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
502 /// <li>
503 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
504 /// <li>
505 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
506 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
507 /// <ul>
508 /// <li>
509 /// <p>US East (N. Virginia)</p></li>
510 /// <li>
511 /// <p>US West (N. California)</p></li>
512 /// <li>
513 /// <p>US West (Oregon)</p></li>
514 /// <li>
515 /// <p>Asia Pacific (Singapore)</p></li>
516 /// <li>
517 /// <p>Asia Pacific (Sydney)</p></li>
518 /// <li>
519 /// <p>Asia Pacific (Tokyo)</p></li>
520 /// <li>
521 /// <p>Europe (Ireland)</p></li>
522 /// <li>
523 /// <p>South America (São Paulo)</p></li>
524 /// </ul>
525 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
526 /// </note></li>
527 /// </ul>
528 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
529 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
530 /// <ul>
531 /// <li>
532 /// <p>This functionality is not supported for directory buckets.</p></li>
533 /// <li>
534 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
535 /// </ul>
536 /// </note>
537 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
538 self.inner = self.inner.grant_read(input.into());
539 self
540 }
541 /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
542 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
543 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
544 /// <ul>
545 /// <li>
546 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
547 /// <li>
548 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
549 /// <li>
550 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
551 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
552 /// <ul>
553 /// <li>
554 /// <p>US East (N. Virginia)</p></li>
555 /// <li>
556 /// <p>US West (N. California)</p></li>
557 /// <li>
558 /// <p>US West (Oregon)</p></li>
559 /// <li>
560 /// <p>Asia Pacific (Singapore)</p></li>
561 /// <li>
562 /// <p>Asia Pacific (Sydney)</p></li>
563 /// <li>
564 /// <p>Asia Pacific (Tokyo)</p></li>
565 /// <li>
566 /// <p>Europe (Ireland)</p></li>
567 /// <li>
568 /// <p>South America (São Paulo)</p></li>
569 /// </ul>
570 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
571 /// </note></li>
572 /// </ul>
573 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
574 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
575 /// <ul>
576 /// <li>
577 /// <p>This functionality is not supported for directory buckets.</p></li>
578 /// <li>
579 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
580 /// </ul>
581 /// </note>
582 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
583 self.inner = self.inner.set_grant_read(input);
584 self
585 }
586 /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
587 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
588 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
589 /// <ul>
590 /// <li>
591 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
592 /// <li>
593 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
594 /// <li>
595 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
596 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
597 /// <ul>
598 /// <li>
599 /// <p>US East (N. Virginia)</p></li>
600 /// <li>
601 /// <p>US West (N. California)</p></li>
602 /// <li>
603 /// <p>US West (Oregon)</p></li>
604 /// <li>
605 /// <p>Asia Pacific (Singapore)</p></li>
606 /// <li>
607 /// <p>Asia Pacific (Sydney)</p></li>
608 /// <li>
609 /// <p>Asia Pacific (Tokyo)</p></li>
610 /// <li>
611 /// <p>Europe (Ireland)</p></li>
612 /// <li>
613 /// <p>South America (São Paulo)</p></li>
614 /// </ul>
615 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
616 /// </note></li>
617 /// </ul>
618 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
619 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
620 /// <ul>
621 /// <li>
622 /// <p>This functionality is not supported for directory buckets.</p></li>
623 /// <li>
624 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
625 /// </ul>
626 /// </note>
627 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
628 self.inner.get_grant_read()
629 }
630 /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
631 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
632 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
633 /// <ul>
634 /// <li>
635 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
636 /// <li>
637 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
638 /// <li>
639 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
640 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
641 /// <ul>
642 /// <li>
643 /// <p>US East (N. Virginia)</p></li>
644 /// <li>
645 /// <p>US West (N. California)</p></li>
646 /// <li>
647 /// <p>US West (Oregon)</p></li>
648 /// <li>
649 /// <p>Asia Pacific (Singapore)</p></li>
650 /// <li>
651 /// <p>Asia Pacific (Sydney)</p></li>
652 /// <li>
653 /// <p>Asia Pacific (Tokyo)</p></li>
654 /// <li>
655 /// <p>Europe (Ireland)</p></li>
656 /// <li>
657 /// <p>South America (São Paulo)</p></li>
658 /// </ul>
659 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
660 /// </note></li>
661 /// </ul>
662 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
663 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
664 /// <ul>
665 /// <li>
666 /// <p>This functionality is not supported for directory buckets.</p></li>
667 /// <li>
668 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
669 /// </ul>
670 /// </note>
671 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
672 self.inner = self.inner.grant_read_acp(input.into());
673 self
674 }
675 /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
676 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
677 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
678 /// <ul>
679 /// <li>
680 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
681 /// <li>
682 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
683 /// <li>
684 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
685 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
686 /// <ul>
687 /// <li>
688 /// <p>US East (N. Virginia)</p></li>
689 /// <li>
690 /// <p>US West (N. California)</p></li>
691 /// <li>
692 /// <p>US West (Oregon)</p></li>
693 /// <li>
694 /// <p>Asia Pacific (Singapore)</p></li>
695 /// <li>
696 /// <p>Asia Pacific (Sydney)</p></li>
697 /// <li>
698 /// <p>Asia Pacific (Tokyo)</p></li>
699 /// <li>
700 /// <p>Europe (Ireland)</p></li>
701 /// <li>
702 /// <p>South America (São Paulo)</p></li>
703 /// </ul>
704 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
705 /// </note></li>
706 /// </ul>
707 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
708 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
709 /// <ul>
710 /// <li>
711 /// <p>This functionality is not supported for directory buckets.</p></li>
712 /// <li>
713 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
714 /// </ul>
715 /// </note>
716 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
717 self.inner = self.inner.set_grant_read_acp(input);
718 self
719 }
720 /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
721 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
722 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
723 /// <ul>
724 /// <li>
725 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
726 /// <li>
727 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
728 /// <li>
729 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
730 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
731 /// <ul>
732 /// <li>
733 /// <p>US East (N. Virginia)</p></li>
734 /// <li>
735 /// <p>US West (N. California)</p></li>
736 /// <li>
737 /// <p>US West (Oregon)</p></li>
738 /// <li>
739 /// <p>Asia Pacific (Singapore)</p></li>
740 /// <li>
741 /// <p>Asia Pacific (Sydney)</p></li>
742 /// <li>
743 /// <p>Asia Pacific (Tokyo)</p></li>
744 /// <li>
745 /// <p>Europe (Ireland)</p></li>
746 /// <li>
747 /// <p>South America (São Paulo)</p></li>
748 /// </ul>
749 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
750 /// </note></li>
751 /// </ul>
752 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
753 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
754 /// <ul>
755 /// <li>
756 /// <p>This functionality is not supported for directory buckets.</p></li>
757 /// <li>
758 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
759 /// </ul>
760 /// </note>
761 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
762 self.inner.get_grant_read_acp()
763 }
764 /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
765 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
766 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
767 /// <ul>
768 /// <li>
769 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
770 /// <li>
771 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
772 /// <li>
773 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
774 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
775 /// <ul>
776 /// <li>
777 /// <p>US East (N. Virginia)</p></li>
778 /// <li>
779 /// <p>US West (N. California)</p></li>
780 /// <li>
781 /// <p>US West (Oregon)</p></li>
782 /// <li>
783 /// <p>Asia Pacific (Singapore)</p></li>
784 /// <li>
785 /// <p>Asia Pacific (Sydney)</p></li>
786 /// <li>
787 /// <p>Asia Pacific (Tokyo)</p></li>
788 /// <li>
789 /// <p>Europe (Ireland)</p></li>
790 /// <li>
791 /// <p>South America (São Paulo)</p></li>
792 /// </ul>
793 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
794 /// </note></li>
795 /// </ul>
796 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
797 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
798 /// <ul>
799 /// <li>
800 /// <p>This functionality is not supported for directory buckets.</p></li>
801 /// <li>
802 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
803 /// </ul>
804 /// </note>
805 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
806 self.inner = self.inner.grant_write_acp(input.into());
807 self
808 }
809 /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
810 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
811 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
812 /// <ul>
813 /// <li>
814 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
815 /// <li>
816 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
817 /// <li>
818 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
819 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
820 /// <ul>
821 /// <li>
822 /// <p>US East (N. Virginia)</p></li>
823 /// <li>
824 /// <p>US West (N. California)</p></li>
825 /// <li>
826 /// <p>US West (Oregon)</p></li>
827 /// <li>
828 /// <p>Asia Pacific (Singapore)</p></li>
829 /// <li>
830 /// <p>Asia Pacific (Sydney)</p></li>
831 /// <li>
832 /// <p>Asia Pacific (Tokyo)</p></li>
833 /// <li>
834 /// <p>Europe (Ireland)</p></li>
835 /// <li>
836 /// <p>South America (São Paulo)</p></li>
837 /// </ul>
838 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
839 /// </note></li>
840 /// </ul>
841 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
842 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
843 /// <ul>
844 /// <li>
845 /// <p>This functionality is not supported for directory buckets.</p></li>
846 /// <li>
847 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
848 /// </ul>
849 /// </note>
850 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
851 self.inner = self.inner.set_grant_write_acp(input);
852 self
853 }
854 /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
855 /// <p>By default, all objects are private. Only the owner has full access control. When uploading an object, you can use this header to explicitly grant access permissions to specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
856 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
857 /// <ul>
858 /// <li>
859 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
860 /// <li>
861 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
862 /// <li>
863 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
864 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
865 /// <ul>
866 /// <li>
867 /// <p>US East (N. Virginia)</p></li>
868 /// <li>
869 /// <p>US West (N. California)</p></li>
870 /// <li>
871 /// <p>US West (Oregon)</p></li>
872 /// <li>
873 /// <p>Asia Pacific (Singapore)</p></li>
874 /// <li>
875 /// <p>Asia Pacific (Sydney)</p></li>
876 /// <li>
877 /// <p>Asia Pacific (Tokyo)</p></li>
878 /// <li>
879 /// <p>Europe (Ireland)</p></li>
880 /// <li>
881 /// <p>South America (São Paulo)</p></li>
882 /// </ul>
883 /// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
884 /// </note></li>
885 /// </ul>
886 /// <p>For example, the following <code>x-amz-grant-read</code> header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:</p>
887 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
888 /// <ul>
889 /// <li>
890 /// <p>This functionality is not supported for directory buckets.</p></li>
891 /// <li>
892 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
893 /// </ul>
894 /// </note>
895 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
896 self.inner.get_grant_write_acp()
897 }
898 /// <p>Object key for which the multipart upload is to be initiated.</p>
899 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
900 self.inner = self.inner.key(input.into());
901 self
902 }
903 /// <p>Object key for which the multipart upload is to be initiated.</p>
904 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
905 self.inner = self.inner.set_key(input);
906 self
907 }
908 /// <p>Object key for which the multipart upload is to be initiated.</p>
909 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
910 self.inner.get_key()
911 }
912 ///
913 /// Adds a key-value pair to `Metadata`.
914 ///
915 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
916 ///
917 /// <p>A map of metadata to store with the object in S3.</p>
918 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
919 self.inner = self.inner.metadata(k.into(), v.into());
920 self
921 }
922 /// <p>A map of metadata to store with the object in S3.</p>
923 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
924 self.inner = self.inner.set_metadata(input);
925 self
926 }
927 /// <p>A map of metadata to store with the object in S3.</p>
928 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
929 self.inner.get_metadata()
930 }
931 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p><note>
932 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
933 /// </note>
934 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
935 self.inner = self.inner.server_side_encryption(input);
936 self
937 }
938 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p><note>
939 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
940 /// </note>
941 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
942 self.inner = self.inner.set_server_side_encryption(input);
943 self
944 }
945 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>).</p><note>
946 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
947 /// </note>
948 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
949 self.inner.get_server_side_encryption()
950 }
951 /// <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>
952 /// <ul>
953 /// <li>
954 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
955 /// <li>
956 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
957 /// </ul>
958 /// </note>
959 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
960 self.inner = self.inner.storage_class(input);
961 self
962 }
963 /// <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>
964 /// <ul>
965 /// <li>
966 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
967 /// <li>
968 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
969 /// </ul>
970 /// </note>
971 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
972 self.inner = self.inner.set_storage_class(input);
973 self
974 }
975 /// <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>
976 /// <ul>
977 /// <li>
978 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
979 /// <li>
980 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
981 /// </ul>
982 /// </note>
983 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
984 self.inner.get_storage_class()
985 }
986 /// <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.</p><note>
987 /// <p>This functionality is not supported for directory buckets.</p>
988 /// </note>
989 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
990 self.inner = self.inner.website_redirect_location(input.into());
991 self
992 }
993 /// <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.</p><note>
994 /// <p>This functionality is not supported for directory buckets.</p>
995 /// </note>
996 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
997 self.inner = self.inner.set_website_redirect_location(input);
998 self
999 }
1000 /// <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.</p><note>
1001 /// <p>This functionality is not supported for directory buckets.</p>
1002 /// </note>
1003 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1004 self.inner.get_website_redirect_location()
1005 }
1006 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1007 /// <p>This functionality is not supported for directory buckets.</p>
1008 /// </note>
1009 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1010 self.inner = self.inner.sse_customer_algorithm(input.into());
1011 self
1012 }
1013 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1014 /// <p>This functionality is not supported for directory buckets.</p>
1015 /// </note>
1016 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1017 self.inner = self.inner.set_sse_customer_algorithm(input);
1018 self
1019 }
1020 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1021 /// <p>This functionality is not supported for directory buckets.</p>
1022 /// </note>
1023 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1024 self.inner.get_sse_customer_algorithm()
1025 }
1026 /// <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>
1027 /// <p>This functionality is not supported for directory buckets.</p>
1028 /// </note>
1029 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1030 self.inner = self.inner.sse_customer_key(input.into());
1031 self
1032 }
1033 /// <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>
1034 /// <p>This functionality is not supported for directory buckets.</p>
1035 /// </note>
1036 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1037 self.inner = self.inner.set_sse_customer_key(input);
1038 self
1039 }
1040 /// <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>
1041 /// <p>This functionality is not supported for directory buckets.</p>
1042 /// </note>
1043 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1044 self.inner.get_sse_customer_key()
1045 }
1046 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1047 /// <p>This functionality is not supported for directory buckets.</p>
1048 /// </note>
1049 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1050 self.inner = self.inner.sse_customer_key_md5(input.into());
1051 self
1052 }
1053 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1054 /// <p>This functionality is not supported for directory buckets.</p>
1055 /// </note>
1056 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1057 self.inner = self.inner.set_sse_customer_key_md5(input);
1058 self
1059 }
1060 /// <p>Specifies the 128-bit MD5 digest of the customer-provided encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
1061 /// <p>This functionality is not supported for directory buckets.</p>
1062 /// </note>
1063 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1064 self.inner.get_sse_customer_key_md5()
1065 }
1066 /// <p>Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption customer managed key to use for object encryption.</p><note>
1067 /// <p>This functionality is not supported for directory buckets.</p>
1068 /// </note>
1069 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1070 self.inner = self.inner.ssekms_key_id(input.into());
1071 self
1072 }
1073 /// <p>Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption customer managed key to use for object encryption.</p><note>
1074 /// <p>This functionality is not supported for directory buckets.</p>
1075 /// </note>
1076 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1077 self.inner = self.inner.set_ssekms_key_id(input);
1078 self
1079 }
1080 /// <p>Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric encryption customer managed key to use for object encryption.</p><note>
1081 /// <p>This functionality is not supported for directory buckets.</p>
1082 /// </note>
1083 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1084 self.inner.get_ssekms_key_id()
1085 }
1086 /// <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.</p><note>
1087 /// <p>This functionality is not supported for directory buckets.</p>
1088 /// </note>
1089 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1090 self.inner = self.inner.ssekms_encryption_context(input.into());
1091 self
1092 }
1093 /// <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.</p><note>
1094 /// <p>This functionality is not supported for directory buckets.</p>
1095 /// </note>
1096 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1097 self.inner = self.inner.set_ssekms_encryption_context(input);
1098 self
1099 }
1100 /// <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.</p><note>
1101 /// <p>This functionality is not supported for directory buckets.</p>
1102 /// </note>
1103 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1104 self.inner.get_ssekms_encryption_context()
1105 }
1106 /// <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>
1107 /// <p>Specifying this header with an object action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
1108 /// <p>This functionality is not supported for directory buckets.</p>
1109 /// </note>
1110 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1111 self.inner = self.inner.bucket_key_enabled(input);
1112 self
1113 }
1114 /// <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>
1115 /// <p>Specifying this header with an object action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
1116 /// <p>This functionality is not supported for directory buckets.</p>
1117 /// </note>
1118 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1119 self.inner = self.inner.set_bucket_key_enabled(input);
1120 self
1121 }
1122 /// <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>
1123 /// <p>Specifying this header with an object action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
1124 /// <p>This functionality is not supported for directory buckets.</p>
1125 /// </note>
1126 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1127 self.inner.get_bucket_key_enabled()
1128 }
1129 /// <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>
1130 /// <p>This functionality is not supported for directory buckets.</p>
1131 /// </note>
1132 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1133 self.inner = self.inner.request_payer(input);
1134 self
1135 }
1136 /// <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>
1137 /// <p>This functionality is not supported for directory buckets.</p>
1138 /// </note>
1139 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1140 self.inner = self.inner.set_request_payer(input);
1141 self
1142 }
1143 /// <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>
1144 /// <p>This functionality is not supported for directory buckets.</p>
1145 /// </note>
1146 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1147 self.inner.get_request_payer()
1148 }
1149 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1150 /// <p>This functionality is not supported for directory buckets.</p>
1151 /// </note>
1152 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1153 self.inner = self.inner.tagging(input.into());
1154 self
1155 }
1156 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1157 /// <p>This functionality is not supported for directory buckets.</p>
1158 /// </note>
1159 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1160 self.inner = self.inner.set_tagging(input);
1161 self
1162 }
1163 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1164 /// <p>This functionality is not supported for directory buckets.</p>
1165 /// </note>
1166 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1167 self.inner.get_tagging()
1168 }
1169 /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1170 /// <p>This functionality is not supported for directory buckets.</p>
1171 /// </note>
1172 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1173 self.inner = self.inner.object_lock_mode(input);
1174 self
1175 }
1176 /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1177 /// <p>This functionality is not supported for directory buckets.</p>
1178 /// </note>
1179 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1180 self.inner = self.inner.set_object_lock_mode(input);
1181 self
1182 }
1183 /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1184 /// <p>This functionality is not supported for directory buckets.</p>
1185 /// </note>
1186 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1187 self.inner.get_object_lock_mode()
1188 }
1189 /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1190 /// <p>This functionality is not supported for directory buckets.</p>
1191 /// </note>
1192 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1193 self.inner = self.inner.object_lock_retain_until_date(input);
1194 self
1195 }
1196 /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1197 /// <p>This functionality is not supported for directory buckets.</p>
1198 /// </note>
1199 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1200 self.inner = self.inner.set_object_lock_retain_until_date(input);
1201 self
1202 }
1203 /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1204 /// <p>This functionality is not supported for directory buckets.</p>
1205 /// </note>
1206 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1207 self.inner.get_object_lock_retain_until_date()
1208 }
1209 /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1210 /// <p>This functionality is not supported for directory buckets.</p>
1211 /// </note>
1212 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1213 self.inner = self.inner.object_lock_legal_hold_status(input);
1214 self
1215 }
1216 /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1217 /// <p>This functionality is not supported for directory buckets.</p>
1218 /// </note>
1219 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1220 self.inner = self.inner.set_object_lock_legal_hold_status(input);
1221 self
1222 }
1223 /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1224 /// <p>This functionality is not supported for directory buckets.</p>
1225 /// </note>
1226 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1227 self.inner.get_object_lock_legal_hold_status()
1228 }
1229 /// <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>
1230 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1231 self.inner = self.inner.expected_bucket_owner(input.into());
1232 self
1233 }
1234 /// <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>
1235 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1236 self.inner = self.inner.set_expected_bucket_owner(input);
1237 self
1238 }
1239 /// <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>
1240 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1241 self.inner.get_expected_bucket_owner()
1242 }
1243 /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for 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>
1244 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
1245 self.inner = self.inner.checksum_algorithm(input);
1246 self
1247 }
1248 /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for 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>
1249 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
1250 self.inner = self.inner.set_checksum_algorithm(input);
1251 self
1252 }
1253 /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for 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>
1254 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
1255 self.inner.get_checksum_algorithm()
1256 }
1257}