aws_sdk_s3/operation/put_object/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_object::_put_object_output::PutObjectOutputBuilder;
3
4pub use crate::operation::put_object::_put_object_input::PutObjectInputBuilder;
5
6impl crate::operation::put_object::builders::PutObjectInputBuilder {
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::put_object::PutObjectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::put_object::PutObjectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.put_object();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `PutObject`.
24///
25/// <p>Adds an object to a bucket.</p><note>
26/// <ul>
27/// <li>
28/// <p>Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added the entire object to the bucket. You cannot use <code>PutObject</code> to only update a single piece of metadata for an existing object. You must put the entire object with updated metadata if you want to update some values.</p></li>
29/// <li>
30/// <p>If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are disabled and no longer affect permissions. All objects written to the bucket by any account will be owned by the bucket owner.</p></li>
31/// <li>
32/// <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>
33/// </ul>
34/// </note>
35/// <p>Amazon S3 is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. However, Amazon S3 provides features that can modify this behavior:</p>
36/// <ul>
37/// <li>
38/// <p><b>S3 Object Lock</b> - To prevent objects from being deleted or overwritten, you can use <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html">Amazon S3 Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
39/// <p>This functionality is not supported for directory buckets.</p>
40/// </note></li>
41/// <li>
42/// <p><b>If-None-Match</b> - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error. If a conflicting operation occurs during the upload, S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure, retry the upload.</p>
43/// <p>Expects the * character (asterisk).</p>
44/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Add preconditions to S3 operations with conditional requests</a> in the <i>Amazon S3 User Guide</i> or <a href="https://datatracker.ietf.org/doc/rfc7232/">RFC 7232</a>.</p><note>
45/// <p>This functionality is not supported for S3 on Outposts.</p>
46/// </note></li>
47/// <li>
48/// <p><b>S3 Versioning</b> - When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all versions of the objects. For each write request that is made to the same object, Amazon S3 automatically generates a unique version ID of that object being stored in Amazon S3. You can retrieve, replace, or delete any version of the object. For more information about versioning, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html">Adding Objects to Versioning-Enabled Buckets</a> in the <i>Amazon S3 User Guide</i>. For information about returning the versioning state of a bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html">GetBucketVersioning</a>.</p><note>
49/// <p>This functionality is not supported for directory buckets.</p>
50/// </note></li>
51/// </ul>
52/// <dl>
53/// <dt>
54/// Permissions
55/// </dt>
56/// <dd>
57/// <ul>
58/// <li>
59/// <p><b>General purpose bucket permissions</b> - The following permissions are required in your policies when your <code>PutObject</code> request includes specific headers.</p>
60/// <ul>
61/// <li>
62/// <p><b> <code>s3:PutObject</code> </b> - To successfully complete the <code>PutObject</code> request, you must always have the <code>s3:PutObject</code> permission on a bucket to add an object to it.</p></li>
63/// <li>
64/// <p><b> <code>s3:PutObjectAcl</code> </b> - To successfully change the objects ACL of your <code>PutObject</code> request, you must have the <code>s3:PutObjectAcl</code>.</p></li>
65/// <li>
66/// <p><b> <code>s3:PutObjectTagging</code> </b> - To successfully set the tag-set with your <code>PutObject</code> request, you must have the <code>s3:PutObjectTagging</code>.</p></li>
67/// </ul></li>
68/// <li>
69/// <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>
70/// <p>If the object is encrypted with SSE-KMS, you must also have the <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permissions in IAM identity-based policies and KMS key policies for the KMS key.</p></li>
71/// </ul>
72/// </dd>
73/// <dt>
74/// Data integrity with Content-MD5
75/// </dt>
76/// <dd>
77/// <ul>
78/// <li>
79/// <p><b>General purpose bucket</b> - To ensure that data is not corrupted traversing the network, use the <code>Content-MD5</code> header. When you use this header, Amazon S3 checks the object against the provided MD5 value and, if they do not match, Amazon S3 returns an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate the MD5 while putting the object to Amazon S3 and compare the returned ETag to the calculated MD5 value.</p></li>
80/// <li>
81/// <p><b>Directory bucket</b> - This functionality is not supported for directory buckets.</p></li>
82/// </ul>
83/// </dd>
84/// <dt>
85/// HTTP Host header syntax
86/// </dt>
87/// <dd>
88/// <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>
89/// </dd>
90/// </dl>
91/// <p>For more information about related Amazon S3 APIs, see the following:</p>
92/// <ul>
93/// <li>
94/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a></p></li>
95/// <li>
96/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a></p></li>
97/// </ul>
98#[derive(::std::fmt::Debug)]
99pub struct PutObjectFluentBuilder {
100 handle: ::std::sync::Arc<crate::client::Handle>,
101 inner: crate::operation::put_object::builders::PutObjectInputBuilder,
102 config_override: ::std::option::Option<crate::config::Builder>,
103}
104impl crate::client::customize::internal::CustomizableSend<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>
105 for PutObjectFluentBuilder
106{
107 fn send(
108 self,
109 config_override: crate::config::Builder,
110 ) -> crate::client::customize::internal::BoxFuture<
111 crate::client::customize::internal::SendResult<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>,
112 > {
113 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
114 }
115}
116impl PutObjectFluentBuilder {
117 /// Creates a new `PutObjectFluentBuilder`.
118 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
119 Self {
120 handle,
121 inner: ::std::default::Default::default(),
122 config_override: ::std::option::Option::None,
123 }
124 }
125 /// Access the PutObject as a reference.
126 pub fn as_input(&self) -> &crate::operation::put_object::builders::PutObjectInputBuilder {
127 &self.inner
128 }
129 /// Sends the request and returns the response.
130 ///
131 /// If an error occurs, an `SdkError` will be returned with additional details that
132 /// can be matched against.
133 ///
134 /// By default, any retryable failures will be retried twice. Retry behavior
135 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
136 /// set when configuring the client.
137 pub async fn send(
138 self,
139 ) -> ::std::result::Result<
140 crate::operation::put_object::PutObjectOutput,
141 ::aws_smithy_runtime_api::client::result::SdkError<
142 crate::operation::put_object::PutObjectError,
143 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
144 >,
145 > {
146 let input = self
147 .inner
148 .build()
149 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
150 let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
151 self.handle.runtime_plugins.clone(),
152 &self.handle.conf,
153 self.config_override,
154 );
155 crate::operation::put_object::PutObject::orchestrate(&runtime_plugins, input).await
156 }
157
158 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
159 pub fn customize(
160 self,
161 ) -> crate::client::customize::CustomizableOperation<
162 crate::operation::put_object::PutObjectOutput,
163 crate::operation::put_object::PutObjectError,
164 Self,
165 > {
166 crate::client::customize::CustomizableOperation::new(self)
167 }
168 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
169 self.set_config_override(::std::option::Option::Some(config_override.into()));
170 self
171 }
172
173 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
174 self.config_override = config_override;
175 self
176 }
177 ///
178 /// Creates a presigned request for this operation.
179 ///
180 /// The `presigning_config` provides additional presigning-specific config values, such as the
181 /// amount of time the request should be valid for after creation.
182 ///
183 /// Presigned requests can be given to other users or applications to access a resource or perform
184 /// an operation without having access to the AWS security credentials.
185 ///
186 /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
187 /// the presigned request can only be valid for as long as the credentials used to create it are.
188 ///
189 #[allow(unused_mut)]
190 pub async fn presigned(
191 mut self,
192 presigning_config: crate::presigning::PresigningConfig,
193 ) -> ::std::result::Result<
194 crate::presigning::PresignedRequest,
195 ::aws_smithy_runtime_api::client::result::SdkError<
196 crate::operation::put_object::PutObjectError,
197 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
198 >,
199 > {
200 let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
201 self.handle.runtime_plugins.clone(),
202 &self.handle.conf,
203 self.config_override,
204 )
205 .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
206 presigning_config,
207 ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
208 ));
209
210 let input = self
211 .inner
212 .build()
213 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
214 let mut context = crate::operation::put_object::PutObject::orchestrate_with_stop_point(
215 &runtime_plugins,
216 input,
217 ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
218 )
219 .await
220 .map_err(|err| {
221 err.map_service_error(|err| {
222 err.downcast::<crate::operation::put_object::PutObjectError>()
223 .expect("correct error type")
224 })
225 })?;
226 let request = context.take_request().expect("request set before transmit");
227 crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
228 }
229 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
230 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
231 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
232 /// <ul>
233 /// <li>
234 /// <p>This functionality is not supported for directory buckets.</p></li>
235 /// <li>
236 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
237 /// </ul>
238 /// </note>
239 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
240 self.inner = self.inner.acl(input);
241 self
242 }
243 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
244 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
245 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
246 /// <ul>
247 /// <li>
248 /// <p>This functionality is not supported for directory buckets.</p></li>
249 /// <li>
250 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
251 /// </ul>
252 /// </note>
253 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
254 self.inner = self.inner.set_acl(input);
255 self
256 }
257 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
258 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
259 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
260 /// <ul>
261 /// <li>
262 /// <p>This functionality is not supported for directory buckets.</p></li>
263 /// <li>
264 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
265 /// </ul>
266 /// </note>
267 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
268 self.inner.get_acl()
269 }
270 /// <p>Object data.</p>
271 pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
272 self.inner = self.inner.body(input);
273 self
274 }
275 /// <p>Object data.</p>
276 pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
277 self.inner = self.inner.set_body(input);
278 self
279 }
280 /// <p>Object data.</p>
281 pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
282 self.inner.get_body()
283 }
284 /// <p>The bucket name to which the PUT action was initiated.</p>
285 /// <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>
286 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
287 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
288 /// </note>
289 /// <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>
290 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291 self.inner = self.inner.bucket(input.into());
292 self
293 }
294 /// <p>The bucket name to which the PUT action was initiated.</p>
295 /// <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>
296 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
297 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
298 /// </note>
299 /// <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>
300 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
301 self.inner = self.inner.set_bucket(input);
302 self
303 }
304 /// <p>The bucket name to which the PUT action was initiated.</p>
305 /// <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>
306 /// <p><b>Access points</b> - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p><note>
307 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
308 /// </note>
309 /// <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>
310 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
311 self.inner.get_bucket()
312 }
313 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
314 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315 self.inner = self.inner.cache_control(input.into());
316 self
317 }
318 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
319 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
320 self.inner = self.inner.set_cache_control(input);
321 self
322 }
323 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
324 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
325 self.inner.get_cache_control()
326 }
327 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
328 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
329 self.inner = self.inner.content_disposition(input.into());
330 self
331 }
332 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
333 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
334 self.inner = self.inner.set_content_disposition(input);
335 self
336 }
337 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
338 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
339 self.inner.get_content_disposition()
340 }
341 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
342 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
343 self.inner = self.inner.content_encoding(input.into());
344 self
345 }
346 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
347 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
348 self.inner = self.inner.set_content_encoding(input);
349 self
350 }
351 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
352 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
353 self.inner.get_content_encoding()
354 }
355 /// <p>The language the content is in.</p>
356 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
357 self.inner = self.inner.content_language(input.into());
358 self
359 }
360 /// <p>The language the content is in.</p>
361 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
362 self.inner = self.inner.set_content_language(input);
363 self
364 }
365 /// <p>The language the content is in.</p>
366 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
367 self.inner.get_content_language()
368 }
369 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
370 pub fn content_length(mut self, input: i64) -> Self {
371 self.inner = self.inner.content_length(input);
372 self
373 }
374 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
375 pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
376 self.inner = self.inner.set_content_length(input);
377 self
378 }
379 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
380 pub fn get_content_length(&self) -> &::std::option::Option<i64> {
381 self.inner.get_content_length()
382 }
383 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
384 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
385 /// </note> <note>
386 /// <p>This functionality is not supported for directory buckets.</p>
387 /// </note>
388 pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389 self.inner = self.inner.content_md5(input.into());
390 self
391 }
392 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
393 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
394 /// </note> <note>
395 /// <p>This functionality is not supported for directory buckets.</p>
396 /// </note>
397 pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
398 self.inner = self.inner.set_content_md5(input);
399 self
400 }
401 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
402 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
403 /// </note> <note>
404 /// <p>This functionality is not supported for directory buckets.</p>
405 /// </note>
406 pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
407 self.inner.get_content_md5()
408 }
409 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
410 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
411 self.inner = self.inner.content_type(input.into());
412 self
413 }
414 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
415 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
416 self.inner = self.inner.set_content_type(input);
417 self
418 }
419 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
420 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
421 self.inner.get_content_type()
422 }
423 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
424 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
425 /// <ul>
426 /// <li>
427 /// <p><code>CRC32</code></p></li>
428 /// <li>
429 /// <p><code>CRC32C</code></p></li>
430 /// <li>
431 /// <p><code>CRC64NVME</code></p></li>
432 /// <li>
433 /// <p><code>SHA1</code></p></li>
434 /// <li>
435 /// <p><code>SHA256</code></p></li>
436 /// </ul>
437 /// <p>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>
438 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
439 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
440 /// </note>
441 /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
442 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
443 self.inner = self.inner.checksum_algorithm(input);
444 self
445 }
446 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
447 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
448 /// <ul>
449 /// <li>
450 /// <p><code>CRC32</code></p></li>
451 /// <li>
452 /// <p><code>CRC32C</code></p></li>
453 /// <li>
454 /// <p><code>CRC64NVME</code></p></li>
455 /// <li>
456 /// <p><code>SHA1</code></p></li>
457 /// <li>
458 /// <p><code>SHA256</code></p></li>
459 /// </ul>
460 /// <p>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>
461 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
462 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
463 /// </note>
464 /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
465 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
466 self.inner = self.inner.set_checksum_algorithm(input);
467 self
468 }
469 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
470 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
471 /// <ul>
472 /// <li>
473 /// <p><code>CRC32</code></p></li>
474 /// <li>
475 /// <p><code>CRC32C</code></p></li>
476 /// <li>
477 /// <p><code>CRC64NVME</code></p></li>
478 /// <li>
479 /// <p><code>SHA1</code></p></li>
480 /// <li>
481 /// <p><code>SHA256</code></p></li>
482 /// </ul>
483 /// <p>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>
484 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
485 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
486 /// </note>
487 /// <p>For directory buckets, when you use Amazon Web Services SDKs, <code>CRC32</code> is the default checksum algorithm that's used for performance.</p>
488 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
489 self.inner.get_checksum_algorithm()
490 }
491 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
492 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
493 self.inner = self.inner.checksum_crc32(input.into());
494 self
495 }
496 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
497 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
498 self.inner = self.inner.set_checksum_crc32(input);
499 self
500 }
501 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
502 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
503 self.inner.get_checksum_crc32()
504 }
505 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
506 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
507 self.inner = self.inner.checksum_crc32_c(input.into());
508 self
509 }
510 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
511 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
512 self.inner = self.inner.set_checksum_crc32_c(input);
513 self
514 }
515 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
516 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
517 self.inner.get_checksum_crc32_c()
518 }
519 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. 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>
520 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
521 self.inner = self.inner.checksum_crc64_nvme(input.into());
522 self
523 }
524 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. 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>
525 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
526 self.inner = self.inner.set_checksum_crc64_nvme(input);
527 self
528 }
529 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. 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>
530 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
531 self.inner.get_checksum_crc64_nvme()
532 }
533 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
534 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
535 self.inner = self.inner.checksum_sha1(input.into());
536 self
537 }
538 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
539 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
540 self.inner = self.inner.set_checksum_sha1(input);
541 self
542 }
543 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
544 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
545 self.inner.get_checksum_sha1()
546 }
547 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
548 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
549 self.inner = self.inner.checksum_sha256(input.into());
550 self
551 }
552 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
553 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
554 self.inner = self.inner.set_checksum_sha256(input);
555 self
556 }
557 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
558 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
559 self.inner.get_checksum_sha256()
560 }
561 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
562 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
563 self.inner = self.inner.expires(input);
564 self
565 }
566 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
567 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
568 self.inner = self.inner.set_expires(input);
569 self
570 }
571 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
572 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
573 self.inner.get_expires()
574 }
575 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
576 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
577 /// <p>Expects the ETag value as a string.</p>
578 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
579 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
580 self.inner = self.inner.if_match(input.into());
581 self
582 }
583 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
584 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
585 /// <p>Expects the ETag value as a string.</p>
586 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
587 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
588 self.inner = self.inner.set_if_match(input);
589 self
590 }
591 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
592 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should fetch the object's ETag and retry the upload.</p>
593 /// <p>Expects the ETag value as a string.</p>
594 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
595 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
596 self.inner.get_if_match()
597 }
598 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
599 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
600 /// <p>Expects the '*' (asterisk) character.</p>
601 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
602 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
603 self.inner = self.inner.if_none_match(input.into());
604 self
605 }
606 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
607 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
608 /// <p>Expects the '*' (asterisk) character.</p>
609 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
610 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
611 self.inner = self.inner.set_if_none_match(input);
612 self
613 }
614 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
615 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
616 /// <p>Expects the '*' (asterisk) character.</p>
617 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
618 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
619 self.inner.get_if_none_match()
620 }
621 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
622 /// <ul>
623 /// <li>
624 /// <p>This functionality is not supported for directory buckets.</p></li>
625 /// <li>
626 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
627 /// </ul>
628 /// </note>
629 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
630 self.inner = self.inner.grant_full_control(input.into());
631 self
632 }
633 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
634 /// <ul>
635 /// <li>
636 /// <p>This functionality is not supported for directory buckets.</p></li>
637 /// <li>
638 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
639 /// </ul>
640 /// </note>
641 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
642 self.inner = self.inner.set_grant_full_control(input);
643 self
644 }
645 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
646 /// <ul>
647 /// <li>
648 /// <p>This functionality is not supported for directory buckets.</p></li>
649 /// <li>
650 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
651 /// </ul>
652 /// </note>
653 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
654 self.inner.get_grant_full_control()
655 }
656 /// <p>Allows grantee to read the object data and its metadata.</p><note>
657 /// <ul>
658 /// <li>
659 /// <p>This functionality is not supported for directory buckets.</p></li>
660 /// <li>
661 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
662 /// </ul>
663 /// </note>
664 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
665 self.inner = self.inner.grant_read(input.into());
666 self
667 }
668 /// <p>Allows grantee to read the object data and its metadata.</p><note>
669 /// <ul>
670 /// <li>
671 /// <p>This functionality is not supported for directory buckets.</p></li>
672 /// <li>
673 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
674 /// </ul>
675 /// </note>
676 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
677 self.inner = self.inner.set_grant_read(input);
678 self
679 }
680 /// <p>Allows grantee to read the object data and its metadata.</p><note>
681 /// <ul>
682 /// <li>
683 /// <p>This functionality is not supported for directory buckets.</p></li>
684 /// <li>
685 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
686 /// </ul>
687 /// </note>
688 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
689 self.inner.get_grant_read()
690 }
691 /// <p>Allows grantee to read the object ACL.</p><note>
692 /// <ul>
693 /// <li>
694 /// <p>This functionality is not supported for directory buckets.</p></li>
695 /// <li>
696 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
697 /// </ul>
698 /// </note>
699 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
700 self.inner = self.inner.grant_read_acp(input.into());
701 self
702 }
703 /// <p>Allows grantee to read the object ACL.</p><note>
704 /// <ul>
705 /// <li>
706 /// <p>This functionality is not supported for directory buckets.</p></li>
707 /// <li>
708 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
709 /// </ul>
710 /// </note>
711 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
712 self.inner = self.inner.set_grant_read_acp(input);
713 self
714 }
715 /// <p>Allows grantee to read the object ACL.</p><note>
716 /// <ul>
717 /// <li>
718 /// <p>This functionality is not supported for directory buckets.</p></li>
719 /// <li>
720 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
721 /// </ul>
722 /// </note>
723 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
724 self.inner.get_grant_read_acp()
725 }
726 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
727 /// <ul>
728 /// <li>
729 /// <p>This functionality is not supported for directory buckets.</p></li>
730 /// <li>
731 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
732 /// </ul>
733 /// </note>
734 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
735 self.inner = self.inner.grant_write_acp(input.into());
736 self
737 }
738 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
739 /// <ul>
740 /// <li>
741 /// <p>This functionality is not supported for directory buckets.</p></li>
742 /// <li>
743 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
744 /// </ul>
745 /// </note>
746 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
747 self.inner = self.inner.set_grant_write_acp(input);
748 self
749 }
750 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
751 /// <ul>
752 /// <li>
753 /// <p>This functionality is not supported for directory buckets.</p></li>
754 /// <li>
755 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
756 /// </ul>
757 /// </note>
758 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
759 self.inner.get_grant_write_acp()
760 }
761 /// <p>Object key for which the PUT action was initiated.</p>
762 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
763 self.inner = self.inner.key(input.into());
764 self
765 }
766 /// <p>Object key for which the PUT action was initiated.</p>
767 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
768 self.inner = self.inner.set_key(input);
769 self
770 }
771 /// <p>Object key for which the PUT action was initiated.</p>
772 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
773 self.inner.get_key()
774 }
775 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
776 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
777 /// </note>
778 pub fn write_offset_bytes(mut self, input: i64) -> Self {
779 self.inner = self.inner.write_offset_bytes(input);
780 self
781 }
782 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
783 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
784 /// </note>
785 pub fn set_write_offset_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
786 self.inner = self.inner.set_write_offset_bytes(input);
787 self
788 }
789 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
790 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
791 /// </note>
792 pub fn get_write_offset_bytes(&self) -> &::std::option::Option<i64> {
793 self.inner.get_write_offset_bytes()
794 }
795 ///
796 /// Adds a key-value pair to `Metadata`.
797 ///
798 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
799 ///
800 /// <p>A map of metadata to store with the object in S3.</p>
801 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
802 self.inner = self.inner.metadata(k.into(), v.into());
803 self
804 }
805 /// <p>A map of metadata to store with the object in S3.</p>
806 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
807 self.inner = self.inner.set_metadata(input);
808 self
809 }
810 /// <p>A map of metadata to store with the object in S3.</p>
811 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
812 self.inner.get_metadata()
813 }
814 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
815 /// <ul>
816 /// <li>
817 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
818 /// <li>
819 /// <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>
820 /// <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>
821 /// <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>
822 /// </note></li>
823 /// </ul>
824 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
825 self.inner = self.inner.server_side_encryption(input);
826 self
827 }
828 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
829 /// <ul>
830 /// <li>
831 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
832 /// <li>
833 /// <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>
834 /// <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>
835 /// <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>
836 /// </note></li>
837 /// </ul>
838 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
839 self.inner = self.inner.set_server_side_encryption(input);
840 self
841 }
842 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>).</p>
843 /// <ul>
844 /// <li>
845 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
846 /// <li>
847 /// <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>
848 /// <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>
849 /// <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>
850 /// </note></li>
851 /// </ul>
852 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
853 self.inner.get_server_side_encryption()
854 }
855 /// <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>
856 /// <ul>
857 /// <li>
858 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
859 /// <li>
860 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
861 /// </ul>
862 /// </note>
863 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
864 self.inner = self.inner.storage_class(input);
865 self
866 }
867 /// <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>
868 /// <ul>
869 /// <li>
870 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
871 /// <li>
872 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
873 /// </ul>
874 /// </note>
875 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
876 self.inner = self.inner.set_storage_class(input);
877 self
878 }
879 /// <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>
880 /// <ul>
881 /// <li>
882 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
883 /// <li>
884 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
885 /// </ul>
886 /// </note>
887 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
888 self.inner.get_storage_class()
889 }
890 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
891 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
892 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
893 /// <p>In the following example, the request header sets the object redirect to another website:</p>
894 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
895 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
896 /// <p>This functionality is not supported for directory buckets.</p>
897 /// </note>
898 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
899 self.inner = self.inner.website_redirect_location(input.into());
900 self
901 }
902 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
903 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
904 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
905 /// <p>In the following example, the request header sets the object redirect to another website:</p>
906 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
907 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
908 /// <p>This functionality is not supported for directory buckets.</p>
909 /// </note>
910 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
911 self.inner = self.inner.set_website_redirect_location(input);
912 self
913 }
914 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
915 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
916 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
917 /// <p>In the following example, the request header sets the object redirect to another website:</p>
918 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
919 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
920 /// <p>This functionality is not supported for directory buckets.</p>
921 /// </note>
922 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
923 self.inner.get_website_redirect_location()
924 }
925 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
926 /// <p>This functionality is not supported for directory buckets.</p>
927 /// </note>
928 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
929 self.inner = self.inner.sse_customer_algorithm(input.into());
930 self
931 }
932 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
933 /// <p>This functionality is not supported for directory buckets.</p>
934 /// </note>
935 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
936 self.inner = self.inner.set_sse_customer_algorithm(input);
937 self
938 }
939 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
940 /// <p>This functionality is not supported for directory buckets.</p>
941 /// </note>
942 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
943 self.inner.get_sse_customer_algorithm()
944 }
945 /// <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>
946 /// <p>This functionality is not supported for directory buckets.</p>
947 /// </note>
948 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
949 self.inner = self.inner.sse_customer_key(input.into());
950 self
951 }
952 /// <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>
953 /// <p>This functionality is not supported for directory buckets.</p>
954 /// </note>
955 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
956 self.inner = self.inner.set_sse_customer_key(input);
957 self
958 }
959 /// <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>
960 /// <p>This functionality is not supported for directory buckets.</p>
961 /// </note>
962 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
963 self.inner.get_sse_customer_key()
964 }
965 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
966 /// <p>This functionality is not supported for directory buckets.</p>
967 /// </note>
968 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
969 self.inner = self.inner.sse_customer_key_md5(input.into());
970 self
971 }
972 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
973 /// <p>This functionality is not supported for directory buckets.</p>
974 /// </note>
975 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
976 self.inner = self.inner.set_sse_customer_key_md5(input);
977 self
978 }
979 /// <p>Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error.</p><note>
980 /// <p>This functionality is not supported for directory buckets.</p>
981 /// </note>
982 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
983 self.inner.get_sse_customer_key_md5()
984 }
985 /// <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>
986 /// <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>
987 /// <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>
988 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
989 self.inner = self.inner.ssekms_key_id(input.into());
990 self
991 }
992 /// <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>
993 /// <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>
994 /// <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>
995 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
996 self.inner = self.inner.set_ssekms_key_id(input);
997 self
998 }
999 /// <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>
1000 /// <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>
1001 /// <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>
1002 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1003 self.inner.get_ssekms_key_id()
1004 }
1005 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1006 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1007 /// <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>
1008 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1009 self.inner = self.inner.ssekms_encryption_context(input.into());
1010 self
1011 }
1012 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1013 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1014 /// <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>
1015 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1016 self.inner = self.inner.set_ssekms_encryption_context(input);
1017 self
1018 }
1019 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional 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. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1020 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context">Encryption context</a> in the <i>Amazon S3 User Guide</i>.</p>
1021 /// <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>
1022 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1023 self.inner.get_ssekms_encryption_context()
1024 }
1025 /// <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>
1026 /// <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>
1027 /// <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>
1028 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1029 self.inner = self.inner.bucket_key_enabled(input);
1030 self
1031 }
1032 /// <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>
1033 /// <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>
1034 /// <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>
1035 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1036 self.inner = self.inner.set_bucket_key_enabled(input);
1037 self
1038 }
1039 /// <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>
1040 /// <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>
1041 /// <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>
1042 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1043 self.inner.get_bucket_key_enabled()
1044 }
1045 /// <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>
1046 /// <p>This functionality is not supported for directory buckets.</p>
1047 /// </note>
1048 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1049 self.inner = self.inner.request_payer(input);
1050 self
1051 }
1052 /// <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>
1053 /// <p>This functionality is not supported for directory buckets.</p>
1054 /// </note>
1055 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1056 self.inner = self.inner.set_request_payer(input);
1057 self
1058 }
1059 /// <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>
1060 /// <p>This functionality is not supported for directory buckets.</p>
1061 /// </note>
1062 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1063 self.inner.get_request_payer()
1064 }
1065 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1066 /// <p>This functionality is not supported for directory buckets.</p>
1067 /// </note>
1068 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1069 self.inner = self.inner.tagging(input.into());
1070 self
1071 }
1072 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1073 /// <p>This functionality is not supported for directory buckets.</p>
1074 /// </note>
1075 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1076 self.inner = self.inner.set_tagging(input);
1077 self
1078 }
1079 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1080 /// <p>This functionality is not supported for directory buckets.</p>
1081 /// </note>
1082 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1083 self.inner.get_tagging()
1084 }
1085 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1086 /// <p>This functionality is not supported for directory buckets.</p>
1087 /// </note>
1088 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1089 self.inner = self.inner.object_lock_mode(input);
1090 self
1091 }
1092 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1093 /// <p>This functionality is not supported for directory buckets.</p>
1094 /// </note>
1095 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1096 self.inner = self.inner.set_object_lock_mode(input);
1097 self
1098 }
1099 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1100 /// <p>This functionality is not supported for directory buckets.</p>
1101 /// </note>
1102 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1103 self.inner.get_object_lock_mode()
1104 }
1105 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1106 /// <p>This functionality is not supported for directory buckets.</p>
1107 /// </note>
1108 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1109 self.inner = self.inner.object_lock_retain_until_date(input);
1110 self
1111 }
1112 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1113 /// <p>This functionality is not supported for directory buckets.</p>
1114 /// </note>
1115 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1116 self.inner = self.inner.set_object_lock_retain_until_date(input);
1117 self
1118 }
1119 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1120 /// <p>This functionality is not supported for directory buckets.</p>
1121 /// </note>
1122 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1123 self.inner.get_object_lock_retain_until_date()
1124 }
1125 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1126 /// <p>This functionality is not supported for directory buckets.</p>
1127 /// </note>
1128 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1129 self.inner = self.inner.object_lock_legal_hold_status(input);
1130 self
1131 }
1132 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1133 /// <p>This functionality is not supported for directory buckets.</p>
1134 /// </note>
1135 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1136 self.inner = self.inner.set_object_lock_legal_hold_status(input);
1137 self
1138 }
1139 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1140 /// <p>This functionality is not supported for directory buckets.</p>
1141 /// </note>
1142 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1143 self.inner.get_object_lock_legal_hold_status()
1144 }
1145 /// <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>
1146 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1147 self.inner = self.inner.expected_bucket_owner(input.into());
1148 self
1149 }
1150 /// <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>
1151 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1152 self.inner = self.inner.set_expected_bucket_owner(input);
1153 self
1154 }
1155 /// <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>
1156 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1157 self.inner.get_expected_bucket_owner()
1158 }
1159}
1160
1161impl crate::client::customize::internal::CustomizablePresigned<crate::operation::put_object::PutObjectError> for PutObjectFluentBuilder {
1162 fn presign(
1163 self,
1164 config_override: crate::config::Builder,
1165 presigning_config: crate::presigning::PresigningConfig,
1166 ) -> crate::client::customize::internal::BoxFuture<
1167 crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::put_object::PutObjectError>,
1168 > {
1169 ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
1170 }
1171}