aws_sdk_s3/operation/copy_object/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::copy_object::_copy_object_output::CopyObjectOutputBuilder;
3
4pub use crate::operation::copy_object::_copy_object_input::CopyObjectInputBuilder;
5
6impl crate::operation::copy_object::builders::CopyObjectInputBuilder {
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::copy_object::CopyObjectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::copy_object::CopyObjectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.copy_object();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CopyObject`.
24///
25/// <p>Creates a copy of an object that is already stored in Amazon S3.</p><note>
26/// <p>You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your object up to 5 GB in size in a single atomic action using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy (UploadPartCopy) API. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html">Copy Object Using the REST Multipart Upload API</a>.</p>
27/// </note>
28/// <p>You can copy individual objects between general purpose buckets, between directory buckets, and between general purpose buckets and directory buckets.</p><note>
29/// <ul>
30/// <li>
31/// <p>Amazon S3 supports copy operations using Multi-Region Access Points only as a destination when using the Multi-Region Access Point ARN.</p></li>
32/// <li>
33/// <p><b>Directory buckets </b> - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format <code>https://<i>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>
34/// <li>
35/// <p>VPC endpoints don't support cross-Region requests (including copies). If you're using VPC endpoints, your source and destination buckets should be in the same Amazon Web Services Region as your VPC endpoint.</p></li>
36/// </ul>
37/// </note>
38/// <p>Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account. For more information about how to enable a Region for your account, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone">Enable or disable a Region for standalone accounts</a> in the <i>Amazon Web Services Account Management Guide</i>.</p><important>
39/// <p>Amazon S3 transfer acceleration does not support cross-Region copies. If you request a cross-Region copy using a transfer acceleration endpoint, you get a <code>400 Bad Request</code> error. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html">Transfer Acceleration</a>.</p>
40/// </important>
41/// <dl>
42/// <dt>
43/// Authentication and authorization
44/// </dt>
45/// <dd>
46/// <p>All <code>CopyObject</code> requests must be authenticated and signed by using IAM credentials (access key ID and secret access key for the IAM identities). All headers with the <code>x-amz-</code> prefix, including <code>x-amz-copy-source</code>, must be signed. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p>
47/// <p><b>Directory buckets</b> - You must use the IAM credentials to authenticate and authorize your access to the <code>CopyObject</code> API operation, instead of using the temporary security credentials through the <code>CreateSession</code> API operation.</p>
48/// <p>Amazon Web Services CLI or SDKs handles authentication and authorization on your behalf.</p>
49/// </dd>
50/// <dt>
51/// Permissions
52/// </dt>
53/// <dd>
54/// <p>You must have <i>read</i> access to the source object and <i>write</i> access to the destination bucket.</p>
55/// <ul>
56/// <li>
57/// <p><b>General purpose bucket permissions</b> - You must have permissions in an IAM policy based on the source and destination bucket types in a <code>CopyObject</code> operation.</p>
58/// <ul>
59/// <li>
60/// <p>If the source object is in a general purpose bucket, you must have <b> <code>s3:GetObject</code> </b> permission to read the source object that is being copied.</p></li>
61/// <li>
62/// <p>If the destination bucket is a general purpose bucket, you must have <b> <code>s3:PutObject</code> </b> permission to write the object copy to the destination bucket.</p></li>
63/// </ul></li>
64/// <li>
65/// <p><b>Directory bucket permissions</b> - You must have permissions in a bucket policy or an IAM identity-based policy based on the source and destination bucket types in a <code>CopyObject</code> operation.</p>
66/// <ul>
67/// <li>
68/// <p>If the source object that you want to copy is in a directory bucket, you must have the <b> <code>s3express:CreateSession</code> </b> permission in the <code>Action</code> element of a policy to read the object. By default, the session is in the <code>ReadWrite</code> mode. If you want to restrict the access, you can explicitly set the <code>s3express:SessionMode</code> condition key to <code>ReadOnly</code> on the copy source bucket.</p></li>
69/// <li>
70/// <p>If the copy destination is a directory bucket, you must have the <b> <code>s3express:CreateSession</code> </b> permission in the <code>Action</code> element of a policy to write the object to the destination. The <code>s3express:SessionMode</code> condition key can't be set to <code>ReadOnly</code> on the copy destination bucket.</p></li>
71/// </ul>
72/// <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>
73/// <p>For example policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html">Example bucket policies for S3 Express One Zone</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html">Amazon Web Services Identity and Access Management (IAM) identity-based policies for S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p></li>
74/// </ul>
75/// </dd>
76/// <dt>
77/// Response and special errors
78/// </dt>
79/// <dd>
80/// <p>When the request is an HTTP 1.1 request, the response is chunk encoded. When the request is not an HTTP 1.1 request, the response would not contain the <code>Content-Length</code>. You always need to read the entire response body to check if the copy succeeds.</p>
81/// <ul>
82/// <li>
83/// <p>If the copy is successful, you receive a response with information about the copied object.</p></li>
84/// <li>
85/// <p>A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. A <code>200 OK</code> response can contain either a success or an error.</p>
86/// <ul>
87/// <li>
88/// <p>If the error occurs before the copy action starts, you receive a standard Amazon S3 error.</p></li>
89/// <li>
90/// <p>If the error occurs during the copy operation, the error response is embedded in the <code>200 OK</code> response. For example, in a cross-region copy, you may encounter throttling and receive a <code>200 OK</code> response. For more information, see <a href="https://repost.aws/knowledge-center/s3-resolve-200-internalerror">Resolve the Error 200 response when copying objects to Amazon S3</a>. The <code>200 OK</code> status code means the copy was accepted, but it doesn't mean the copy is complete. Another example is when you disconnect from Amazon S3 before the copy is complete, Amazon S3 might cancel the copy and you may receive a <code>200 OK</code> response. You must stay connected to Amazon S3 until the entire response is successfully received and processed.</p>
91/// <p>If you call this API operation directly, make sure to design your application to parse the content of the response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The SDKs detect the embedded error and apply error handling per your configuration settings (including automatically retrying the request as appropriate). If the condition persists, the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an error).</p></li>
92/// </ul></li>
93/// </ul>
94/// </dd>
95/// <dt>
96/// Charge
97/// </dt>
98/// <dd>
99/// <p>The copy request charge is based on the storage class and Region that you specify for the destination object. The request can also result in a data retrieval charge for the source if the source storage class bills for data retrieval. If the copy source is in a different region, the data transfer is billed to the copy source account. For pricing information, see <a href="http://aws.amazon.com/s3/pricing/">Amazon S3 pricing</a>.</p>
100/// </dd>
101/// <dt>
102/// HTTP Host header syntax
103/// </dt>
104/// <dd>
105/// <ul>
106/// <li>
107/// <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></li>
108/// <li>
109/// <p><b>Amazon S3 on Outposts</b> - When you use this action with S3 on Outposts through the REST API, 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>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p></li>
110/// </ul>
111/// </dd>
112/// </dl>
113/// <p>The following operations are related to <code>CopyObject</code>:</p>
114/// <ul>
115/// <li>
116/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
117/// <li>
118/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
119/// </ul>
120#[derive(::std::clone::Clone, ::std::fmt::Debug)]
121pub struct CopyObjectFluentBuilder {
122 handle: ::std::sync::Arc<crate::client::Handle>,
123 inner: crate::operation::copy_object::builders::CopyObjectInputBuilder,
124 config_override: ::std::option::Option<crate::config::Builder>,
125}
126impl
127 crate::client::customize::internal::CustomizableSend<
128 crate::operation::copy_object::CopyObjectOutput,
129 crate::operation::copy_object::CopyObjectError,
130 > for CopyObjectFluentBuilder
131{
132 fn send(
133 self,
134 config_override: crate::config::Builder,
135 ) -> crate::client::customize::internal::BoxFuture<
136 crate::client::customize::internal::SendResult<
137 crate::operation::copy_object::CopyObjectOutput,
138 crate::operation::copy_object::CopyObjectError,
139 >,
140 > {
141 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
142 }
143}
144impl CopyObjectFluentBuilder {
145 /// Creates a new `CopyObjectFluentBuilder`.
146 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
147 Self {
148 handle,
149 inner: ::std::default::Default::default(),
150 config_override: ::std::option::Option::None,
151 }
152 }
153 /// Access the CopyObject as a reference.
154 pub fn as_input(&self) -> &crate::operation::copy_object::builders::CopyObjectInputBuilder {
155 &self.inner
156 }
157 /// Sends the request and returns the response.
158 ///
159 /// If an error occurs, an `SdkError` will be returned with additional details that
160 /// can be matched against.
161 ///
162 /// By default, any retryable failures will be retried twice. Retry behavior
163 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
164 /// set when configuring the client.
165 pub async fn send(
166 self,
167 ) -> ::std::result::Result<
168 crate::operation::copy_object::CopyObjectOutput,
169 ::aws_smithy_runtime_api::client::result::SdkError<
170 crate::operation::copy_object::CopyObjectError,
171 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
172 >,
173 > {
174 let input = self
175 .inner
176 .build()
177 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
178 let runtime_plugins = crate::operation::copy_object::CopyObject::operation_runtime_plugins(
179 self.handle.runtime_plugins.clone(),
180 &self.handle.conf,
181 self.config_override,
182 );
183 crate::operation::copy_object::CopyObject::orchestrate(&runtime_plugins, input).await
184 }
185
186 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
187 pub fn customize(
188 self,
189 ) -> crate::client::customize::CustomizableOperation<
190 crate::operation::copy_object::CopyObjectOutput,
191 crate::operation::copy_object::CopyObjectError,
192 Self,
193 > {
194 crate::client::customize::CustomizableOperation::new(self)
195 }
196 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
197 self.set_config_override(::std::option::Option::Some(config_override.into()));
198 self
199 }
200
201 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
202 self.config_override = config_override;
203 self
204 }
205 /// <p>The canned access control list (ACL) to apply to the object.</p>
206 /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
207 /// <p>If the destination bucket that you're copying 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 <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> 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. 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>
208 /// <ul>
209 /// <li>
210 /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
211 /// <li>
212 /// <p>This functionality is not supported for directory buckets.</p></li>
213 /// <li>
214 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
215 /// </ul>
216 /// </note>
217 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
218 self.inner = self.inner.acl(input);
219 self
220 }
221 /// <p>The canned access control list (ACL) to apply to the object.</p>
222 /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
223 /// <p>If the destination bucket that you're copying 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 <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> 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. 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>
224 /// <ul>
225 /// <li>
226 /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
227 /// <li>
228 /// <p>This functionality is not supported for directory buckets.</p></li>
229 /// <li>
230 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
231 /// </ul>
232 /// </note>
233 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
234 self.inner = self.inner.set_acl(input);
235 self
236 }
237 /// <p>The canned access control list (ACL) to apply to the object.</p>
238 /// <p>When you copy an object, the ACL metadata is not preserved and is set to <code>private</code> by default. Only the owner has full access control. To override the default ACL setting, specify a new ACL when you generate a copy request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html">Using ACLs</a>.</p>
239 /// <p>If the destination bucket that you're copying 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 <code>PUT</code> requests that don't specify an ACL or <code>PUT</code> 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. 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>
240 /// <ul>
241 /// <li>
242 /// <p>If your destination bucket uses the bucket owner enforced setting for Object Ownership, all objects written to the bucket by any account will be owned by the bucket owner.</p></li>
243 /// <li>
244 /// <p>This functionality is not supported for directory buckets.</p></li>
245 /// <li>
246 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
247 /// </ul>
248 /// </note>
249 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
250 self.inner.get_acl()
251 }
252 /// <p>The name of the destination bucket.</p>
253 /// <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><note>
254 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
255 /// </note>
256 /// <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>
257 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
258 /// </note>
259 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. 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>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
260 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261 self.inner = self.inner.bucket(input.into());
262 self
263 }
264 /// <p>The name of the destination bucket.</p>
265 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket-name</i>.s3express-<i>zone-id</i>.<i>region-code</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format <code> <i>bucket-base-name</i>--<i>zone-id</i>--x-s3</code> (for example, <code> <i>amzn-s3-demo-bucket</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
266 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
267 /// </note>
268 /// <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>
269 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
270 /// </note>
271 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. 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>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
272 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273 self.inner = self.inner.set_bucket(input);
274 self
275 }
276 /// <p>The name of the destination bucket.</p>
277 /// <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><note>
278 /// <p>Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, you get an HTTP <code>400 Bad Request</code> error with the error code <code>InvalidRequest</code>.</p>
279 /// </note>
280 /// <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>
281 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
282 /// </note>
283 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. 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>S3 on Outposts guide</i>. When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.</p>
284 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
285 self.inner.get_bucket()
286 }
287 /// <p>Specifies the caching behavior along the request/reply chain.</p>
288 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289 self.inner = self.inner.cache_control(input.into());
290 self
291 }
292 /// <p>Specifies the caching behavior along the request/reply chain.</p>
293 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294 self.inner = self.inner.set_cache_control(input);
295 self
296 }
297 /// <p>Specifies the caching behavior along the request/reply chain.</p>
298 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
299 self.inner.get_cache_control()
300 }
301 /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
302 /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
303 /// <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>
304 /// </note>
305 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
306 self.inner = self.inner.checksum_algorithm(input);
307 self
308 }
309 /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
310 /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
311 /// <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>
312 /// </note>
313 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
314 self.inner = self.inner.set_checksum_algorithm(input);
315 self
316 }
317 /// <p>Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
318 /// <p>When you copy an object, if the source object has a checksum, that checksum value will be copied to the new object by default. If the <code>CopyObject</code> request does not include this <code>x-amz-checksum-algorithm</code> header, the checksum algorithm will be copied from the source object to the destination object (if it's present on the source object). You can optionally specify a different checksum algorithm to use with the <code>x-amz-checksum-algorithm</code> header. Unrecognized or unsupported values will respond with the HTTP status code <code>400 Bad Request</code>.</p><note>
319 /// <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>
320 /// </note>
321 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
322 self.inner.get_checksum_algorithm()
323 }
324 /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
325 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326 self.inner = self.inner.content_disposition(input.into());
327 self
328 }
329 /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
330 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331 self.inner = self.inner.set_content_disposition(input);
332 self
333 }
334 /// <p>Specifies presentational information for the object. Indicates whether an object should be displayed in a web browser or downloaded as a file. It allows specifying the desired filename for the downloaded file.</p>
335 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
336 self.inner.get_content_disposition()
337 }
338 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
339 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
340 /// </note>
341 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342 self.inner = self.inner.content_encoding(input.into());
343 self
344 }
345 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
346 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
347 /// </note>
348 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
349 self.inner = self.inner.set_content_encoding(input);
350 self
351 }
352 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
353 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
354 /// </note>
355 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
356 self.inner.get_content_encoding()
357 }
358 /// <p>The language the content is in.</p>
359 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360 self.inner = self.inner.content_language(input.into());
361 self
362 }
363 /// <p>The language the content is in.</p>
364 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
365 self.inner = self.inner.set_content_language(input);
366 self
367 }
368 /// <p>The language the content is in.</p>
369 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
370 self.inner.get_content_language()
371 }
372 /// <p>A standard MIME type that describes the format of the object data.</p>
373 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 self.inner = self.inner.content_type(input.into());
375 self
376 }
377 /// <p>A standard MIME type that describes the format of the object data.</p>
378 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
379 self.inner = self.inner.set_content_type(input);
380 self
381 }
382 /// <p>A standard MIME type that describes the format of the object data.</p>
383 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
384 self.inner.get_content_type()
385 }
386 /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
387 /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
388 /// <ul>
389 /// <li>
390 /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
391 /// <li>
392 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
393 /// :
394 /// <account-id>
395 /// :accesspoint/
396 /// <access-point-name>
397 /// /object/
398 /// <key></key>
399 /// </access-point-name>
400 /// </account-id>
401 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
402 /// <ul>
403 /// <li>
404 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
405 /// <li>
406 /// <p>Access points are not supported by directory buckets.</p></li>
407 /// </ul>
408 /// </note>
409 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
410 /// :
411 /// <account-id>
412 /// :outpost/
413 /// <outpost-id>
414 /// /object/
415 /// <key></key>
416 /// </outpost-id>
417 /// </account-id>
418 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
419 /// </ul>
420 /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
421 /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
422 /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
423 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
424 /// </note>
425 pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
426 self.inner = self.inner.copy_source(input.into());
427 self
428 }
429 /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
430 /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
431 /// <ul>
432 /// <li>
433 /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
434 /// <li>
435 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
436 /// :
437 /// <account-id>
438 /// :accesspoint/
439 /// <access-point-name>
440 /// /object/
441 /// <key></key>
442 /// </access-point-name>
443 /// </account-id>
444 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
445 /// <ul>
446 /// <li>
447 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
448 /// <li>
449 /// <p>Access points are not supported by directory buckets.</p></li>
450 /// </ul>
451 /// </note>
452 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
453 /// :
454 /// <account-id>
455 /// :outpost/
456 /// <outpost-id>
457 /// /object/
458 /// <key></key>
459 /// </outpost-id>
460 /// </account-id>
461 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
462 /// </ul>
463 /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
464 /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
465 /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
466 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
467 /// </note>
468 pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
469 self.inner = self.inner.set_copy_source(input);
470 self
471 }
472 /// <p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p>
473 /// <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html">access point</a>:</p>
474 /// <ul>
475 /// <li>
476 /// <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
477 /// <li>
478 /// <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:<region>
479 /// :
480 /// <account-id>
481 /// :accesspoint/
482 /// <access-point-name>
483 /// /object/
484 /// <key></key>
485 /// </access-point-name>
486 /// </account-id>
487 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p><note>
488 /// <ul>
489 /// <li>
490 /// <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p></li>
491 /// <li>
492 /// <p>Access points are not supported by directory buckets.</p></li>
493 /// </ul>
494 /// </note>
495 /// <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:<region>
496 /// :
497 /// <account-id>
498 /// :outpost/
499 /// <outpost-id>
500 /// /object/
501 /// <key></key>
502 /// </outpost-id>
503 /// </account-id>
504 /// </region></code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded.</p></li>
505 /// </ul>
506 /// <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=<version-id></version-id></code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p>
507 /// <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p>
508 /// <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p><note>
509 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
510 /// </note>
511 pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
512 self.inner.get_copy_source()
513 }
514 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
515 /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
516 /// <ul>
517 /// <li>
518 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
519 /// <li>
520 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
521 /// </ul>
522 pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
523 self.inner = self.inner.copy_source_if_match(input.into());
524 self
525 }
526 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
527 /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
528 /// <ul>
529 /// <li>
530 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
531 /// <li>
532 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
533 /// </ul>
534 pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
535 self.inner = self.inner.set_copy_source_if_match(input);
536 self
537 }
538 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
539 /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
540 /// <ul>
541 /// <li>
542 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
543 /// <li>
544 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
545 /// </ul>
546 pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
547 self.inner.get_copy_source_if_match()
548 }
549 /// <p>Copies the object if it has been modified since the specified time.</p>
550 /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
551 /// <ul>
552 /// <li>
553 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
554 /// <li>
555 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
556 /// </ul>
557 pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
558 self.inner = self.inner.copy_source_if_modified_since(input);
559 self
560 }
561 /// <p>Copies the object if it has been modified since the specified time.</p>
562 /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
563 /// <ul>
564 /// <li>
565 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
566 /// <li>
567 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
568 /// </ul>
569 pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
570 self.inner = self.inner.set_copy_source_if_modified_since(input);
571 self
572 }
573 /// <p>Copies the object if it has been modified since the specified time.</p>
574 /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
575 /// <ul>
576 /// <li>
577 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
578 /// <li>
579 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
580 /// </ul>
581 pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
582 self.inner.get_copy_source_if_modified_since()
583 }
584 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
585 /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
586 /// <ul>
587 /// <li>
588 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
589 /// <li>
590 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
591 /// </ul>
592 pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
593 self.inner = self.inner.copy_source_if_none_match(input.into());
594 self
595 }
596 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
597 /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
598 /// <ul>
599 /// <li>
600 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
601 /// <li>
602 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
603 /// </ul>
604 pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
605 self.inner = self.inner.set_copy_source_if_none_match(input);
606 self
607 }
608 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
609 /// <p>If both the <code>x-amz-copy-source-if-none-match</code> and <code>x-amz-copy-source-if-modified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns the <code>412 Precondition Failed</code> response code:</p>
610 /// <ul>
611 /// <li>
612 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
613 /// <li>
614 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
615 /// </ul>
616 pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
617 self.inner.get_copy_source_if_none_match()
618 }
619 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
620 /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
621 /// <ul>
622 /// <li>
623 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
624 /// <li>
625 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
626 /// </ul>
627 pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
628 self.inner = self.inner.copy_source_if_unmodified_since(input);
629 self
630 }
631 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
632 /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
633 /// <ul>
634 /// <li>
635 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
636 /// <li>
637 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
638 /// </ul>
639 pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
640 self.inner = self.inner.set_copy_source_if_unmodified_since(input);
641 self
642 }
643 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
644 /// <p>If both the <code>x-amz-copy-source-if-match</code> and <code>x-amz-copy-source-if-unmodified-since</code> headers are present in the request and evaluate as follows, Amazon S3 returns <code>200 OK</code> and copies the data:</p>
645 /// <ul>
646 /// <li>
647 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
648 /// <li>
649 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
650 /// </ul>
651 pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
652 self.inner.get_copy_source_if_unmodified_since()
653 }
654 /// <p>The date and time at which the object is no longer cacheable.</p>
655 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
656 self.inner = self.inner.expires(input);
657 self
658 }
659 /// <p>The date and time at which the object is no longer cacheable.</p>
660 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
661 self.inner = self.inner.set_expires(input);
662 self
663 }
664 /// <p>The date and time at which the object is no longer cacheable.</p>
665 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
666 self.inner.get_expires()
667 }
668 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</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 grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
677 self.inner = self.inner.grant_full_control(input.into());
678 self
679 }
680 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</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 set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
689 self.inner = self.inner.set_grant_full_control(input);
690 self
691 }
692 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
693 /// <ul>
694 /// <li>
695 /// <p>This functionality is not supported for directory buckets.</p></li>
696 /// <li>
697 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
698 /// </ul>
699 /// </note>
700 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
701 self.inner.get_grant_full_control()
702 }
703 /// <p>Allows grantee to read the object data and its metadata.</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 grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
712 self.inner = self.inner.grant_read(input.into());
713 self
714 }
715 /// <p>Allows grantee to read the object data and its metadata.</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 set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
724 self.inner = self.inner.set_grant_read(input);
725 self
726 }
727 /// <p>Allows grantee to read the object data and its metadata.</p><note>
728 /// <ul>
729 /// <li>
730 /// <p>This functionality is not supported for directory buckets.</p></li>
731 /// <li>
732 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
733 /// </ul>
734 /// </note>
735 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
736 self.inner.get_grant_read()
737 }
738 /// <p>Allows grantee to read the object ACL.</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 grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
747 self.inner = self.inner.grant_read_acp(input.into());
748 self
749 }
750 /// <p>Allows grantee to read the object ACL.</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 set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
759 self.inner = self.inner.set_grant_read_acp(input);
760 self
761 }
762 /// <p>Allows grantee to read the object ACL.</p><note>
763 /// <ul>
764 /// <li>
765 /// <p>This functionality is not supported for directory buckets.</p></li>
766 /// <li>
767 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
768 /// </ul>
769 /// </note>
770 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
771 self.inner.get_grant_read_acp()
772 }
773 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
774 /// <ul>
775 /// <li>
776 /// <p>This functionality is not supported for directory buckets.</p></li>
777 /// <li>
778 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
779 /// </ul>
780 /// </note>
781 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
782 self.inner = self.inner.grant_write_acp(input.into());
783 self
784 }
785 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
786 /// <ul>
787 /// <li>
788 /// <p>This functionality is not supported for directory buckets.</p></li>
789 /// <li>
790 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
791 /// </ul>
792 /// </note>
793 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
794 self.inner = self.inner.set_grant_write_acp(input);
795 self
796 }
797 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
798 /// <ul>
799 /// <li>
800 /// <p>This functionality is not supported for directory buckets.</p></li>
801 /// <li>
802 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
803 /// </ul>
804 /// </note>
805 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
806 self.inner.get_grant_write_acp()
807 }
808 /// <p>The key of the destination object.</p>
809 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
810 self.inner = self.inner.key(input.into());
811 self
812 }
813 /// <p>The key of the destination object.</p>
814 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
815 self.inner = self.inner.set_key(input);
816 self
817 }
818 /// <p>The key of the destination object.</p>
819 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
820 self.inner.get_key()
821 }
822 ///
823 /// Adds a key-value pair to `Metadata`.
824 ///
825 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
826 ///
827 /// <p>A map of metadata to store with the object in S3.</p>
828 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
829 self.inner = self.inner.metadata(k.into(), v.into());
830 self
831 }
832 /// <p>A map of metadata to store with the object in S3.</p>
833 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
834 self.inner = self.inner.set_metadata(input);
835 self
836 }
837 /// <p>A map of metadata to store with the object in S3.</p>
838 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
839 self.inner.get_metadata()
840 }
841 /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
842 /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
843 /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
844 /// </note>
845 pub fn metadata_directive(mut self, input: crate::types::MetadataDirective) -> Self {
846 self.inner = self.inner.metadata_directive(input);
847 self
848 }
849 /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
850 /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
851 /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
852 /// </note>
853 pub fn set_metadata_directive(mut self, input: ::std::option::Option<crate::types::MetadataDirective>) -> Self {
854 self.inner = self.inner.set_metadata_directive(input);
855 self
856 }
857 /// <p>Specifies whether the metadata is copied from the source object or replaced with metadata that's provided in the request. When copying an object, you can preserve all metadata (the default) or specify new metadata. If this header isn’t specified, <code>COPY</code> is the default behavior.</p>
858 /// <p><b>General purpose bucket</b> - For general purpose buckets, when you grant permissions, you can use the <code>s3:x-amz-metadata-directive</code> condition key to enforce certain metadata behavior when objects are uploaded. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html">Amazon S3 condition key examples</a> in the <i>Amazon S3 User Guide</i>.</p><note>
859 /// <p><code>x-amz-website-redirect-location</code> is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. To copy the value, you must specify <code>x-amz-website-redirect-location</code> in the request header.</p>
860 /// </note>
861 pub fn get_metadata_directive(&self) -> &::std::option::Option<crate::types::MetadataDirective> {
862 self.inner.get_metadata_directive()
863 }
864 /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
865 /// <p>The default value is <code>COPY</code>.</p><note>
866 /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
867 /// <ul>
868 /// <li>
869 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
870 /// <li>
871 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
872 /// <li>
873 /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
874 /// </ul>
875 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
876 /// <ul>
877 /// <li>
878 /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
879 /// <li>
880 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
881 /// <li>
882 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
883 /// <li>
884 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
885 /// </ul>
886 /// </note>
887 pub fn tagging_directive(mut self, input: crate::types::TaggingDirective) -> Self {
888 self.inner = self.inner.tagging_directive(input);
889 self
890 }
891 /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
892 /// <p>The default value is <code>COPY</code>.</p><note>
893 /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
894 /// <ul>
895 /// <li>
896 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
897 /// <li>
898 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
899 /// <li>
900 /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
901 /// </ul>
902 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
903 /// <ul>
904 /// <li>
905 /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
906 /// <li>
907 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
908 /// <li>
909 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
910 /// <li>
911 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
912 /// </ul>
913 /// </note>
914 pub fn set_tagging_directive(mut self, input: ::std::option::Option<crate::types::TaggingDirective>) -> Self {
915 self.inner = self.inner.set_tagging_directive(input);
916 self
917 }
918 /// <p>Specifies whether the object tag-set is copied from the source object or replaced with the tag-set that's provided in the request.</p>
919 /// <p>The default value is <code>COPY</code>.</p><note>
920 /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
921 /// <ul>
922 /// <li>
923 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
924 /// <li>
925 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
926 /// <li>
927 /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
928 /// </ul>
929 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
930 /// <ul>
931 /// <li>
932 /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
933 /// <li>
934 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
935 /// <li>
936 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
937 /// <li>
938 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
939 /// </ul>
940 /// </note>
941 pub fn get_tagging_directive(&self) -> &::std::option::Option<crate::types::TaggingDirective> {
942 self.inner.get_tagging_directive()
943 }
944 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
945 /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
946 /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
947 /// <p><b>General purpose buckets </b></p>
948 /// <ul>
949 /// <li>
950 /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
951 /// <li>
952 /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
953 /// </ul>
954 /// <p><b>Directory buckets </b></p>
955 /// <ul>
956 /// <li>
957 /// <p>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></li>
958 /// <li>
959 /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). 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. 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 for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
960 /// </ul>
961 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
962 self.inner = self.inner.server_side_encryption(input);
963 self
964 }
965 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
966 /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
967 /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
968 /// <p><b>General purpose buckets </b></p>
969 /// <ul>
970 /// <li>
971 /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
972 /// <li>
973 /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
974 /// </ul>
975 /// <p><b>Directory buckets </b></p>
976 /// <ul>
977 /// <li>
978 /// <p>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></li>
979 /// <li>
980 /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). 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. 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 for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
981 /// </ul>
982 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
983 self.inner = self.inner.set_server_side_encryption(input);
984 self
985 }
986 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
987 /// <p>Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When copying an object, if you don't specify encryption information in your copy request, the encryption setting of the target object is set to the default encryption configuration of the destination bucket. By default, all buckets have a base level of encryption configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination bucket has a different default encryption configuration, Amazon S3 uses the corresponding encryption key to encrypt the target object copy.</p>
988 /// <p>With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in its data centers and decrypts the data when you access it. For more information about server-side encryption, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p>
989 /// <p><b>General purpose buckets </b></p>
990 /// <ul>
991 /// <li>
992 /// <p>For general purpose buckets, there are the following supported options for server-side encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding KMS key, or a customer-provided key to encrypt the target object copy.</p></li>
993 /// <li>
994 /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p></li>
995 /// </ul>
996 /// <p><b>Directory buckets </b></p>
997 /// <ul>
998 /// <li>
999 /// <p>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></li>
1000 /// <li>
1001 /// <p>To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>). 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. 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 for the lifetime of the bucket. After you specify a customer managed key for SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS configuration. Then, when you perform a <code>CopyObject</code> operation and want to specify server-side encryption settings for new object copies with SSE-KMS in the encryption-related request headers, you must ensure the encryption key is the same customer managed key that you specified for the directory bucket's default encryption configuration.</p></li>
1002 /// </ul>
1003 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1004 self.inner.get_server_side_encryption()
1005 }
1006 /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
1007 /// <ul>
1008 /// <li>
1009 /// <p><b>Directory buckets </b> - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
1010 /// <li>
1011 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1012 /// </ul>
1013 /// </note>
1014 /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. 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>
1015 /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
1016 /// <ul>
1017 /// <li>
1018 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1019 /// <li>
1020 /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
1021 /// </ul>
1022 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
1023 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1024 self.inner = self.inner.storage_class(input);
1025 self
1026 }
1027 /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
1028 /// <ul>
1029 /// <li>
1030 /// <p><b>Directory buckets </b> - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
1031 /// <li>
1032 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1033 /// </ul>
1034 /// </note>
1035 /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. 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>
1036 /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
1037 /// <ul>
1038 /// <li>
1039 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1040 /// <li>
1041 /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
1042 /// </ul>
1043 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
1044 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1045 self.inner = self.inner.set_storage_class(input);
1046 self
1047 }
1048 /// <p>If the <code>x-amz-storage-class</code> header is not used, the copied object will be stored in the <code>STANDARD</code> Storage Class by default. The <code>STANDARD</code> storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class.</p><note>
1049 /// <ul>
1050 /// <li>
1051 /// <p><b>Directory buckets </b> - For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. Unsupported storage class values won't write a destination object and will respond with the HTTP status code <code>400 Bad Request</code>.</p></li>
1052 /// <li>
1053 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1054 /// </ul>
1055 /// </note>
1056 /// <p>You can use the <code>CopyObject</code> action to change the storage class of an object that is already stored in Amazon S3 by using the <code>x-amz-storage-class</code> header. 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>
1057 /// <p>Before using an object as a source object for the copy operation, you must restore a copy of it if it meets any of the following conditions:</p>
1058 /// <ul>
1059 /// <li>
1060 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1061 /// <li>
1062 /// <p>The storage class of the source object is <code>INTELLIGENT_TIERING</code> and it's <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering-overview.html#intel-tiering-tier-definition">S3 Intelligent-Tiering access tier</a> is <code>Archive Access</code> or <code>Deep Archive Access</code>.</p></li>
1063 /// </ul>
1064 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html">RestoreObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html">Copying Objects</a> in the <i>Amazon S3 User Guide</i>.</p>
1065 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1066 self.inner.get_storage_class()
1067 }
1068 /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
1069 /// <p>This functionality is not supported for directory buckets.</p>
1070 /// </note>
1071 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1072 self.inner = self.inner.website_redirect_location(input.into());
1073 self
1074 }
1075 /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
1076 /// <p>This functionality is not supported for directory buckets.</p>
1077 /// </note>
1078 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1079 self.inner = self.inner.set_website_redirect_location(input);
1080 self
1081 }
1082 /// <p>If the destination bucket is configured as a website, redirects requests for this object copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. This value is unique to each object and is not copied when using the <code>x-amz-metadata-directive</code> header. Instead, you may opt to provide this header in combination with the <code>x-amz-metadata-directive</code> header.</p><note>
1083 /// <p>This functionality is not supported for directory buckets.</p>
1084 /// </note>
1085 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1086 self.inner.get_website_redirect_location()
1087 }
1088 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1089 /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
1090 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1091 /// </note>
1092 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1093 self.inner = self.inner.sse_customer_algorithm(input.into());
1094 self
1095 }
1096 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1097 /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
1098 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1099 /// </note>
1100 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1101 self.inner = self.inner.set_sse_customer_algorithm(input);
1102 self
1103 }
1104 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1105 /// <p>When you perform a <code>CopyObject</code> operation, if you want to use a different type of encryption setting for the target object, you can specify appropriate encryption-related headers to encrypt the target object with an Amazon S3 managed key, a KMS key, or a customer-provided key. If the encryption setting in your request is different from the default encryption configuration of the destination bucket, the encryption setting in your request takes precedence.</p><note>
1106 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1107 /// </note>
1108 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1109 self.inner.get_sse_customer_algorithm()
1110 }
1111 /// <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>
1112 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1113 /// </note>
1114 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1115 self.inner = self.inner.sse_customer_key(input.into());
1116 self
1117 }
1118 /// <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>
1119 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1120 /// </note>
1121 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1122 self.inner = self.inner.set_sse_customer_key(input);
1123 self
1124 }
1125 /// <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>
1126 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1127 /// </note>
1128 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1129 self.inner.get_sse_customer_key()
1130 }
1131 /// <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>
1132 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1133 /// </note>
1134 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1135 self.inner = self.inner.sse_customer_key_md5(input.into());
1136 self
1137 }
1138 /// <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>
1139 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1140 /// </note>
1141 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1142 self.inner = self.inner.set_sse_customer_key_md5(input);
1143 self
1144 }
1145 /// <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>
1146 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1147 /// </note>
1148 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1149 self.inner.get_sse_customer_key_md5()
1150 }
1151 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
1152 /// <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>
1153 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1154 self.inner = self.inner.ssekms_key_id(input.into());
1155 self
1156 }
1157 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
1158 /// <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>
1159 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1160 self.inner = self.inner.set_ssekms_key_id(input);
1161 self
1162 }
1163 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. All GET and PUT requests for an object protected by KMS will fail if they're not made via SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services SDKs and Amazon Web Services CLI, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version">Specifying the Signature Version in Request Authentication</a> in the <i>Amazon S3 User Guide</i>.</p>
1164 /// <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>
1165 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1166 self.inner.get_ssekms_key_id()
1167 }
1168 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
1169 /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination 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>
1170 /// <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>
1171 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1172 self.inner = self.inner.ssekms_encryption_context(input.into());
1173 self
1174 }
1175 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
1176 /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination 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>
1177 /// <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>
1178 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1179 self.inner = self.inner.set_ssekms_encryption_context(input);
1180 self
1181 }
1182 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.</p>
1183 /// <p><b>General purpose buckets</b> - This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests if you want an additional encryption context for your destination object. The additional encryption context of the source object won't be copied to the destination 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>
1184 /// <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>
1185 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1186 self.inner.get_ssekms_encryption_context()
1187 }
1188 /// <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). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
1189 /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1190 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1191 /// <p><b>Directory buckets</b> - 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>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1192 /// </note>
1193 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1194 self.inner = self.inner.bucket_key_enabled(input);
1195 self
1196 }
1197 /// <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). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
1198 /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1199 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1200 /// <p><b>Directory buckets</b> - 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>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1201 /// </note>
1202 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1203 self.inner = self.inner.set_bucket_key_enabled(input);
1204 self
1205 }
1206 /// <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). If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the object.</p>
1207 /// <p>Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect bucket-level settings for S3 Bucket Key.</p>
1208 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html">Amazon S3 Bucket Keys</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1209 /// <p><b>Directory buckets</b> - 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>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1210 /// </note>
1211 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1212 self.inner.get_bucket_key_enabled()
1213 }
1214 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1215 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1216 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1217 /// </note>
1218 pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1219 self.inner = self.inner.copy_source_sse_customer_algorithm(input.into());
1220 self
1221 }
1222 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1223 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1224 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1225 /// </note>
1226 pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1227 self.inner = self.inner.set_copy_source_sse_customer_algorithm(input);
1228 self
1229 }
1230 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1231 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1232 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1233 /// </note>
1234 pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1235 self.inner.get_copy_source_sse_customer_algorithm()
1236 }
1237 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
1238 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1239 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1240 /// </note>
1241 pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1242 self.inner = self.inner.copy_source_sse_customer_key(input.into());
1243 self
1244 }
1245 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
1246 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1247 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1248 /// </note>
1249 pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1250 self.inner = self.inner.set_copy_source_sse_customer_key(input);
1251 self
1252 }
1253 /// <p>Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object. The encryption key provided in this header must be the same one that was used when the source object was created.</p>
1254 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1255 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1256 /// </note>
1257 pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1258 self.inner.get_copy_source_sse_customer_key()
1259 }
1260 /// <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>
1261 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1262 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1263 /// </note>
1264 pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1265 self.inner = self.inner.copy_source_sse_customer_key_md5(input.into());
1266 self
1267 }
1268 /// <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>
1269 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1270 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1271 /// </note>
1272 pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1273 self.inner = self.inner.set_copy_source_sse_customer_key_md5(input);
1274 self
1275 }
1276 /// <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>
1277 /// <p>If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the necessary encryption information in your request so that Amazon S3 can decrypt the object for copying.</p><note>
1278 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1279 /// </note>
1280 pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1281 self.inner.get_copy_source_sse_customer_key_md5()
1282 }
1283 /// <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>
1284 /// <p>This functionality is not supported for directory buckets.</p>
1285 /// </note>
1286 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1287 self.inner = self.inner.request_payer(input);
1288 self
1289 }
1290 /// <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>
1291 /// <p>This functionality is not supported for directory buckets.</p>
1292 /// </note>
1293 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1294 self.inner = self.inner.set_request_payer(input);
1295 self
1296 }
1297 /// <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>
1298 /// <p>This functionality is not supported for directory buckets.</p>
1299 /// </note>
1300 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1301 self.inner.get_request_payer()
1302 }
1303 /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
1304 /// <p>The default value is the empty value.</p><note>
1305 /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
1306 /// <ul>
1307 /// <li>
1308 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1309 /// <li>
1310 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
1311 /// <li>
1312 /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
1313 /// </ul>
1314 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1315 /// <ul>
1316 /// <li>
1317 /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
1318 /// <li>
1319 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1320 /// <li>
1321 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1322 /// <li>
1323 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
1324 /// </ul>
1325 /// </note>
1326 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1327 self.inner = self.inner.tagging(input.into());
1328 self
1329 }
1330 /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
1331 /// <p>The default value is the empty value.</p><note>
1332 /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
1333 /// <ul>
1334 /// <li>
1335 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1336 /// <li>
1337 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
1338 /// <li>
1339 /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
1340 /// </ul>
1341 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1342 /// <ul>
1343 /// <li>
1344 /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
1345 /// <li>
1346 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1347 /// <li>
1348 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1349 /// <li>
1350 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
1351 /// </ul>
1352 /// </note>
1353 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1354 self.inner = self.inner.set_tagging(input);
1355 self
1356 }
1357 /// <p>The tag-set for the object copy in the destination bucket. This value must be used in conjunction with the <code>x-amz-tagging-directive</code> if you choose <code>REPLACE</code> for the <code>x-amz-tagging-directive</code>. If you choose <code>COPY</code> for the <code>x-amz-tagging-directive</code>, you don't need to set the <code>x-amz-tagging</code> header, because the tag-set will be copied from the source object directly. The tag-set must be encoded as URL Query parameters.</p>
1358 /// <p>The default value is the empty value.</p><note>
1359 /// <p><b>Directory buckets</b> - For directory buckets in a <code>CopyObject</code> operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a <code>501 Not Implemented</code> status code. When the destination bucket is a directory bucket, you will receive a <code>501 Not Implemented</code> response in any of the following situations:</p>
1360 /// <ul>
1361 /// <li>
1362 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1363 /// <li>
1364 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a source object and set a non-empty value to <code>x-amz-tagging</code>.</p></li>
1365 /// <li>
1366 /// <p>When you don't set the <code>x-amz-tagging-directive</code> header and the source object has non-empty tags. This is because the default value of <code>x-amz-tagging-directive</code> is <code>COPY</code>.</p></li>
1367 /// </ul>
1368 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1369 /// <ul>
1370 /// <li>
1371 /// <p>When you attempt to <code>COPY</code> the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.</p></li>
1372 /// <li>
1373 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1374 /// <li>
1375 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a general purpose bucket source object that has non-empty tags and set the <code>x-amz-tagging</code> value of the directory bucket destination object to empty.</p></li>
1376 /// <li>
1377 /// <p>When you attempt to <code>REPLACE</code> the tag-set of a directory bucket source object and don't set the <code>x-amz-tagging</code> value of the directory bucket destination object. This is because the default value of <code>x-amz-tagging</code> is the empty value.</p></li>
1378 /// </ul>
1379 /// </note>
1380 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1381 self.inner.get_tagging()
1382 }
1383 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1384 /// <p>This functionality is not supported for directory buckets.</p>
1385 /// </note>
1386 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1387 self.inner = self.inner.object_lock_mode(input);
1388 self
1389 }
1390 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1391 /// <p>This functionality is not supported for directory buckets.</p>
1392 /// </note>
1393 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1394 self.inner = self.inner.set_object_lock_mode(input);
1395 self
1396 }
1397 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1398 /// <p>This functionality is not supported for directory buckets.</p>
1399 /// </note>
1400 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1401 self.inner.get_object_lock_mode()
1402 }
1403 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1404 /// <p>This functionality is not supported for directory buckets.</p>
1405 /// </note>
1406 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1407 self.inner = self.inner.object_lock_retain_until_date(input);
1408 self
1409 }
1410 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1411 /// <p>This functionality is not supported for directory buckets.</p>
1412 /// </note>
1413 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1414 self.inner = self.inner.set_object_lock_retain_until_date(input);
1415 self
1416 }
1417 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1418 /// <p>This functionality is not supported for directory buckets.</p>
1419 /// </note>
1420 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1421 self.inner.get_object_lock_retain_until_date()
1422 }
1423 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1424 /// <p>This functionality is not supported for directory buckets.</p>
1425 /// </note>
1426 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1427 self.inner = self.inner.object_lock_legal_hold_status(input);
1428 self
1429 }
1430 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1431 /// <p>This functionality is not supported for directory buckets.</p>
1432 /// </note>
1433 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1434 self.inner = self.inner.set_object_lock_legal_hold_status(input);
1435 self
1436 }
1437 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1438 /// <p>This functionality is not supported for directory buckets.</p>
1439 /// </note>
1440 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1441 self.inner.get_object_lock_legal_hold_status()
1442 }
1443 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1444 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1445 self.inner = self.inner.expected_bucket_owner(input.into());
1446 self
1447 }
1448 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1449 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1450 self.inner = self.inner.set_expected_bucket_owner(input);
1451 self
1452 }
1453 /// <p>The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1454 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1455 self.inner.get_expected_bucket_owner()
1456 }
1457 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1458 pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1459 self.inner = self.inner.expected_source_bucket_owner(input.into());
1460 self
1461 }
1462 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1463 pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1464 self.inner = self.inner.set_expected_source_bucket_owner(input);
1465 self
1466 }
1467 /// <p>The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1468 pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1469 self.inner.get_expected_source_bucket_owner()
1470 }
1471}