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 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>bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com/<i>key-name</i> </code>. Path-style requests are not supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html">Regional and Zonal endpoints</a> in the <i>Amazon S3 User Guide</i>.</p></li>
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>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>
43/// <p>This functionality is not supported for directory buckets.</p>
44/// </note></li>
45/// </ul>
46/// <dl>
47/// <dt>
48/// Permissions
49/// </dt>
50/// <dd>
51/// <ul>
52/// <li>
53/// <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>
54/// <ul>
55/// <li>
56/// <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>
57/// <li>
58/// <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>
59/// <li>
60/// <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>
61/// </ul></li>
62/// <li>
63/// <p><b>Directory bucket permissions</b> - To grant access to this API operation on a directory bucket, we recommend that you use the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a> API operation for session-based authorization. Specifically, you grant the <code>s3express:CreateSession</code> permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the <code>CreateSession</code> API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another <code>CreateSession</code> API call to generate a new session token for use. Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html"> <code>CreateSession</code> </a>.</p></li>
64/// </ul>
65/// </dd>
66/// <dt>
67/// Data integrity with Content-MD5
68/// </dt>
69/// <dd>
70/// <ul>
71/// <li>
72/// <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>
73/// <li>
74/// <p><b>Directory bucket</b> - This functionality is not supported for directory buckets.</p></li>
75/// </ul>
76/// </dd>
77/// <dt>
78/// HTTP Host header syntax
79/// </dt>
80/// <dd>
81/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>.</p>
82/// </dd>
83/// </dl>
84/// <p>For more information about related Amazon S3 APIs, see the following:</p>
85/// <ul>
86/// <li>
87/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a></p></li>
88/// <li>
89/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html">DeleteObject</a></p></li>
90/// </ul>
91#[derive(::std::fmt::Debug)]
92pub struct PutObjectFluentBuilder {
93 handle: ::std::sync::Arc<crate::client::Handle>,
94 inner: crate::operation::put_object::builders::PutObjectInputBuilder,
95 config_override: ::std::option::Option<crate::config::Builder>,
96}
97impl crate::client::customize::internal::CustomizableSend<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>
98 for PutObjectFluentBuilder
99{
100 fn send(
101 self,
102 config_override: crate::config::Builder,
103 ) -> crate::client::customize::internal::BoxFuture<
104 crate::client::customize::internal::SendResult<crate::operation::put_object::PutObjectOutput, crate::operation::put_object::PutObjectError>,
105 > {
106 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
107 }
108}
109impl PutObjectFluentBuilder {
110 /// Creates a new `PutObject`.
111 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
112 Self {
113 handle,
114 inner: ::std::default::Default::default(),
115 config_override: ::std::option::Option::None,
116 }
117 }
118 /// Access the PutObject as a reference.
119 pub fn as_input(&self) -> &crate::operation::put_object::builders::PutObjectInputBuilder {
120 &self.inner
121 }
122 /// Sends the request and returns the response.
123 ///
124 /// If an error occurs, an `SdkError` will be returned with additional details that
125 /// can be matched against.
126 ///
127 /// By default, any retryable failures will be retried twice. Retry behavior
128 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
129 /// set when configuring the client.
130 pub async fn send(
131 self,
132 ) -> ::std::result::Result<
133 crate::operation::put_object::PutObjectOutput,
134 ::aws_smithy_runtime_api::client::result::SdkError<
135 crate::operation::put_object::PutObjectError,
136 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
137 >,
138 > {
139 let input = self
140 .inner
141 .build()
142 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
143 let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
144 self.handle.runtime_plugins.clone(),
145 &self.handle.conf,
146 self.config_override,
147 );
148 crate::operation::put_object::PutObject::orchestrate(&runtime_plugins, input).await
149 }
150
151 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
152 pub fn customize(
153 self,
154 ) -> crate::client::customize::CustomizableOperation<
155 crate::operation::put_object::PutObjectOutput,
156 crate::operation::put_object::PutObjectError,
157 Self,
158 > {
159 crate::client::customize::CustomizableOperation::new(self)
160 }
161 pub(crate) fn config_override(mut self, config_override: impl Into<crate::config::Builder>) -> Self {
162 self.set_config_override(Some(config_override.into()));
163 self
164 }
165
166 pub(crate) fn set_config_override(&mut self, config_override: Option<crate::config::Builder>) -> &mut Self {
167 self.config_override = config_override;
168 self
169 }
170 ///
171 /// Creates a presigned request for this operation.
172 ///
173 /// The `presigning_config` provides additional presigning-specific config values, such as the
174 /// amount of time the request should be valid for after creation.
175 ///
176 /// Presigned requests can be given to other users or applications to access a resource or perform
177 /// an operation without having access to the AWS security credentials.
178 ///
179 /// _Important:_ If you're using credentials that can expire, such as those from STS AssumeRole or SSO, then
180 /// the presigned request can only be valid for as long as the credentials used to create it are.
181 ///
182 #[allow(unused_mut)]
183 pub async fn presigned(
184 mut self,
185 presigning_config: crate::presigning::PresigningConfig,
186 ) -> ::std::result::Result<
187 crate::presigning::PresignedRequest,
188 ::aws_smithy_runtime_api::client::result::SdkError<
189 crate::operation::put_object::PutObjectError,
190 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
191 >,
192 > {
193 let runtime_plugins = crate::operation::put_object::PutObject::operation_runtime_plugins(
194 self.handle.runtime_plugins.clone(),
195 &self.handle.conf,
196 self.config_override,
197 )
198 .with_client_plugin(crate::presigning_interceptors::SigV4PresigningRuntimePlugin::new(
199 presigning_config,
200 ::aws_sigv4::http_request::SignableBody::UnsignedPayload,
201 ));
202
203 let input = self
204 .inner
205 .build()
206 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
207 let mut context = crate::operation::put_object::PutObject::orchestrate_with_stop_point(
208 &runtime_plugins,
209 input,
210 ::aws_smithy_runtime::client::orchestrator::StopPoint::BeforeTransmit,
211 )
212 .await
213 .map_err(|err| {
214 err.map_service_error(|err| {
215 err.downcast::<crate::operation::put_object::PutObjectError>()
216 .expect("correct error type")
217 })
218 })?;
219 let request = context.take_request().expect("request set before transmit");
220 crate::presigning::PresignedRequest::new(request).map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)
221 }
222 /// <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>
223 /// <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>
224 /// <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>
225 /// <ul>
226 /// <li>
227 /// <p>This functionality is not supported for directory buckets.</p></li>
228 /// <li>
229 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
230 /// </ul>
231 /// </note>
232 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
233 self.inner = self.inner.acl(input);
234 self
235 }
236 /// <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>
237 /// <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>
238 /// <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>
239 /// <ul>
240 /// <li>
241 /// <p>This functionality is not supported for directory buckets.</p></li>
242 /// <li>
243 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
244 /// </ul>
245 /// </note>
246 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
247 self.inner = self.inner.set_acl(input);
248 self
249 }
250 /// <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>
251 /// <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>
252 /// <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>
253 /// <ul>
254 /// <li>
255 /// <p>This functionality is not supported for directory buckets.</p></li>
256 /// <li>
257 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
258 /// </ul>
259 /// </note>
260 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
261 self.inner.get_acl()
262 }
263 /// <p>Object data.</p>
264 pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
265 self.inner = self.inner.body(input);
266 self
267 }
268 /// <p>Object data.</p>
269 pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
270 self.inner = self.inner.set_body(input);
271 self
272 }
273 /// <p>Object data.</p>
274 pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
275 self.inner.get_body()
276 }
277 /// <p>The bucket name to which the PUT action was initiated.</p>
278 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
279 /// <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>
280 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
281 /// </note>
282 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
283 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284 self.inner = self.inner.bucket(input.into());
285 self
286 }
287 /// <p>The bucket name to which the PUT action was initiated.</p>
288 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
289 /// <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>
290 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
291 /// </note>
292 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
293 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294 self.inner = self.inner.set_bucket(input);
295 self
296 }
297 /// <p>The bucket name to which the PUT action was initiated.</p>
298 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
299 /// <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>
300 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
301 /// </note>
302 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
303 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
304 self.inner.get_bucket()
305 }
306 /// <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>
307 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
308 self.inner = self.inner.cache_control(input.into());
309 self
310 }
311 /// <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>
312 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
313 self.inner = self.inner.set_cache_control(input);
314 self
315 }
316 /// <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>
317 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
318 self.inner.get_cache_control()
319 }
320 /// <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>
321 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322 self.inner = self.inner.content_disposition(input.into());
323 self
324 }
325 /// <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>
326 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327 self.inner = self.inner.set_content_disposition(input);
328 self
329 }
330 /// <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>
331 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
332 self.inner.get_content_disposition()
333 }
334 /// <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>
335 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
336 self.inner = self.inner.content_encoding(input.into());
337 self
338 }
339 /// <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>
340 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
341 self.inner = self.inner.set_content_encoding(input);
342 self
343 }
344 /// <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>
345 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
346 self.inner.get_content_encoding()
347 }
348 /// <p>The language the content is in.</p>
349 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350 self.inner = self.inner.content_language(input.into());
351 self
352 }
353 /// <p>The language the content is in.</p>
354 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
355 self.inner = self.inner.set_content_language(input);
356 self
357 }
358 /// <p>The language the content is in.</p>
359 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
360 self.inner.get_content_language()
361 }
362 /// <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>
363 pub fn content_length(mut self, input: i64) -> Self {
364 self.inner = self.inner.content_length(input);
365 self
366 }
367 /// <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>
368 pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
369 self.inner = self.inner.set_content_length(input);
370 self
371 }
372 /// <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>
373 pub fn get_content_length(&self) -> &::std::option::Option<i64> {
374 self.inner.get_content_length()
375 }
376 /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
377 /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
378 /// </note> <note>
379 /// <p>This functionality is not supported for directory buckets.</p>
380 /// </note>
381 pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
382 self.inner = self.inner.content_md5(input.into());
383 self
384 }
385 /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
386 /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
387 /// </note> <note>
388 /// <p>This functionality is not supported for directory buckets.</p>
389 /// </note>
390 pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
391 self.inner = self.inner.set_content_md5(input);
392 self
393 }
394 /// <p>The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
395 /// <p>The <code>Content-MD5</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information about Amazon S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html">Amazon S3 Object Lock Overview</a> in the <i>Amazon S3 User Guide</i>.</p>
396 /// </note> <note>
397 /// <p>This functionality is not supported for directory buckets.</p>
398 /// </note>
399 pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
400 self.inner.get_content_md5()
401 }
402 /// <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>
403 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404 self.inner = self.inner.content_type(input.into());
405 self
406 }
407 /// <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>
408 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
409 self.inner = self.inner.set_content_type(input);
410 self
411 }
412 /// <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>
413 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
414 self.inner.get_content_type()
415 }
416 /// <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>
417 /// <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>
418 /// <ul>
419 /// <li>
420 /// <p>CRC32</p></li>
421 /// <li>
422 /// <p>CRC32C</p></li>
423 /// <li>
424 /// <p>SHA1</p></li>
425 /// <li>
426 /// <p>SHA256</p></li>
427 /// </ul>
428 /// <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>
429 /// <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 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
430 /// <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>
431 /// </note>
432 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
433 self.inner = self.inner.checksum_algorithm(input);
434 self
435 }
436 /// <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>
437 /// <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>
438 /// <ul>
439 /// <li>
440 /// <p>CRC32</p></li>
441 /// <li>
442 /// <p>CRC32C</p></li>
443 /// <li>
444 /// <p>SHA1</p></li>
445 /// <li>
446 /// <p>SHA256</p></li>
447 /// </ul>
448 /// <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>
449 /// <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 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
450 /// <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>
451 /// </note>
452 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
453 self.inner = self.inner.set_checksum_algorithm(input);
454 self
455 }
456 /// <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>
457 /// <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>
458 /// <ul>
459 /// <li>
460 /// <p>CRC32</p></li>
461 /// <li>
462 /// <p>CRC32C</p></li>
463 /// <li>
464 /// <p>SHA1</p></li>
465 /// <li>
466 /// <p>SHA256</p></li>
467 /// </ul>
468 /// <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>
469 /// <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 ignores any provided <code>ChecksumAlgorithm</code> parameter and uses the checksum algorithm that matches the provided value in <code>x-amz-checksum-<i>algorithm</i> </code>.</p><note>
470 /// <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>
471 /// </note>
472 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
473 self.inner.get_checksum_algorithm()
474 }
475 /// <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 CRC32 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>
476 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
477 self.inner = self.inner.checksum_crc32(input.into());
478 self
479 }
480 /// <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 CRC32 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>
481 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
482 self.inner = self.inner.set_checksum_crc32(input);
483 self
484 }
485 /// <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 CRC32 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>
486 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
487 self.inner.get_checksum_crc32()
488 }
489 /// <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 CRC32C 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>
490 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
491 self.inner = self.inner.checksum_crc32_c(input.into());
492 self
493 }
494 /// <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 CRC32C 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>
495 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
496 self.inner = self.inner.set_checksum_crc32_c(input);
497 self
498 }
499 /// <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 CRC32C 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>
500 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
501 self.inner.get_checksum_crc32_c()
502 }
503 /// <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 SHA-1 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>
504 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
505 self.inner = self.inner.checksum_sha1(input.into());
506 self
507 }
508 /// <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 SHA-1 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>
509 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
510 self.inner = self.inner.set_checksum_sha1(input);
511 self
512 }
513 /// <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 SHA-1 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>
514 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
515 self.inner.get_checksum_sha1()
516 }
517 /// <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 SHA-256 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>
518 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
519 self.inner = self.inner.checksum_sha256(input.into());
520 self
521 }
522 /// <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 SHA-256 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>
523 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
524 self.inner = self.inner.set_checksum_sha256(input);
525 self
526 }
527 /// <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 SHA-256 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>
528 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
529 self.inner.get_checksum_sha256()
530 }
531 /// <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>
532 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
533 self.inner = self.inner.expires(input);
534 self
535 }
536 /// <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>
537 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
538 self.inner = self.inner.set_expires(input);
539 self
540 }
541 /// <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>
542 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
543 self.inner.get_expires()
544 }
545 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
546 /// <ul>
547 /// <li>
548 /// <p>This functionality is not supported for directory buckets.</p></li>
549 /// <li>
550 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
551 /// </ul>
552 /// </note>
553 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
554 self.inner = self.inner.grant_full_control(input.into());
555 self
556 }
557 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
558 /// <ul>
559 /// <li>
560 /// <p>This functionality is not supported for directory buckets.</p></li>
561 /// <li>
562 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
563 /// </ul>
564 /// </note>
565 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
566 self.inner = self.inner.set_grant_full_control(input);
567 self
568 }
569 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
570 /// <ul>
571 /// <li>
572 /// <p>This functionality is not supported for directory buckets.</p></li>
573 /// <li>
574 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
575 /// </ul>
576 /// </note>
577 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
578 self.inner.get_grant_full_control()
579 }
580 /// <p>Allows grantee to read the object data and its metadata.</p><note>
581 /// <ul>
582 /// <li>
583 /// <p>This functionality is not supported for directory buckets.</p></li>
584 /// <li>
585 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
586 /// </ul>
587 /// </note>
588 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
589 self.inner = self.inner.grant_read(input.into());
590 self
591 }
592 /// <p>Allows grantee to read the object data and its metadata.</p><note>
593 /// <ul>
594 /// <li>
595 /// <p>This functionality is not supported for directory buckets.</p></li>
596 /// <li>
597 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
598 /// </ul>
599 /// </note>
600 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
601 self.inner = self.inner.set_grant_read(input);
602 self
603 }
604 /// <p>Allows grantee to read the object data and its metadata.</p><note>
605 /// <ul>
606 /// <li>
607 /// <p>This functionality is not supported for directory buckets.</p></li>
608 /// <li>
609 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
610 /// </ul>
611 /// </note>
612 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
613 self.inner.get_grant_read()
614 }
615 /// <p>Allows grantee to read the object ACL.</p><note>
616 /// <ul>
617 /// <li>
618 /// <p>This functionality is not supported for directory buckets.</p></li>
619 /// <li>
620 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
621 /// </ul>
622 /// </note>
623 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
624 self.inner = self.inner.grant_read_acp(input.into());
625 self
626 }
627 /// <p>Allows grantee to read the object ACL.</p><note>
628 /// <ul>
629 /// <li>
630 /// <p>This functionality is not supported for directory buckets.</p></li>
631 /// <li>
632 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
633 /// </ul>
634 /// </note>
635 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
636 self.inner = self.inner.set_grant_read_acp(input);
637 self
638 }
639 /// <p>Allows grantee to read the object ACL.</p><note>
640 /// <ul>
641 /// <li>
642 /// <p>This functionality is not supported for directory buckets.</p></li>
643 /// <li>
644 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
645 /// </ul>
646 /// </note>
647 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
648 self.inner.get_grant_read_acp()
649 }
650 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
651 /// <ul>
652 /// <li>
653 /// <p>This functionality is not supported for directory buckets.</p></li>
654 /// <li>
655 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
656 /// </ul>
657 /// </note>
658 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
659 self.inner = self.inner.grant_write_acp(input.into());
660 self
661 }
662 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
663 /// <ul>
664 /// <li>
665 /// <p>This functionality is not supported for directory buckets.</p></li>
666 /// <li>
667 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
668 /// </ul>
669 /// </note>
670 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
671 self.inner = self.inner.set_grant_write_acp(input);
672 self
673 }
674 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
675 /// <ul>
676 /// <li>
677 /// <p>This functionality is not supported for directory buckets.</p></li>
678 /// <li>
679 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
680 /// </ul>
681 /// </note>
682 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
683 self.inner.get_grant_write_acp()
684 }
685 /// <p>Object key for which the PUT action was initiated.</p>
686 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
687 self.inner = self.inner.key(input.into());
688 self
689 }
690 /// <p>Object key for which the PUT action was initiated.</p>
691 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
692 self.inner = self.inner.set_key(input);
693 self
694 }
695 /// <p>Object key for which the PUT action was initiated.</p>
696 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
697 self.inner.get_key()
698 }
699 /// Adds a key-value pair to `Metadata`.
700 ///
701 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
702 ///
703 /// <p>A map of metadata to store with the object in S3.</p>
704 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
705 self.inner = self.inner.metadata(k.into(), v.into());
706 self
707 }
708 /// <p>A map of metadata to store with the object in S3.</p>
709 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
710 self.inner = self.inner.set_metadata(input);
711 self
712 }
713 /// <p>A map of metadata to store with the object in S3.</p>
714 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
715 self.inner.get_metadata()
716 }
717 /// <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>
718 /// <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>
719 /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
720 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
721 self.inner = self.inner.server_side_encryption(input);
722 self
723 }
724 /// <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>
725 /// <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>
726 /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
727 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
728 self.inner = self.inner.set_server_side_encryption(input);
729 self
730 }
731 /// <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>
732 /// <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>
733 /// <p><b>Directory buckets </b> - For directory buckets, only the server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) value is supported.</p>
734 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
735 self.inner.get_server_side_encryption()
736 }
737 /// <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>
738 /// <ul>
739 /// <li>
740 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
741 /// <li>
742 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
743 /// </ul>
744 /// </note>
745 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
746 self.inner = self.inner.storage_class(input);
747 self
748 }
749 /// <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>
750 /// <ul>
751 /// <li>
752 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
753 /// <li>
754 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
755 /// </ul>
756 /// </note>
757 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
758 self.inner = self.inner.set_storage_class(input);
759 self
760 }
761 /// <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>
762 /// <ul>
763 /// <li>
764 /// <p>For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects.</p></li>
765 /// <li>
766 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
767 /// </ul>
768 /// </note>
769 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
770 self.inner.get_storage_class()
771 }
772 /// <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>
773 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
774 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
775 /// <p>In the following example, the request header sets the object redirect to another website:</p>
776 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
777 /// <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>
778 /// <p>This functionality is not supported for directory buckets.</p>
779 /// </note>
780 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
781 self.inner = self.inner.website_redirect_location(input.into());
782 self
783 }
784 /// <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>
785 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
786 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
787 /// <p>In the following example, the request header sets the object redirect to another website:</p>
788 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
789 /// <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>
790 /// <p>This functionality is not supported for directory buckets.</p>
791 /// </note>
792 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
793 self.inner = self.inner.set_website_redirect_location(input);
794 self
795 }
796 /// <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>
797 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
798 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
799 /// <p>In the following example, the request header sets the object redirect to another website:</p>
800 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
801 /// <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>
802 /// <p>This functionality is not supported for directory buckets.</p>
803 /// </note>
804 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
805 self.inner.get_website_redirect_location()
806 }
807 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
808 /// <p>This functionality is not supported for directory buckets.</p>
809 /// </note>
810 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
811 self.inner = self.inner.sse_customer_algorithm(input.into());
812 self
813 }
814 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
815 /// <p>This functionality is not supported for directory buckets.</p>
816 /// </note>
817 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
818 self.inner = self.inner.set_sse_customer_algorithm(input);
819 self
820 }
821 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
822 /// <p>This functionality is not supported for directory buckets.</p>
823 /// </note>
824 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
825 self.inner.get_sse_customer_algorithm()
826 }
827 /// <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>
828 /// <p>This functionality is not supported for directory buckets.</p>
829 /// </note>
830 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
831 self.inner = self.inner.sse_customer_key(input.into());
832 self
833 }
834 /// <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>
835 /// <p>This functionality is not supported for directory buckets.</p>
836 /// </note>
837 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
838 self.inner = self.inner.set_sse_customer_key(input);
839 self
840 }
841 /// <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>
842 /// <p>This functionality is not supported for directory buckets.</p>
843 /// </note>
844 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
845 self.inner.get_sse_customer_key()
846 }
847 /// <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>
848 /// <p>This functionality is not supported for directory buckets.</p>
849 /// </note>
850 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
851 self.inner = self.inner.sse_customer_key_md5(input.into());
852 self
853 }
854 /// <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>
855 /// <p>This functionality is not supported for directory buckets.</p>
856 /// </note>
857 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
858 self.inner = self.inner.set_sse_customer_key_md5(input);
859 self
860 }
861 /// <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>
862 /// <p>This functionality is not supported for directory buckets.</p>
863 /// </note>
864 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
865 self.inner.get_sse_customer_key_md5()
866 }
867 /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
868 /// <p>This functionality is not supported for directory buckets.</p>
869 /// </note>
870 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
871 self.inner = self.inner.ssekms_key_id(input.into());
872 self
873 }
874 /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
875 /// <p>This functionality is not supported for directory buckets.</p>
876 /// </note>
877 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
878 self.inner = self.inner.set_ssekms_key_id(input);
879 self
880 }
881 /// <p>If <code>x-amz-server-side-encryption</code> has a valid value of <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the Key Management Service (KMS) symmetric encryption customer managed key that was used for the object. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide<code> x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data. If the KMS key does not exist in the same account that's issuing the command, you must use the full ARN and not just the ID.</p><note>
882 /// <p>This functionality is not supported for directory buckets.</p>
883 /// </note>
884 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
885 self.inner.get_ssekms_key_id()
886 }
887 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
888 /// <p>This functionality is not supported for directory buckets.</p>
889 /// </note>
890 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
891 self.inner = self.inner.ssekms_encryption_context(input.into());
892 self
893 }
894 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
895 /// <p>This functionality is not supported for directory buckets.</p>
896 /// </note>
897 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
898 self.inner = self.inner.set_ssekms_encryption_context(input);
899 self
900 }
901 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> or <code>CopyObject</code> operations on this object. This value must be explicitly added during <code>CopyObject</code> operations.</p><note>
902 /// <p>This functionality is not supported for directory buckets.</p>
903 /// </note>
904 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
905 self.inner.get_ssekms_encryption_context()
906 }
907 /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
908 /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
909 /// <p>This functionality is not supported for directory buckets.</p>
910 /// </note>
911 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
912 self.inner = self.inner.bucket_key_enabled(input);
913 self
914 }
915 /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
916 /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
917 /// <p>This functionality is not supported for directory buckets.</p>
918 /// </note>
919 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
920 self.inner = self.inner.set_bucket_key_enabled(input);
921 self
922 }
923 /// <p>Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using Key Management Service (KMS) keys (SSE-KMS). Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.</p>
924 /// <p>Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key.</p><note>
925 /// <p>This functionality is not supported for directory buckets.</p>
926 /// </note>
927 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
928 self.inner.get_bucket_key_enabled()
929 }
930 /// <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>
931 /// <p>This functionality is not supported for directory buckets.</p>
932 /// </note>
933 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
934 self.inner = self.inner.request_payer(input);
935 self
936 }
937 /// <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>
938 /// <p>This functionality is not supported for directory buckets.</p>
939 /// </note>
940 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
941 self.inner = self.inner.set_request_payer(input);
942 self
943 }
944 /// <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>
945 /// <p>This functionality is not supported for directory buckets.</p>
946 /// </note>
947 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
948 self.inner.get_request_payer()
949 }
950 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
951 /// <p>This functionality is not supported for directory buckets.</p>
952 /// </note>
953 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
954 self.inner = self.inner.tagging(input.into());
955 self
956 }
957 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
958 /// <p>This functionality is not supported for directory buckets.</p>
959 /// </note>
960 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
961 self.inner = self.inner.set_tagging(input);
962 self
963 }
964 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
965 /// <p>This functionality is not supported for directory buckets.</p>
966 /// </note>
967 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
968 self.inner.get_tagging()
969 }
970 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
971 /// <p>This functionality is not supported for directory buckets.</p>
972 /// </note>
973 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
974 self.inner = self.inner.object_lock_mode(input);
975 self
976 }
977 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
978 /// <p>This functionality is not supported for directory buckets.</p>
979 /// </note>
980 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
981 self.inner = self.inner.set_object_lock_mode(input);
982 self
983 }
984 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
985 /// <p>This functionality is not supported for directory buckets.</p>
986 /// </note>
987 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
988 self.inner.get_object_lock_mode()
989 }
990 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
991 /// <p>This functionality is not supported for directory buckets.</p>
992 /// </note>
993 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
994 self.inner = self.inner.object_lock_retain_until_date(input);
995 self
996 }
997 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
998 /// <p>This functionality is not supported for directory buckets.</p>
999 /// </note>
1000 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1001 self.inner = self.inner.set_object_lock_retain_until_date(input);
1002 self
1003 }
1004 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1005 /// <p>This functionality is not supported for directory buckets.</p>
1006 /// </note>
1007 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1008 self.inner.get_object_lock_retain_until_date()
1009 }
1010 /// <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>
1011 /// <p>This functionality is not supported for directory buckets.</p>
1012 /// </note>
1013 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1014 self.inner = self.inner.object_lock_legal_hold_status(input);
1015 self
1016 }
1017 /// <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>
1018 /// <p>This functionality is not supported for directory buckets.</p>
1019 /// </note>
1020 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1021 self.inner = self.inner.set_object_lock_legal_hold_status(input);
1022 self
1023 }
1024 /// <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>
1025 /// <p>This functionality is not supported for directory buckets.</p>
1026 /// </note>
1027 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1028 self.inner.get_object_lock_legal_hold_status()
1029 }
1030 /// <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>
1031 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1032 self.inner = self.inner.expected_bucket_owner(input.into());
1033 self
1034 }
1035 /// <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>
1036 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1037 self.inner = self.inner.set_expected_bucket_owner(input);
1038 self
1039 }
1040 /// <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>
1041 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1042 self.inner.get_expected_bucket_owner()
1043 }
1044}
1045
1046impl crate::client::customize::internal::CustomizablePresigned<crate::operation::put_object::PutObjectError> for PutObjectFluentBuilder {
1047 fn presign(
1048 self,
1049 config_override: crate::config::Builder,
1050 presigning_config: crate::presigning::PresigningConfig,
1051 ) -> crate::client::customize::internal::BoxFuture<
1052 crate::client::customize::internal::SendResult<crate::presigning::PresignedRequest, crate::operation::put_object::PutObjectError>,
1053 > {
1054 ::std::boxed::Box::pin(async move { self.config_override(config_override).presigned(presigning_config).await })
1055 }
1056}