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