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_input::CreateMultipartUploadInputBuilder;
3
4pub use crate::operation::create_multipart_upload::_create_multipart_upload_output::CreateMultipartUploadOutputBuilder;
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/// <important>
26/// <p>End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an <code>HTTP 405</code> (Method Not Allowed) error.</p>
27/// <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Europe (Ireland), and South America (São Paulo).</p>
28/// </important>
29/// <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>
30/// <ul>
31/// <li>
32/// <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></li>
33/// <li>
34/// <p>When you initiate a multipart upload, Amazon S3 records the bucket configuration in place at that time and uses it for the rest of the upload. Changes that you make to the bucket configuration after you initiate the upload don't apply to that upload. To apply new bucket configuration to uploads in progress, use <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a> to find them and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a> to stop them. Then start the uploads again.</p></li>
35/// </ul>
36/// </note>
37/// <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>
38/// <ul>
39/// <li>
40/// <p><b>Directory buckets </b> - S3 Lifecycle is not supported by directory buckets.</p></li>
41/// <li>
42/// <p><b>Directory buckets </b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>amzn-s3-demo-bucket</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p></li>
43/// </ul>
44/// </note>
45/// <dl>
46/// <dt>
47/// Request signing
48/// </dt>
49/// <dd>
50/// <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>
51/// </dd>
52/// <dt>
53/// Permissions
54/// </dt>
55/// <dd>
56/// <ul>
57/// <li>
58/// <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>
59/// <li>
60/// <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>
61/// </ul>
62/// </dd>
63/// <dt>
64/// Encryption
65/// </dt>
66/// <dd>
67/// <ul>
68/// <li>
69/// <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>
70/// <ul>
71/// <li>
72/// <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>
73/// <ul>
74/// <li>
75/// <p><code>x-amz-server-side-encryption</code></p></li>
76/// <li>
77/// <p><code>x-amz-server-side-encryption-aws-kms-key-id</code></p></li>
78/// <li>
79/// <p><code>x-amz-server-side-encryption-context</code></p></li>
80/// </ul><note>
81/// <ul>
82/// <li>
83/// <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>
84/// <li>
85/// <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>
86/// <li>
87/// <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>
88/// <li>
89/// <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>
90/// </ul>
91/// </note>
92/// <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>
93/// <li>
94/// <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>
95/// <ul>
96/// <li>
97/// <p><code>x-amz-server-side-encryption-customer-algorithm</code></p></li>
98/// <li>
99/// <p><code>x-amz-server-side-encryption-customer-key</code></p></li>
100/// <li>
101/// <p><code>x-amz-server-side-encryption-customer-key-MD5</code></p></li>
102/// </ul>
103/// <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>
104/// </ul></li>
105/// <li>
106/// <p><b>Directory buckets</b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
107/// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
108/// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
109/// </note> <note>
110/// <p>For directory buckets, when you perform a <code>CreateMultipartUpload</code> operation and an <code>UploadPartCopy</code> operation, the request headers you provide in the <code>CreateMultipartUpload</code> request must match the default encryption configuration of the destination bucket.</p>
111/// </note></li>
112/// </ul>
113/// </dd>
114/// <dt>
115/// HTTP Host header syntax
116/// </dt>
117/// <dd>
118/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>.</p>
119/// </dd>
120/// </dl>
121/// <p>The following operations are related to <code>CreateMultipartUpload</code>:</p>
122/// <ul>
123/// <li>
124/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a></p></li>
125/// <li>
126/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html">CompleteMultipartUpload</a></p></li>
127/// <li>
128/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html">AbortMultipartUpload</a></p></li>
129/// <li>
130/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html">ListParts</a></p></li>
131/// <li>
132/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html">ListMultipartUploads</a></p></li>
133/// </ul><important>
134/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
135/// </important>
136#[derive(::std::clone::Clone, ::std::fmt::Debug)]
137pub struct CreateMultipartUploadFluentBuilder {
138 handle: ::std::sync::Arc<crate::client::Handle>,
139 inner: crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder,
140 config_override: ::std::option::Option<crate::config::Builder>,
141}
142impl
143 crate::client::customize::internal::CustomizableSend<
144 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
145 crate::operation::create_multipart_upload::CreateMultipartUploadError,
146 > for CreateMultipartUploadFluentBuilder
147{
148 fn send(
149 self,
150 config_override: crate::config::Builder,
151 ) -> crate::client::customize::internal::BoxFuture<
152 crate::client::customize::internal::SendResult<
153 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
154 crate::operation::create_multipart_upload::CreateMultipartUploadError,
155 >,
156 > {
157 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
158 }
159}
160impl CreateMultipartUploadFluentBuilder {
161 /// Creates a new `CreateMultipartUploadFluentBuilder`.
162 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
163 Self {
164 handle,
165 inner: ::std::default::Default::default(),
166 config_override: ::std::option::Option::None,
167 }
168 }
169 /// Access the CreateMultipartUpload as a reference.
170 pub fn as_input(&self) -> &crate::operation::create_multipart_upload::builders::CreateMultipartUploadInputBuilder {
171 &self.inner
172 }
173 /// Sends the request and returns the response.
174 ///
175 /// If an error occurs, an `SdkError` will be returned with additional details that
176 /// can be matched against.
177 ///
178 /// By default, any retryable failures will be retried twice. Retry behavior
179 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
180 /// set when configuring the client.
181 pub async fn send(
182 self,
183 ) -> ::std::result::Result<
184 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
185 ::aws_smithy_runtime_api::client::result::SdkError<
186 crate::operation::create_multipart_upload::CreateMultipartUploadError,
187 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
188 >,
189 > {
190 let input = self
191 .inner
192 .build()
193 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
194 let runtime_plugins = crate::operation::create_multipart_upload::CreateMultipartUpload::operation_runtime_plugins(
195 self.handle.runtime_plugins.clone(),
196 &self.handle.conf,
197 self.config_override,
198 );
199 crate::operation::create_multipart_upload::CreateMultipartUpload::orchestrate(&runtime_plugins, input).await
200 }
201
202 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
203 pub fn customize(
204 self,
205 ) -> crate::client::customize::CustomizableOperation<
206 crate::operation::create_multipart_upload::CreateMultipartUploadOutput,
207 crate::operation::create_multipart_upload::CreateMultipartUploadError,
208 Self,
209 > {
210 crate::client::customize::CustomizableOperation::new(self)
211 }
212 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
213 self.set_config_override(::std::option::Option::Some(config_override.into()));
214 self
215 }
216
217 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
218 self.config_override = config_override;
219 self
220 }
221 /// <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>
222 /// <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>
223 /// <ul>
224 /// <li>
225 /// <p>This functionality is not supported for directory buckets.</p></li>
226 /// <li>
227 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
228 /// </ul>
229 /// </note>
230 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
231 self.inner = self.inner.acl(input);
232 self
233 }
234 /// <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>
235 /// <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>
236 /// <ul>
237 /// <li>
238 /// <p>This functionality is not supported for directory buckets.</p></li>
239 /// <li>
240 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
241 /// </ul>
242 /// </note>
243 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
244 self.inner = self.inner.set_acl(input);
245 self
246 }
247 /// <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>
248 /// <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>
249 /// <ul>
250 /// <li>
251 /// <p>This functionality is not supported for directory buckets.</p></li>
252 /// <li>
253 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
254 /// </ul>
255 /// </note>
256 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
257 self.inner.get_acl()
258 }
259 /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
260 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
261 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
262 /// <p>Object Lambda access points are not supported by directory buckets.</p>
263 /// </note>
264 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
265 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
266 self.inner = self.inner.bucket(input.into());
267 self
268 }
269 /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
270 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
271 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
272 /// <p>Object Lambda access points are not supported by directory buckets.</p>
273 /// </note>
274 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
275 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
276 self.inner = self.inner.set_bucket(input);
277 self
278 }
279 /// <p>The name of the bucket where the multipart upload is initiated and where the object is uploaded.</p>
280 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
281 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
282 /// <p>Object Lambda access points are not supported by directory buckets.</p>
283 /// </note>
284 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
285 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
286 self.inner.get_bucket()
287 }
288 /// <p>Specifies caching behavior along the request/reply chain.</p>
289 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290 self.inner = self.inner.cache_control(input.into());
291 self
292 }
293 /// <p>Specifies caching behavior along the request/reply chain.</p>
294 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
295 self.inner = self.inner.set_cache_control(input);
296 self
297 }
298 /// <p>Specifies caching behavior along the request/reply chain.</p>
299 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
300 self.inner.get_cache_control()
301 }
302 /// <p>Specifies presentational information for the object.</p>
303 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304 self.inner = self.inner.content_disposition(input.into());
305 self
306 }
307 /// <p>Specifies presentational information for the object.</p>
308 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
309 self.inner = self.inner.set_content_disposition(input);
310 self
311 }
312 /// <p>Specifies presentational information for the object.</p>
313 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
314 self.inner.get_content_disposition()
315 }
316 /// <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>
317 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
318 /// </note>
319 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320 self.inner = self.inner.content_encoding(input.into());
321 self
322 }
323 /// <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>
324 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
325 /// </note>
326 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327 self.inner = self.inner.set_content_encoding(input);
328 self
329 }
330 /// <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>
331 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
332 /// </note>
333 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
334 self.inner.get_content_encoding()
335 }
336 /// <p>The language that the content is in.</p>
337 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
338 self.inner = self.inner.content_language(input.into());
339 self
340 }
341 /// <p>The language that the content is in.</p>
342 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
343 self.inner = self.inner.set_content_language(input);
344 self
345 }
346 /// <p>The language that the content is in.</p>
347 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
348 self.inner.get_content_language()
349 }
350 /// <p>A standard MIME type describing the format of the object data.</p>
351 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
352 self.inner = self.inner.content_type(input.into());
353 self
354 }
355 /// <p>A standard MIME type describing the format of the object data.</p>
356 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
357 self.inner = self.inner.set_content_type(input);
358 self
359 }
360 /// <p>A standard MIME type describing the format of the object data.</p>
361 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
362 self.inner.get_content_type()
363 }
364 /// <p>The date and time at which the object is no longer cacheable.</p>
365 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
366 self.inner = self.inner.expires(input);
367 self
368 }
369 /// <p>The date and time at which the object is no longer cacheable.</p>
370 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
371 self.inner = self.inner.set_expires(input);
372 self
373 }
374 /// <p>The date and time at which the object is no longer cacheable.</p>
375 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
376 self.inner.get_expires()
377 }
378 /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
379 /// <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>
380 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
381 /// <ul>
382 /// <li>
383 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
384 /// <li>
385 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
386 /// <li>
387 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
388 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
389 /// <ul>
390 /// <li>
391 /// <p>US East (N. Virginia)</p></li>
392 /// <li>
393 /// <p>US West (N. California)</p></li>
394 /// <li>
395 /// <p>US West (Oregon)</p></li>
396 /// <li>
397 /// <p>Asia Pacific (Singapore)</p></li>
398 /// <li>
399 /// <p>Asia Pacific (Sydney)</p></li>
400 /// <li>
401 /// <p>Asia Pacific (Tokyo)</p></li>
402 /// <li>
403 /// <p>Europe (Ireland)</p></li>
404 /// <li>
405 /// <p>South America (São Paulo)</p></li>
406 /// </ul>
407 /// <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>
408 /// </note></li>
409 /// </ul>
410 /// <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>
411 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
412 /// <ul>
413 /// <li>
414 /// <p>This functionality is not supported for directory buckets.</p></li>
415 /// <li>
416 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
417 /// </ul>
418 /// </note>
419 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
420 self.inner = self.inner.grant_full_control(input.into());
421 self
422 }
423 /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
424 /// <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>
425 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
426 /// <ul>
427 /// <li>
428 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
429 /// <li>
430 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
431 /// <li>
432 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
433 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
434 /// <ul>
435 /// <li>
436 /// <p>US East (N. Virginia)</p></li>
437 /// <li>
438 /// <p>US West (N. California)</p></li>
439 /// <li>
440 /// <p>US West (Oregon)</p></li>
441 /// <li>
442 /// <p>Asia Pacific (Singapore)</p></li>
443 /// <li>
444 /// <p>Asia Pacific (Sydney)</p></li>
445 /// <li>
446 /// <p>Asia Pacific (Tokyo)</p></li>
447 /// <li>
448 /// <p>Europe (Ireland)</p></li>
449 /// <li>
450 /// <p>South America (São Paulo)</p></li>
451 /// </ul>
452 /// <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>
453 /// </note></li>
454 /// </ul>
455 /// <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>
456 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
457 /// <ul>
458 /// <li>
459 /// <p>This functionality is not supported for directory buckets.</p></li>
460 /// <li>
461 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
462 /// </ul>
463 /// </note>
464 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
465 self.inner = self.inner.set_grant_full_control(input);
466 self
467 }
468 /// <p>Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p>
469 /// <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>
470 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
471 /// <ul>
472 /// <li>
473 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
474 /// <li>
475 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
476 /// <li>
477 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
478 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
479 /// <ul>
480 /// <li>
481 /// <p>US East (N. Virginia)</p></li>
482 /// <li>
483 /// <p>US West (N. California)</p></li>
484 /// <li>
485 /// <p>US West (Oregon)</p></li>
486 /// <li>
487 /// <p>Asia Pacific (Singapore)</p></li>
488 /// <li>
489 /// <p>Asia Pacific (Sydney)</p></li>
490 /// <li>
491 /// <p>Asia Pacific (Tokyo)</p></li>
492 /// <li>
493 /// <p>Europe (Ireland)</p></li>
494 /// <li>
495 /// <p>South America (São Paulo)</p></li>
496 /// </ul>
497 /// <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>
498 /// </note></li>
499 /// </ul>
500 /// <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>
501 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
502 /// <ul>
503 /// <li>
504 /// <p>This functionality is not supported for directory buckets.</p></li>
505 /// <li>
506 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
507 /// </ul>
508 /// </note>
509 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
510 self.inner.get_grant_full_control()
511 }
512 /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
513 /// <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>
514 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
515 /// <ul>
516 /// <li>
517 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
518 /// <li>
519 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
520 /// <li>
521 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
522 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
523 /// <ul>
524 /// <li>
525 /// <p>US East (N. Virginia)</p></li>
526 /// <li>
527 /// <p>US West (N. California)</p></li>
528 /// <li>
529 /// <p>US West (Oregon)</p></li>
530 /// <li>
531 /// <p>Asia Pacific (Singapore)</p></li>
532 /// <li>
533 /// <p>Asia Pacific (Sydney)</p></li>
534 /// <li>
535 /// <p>Asia Pacific (Tokyo)</p></li>
536 /// <li>
537 /// <p>Europe (Ireland)</p></li>
538 /// <li>
539 /// <p>South America (São Paulo)</p></li>
540 /// </ul>
541 /// <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>
542 /// </note></li>
543 /// </ul>
544 /// <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>
545 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
546 /// <ul>
547 /// <li>
548 /// <p>This functionality is not supported for directory buckets.</p></li>
549 /// <li>
550 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
551 /// </ul>
552 /// </note>
553 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
554 self.inner = self.inner.grant_read(input.into());
555 self
556 }
557 /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
558 /// <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>
559 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
560 /// <ul>
561 /// <li>
562 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
563 /// <li>
564 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
565 /// <li>
566 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
567 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
568 /// <ul>
569 /// <li>
570 /// <p>US East (N. Virginia)</p></li>
571 /// <li>
572 /// <p>US West (N. California)</p></li>
573 /// <li>
574 /// <p>US West (Oregon)</p></li>
575 /// <li>
576 /// <p>Asia Pacific (Singapore)</p></li>
577 /// <li>
578 /// <p>Asia Pacific (Sydney)</p></li>
579 /// <li>
580 /// <p>Asia Pacific (Tokyo)</p></li>
581 /// <li>
582 /// <p>Europe (Ireland)</p></li>
583 /// <li>
584 /// <p>South America (São Paulo)</p></li>
585 /// </ul>
586 /// <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>
587 /// </note></li>
588 /// </ul>
589 /// <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>
590 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
591 /// <ul>
592 /// <li>
593 /// <p>This functionality is not supported for directory buckets.</p></li>
594 /// <li>
595 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
596 /// </ul>
597 /// </note>
598 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
599 self.inner = self.inner.set_grant_read(input);
600 self
601 }
602 /// <p>Specify access permissions explicitly to allow grantee to read the object data and its metadata.</p>
603 /// <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>
604 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
605 /// <ul>
606 /// <li>
607 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
608 /// <li>
609 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
610 /// <li>
611 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
612 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
613 /// <ul>
614 /// <li>
615 /// <p>US East (N. Virginia)</p></li>
616 /// <li>
617 /// <p>US West (N. California)</p></li>
618 /// <li>
619 /// <p>US West (Oregon)</p></li>
620 /// <li>
621 /// <p>Asia Pacific (Singapore)</p></li>
622 /// <li>
623 /// <p>Asia Pacific (Sydney)</p></li>
624 /// <li>
625 /// <p>Asia Pacific (Tokyo)</p></li>
626 /// <li>
627 /// <p>Europe (Ireland)</p></li>
628 /// <li>
629 /// <p>South America (São Paulo)</p></li>
630 /// </ul>
631 /// <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>
632 /// </note></li>
633 /// </ul>
634 /// <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>
635 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
636 /// <ul>
637 /// <li>
638 /// <p>This functionality is not supported for directory buckets.</p></li>
639 /// <li>
640 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
641 /// </ul>
642 /// </note>
643 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
644 self.inner.get_grant_read()
645 }
646 /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
647 /// <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>
648 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
649 /// <ul>
650 /// <li>
651 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
652 /// <li>
653 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
654 /// <li>
655 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
656 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
657 /// <ul>
658 /// <li>
659 /// <p>US East (N. Virginia)</p></li>
660 /// <li>
661 /// <p>US West (N. California)</p></li>
662 /// <li>
663 /// <p>US West (Oregon)</p></li>
664 /// <li>
665 /// <p>Asia Pacific (Singapore)</p></li>
666 /// <li>
667 /// <p>Asia Pacific (Sydney)</p></li>
668 /// <li>
669 /// <p>Asia Pacific (Tokyo)</p></li>
670 /// <li>
671 /// <p>Europe (Ireland)</p></li>
672 /// <li>
673 /// <p>South America (São Paulo)</p></li>
674 /// </ul>
675 /// <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>
676 /// </note></li>
677 /// </ul>
678 /// <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>
679 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
680 /// <ul>
681 /// <li>
682 /// <p>This functionality is not supported for directory buckets.</p></li>
683 /// <li>
684 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
685 /// </ul>
686 /// </note>
687 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
688 self.inner = self.inner.grant_read_acp(input.into());
689 self
690 }
691 /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
692 /// <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>
693 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
694 /// <ul>
695 /// <li>
696 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
697 /// <li>
698 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
699 /// <li>
700 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
701 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
702 /// <ul>
703 /// <li>
704 /// <p>US East (N. Virginia)</p></li>
705 /// <li>
706 /// <p>US West (N. California)</p></li>
707 /// <li>
708 /// <p>US West (Oregon)</p></li>
709 /// <li>
710 /// <p>Asia Pacific (Singapore)</p></li>
711 /// <li>
712 /// <p>Asia Pacific (Sydney)</p></li>
713 /// <li>
714 /// <p>Asia Pacific (Tokyo)</p></li>
715 /// <li>
716 /// <p>Europe (Ireland)</p></li>
717 /// <li>
718 /// <p>South America (São Paulo)</p></li>
719 /// </ul>
720 /// <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>
721 /// </note></li>
722 /// </ul>
723 /// <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>
724 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
725 /// <ul>
726 /// <li>
727 /// <p>This functionality is not supported for directory buckets.</p></li>
728 /// <li>
729 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
730 /// </ul>
731 /// </note>
732 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
733 self.inner = self.inner.set_grant_read_acp(input);
734 self
735 }
736 /// <p>Specify access permissions explicitly to allows grantee to read the object ACL.</p>
737 /// <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>
738 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
739 /// <ul>
740 /// <li>
741 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
742 /// <li>
743 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
744 /// <li>
745 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
746 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
747 /// <ul>
748 /// <li>
749 /// <p>US East (N. Virginia)</p></li>
750 /// <li>
751 /// <p>US West (N. California)</p></li>
752 /// <li>
753 /// <p>US West (Oregon)</p></li>
754 /// <li>
755 /// <p>Asia Pacific (Singapore)</p></li>
756 /// <li>
757 /// <p>Asia Pacific (Sydney)</p></li>
758 /// <li>
759 /// <p>Asia Pacific (Tokyo)</p></li>
760 /// <li>
761 /// <p>Europe (Ireland)</p></li>
762 /// <li>
763 /// <p>South America (São Paulo)</p></li>
764 /// </ul>
765 /// <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>
766 /// </note></li>
767 /// </ul>
768 /// <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>
769 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
770 /// <ul>
771 /// <li>
772 /// <p>This functionality is not supported for directory buckets.</p></li>
773 /// <li>
774 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
775 /// </ul>
776 /// </note>
777 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
778 self.inner.get_grant_read_acp()
779 }
780 /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
781 /// <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>
782 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
783 /// <ul>
784 /// <li>
785 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
786 /// <li>
787 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
788 /// <li>
789 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
790 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
791 /// <ul>
792 /// <li>
793 /// <p>US East (N. Virginia)</p></li>
794 /// <li>
795 /// <p>US West (N. California)</p></li>
796 /// <li>
797 /// <p>US West (Oregon)</p></li>
798 /// <li>
799 /// <p>Asia Pacific (Singapore)</p></li>
800 /// <li>
801 /// <p>Asia Pacific (Sydney)</p></li>
802 /// <li>
803 /// <p>Asia Pacific (Tokyo)</p></li>
804 /// <li>
805 /// <p>Europe (Ireland)</p></li>
806 /// <li>
807 /// <p>South America (São Paulo)</p></li>
808 /// </ul>
809 /// <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>
810 /// </note></li>
811 /// </ul>
812 /// <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>
813 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
814 /// <ul>
815 /// <li>
816 /// <p>This functionality is not supported for directory buckets.</p></li>
817 /// <li>
818 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
819 /// </ul>
820 /// </note>
821 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
822 self.inner = self.inner.grant_write_acp(input.into());
823 self
824 }
825 /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
826 /// <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>
827 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
828 /// <ul>
829 /// <li>
830 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
831 /// <li>
832 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
833 /// <li>
834 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
835 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
836 /// <ul>
837 /// <li>
838 /// <p>US East (N. Virginia)</p></li>
839 /// <li>
840 /// <p>US West (N. California)</p></li>
841 /// <li>
842 /// <p>US West (Oregon)</p></li>
843 /// <li>
844 /// <p>Asia Pacific (Singapore)</p></li>
845 /// <li>
846 /// <p>Asia Pacific (Sydney)</p></li>
847 /// <li>
848 /// <p>Asia Pacific (Tokyo)</p></li>
849 /// <li>
850 /// <p>Europe (Ireland)</p></li>
851 /// <li>
852 /// <p>South America (São Paulo)</p></li>
853 /// </ul>
854 /// <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>
855 /// </note></li>
856 /// </ul>
857 /// <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>
858 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
859 /// <ul>
860 /// <li>
861 /// <p>This functionality is not supported for directory buckets.</p></li>
862 /// <li>
863 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
864 /// </ul>
865 /// </note>
866 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
867 self.inner = self.inner.set_grant_write_acp(input);
868 self
869 }
870 /// <p>Specify access permissions explicitly to allows grantee to allow grantee to write the ACL for the applicable object.</p>
871 /// <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>
872 /// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
873 /// <ul>
874 /// <li>
875 /// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
876 /// <li>
877 /// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
878 /// <li>
879 /// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
880 /// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
881 /// <ul>
882 /// <li>
883 /// <p>US East (N. Virginia)</p></li>
884 /// <li>
885 /// <p>US West (N. California)</p></li>
886 /// <li>
887 /// <p>US West (Oregon)</p></li>
888 /// <li>
889 /// <p>Asia Pacific (Singapore)</p></li>
890 /// <li>
891 /// <p>Asia Pacific (Sydney)</p></li>
892 /// <li>
893 /// <p>Asia Pacific (Tokyo)</p></li>
894 /// <li>
895 /// <p>Europe (Ireland)</p></li>
896 /// <li>
897 /// <p>South America (São Paulo)</p></li>
898 /// </ul>
899 /// <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>
900 /// </note></li>
901 /// </ul>
902 /// <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>
903 /// <p><code>x-amz-grant-read: id="11112222333", id="444455556666" </code></p><note>
904 /// <ul>
905 /// <li>
906 /// <p>This functionality is not supported for directory buckets.</p></li>
907 /// <li>
908 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
909 /// </ul>
910 /// </note>
911 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
912 self.inner.get_grant_write_acp()
913 }
914 /// <p>Object key for which the multipart upload is to be initiated.</p>
915 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
916 self.inner = self.inner.key(input.into());
917 self
918 }
919 /// <p>Object key for which the multipart upload is to be initiated.</p>
920 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
921 self.inner = self.inner.set_key(input);
922 self
923 }
924 /// <p>Object key for which the multipart upload is to be initiated.</p>
925 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
926 self.inner.get_key()
927 }
928 ///
929 /// Adds a key-value pair to `Metadata`.
930 ///
931 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
932 ///
933 /// <p>A map of metadata to store with the object in S3.</p>
934 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
935 self.inner = self.inner.metadata(k.into(), v.into());
936 self
937 }
938 /// <p>A map of metadata to store with the object in S3.</p>
939 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
940 self.inner = self.inner.set_metadata(input);
941 self
942 }
943 /// <p>A map of metadata to store with the object in S3.</p>
944 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
945 self.inner.get_metadata()
946 }
947 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p>
948 /// <ul>
949 /// <li>
950 /// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
951 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
952 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
953 /// </note></li>
954 /// <li>
955 /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
956 /// </ul>
957 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
958 self.inner = self.inner.server_side_encryption(input);
959 self
960 }
961 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p>
962 /// <ul>
963 /// <li>
964 /// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
965 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
966 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
967 /// </note></li>
968 /// <li>
969 /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
970 /// </ul>
971 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
972 self.inner = self.inner.set_server_side_encryption(input);
973 self
974 }
975 /// <p>The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.</p>
976 /// <ul>
977 /// <li>
978 /// <p><b>Directory buckets </b> - For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) and server-side encryption with KMS keys (SSE-KMS) (<code>aws:kms</code>). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your <code>CreateSession</code> requests or <code>PUT</code> object requests. Then, new objects are automatically encrypted with the desired encryption settings. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html">Protecting data with server-side encryption</a> in the <i>Amazon S3 User Guide</i>. For more information about the encryption overriding behaviors in directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html">Specifying server-side encryption with KMS for new object uploads</a>.</p>
979 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
980 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
981 /// </note></li>
982 /// <li>
983 /// <p><b>S3 access points for Amazon FSx </b> - When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is <code>aws:fsx</code>. All Amazon FSx file systems have encryption configured by default and are encrypted at rest. Data is automatically encrypted before being written to the file system, and automatically decrypted as it is read. These processes are handled transparently by Amazon FSx.</p></li>
984 /// </ul>
985 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
986 self.inner.get_server_side_encryption()
987 }
988 /// <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>
989 /// <ul>
990 /// <li>
991 /// <p>Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.</p></li>
992 /// <li>
993 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
994 /// </ul>
995 /// </note>
996 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
997 self.inner = self.inner.storage_class(input);
998 self
999 }
1000 /// <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>
1001 /// <ul>
1002 /// <li>
1003 /// <p>Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.</p></li>
1004 /// <li>
1005 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1006 /// </ul>
1007 /// </note>
1008 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1009 self.inner = self.inner.set_storage_class(input);
1010 self
1011 }
1012 /// <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>
1013 /// <ul>
1014 /// <li>
1015 /// <p>Directory buckets only support <code>EXPRESS_ONEZONE</code> (the S3 Express One Zone storage class) in Availability Zones and <code>ONEZONE_IA</code> (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.</p></li>
1016 /// <li>
1017 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1018 /// </ul>
1019 /// </note>
1020 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1021 self.inner.get_storage_class()
1022 }
1023 /// <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>
1024 /// <p>This functionality is not supported for directory buckets.</p>
1025 /// </note>
1026 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1027 self.inner = self.inner.website_redirect_location(input.into());
1028 self
1029 }
1030 /// <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>
1031 /// <p>This functionality is not supported for directory buckets.</p>
1032 /// </note>
1033 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1034 self.inner = self.inner.set_website_redirect_location(input);
1035 self
1036 }
1037 /// <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>
1038 /// <p>This functionality is not supported for directory buckets.</p>
1039 /// </note>
1040 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1041 self.inner.get_website_redirect_location()
1042 }
1043 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1044 /// <p>This functionality is not supported for directory buckets.</p>
1045 /// </note>
1046 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1047 self.inner = self.inner.sse_customer_algorithm(input.into());
1048 self
1049 }
1050 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1051 /// <p>This functionality is not supported for directory buckets.</p>
1052 /// </note>
1053 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1054 self.inner = self.inner.set_sse_customer_algorithm(input);
1055 self
1056 }
1057 /// <p>Specifies the algorithm to use when encrypting the object (for example, AES256).</p><note>
1058 /// <p>This functionality is not supported for directory buckets.</p>
1059 /// </note>
1060 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1061 self.inner.get_sse_customer_algorithm()
1062 }
1063 /// <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>
1064 /// <p>This functionality is not supported for directory buckets.</p>
1065 /// </note>
1066 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1067 self.inner = self.inner.sse_customer_key(input.into());
1068 self
1069 }
1070 /// <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>
1071 /// <p>This functionality is not supported for directory buckets.</p>
1072 /// </note>
1073 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1074 self.inner = self.inner.set_sse_customer_key(input);
1075 self
1076 }
1077 /// <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>
1078 /// <p>This functionality is not supported for directory buckets.</p>
1079 /// </note>
1080 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1081 self.inner.get_sse_customer_key()
1082 }
1083 /// <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>
1084 /// <p>This functionality is not supported for directory buckets.</p>
1085 /// </note>
1086 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1087 self.inner = self.inner.sse_customer_key_md5(input.into());
1088 self
1089 }
1090 /// <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>
1091 /// <p>This functionality is not supported for directory buckets.</p>
1092 /// </note>
1093 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1094 self.inner = self.inner.set_sse_customer_key_md5(input);
1095 self
1096 }
1097 /// <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>
1098 /// <p>This functionality is not supported for directory buckets.</p>
1099 /// </note>
1100 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1101 self.inner.get_sse_customer_key_md5()
1102 }
1103 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1104 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. 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.</p>
1105 /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1106 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1107 self.inner = self.inner.ssekms_key_id(input.into());
1108 self
1109 }
1110 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1111 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. 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.</p>
1112 /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1113 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1114 self.inner = self.inner.set_ssekms_key_id(input);
1115 self
1116 }
1117 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1118 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. 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.</p>
1119 /// <p><b>Directory buckets</b> - To encrypt data using SSE-KMS, it's recommended to specify the <code>x-amz-server-side-encryption</code> header to <code>aws:kms</code>. Then, the <code>x-amz-server-side-encryption-aws-kms-key-id</code> header implicitly uses the bucket's default KMS customer managed key ID. If you want to explicitly set the <code> x-amz-server-side-encryption-aws-kms-key-id</code> header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> per directory bucket's lifetime. The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a> (<code>aws/s3</code>) isn't supported. Incorrect key specification results in an HTTP <code>400 Bad Request</code> error.</p>
1120 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1121 self.inner.get_ssekms_key_id()
1122 }
1123 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.</p>
1124 /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1125 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1126 self.inner = self.inner.ssekms_encryption_context(input.into());
1127 self
1128 }
1129 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.</p>
1130 /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1131 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1132 self.inner = self.inner.set_ssekms_encryption_context(input);
1133 self
1134 }
1135 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.</p>
1136 /// <p><b>Directory buckets</b> - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.</p>
1137 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1138 self.inner.get_ssekms_encryption_context()
1139 }
1140 /// <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).</p>
1141 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1142 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1143 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1144 self.inner = self.inner.bucket_key_enabled(input);
1145 self
1146 }
1147 /// <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).</p>
1148 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1149 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1150 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1151 self.inner = self.inner.set_bucket_key_enabled(input);
1152 self
1153 }
1154 /// <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).</p>
1155 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1156 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1157 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1158 self.inner.get_bucket_key_enabled()
1159 }
1160 /// <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 the corresponding charges. 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>
1161 /// <p>This functionality is not supported for directory buckets.</p>
1162 /// </note>
1163 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1164 self.inner = self.inner.request_payer(input);
1165 self
1166 }
1167 /// <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 the corresponding charges. 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>
1168 /// <p>This functionality is not supported for directory buckets.</p>
1169 /// </note>
1170 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1171 self.inner = self.inner.set_request_payer(input);
1172 self
1173 }
1174 /// <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 the corresponding charges. 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>
1175 /// <p>This functionality is not supported for directory buckets.</p>
1176 /// </note>
1177 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1178 self.inner.get_request_payer()
1179 }
1180 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1181 /// <p>This functionality is not supported for directory buckets.</p>
1182 /// </note>
1183 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1184 self.inner = self.inner.tagging(input.into());
1185 self
1186 }
1187 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1188 /// <p>This functionality is not supported for directory buckets.</p>
1189 /// </note>
1190 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1191 self.inner = self.inner.set_tagging(input);
1192 self
1193 }
1194 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters.</p><note>
1195 /// <p>This functionality is not supported for directory buckets.</p>
1196 /// </note>
1197 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1198 self.inner.get_tagging()
1199 }
1200 /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1201 /// <p>This functionality is not supported for directory buckets.</p>
1202 /// </note>
1203 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1204 self.inner = self.inner.object_lock_mode(input);
1205 self
1206 }
1207 /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1208 /// <p>This functionality is not supported for directory buckets.</p>
1209 /// </note>
1210 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1211 self.inner = self.inner.set_object_lock_mode(input);
1212 self
1213 }
1214 /// <p>Specifies the Object Lock mode that you want to apply to the uploaded object.</p><note>
1215 /// <p>This functionality is not supported for directory buckets.</p>
1216 /// </note>
1217 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1218 self.inner.get_object_lock_mode()
1219 }
1220 /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1221 /// <p>This functionality is not supported for directory buckets.</p>
1222 /// </note>
1223 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1224 self.inner = self.inner.object_lock_retain_until_date(input);
1225 self
1226 }
1227 /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1228 /// <p>This functionality is not supported for directory buckets.</p>
1229 /// </note>
1230 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1231 self.inner = self.inner.set_object_lock_retain_until_date(input);
1232 self
1233 }
1234 /// <p>Specifies the date and time when you want the Object Lock to expire.</p><note>
1235 /// <p>This functionality is not supported for directory buckets.</p>
1236 /// </note>
1237 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1238 self.inner.get_object_lock_retain_until_date()
1239 }
1240 /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1241 /// <p>This functionality is not supported for directory buckets.</p>
1242 /// </note>
1243 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1244 self.inner = self.inner.object_lock_legal_hold_status(input);
1245 self
1246 }
1247 /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1248 /// <p>This functionality is not supported for directory buckets.</p>
1249 /// </note>
1250 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1251 self.inner = self.inner.set_object_lock_legal_hold_status(input);
1252 self
1253 }
1254 /// <p>Specifies whether you want to apply a legal hold to the uploaded object.</p><note>
1255 /// <p>This functionality is not supported for directory buckets.</p>
1256 /// </note>
1257 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1258 self.inner.get_object_lock_legal_hold_status()
1259 }
1260 /// <p>Specifies the event hold status to apply to the uploaded object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
1261 /// <p>This functionality is not supported for directory buckets.</p>
1262 /// </note>
1263 pub fn object_lock_event_hold(mut self, input: crate::types::ObjectLockEventHold) -> Self {
1264 self.inner = self.inner.object_lock_event_hold(input);
1265 self
1266 }
1267 /// <p>Specifies the event hold status to apply to the uploaded object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
1268 /// <p>This functionality is not supported for directory buckets.</p>
1269 /// </note>
1270 pub fn set_object_lock_event_hold(mut self, input: ::std::option::Option<crate::types::ObjectLockEventHold>) -> Self {
1271 self.inner = self.inner.set_object_lock_event_hold(input);
1272 self
1273 }
1274 /// <p>Specifies the event hold status to apply to the uploaded object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
1275 /// <p>This functionality is not supported for directory buckets.</p>
1276 /// </note>
1277 pub fn get_object_lock_event_hold(&self) -> &::std::option::Option<crate::types::ObjectLockEventHold> {
1278 self.inner.get_object_lock_event_hold()
1279 }
1280 /// <p>Specifies the event hold duration in days to apply to the uploaded object. You cannot specify a duration in both days and years.</p><note>
1281 /// <p>This functionality is not supported for directory buckets.</p>
1282 /// </note>
1283 pub fn object_lock_event_hold_duration_days(mut self, input: i32) -> Self {
1284 self.inner = self.inner.object_lock_event_hold_duration_days(input);
1285 self
1286 }
1287 /// <p>Specifies the event hold duration in days to apply to the uploaded object. You cannot specify a duration in both days and years.</p><note>
1288 /// <p>This functionality is not supported for directory buckets.</p>
1289 /// </note>
1290 pub fn set_object_lock_event_hold_duration_days(mut self, input: ::std::option::Option<i32>) -> Self {
1291 self.inner = self.inner.set_object_lock_event_hold_duration_days(input);
1292 self
1293 }
1294 /// <p>Specifies the event hold duration in days to apply to the uploaded object. You cannot specify a duration in both days and years.</p><note>
1295 /// <p>This functionality is not supported for directory buckets.</p>
1296 /// </note>
1297 pub fn get_object_lock_event_hold_duration_days(&self) -> &::std::option::Option<i32> {
1298 self.inner.get_object_lock_event_hold_duration_days()
1299 }
1300 /// <p>Specifies the event hold duration in years to apply to the uploaded object. You cannot specify a duration in both days and years.</p><note>
1301 /// <p>This functionality is not supported for directory buckets.</p>
1302 /// </note>
1303 pub fn object_lock_event_hold_duration_years(mut self, input: i32) -> Self {
1304 self.inner = self.inner.object_lock_event_hold_duration_years(input);
1305 self
1306 }
1307 /// <p>Specifies the event hold duration in years to apply to the uploaded object. You cannot specify a duration in both days and years.</p><note>
1308 /// <p>This functionality is not supported for directory buckets.</p>
1309 /// </note>
1310 pub fn set_object_lock_event_hold_duration_years(mut self, input: ::std::option::Option<i32>) -> Self {
1311 self.inner = self.inner.set_object_lock_event_hold_duration_years(input);
1312 self
1313 }
1314 /// <p>Specifies the event hold duration in years to apply to the uploaded object. You cannot specify a duration in both days and years.</p><note>
1315 /// <p>This functionality is not supported for directory buckets.</p>
1316 /// </note>
1317 pub fn get_object_lock_event_hold_duration_years(&self) -> &::std::option::Option<i32> {
1318 self.inner.get_object_lock_event_hold_duration_years()
1319 }
1320 /// <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>
1321 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1322 self.inner = self.inner.expected_bucket_owner(input.into());
1323 self
1324 }
1325 /// <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>
1326 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1327 self.inner = self.inner.set_expected_bucket_owner(input);
1328 self
1329 }
1330 /// <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>
1331 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1332 self.inner.get_expected_bucket_owner()
1333 }
1334 /// <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>
1335 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
1336 self.inner = self.inner.checksum_algorithm(input);
1337 self
1338 }
1339 /// <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>
1340 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
1341 self.inner = self.inner.set_checksum_algorithm(input);
1342 self
1343 }
1344 /// <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>
1345 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
1346 self.inner.get_checksum_algorithm()
1347 }
1348 /// <p>Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1349 pub fn checksum_type(mut self, input: crate::types::ChecksumType) -> Self {
1350 self.inner = self.inner.checksum_type(input);
1351 self
1352 }
1353 /// <p>Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1354 pub fn set_checksum_type(mut self, input: ::std::option::Option<crate::types::ChecksumType>) -> Self {
1355 self.inner = self.inner.set_checksum_type(input);
1356 self
1357 }
1358 /// <p>Indicates the checksum type that you want Amazon S3 to use to calculate the object’s checksum value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1359 pub fn get_checksum_type(&self) -> &::std::option::Option<crate::types::ChecksumType> {
1360 self.inner.get_checksum_type()
1361 }
1362}