aws_sdk_s3/operation/copy_object/_copy_object_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CopyObjectInput {
6 /// <p>The canned access control list (ACL) to apply to the object.</p>
7 /// <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>
8 /// <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>
9 /// <ul>
10 /// <li>
11 /// <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>
12 /// <li>
13 /// <p>This functionality is not supported for directory buckets.</p></li>
14 /// <li>
15 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
16 /// </ul>
17 /// </note>
18 pub acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
19 /// <p>The name of the destination bucket.</p>
20 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
21 /// <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>
22 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
23 /// </note>
24 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
25 pub bucket: ::std::option::Option<::std::string::String>,
26 /// <p>Specifies the caching behavior along the request/reply chain.</p>
27 pub cache_control: ::std::option::Option<::std::string::String>,
28 /// <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>
29 /// <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>
30 /// <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>
31 /// </note>
32 pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
33 /// <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>
34 pub content_disposition: ::std::option::Option<::std::string::String>,
35 /// <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>
36 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
37 /// </note>
38 pub content_encoding: ::std::option::Option<::std::string::String>,
39 /// <p>The language the content is in.</p>
40 pub content_language: ::std::option::Option<::std::string::String>,
41 /// <p>A standard MIME type that describes the format of the object data.</p>
42 pub content_type: ::std::option::Option<::std::string::String>,
43 /// <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>
44 /// <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>
45 /// <ul>
46 /// <li>
47 /// <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>
48 /// <li>
49 /// <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>
50 /// :
51 /// <account-id>
52 /// :accesspoint/
53 /// <access-point-name>
54 /// /object/
55 /// <key></key>
56 /// </access-point-name>
57 /// </account-id>
58 /// </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>
59 /// <ul>
60 /// <li>
61 /// <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>
62 /// <li>
63 /// <p>Access points are not supported by directory buckets.</p></li>
64 /// </ul>
65 /// </note>
66 /// <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>
67 /// :
68 /// <account-id>
69 /// :outpost/
70 /// <outpost-id>
71 /// /object/
72 /// <key></key>
73 /// </outpost-id>
74 /// </account-id>
75 /// </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>
76 /// </ul>
77 /// <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>
78 /// <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>
79 /// <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>
80 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
81 /// </note>
82 pub copy_source: ::std::option::Option<::std::string::String>,
83 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
84 /// <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>
85 /// <ul>
86 /// <li>
87 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
88 /// <li>
89 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
90 /// </ul>
91 pub copy_source_if_match: ::std::option::Option<::std::string::String>,
92 /// <p>Copies the object if it has been modified since the specified time.</p>
93 /// <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>
94 /// <ul>
95 /// <li>
96 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
97 /// <li>
98 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
99 /// </ul>
100 pub copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
101 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
102 /// <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>
103 /// <ul>
104 /// <li>
105 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
106 /// <li>
107 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
108 /// </ul>
109 pub copy_source_if_none_match: ::std::option::Option<::std::string::String>,
110 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
111 /// <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>
112 /// <ul>
113 /// <li>
114 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
115 /// <li>
116 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
117 /// </ul>
118 pub copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
119 /// <p>The date and time at which the object is no longer cacheable.</p>
120 pub expires: ::std::option::Option<::aws_smithy_types::DateTime>,
121 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
122 /// <ul>
123 /// <li>
124 /// <p>This functionality is not supported for directory buckets.</p></li>
125 /// <li>
126 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
127 /// </ul>
128 /// </note>
129 pub grant_full_control: ::std::option::Option<::std::string::String>,
130 /// <p>Allows grantee to read the object data and its metadata.</p><note>
131 /// <ul>
132 /// <li>
133 /// <p>This functionality is not supported for directory buckets.</p></li>
134 /// <li>
135 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
136 /// </ul>
137 /// </note>
138 pub grant_read: ::std::option::Option<::std::string::String>,
139 /// <p>Allows grantee to read the object ACL.</p><note>
140 /// <ul>
141 /// <li>
142 /// <p>This functionality is not supported for directory buckets.</p></li>
143 /// <li>
144 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
145 /// </ul>
146 /// </note>
147 pub grant_read_acp: ::std::option::Option<::std::string::String>,
148 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
149 /// <ul>
150 /// <li>
151 /// <p>This functionality is not supported for directory buckets.</p></li>
152 /// <li>
153 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
154 /// </ul>
155 /// </note>
156 pub grant_write_acp: ::std::option::Option<::std::string::String>,
157 /// <p>The key of the destination object.</p>
158 pub key: ::std::option::Option<::std::string::String>,
159 /// <p>A map of metadata to store with the object in S3.</p>
160 pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
161 /// <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>
162 /// <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>
163 /// <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>
164 /// </note>
165 pub metadata_directive: ::std::option::Option<crate::types::MetadataDirective>,
166 /// <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>
167 /// <p>The default value is <code>COPY</code>.</p><note>
168 /// <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>
169 /// <ul>
170 /// <li>
171 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
172 /// <li>
173 /// <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>
174 /// <li>
175 /// <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>
176 /// </ul>
177 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
178 /// <ul>
179 /// <li>
180 /// <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>
181 /// <li>
182 /// <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>
183 /// <li>
184 /// <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>
185 /// <li>
186 /// <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>
187 /// </ul>
188 /// </note>
189 pub tagging_directive: ::std::option::Option<crate::types::TaggingDirective>,
190 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>). Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
191 /// <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 default encryption configuration that uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or 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>
192 /// <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>
193 /// <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><note>
194 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
195 /// </note>
196 pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
197 /// <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>
198 /// <ul>
199 /// <li>
200 /// <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>
201 /// <li>
202 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
203 /// </ul>
204 /// </note>
205 /// <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>
206 /// <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>
207 /// <ul>
208 /// <li>
209 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
210 /// <li>
211 /// <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>
212 /// </ul>
213 /// <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>
214 pub storage_class: ::std::option::Option<crate::types::StorageClass>,
215 /// <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>
216 /// <p>This functionality is not supported for directory buckets.</p>
217 /// </note>
218 pub website_redirect_location: ::std::option::Option<::std::string::String>,
219 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
220 /// <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>
221 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
222 /// </note>
223 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
224 /// <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>
225 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
226 /// </note>
227 pub sse_customer_key: ::std::option::Option<::std::string::String>,
228 /// <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>
229 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
230 /// </note>
231 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
232 /// <p>Specifies the KMS 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><note>
233 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
234 /// </note>
235 pub ssekms_key_id: ::std::option::Option<::std::string::String>,
236 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests.</p><note>
237 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
238 /// </note>
239 pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
240 /// <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>
241 /// <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>
242 /// <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>
243 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
244 /// </note>
245 pub bucket_key_enabled: ::std::option::Option<bool>,
246 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
247 /// <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>
248 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
249 /// </note>
250 pub copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
251 /// <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>
252 /// <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>
253 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
254 /// </note>
255 pub copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
256 /// <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>
257 /// <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>
258 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
259 /// </note>
260 pub copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
261 /// <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>
262 /// <p>This functionality is not supported for directory buckets.</p>
263 /// </note>
264 pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
265 /// <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>
266 /// <p>The default value is the empty value.</p><note>
267 /// <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>
268 /// <ul>
269 /// <li>
270 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
271 /// <li>
272 /// <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>
273 /// <li>
274 /// <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>
275 /// </ul>
276 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
277 /// <ul>
278 /// <li>
279 /// <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>
280 /// <li>
281 /// <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>
282 /// <li>
283 /// <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>
284 /// <li>
285 /// <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>
286 /// </ul>
287 /// </note>
288 pub tagging: ::std::option::Option<::std::string::String>,
289 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
290 /// <p>This functionality is not supported for directory buckets.</p>
291 /// </note>
292 pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
293 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
294 /// <p>This functionality is not supported for directory buckets.</p>
295 /// </note>
296 pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
297 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
298 /// <p>This functionality is not supported for directory buckets.</p>
299 /// </note>
300 pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
301 /// <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>
302 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
303 /// <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>
304 pub expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
305}
306impl CopyObjectInput {
307 /// <p>The canned access control list (ACL) to apply to the object.</p>
308 /// <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>
309 /// <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>
310 /// <ul>
311 /// <li>
312 /// <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>
313 /// <li>
314 /// <p>This functionality is not supported for directory buckets.</p></li>
315 /// <li>
316 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
317 /// </ul>
318 /// </note>
319 pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
320 self.acl.as_ref()
321 }
322 /// <p>The name of the destination bucket.</p>
323 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
324 /// <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>
325 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
326 /// </note>
327 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
328 pub fn bucket(&self) -> ::std::option::Option<&str> {
329 self.bucket.as_deref()
330 }
331 /// <p>Specifies the caching behavior along the request/reply chain.</p>
332 pub fn cache_control(&self) -> ::std::option::Option<&str> {
333 self.cache_control.as_deref()
334 }
335 /// <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>
336 /// <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>
337 /// <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>
338 /// </note>
339 pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
340 self.checksum_algorithm.as_ref()
341 }
342 /// <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>
343 pub fn content_disposition(&self) -> ::std::option::Option<&str> {
344 self.content_disposition.as_deref()
345 }
346 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.</p><note>
347 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
348 /// </note>
349 pub fn content_encoding(&self) -> ::std::option::Option<&str> {
350 self.content_encoding.as_deref()
351 }
352 /// <p>The language the content is in.</p>
353 pub fn content_language(&self) -> ::std::option::Option<&str> {
354 self.content_language.as_deref()
355 }
356 /// <p>A standard MIME type that describes the format of the object data.</p>
357 pub fn content_type(&self) -> ::std::option::Option<&str> {
358 self.content_type.as_deref()
359 }
360 /// <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>
361 /// <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>
362 /// <ul>
363 /// <li>
364 /// <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>
365 /// <li>
366 /// <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>
367 /// :
368 /// <account-id>
369 /// :accesspoint/
370 /// <access-point-name>
371 /// /object/
372 /// <key></key>
373 /// </access-point-name>
374 /// </account-id>
375 /// </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>
376 /// <ul>
377 /// <li>
378 /// <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>
379 /// <li>
380 /// <p>Access points are not supported by directory buckets.</p></li>
381 /// </ul>
382 /// </note>
383 /// <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>
384 /// :
385 /// <account-id>
386 /// :outpost/
387 /// <outpost-id>
388 /// /object/
389 /// <key></key>
390 /// </outpost-id>
391 /// </account-id>
392 /// </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>
393 /// </ul>
394 /// <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>
395 /// <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>
396 /// <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>
397 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
398 /// </note>
399 pub fn copy_source(&self) -> ::std::option::Option<&str> {
400 self.copy_source.as_deref()
401 }
402 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
403 /// <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>
404 /// <ul>
405 /// <li>
406 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
407 /// <li>
408 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
409 /// </ul>
410 pub fn copy_source_if_match(&self) -> ::std::option::Option<&str> {
411 self.copy_source_if_match.as_deref()
412 }
413 /// <p>Copies the object if it has been modified since the specified time.</p>
414 /// <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>
415 /// <ul>
416 /// <li>
417 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
418 /// <li>
419 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
420 /// </ul>
421 pub fn copy_source_if_modified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
422 self.copy_source_if_modified_since.as_ref()
423 }
424 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
425 /// <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>
426 /// <ul>
427 /// <li>
428 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
429 /// <li>
430 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
431 /// </ul>
432 pub fn copy_source_if_none_match(&self) -> ::std::option::Option<&str> {
433 self.copy_source_if_none_match.as_deref()
434 }
435 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
436 /// <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>
437 /// <ul>
438 /// <li>
439 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
440 /// <li>
441 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
442 /// </ul>
443 pub fn copy_source_if_unmodified_since(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
444 self.copy_source_if_unmodified_since.as_ref()
445 }
446 /// <p>The date and time at which the object is no longer cacheable.</p>
447 pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
448 self.expires.as_ref()
449 }
450 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
451 /// <ul>
452 /// <li>
453 /// <p>This functionality is not supported for directory buckets.</p></li>
454 /// <li>
455 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
456 /// </ul>
457 /// </note>
458 pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
459 self.grant_full_control.as_deref()
460 }
461 /// <p>Allows grantee to read the object data and its metadata.</p><note>
462 /// <ul>
463 /// <li>
464 /// <p>This functionality is not supported for directory buckets.</p></li>
465 /// <li>
466 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
467 /// </ul>
468 /// </note>
469 pub fn grant_read(&self) -> ::std::option::Option<&str> {
470 self.grant_read.as_deref()
471 }
472 /// <p>Allows grantee to read the object ACL.</p><note>
473 /// <ul>
474 /// <li>
475 /// <p>This functionality is not supported for directory buckets.</p></li>
476 /// <li>
477 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
478 /// </ul>
479 /// </note>
480 pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
481 self.grant_read_acp.as_deref()
482 }
483 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
484 /// <ul>
485 /// <li>
486 /// <p>This functionality is not supported for directory buckets.</p></li>
487 /// <li>
488 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
489 /// </ul>
490 /// </note>
491 pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
492 self.grant_write_acp.as_deref()
493 }
494 /// <p>The key of the destination object.</p>
495 pub fn key(&self) -> ::std::option::Option<&str> {
496 self.key.as_deref()
497 }
498 /// <p>A map of metadata to store with the object in S3.</p>
499 pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
500 self.metadata.as_ref()
501 }
502 /// <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>
503 /// <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>
504 /// <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>
505 /// </note>
506 pub fn metadata_directive(&self) -> ::std::option::Option<&crate::types::MetadataDirective> {
507 self.metadata_directive.as_ref()
508 }
509 /// <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>
510 /// <p>The default value is <code>COPY</code>.</p><note>
511 /// <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>
512 /// <ul>
513 /// <li>
514 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
515 /// <li>
516 /// <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>
517 /// <li>
518 /// <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>
519 /// </ul>
520 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
521 /// <ul>
522 /// <li>
523 /// <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>
524 /// <li>
525 /// <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>
526 /// <li>
527 /// <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>
528 /// <li>
529 /// <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>
530 /// </ul>
531 /// </note>
532 pub fn tagging_directive(&self) -> ::std::option::Option<&crate::types::TaggingDirective> {
533 self.tagging_directive.as_ref()
534 }
535 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>). Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
536 /// <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 default encryption configuration that uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or 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>
537 /// <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>
538 /// <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><note>
539 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
540 /// </note>
541 pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
542 self.server_side_encryption.as_ref()
543 }
544 /// <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>
545 /// <ul>
546 /// <li>
547 /// <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>
548 /// <li>
549 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
550 /// </ul>
551 /// </note>
552 /// <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>
553 /// <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>
554 /// <ul>
555 /// <li>
556 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
557 /// <li>
558 /// <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>
559 /// </ul>
560 /// <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>
561 pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
562 self.storage_class.as_ref()
563 }
564 /// <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>
565 /// <p>This functionality is not supported for directory buckets.</p>
566 /// </note>
567 pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
568 self.website_redirect_location.as_deref()
569 }
570 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
571 /// <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>
572 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
573 /// </note>
574 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
575 self.sse_customer_algorithm.as_deref()
576 }
577 /// <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>
578 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
579 /// </note>
580 pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
581 self.sse_customer_key.as_deref()
582 }
583 /// <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>
584 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
585 /// </note>
586 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
587 self.sse_customer_key_md5.as_deref()
588 }
589 /// <p>Specifies the KMS 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><note>
590 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
591 /// </note>
592 pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
593 self.ssekms_key_id.as_deref()
594 }
595 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests.</p><note>
596 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
597 /// </note>
598 pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
599 self.ssekms_encryption_context.as_deref()
600 }
601 /// <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>
602 /// <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>
603 /// <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>
604 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
605 /// </note>
606 pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
607 self.bucket_key_enabled
608 }
609 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
610 /// <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>
611 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
612 /// </note>
613 pub fn copy_source_sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
614 self.copy_source_sse_customer_algorithm.as_deref()
615 }
616 /// <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>
617 /// <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>
618 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
619 /// </note>
620 pub fn copy_source_sse_customer_key(&self) -> ::std::option::Option<&str> {
621 self.copy_source_sse_customer_key.as_deref()
622 }
623 /// <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>
624 /// <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>
625 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
626 /// </note>
627 pub fn copy_source_sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
628 self.copy_source_sse_customer_key_md5.as_deref()
629 }
630 /// <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>
631 /// <p>This functionality is not supported for directory buckets.</p>
632 /// </note>
633 pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
634 self.request_payer.as_ref()
635 }
636 /// <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>
637 /// <p>The default value is the empty value.</p><note>
638 /// <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>
639 /// <ul>
640 /// <li>
641 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
642 /// <li>
643 /// <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>
644 /// <li>
645 /// <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>
646 /// </ul>
647 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
648 /// <ul>
649 /// <li>
650 /// <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>
651 /// <li>
652 /// <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>
653 /// <li>
654 /// <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>
655 /// <li>
656 /// <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>
657 /// </ul>
658 /// </note>
659 pub fn tagging(&self) -> ::std::option::Option<&str> {
660 self.tagging.as_deref()
661 }
662 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
663 /// <p>This functionality is not supported for directory buckets.</p>
664 /// </note>
665 pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
666 self.object_lock_mode.as_ref()
667 }
668 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
669 /// <p>This functionality is not supported for directory buckets.</p>
670 /// </note>
671 pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
672 self.object_lock_retain_until_date.as_ref()
673 }
674 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
675 /// <p>This functionality is not supported for directory buckets.</p>
676 /// </note>
677 pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
678 self.object_lock_legal_hold_status.as_ref()
679 }
680 /// <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>
681 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
682 self.expected_bucket_owner.as_deref()
683 }
684 /// <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>
685 pub fn expected_source_bucket_owner(&self) -> ::std::option::Option<&str> {
686 self.expected_source_bucket_owner.as_deref()
687 }
688}
689impl ::std::fmt::Debug for CopyObjectInput {
690 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
691 let mut formatter = f.debug_struct("CopyObjectInput");
692 formatter.field("acl", &self.acl);
693 formatter.field("bucket", &self.bucket);
694 formatter.field("cache_control", &self.cache_control);
695 formatter.field("checksum_algorithm", &self.checksum_algorithm);
696 formatter.field("content_disposition", &self.content_disposition);
697 formatter.field("content_encoding", &self.content_encoding);
698 formatter.field("content_language", &self.content_language);
699 formatter.field("content_type", &self.content_type);
700 formatter.field("copy_source", &self.copy_source);
701 formatter.field("copy_source_if_match", &self.copy_source_if_match);
702 formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
703 formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
704 formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
705 formatter.field("expires", &self.expires);
706 formatter.field("grant_full_control", &self.grant_full_control);
707 formatter.field("grant_read", &self.grant_read);
708 formatter.field("grant_read_acp", &self.grant_read_acp);
709 formatter.field("grant_write_acp", &self.grant_write_acp);
710 formatter.field("key", &self.key);
711 formatter.field("metadata", &self.metadata);
712 formatter.field("metadata_directive", &self.metadata_directive);
713 formatter.field("tagging_directive", &self.tagging_directive);
714 formatter.field("server_side_encryption", &self.server_side_encryption);
715 formatter.field("storage_class", &self.storage_class);
716 formatter.field("website_redirect_location", &self.website_redirect_location);
717 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
718 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
719 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
720 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
721 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
722 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
723 formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
724 formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
725 formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
726 formatter.field("request_payer", &self.request_payer);
727 formatter.field("tagging", &self.tagging);
728 formatter.field("object_lock_mode", &self.object_lock_mode);
729 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
730 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
731 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
732 formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
733 formatter.finish()
734 }
735}
736impl CopyObjectInput {
737 /// Creates a new builder-style object to manufacture [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
738 pub fn builder() -> crate::operation::copy_object::builders::CopyObjectInputBuilder {
739 crate::operation::copy_object::builders::CopyObjectInputBuilder::default()
740 }
741}
742
743/// A builder for [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
744#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
745#[non_exhaustive]
746pub struct CopyObjectInputBuilder {
747 pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
748 pub(crate) bucket: ::std::option::Option<::std::string::String>,
749 pub(crate) cache_control: ::std::option::Option<::std::string::String>,
750 pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
751 pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
752 pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
753 pub(crate) content_language: ::std::option::Option<::std::string::String>,
754 pub(crate) content_type: ::std::option::Option<::std::string::String>,
755 pub(crate) copy_source: ::std::option::Option<::std::string::String>,
756 pub(crate) copy_source_if_match: ::std::option::Option<::std::string::String>,
757 pub(crate) copy_source_if_modified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
758 pub(crate) copy_source_if_none_match: ::std::option::Option<::std::string::String>,
759 pub(crate) copy_source_if_unmodified_since: ::std::option::Option<::aws_smithy_types::DateTime>,
760 pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
761 pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
762 pub(crate) grant_read: ::std::option::Option<::std::string::String>,
763 pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
764 pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
765 pub(crate) key: ::std::option::Option<::std::string::String>,
766 pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
767 pub(crate) metadata_directive: ::std::option::Option<crate::types::MetadataDirective>,
768 pub(crate) tagging_directive: ::std::option::Option<crate::types::TaggingDirective>,
769 pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
770 pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
771 pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
772 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
773 pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
774 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
775 pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
776 pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
777 pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
778 pub(crate) copy_source_sse_customer_algorithm: ::std::option::Option<::std::string::String>,
779 pub(crate) copy_source_sse_customer_key: ::std::option::Option<::std::string::String>,
780 pub(crate) copy_source_sse_customer_key_md5: ::std::option::Option<::std::string::String>,
781 pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
782 pub(crate) tagging: ::std::option::Option<::std::string::String>,
783 pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
784 pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
785 pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
786 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
787 pub(crate) expected_source_bucket_owner: ::std::option::Option<::std::string::String>,
788}
789impl CopyObjectInputBuilder {
790 /// <p>The canned access control list (ACL) to apply to the object.</p>
791 /// <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>
792 /// <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>
793 /// <ul>
794 /// <li>
795 /// <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>
796 /// <li>
797 /// <p>This functionality is not supported for directory buckets.</p></li>
798 /// <li>
799 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
800 /// </ul>
801 /// </note>
802 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
803 self.acl = ::std::option::Option::Some(input);
804 self
805 }
806 /// <p>The canned access control list (ACL) to apply to the object.</p>
807 /// <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>
808 /// <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>
809 /// <ul>
810 /// <li>
811 /// <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>
812 /// <li>
813 /// <p>This functionality is not supported for directory buckets.</p></li>
814 /// <li>
815 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
816 /// </ul>
817 /// </note>
818 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
819 self.acl = input;
820 self
821 }
822 /// <p>The canned access control list (ACL) to apply to the object.</p>
823 /// <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>
824 /// <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>
825 /// <ul>
826 /// <li>
827 /// <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>
828 /// <li>
829 /// <p>This functionality is not supported for directory buckets.</p></li>
830 /// <li>
831 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
832 /// </ul>
833 /// </note>
834 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
835 &self.acl
836 }
837 /// <p>The name of the destination bucket.</p>
838 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
839 /// <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>
840 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
841 /// </note>
842 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
843 /// This field is required.
844 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
845 self.bucket = ::std::option::Option::Some(input.into());
846 self
847 }
848 /// <p>The name of the destination bucket.</p>
849 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
850 /// <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>
851 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
852 /// </note>
853 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
854 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
855 self.bucket = input;
856 self
857 }
858 /// <p>The name of the destination bucket.</p>
859 /// <p><b>Directory buckets</b> - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format <code> <i>Bucket_name</i>.s3express-<i>az_id</i>.<i>region</i>.amazonaws.com</code>. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format <code> <i>bucket_base_name</i>--<i>az-id</i>--x-s3</code> (for example, <code> <i>DOC-EXAMPLE-BUCKET</i>--<i>usw2-az1</i>--x-s3</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html">Directory bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
860 /// <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>
861 /// <p>Access points and Object Lambda access points are not supported by directory buckets.</p>
862 /// </note>
863 /// <p><b>S3 on Outposts</b> - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
864 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
865 &self.bucket
866 }
867 /// <p>Specifies the caching behavior along the request/reply chain.</p>
868 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
869 self.cache_control = ::std::option::Option::Some(input.into());
870 self
871 }
872 /// <p>Specifies the caching behavior along the request/reply chain.</p>
873 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
874 self.cache_control = input;
875 self
876 }
877 /// <p>Specifies the caching behavior along the request/reply chain.</p>
878 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
879 &self.cache_control
880 }
881 /// <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>
882 /// <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>
883 /// <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>
884 /// </note>
885 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
886 self.checksum_algorithm = ::std::option::Option::Some(input);
887 self
888 }
889 /// <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>
890 /// <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>
891 /// <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>
892 /// </note>
893 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
894 self.checksum_algorithm = input;
895 self
896 }
897 /// <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>
898 /// <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>
899 /// <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>
900 /// </note>
901 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
902 &self.checksum_algorithm
903 }
904 /// <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>
905 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
906 self.content_disposition = ::std::option::Option::Some(input.into());
907 self
908 }
909 /// <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>
910 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
911 self.content_disposition = input;
912 self
913 }
914 /// <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>
915 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
916 &self.content_disposition
917 }
918 /// <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>
919 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
920 /// </note>
921 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
922 self.content_encoding = ::std::option::Option::Some(input.into());
923 self
924 }
925 /// <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>
926 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
927 /// </note>
928 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
929 self.content_encoding = input;
930 self
931 }
932 /// <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>
933 /// <p>For directory buckets, only the <code>aws-chunked</code> value is supported in this header field.</p>
934 /// </note>
935 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
936 &self.content_encoding
937 }
938 /// <p>The language the content is in.</p>
939 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
940 self.content_language = ::std::option::Option::Some(input.into());
941 self
942 }
943 /// <p>The language the content is in.</p>
944 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
945 self.content_language = input;
946 self
947 }
948 /// <p>The language the content is in.</p>
949 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
950 &self.content_language
951 }
952 /// <p>A standard MIME type that describes the format of the object data.</p>
953 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
954 self.content_type = ::std::option::Option::Some(input.into());
955 self
956 }
957 /// <p>A standard MIME type that describes the format of the object data.</p>
958 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
959 self.content_type = input;
960 self
961 }
962 /// <p>A standard MIME type that describes the format of the object data.</p>
963 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
964 &self.content_type
965 }
966 /// <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>
967 /// <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>
968 /// <ul>
969 /// <li>
970 /// <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>
971 /// <li>
972 /// <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>
973 /// :
974 /// <account-id>
975 /// :accesspoint/
976 /// <access-point-name>
977 /// /object/
978 /// <key></key>
979 /// </access-point-name>
980 /// </account-id>
981 /// </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>
982 /// <ul>
983 /// <li>
984 /// <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>
985 /// <li>
986 /// <p>Access points are not supported by directory buckets.</p></li>
987 /// </ul>
988 /// </note>
989 /// <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>
990 /// :
991 /// <account-id>
992 /// :outpost/
993 /// <outpost-id>
994 /// /object/
995 /// <key></key>
996 /// </outpost-id>
997 /// </account-id>
998 /// </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>
999 /// </ul>
1000 /// <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>
1001 /// <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>
1002 /// <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>
1003 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1004 /// </note>
1005 /// This field is required.
1006 pub fn copy_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1007 self.copy_source = ::std::option::Option::Some(input.into());
1008 self
1009 }
1010 /// <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>
1011 /// <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>
1012 /// <ul>
1013 /// <li>
1014 /// <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>
1015 /// <li>
1016 /// <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>
1017 /// :
1018 /// <account-id>
1019 /// :accesspoint/
1020 /// <access-point-name>
1021 /// /object/
1022 /// <key></key>
1023 /// </access-point-name>
1024 /// </account-id>
1025 /// </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>
1026 /// <ul>
1027 /// <li>
1028 /// <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>
1029 /// <li>
1030 /// <p>Access points are not supported by directory buckets.</p></li>
1031 /// </ul>
1032 /// </note>
1033 /// <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>
1034 /// :
1035 /// <account-id>
1036 /// :outpost/
1037 /// <outpost-id>
1038 /// /object/
1039 /// <key></key>
1040 /// </outpost-id>
1041 /// </account-id>
1042 /// </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>
1043 /// </ul>
1044 /// <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>
1045 /// <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>
1046 /// <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>
1047 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1048 /// </note>
1049 pub fn set_copy_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1050 self.copy_source = input;
1051 self
1052 }
1053 /// <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>
1054 /// <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>
1055 /// <ul>
1056 /// <li>
1057 /// <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>
1058 /// <li>
1059 /// <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>
1060 /// :
1061 /// <account-id>
1062 /// :accesspoint/
1063 /// <access-point-name>
1064 /// /object/
1065 /// <key></key>
1066 /// </access-point-name>
1067 /// </account-id>
1068 /// </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>
1069 /// <ul>
1070 /// <li>
1071 /// <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>
1072 /// <li>
1073 /// <p>Access points are not supported by directory buckets.</p></li>
1074 /// </ul>
1075 /// </note>
1076 /// <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>
1077 /// :
1078 /// <account-id>
1079 /// :outpost/
1080 /// <outpost-id>
1081 /// /object/
1082 /// <key></key>
1083 /// </outpost-id>
1084 /// </account-id>
1085 /// </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>
1086 /// </ul>
1087 /// <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>
1088 /// <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>
1089 /// <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>
1090 /// <p><b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p>
1091 /// </note>
1092 pub fn get_copy_source(&self) -> &::std::option::Option<::std::string::String> {
1093 &self.copy_source
1094 }
1095 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1096 /// <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>
1097 /// <ul>
1098 /// <li>
1099 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1100 /// <li>
1101 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1102 /// </ul>
1103 pub fn copy_source_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1104 self.copy_source_if_match = ::std::option::Option::Some(input.into());
1105 self
1106 }
1107 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1108 /// <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>
1109 /// <ul>
1110 /// <li>
1111 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1112 /// <li>
1113 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1114 /// </ul>
1115 pub fn set_copy_source_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1116 self.copy_source_if_match = input;
1117 self
1118 }
1119 /// <p>Copies the object if its entity tag (ETag) matches the specified tag.</p>
1120 /// <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>
1121 /// <ul>
1122 /// <li>
1123 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1124 /// <li>
1125 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1126 /// </ul>
1127 pub fn get_copy_source_if_match(&self) -> &::std::option::Option<::std::string::String> {
1128 &self.copy_source_if_match
1129 }
1130 /// <p>Copies the object if it has been modified since the specified time.</p>
1131 /// <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>
1132 /// <ul>
1133 /// <li>
1134 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1135 /// <li>
1136 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1137 /// </ul>
1138 pub fn copy_source_if_modified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1139 self.copy_source_if_modified_since = ::std::option::Option::Some(input);
1140 self
1141 }
1142 /// <p>Copies the object if it has been modified since the specified time.</p>
1143 /// <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>
1144 /// <ul>
1145 /// <li>
1146 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1147 /// <li>
1148 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1149 /// </ul>
1150 pub fn set_copy_source_if_modified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1151 self.copy_source_if_modified_since = input;
1152 self
1153 }
1154 /// <p>Copies the object if it has been modified since the specified time.</p>
1155 /// <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>
1156 /// <ul>
1157 /// <li>
1158 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1159 /// <li>
1160 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1161 /// </ul>
1162 pub fn get_copy_source_if_modified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1163 &self.copy_source_if_modified_since
1164 }
1165 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1166 /// <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>
1167 /// <ul>
1168 /// <li>
1169 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1170 /// <li>
1171 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1172 /// </ul>
1173 pub fn copy_source_if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1174 self.copy_source_if_none_match = ::std::option::Option::Some(input.into());
1175 self
1176 }
1177 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1178 /// <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>
1179 /// <ul>
1180 /// <li>
1181 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1182 /// <li>
1183 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1184 /// </ul>
1185 pub fn set_copy_source_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1186 self.copy_source_if_none_match = input;
1187 self
1188 }
1189 /// <p>Copies the object if its entity tag (ETag) is different than the specified ETag.</p>
1190 /// <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>
1191 /// <ul>
1192 /// <li>
1193 /// <p><code>x-amz-copy-source-if-none-match</code> condition evaluates to false</p></li>
1194 /// <li>
1195 /// <p><code>x-amz-copy-source-if-modified-since</code> condition evaluates to true</p></li>
1196 /// </ul>
1197 pub fn get_copy_source_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
1198 &self.copy_source_if_none_match
1199 }
1200 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1201 /// <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>
1202 /// <ul>
1203 /// <li>
1204 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1205 /// <li>
1206 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1207 /// </ul>
1208 pub fn copy_source_if_unmodified_since(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1209 self.copy_source_if_unmodified_since = ::std::option::Option::Some(input);
1210 self
1211 }
1212 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1213 /// <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>
1214 /// <ul>
1215 /// <li>
1216 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1217 /// <li>
1218 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1219 /// </ul>
1220 pub fn set_copy_source_if_unmodified_since(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1221 self.copy_source_if_unmodified_since = input;
1222 self
1223 }
1224 /// <p>Copies the object if it hasn't been modified since the specified time.</p>
1225 /// <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>
1226 /// <ul>
1227 /// <li>
1228 /// <p><code>x-amz-copy-source-if-match</code> condition evaluates to true</p></li>
1229 /// <li>
1230 /// <p><code>x-amz-copy-source-if-unmodified-since</code> condition evaluates to false</p></li>
1231 /// </ul>
1232 pub fn get_copy_source_if_unmodified_since(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1233 &self.copy_source_if_unmodified_since
1234 }
1235 /// <p>The date and time at which the object is no longer cacheable.</p>
1236 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1237 self.expires = ::std::option::Option::Some(input);
1238 self
1239 }
1240 /// <p>The date and time at which the object is no longer cacheable.</p>
1241 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1242 self.expires = input;
1243 self
1244 }
1245 /// <p>The date and time at which the object is no longer cacheable.</p>
1246 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1247 &self.expires
1248 }
1249 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1250 /// <ul>
1251 /// <li>
1252 /// <p>This functionality is not supported for directory buckets.</p></li>
1253 /// <li>
1254 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1255 /// </ul>
1256 /// </note>
1257 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1258 self.grant_full_control = ::std::option::Option::Some(input.into());
1259 self
1260 }
1261 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1262 /// <ul>
1263 /// <li>
1264 /// <p>This functionality is not supported for directory buckets.</p></li>
1265 /// <li>
1266 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1267 /// </ul>
1268 /// </note>
1269 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1270 self.grant_full_control = input;
1271 self
1272 }
1273 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1274 /// <ul>
1275 /// <li>
1276 /// <p>This functionality is not supported for directory buckets.</p></li>
1277 /// <li>
1278 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1279 /// </ul>
1280 /// </note>
1281 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
1282 &self.grant_full_control
1283 }
1284 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1285 /// <ul>
1286 /// <li>
1287 /// <p>This functionality is not supported for directory buckets.</p></li>
1288 /// <li>
1289 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1290 /// </ul>
1291 /// </note>
1292 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1293 self.grant_read = ::std::option::Option::Some(input.into());
1294 self
1295 }
1296 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1297 /// <ul>
1298 /// <li>
1299 /// <p>This functionality is not supported for directory buckets.</p></li>
1300 /// <li>
1301 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1302 /// </ul>
1303 /// </note>
1304 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1305 self.grant_read = input;
1306 self
1307 }
1308 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1309 /// <ul>
1310 /// <li>
1311 /// <p>This functionality is not supported for directory buckets.</p></li>
1312 /// <li>
1313 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1314 /// </ul>
1315 /// </note>
1316 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
1317 &self.grant_read
1318 }
1319 /// <p>Allows grantee to read the object ACL.</p><note>
1320 /// <ul>
1321 /// <li>
1322 /// <p>This functionality is not supported for directory buckets.</p></li>
1323 /// <li>
1324 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1325 /// </ul>
1326 /// </note>
1327 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1328 self.grant_read_acp = ::std::option::Option::Some(input.into());
1329 self
1330 }
1331 /// <p>Allows grantee to read the object ACL.</p><note>
1332 /// <ul>
1333 /// <li>
1334 /// <p>This functionality is not supported for directory buckets.</p></li>
1335 /// <li>
1336 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1337 /// </ul>
1338 /// </note>
1339 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1340 self.grant_read_acp = input;
1341 self
1342 }
1343 /// <p>Allows grantee to read the object ACL.</p><note>
1344 /// <ul>
1345 /// <li>
1346 /// <p>This functionality is not supported for directory buckets.</p></li>
1347 /// <li>
1348 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1349 /// </ul>
1350 /// </note>
1351 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
1352 &self.grant_read_acp
1353 }
1354 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1355 /// <ul>
1356 /// <li>
1357 /// <p>This functionality is not supported for directory buckets.</p></li>
1358 /// <li>
1359 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1360 /// </ul>
1361 /// </note>
1362 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1363 self.grant_write_acp = ::std::option::Option::Some(input.into());
1364 self
1365 }
1366 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1367 /// <ul>
1368 /// <li>
1369 /// <p>This functionality is not supported for directory buckets.</p></li>
1370 /// <li>
1371 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1372 /// </ul>
1373 /// </note>
1374 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1375 self.grant_write_acp = input;
1376 self
1377 }
1378 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1379 /// <ul>
1380 /// <li>
1381 /// <p>This functionality is not supported for directory buckets.</p></li>
1382 /// <li>
1383 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1384 /// </ul>
1385 /// </note>
1386 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
1387 &self.grant_write_acp
1388 }
1389 /// <p>The key of the destination object.</p>
1390 /// This field is required.
1391 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1392 self.key = ::std::option::Option::Some(input.into());
1393 self
1394 }
1395 /// <p>The key of the destination object.</p>
1396 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1397 self.key = input;
1398 self
1399 }
1400 /// <p>The key of the destination object.</p>
1401 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
1402 &self.key
1403 }
1404 /// Adds a key-value pair to `metadata`.
1405 ///
1406 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
1407 ///
1408 /// <p>A map of metadata to store with the object in S3.</p>
1409 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
1410 let mut hash_map = self.metadata.unwrap_or_default();
1411 hash_map.insert(k.into(), v.into());
1412 self.metadata = ::std::option::Option::Some(hash_map);
1413 self
1414 }
1415 /// <p>A map of metadata to store with the object in S3.</p>
1416 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
1417 self.metadata = input;
1418 self
1419 }
1420 /// <p>A map of metadata to store with the object in S3.</p>
1421 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
1422 &self.metadata
1423 }
1424 /// <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>
1425 /// <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>
1426 /// <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>
1427 /// </note>
1428 pub fn metadata_directive(mut self, input: crate::types::MetadataDirective) -> Self {
1429 self.metadata_directive = ::std::option::Option::Some(input);
1430 self
1431 }
1432 /// <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>
1433 /// <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>
1434 /// <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>
1435 /// </note>
1436 pub fn set_metadata_directive(mut self, input: ::std::option::Option<crate::types::MetadataDirective>) -> Self {
1437 self.metadata_directive = input;
1438 self
1439 }
1440 /// <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>
1441 /// <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>
1442 /// <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>
1443 /// </note>
1444 pub fn get_metadata_directive(&self) -> &::std::option::Option<crate::types::MetadataDirective> {
1445 &self.metadata_directive
1446 }
1447 /// <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>
1448 /// <p>The default value is <code>COPY</code>.</p><note>
1449 /// <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>
1450 /// <ul>
1451 /// <li>
1452 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1453 /// <li>
1454 /// <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>
1455 /// <li>
1456 /// <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>
1457 /// </ul>
1458 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1459 /// <ul>
1460 /// <li>
1461 /// <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>
1462 /// <li>
1463 /// <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>
1464 /// <li>
1465 /// <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>
1466 /// <li>
1467 /// <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>
1468 /// </ul>
1469 /// </note>
1470 pub fn tagging_directive(mut self, input: crate::types::TaggingDirective) -> Self {
1471 self.tagging_directive = ::std::option::Option::Some(input);
1472 self
1473 }
1474 /// <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>
1475 /// <p>The default value is <code>COPY</code>.</p><note>
1476 /// <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>
1477 /// <ul>
1478 /// <li>
1479 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1480 /// <li>
1481 /// <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>
1482 /// <li>
1483 /// <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>
1484 /// </ul>
1485 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1486 /// <ul>
1487 /// <li>
1488 /// <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>
1489 /// <li>
1490 /// <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>
1491 /// <li>
1492 /// <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>
1493 /// <li>
1494 /// <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>
1495 /// </ul>
1496 /// </note>
1497 pub fn set_tagging_directive(mut self, input: ::std::option::Option<crate::types::TaggingDirective>) -> Self {
1498 self.tagging_directive = input;
1499 self
1500 }
1501 /// <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>
1502 /// <p>The default value is <code>COPY</code>.</p><note>
1503 /// <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>
1504 /// <ul>
1505 /// <li>
1506 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1507 /// <li>
1508 /// <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>
1509 /// <li>
1510 /// <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>
1511 /// </ul>
1512 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1513 /// <ul>
1514 /// <li>
1515 /// <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>
1516 /// <li>
1517 /// <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>
1518 /// <li>
1519 /// <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>
1520 /// <li>
1521 /// <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>
1522 /// </ul>
1523 /// </note>
1524 pub fn get_tagging_directive(&self) -> &::std::option::Option<crate::types::TaggingDirective> {
1525 &self.tagging_directive
1526 }
1527 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>). Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
1528 /// <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 default encryption configuration that uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or 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>
1529 /// <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>
1530 /// <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><note>
1531 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
1532 /// </note>
1533 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
1534 self.server_side_encryption = ::std::option::Option::Some(input);
1535 self
1536 }
1537 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>). Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
1538 /// <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 default encryption configuration that uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or 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>
1539 /// <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>
1540 /// <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><note>
1541 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
1542 /// </note>
1543 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
1544 self.server_side_encryption = input;
1545 self
1546 }
1547 /// <p>The server-side encryption algorithm used when storing this object in Amazon S3 (for example, <code>AES256</code>, <code>aws:kms</code>, <code>aws:kms:dsse</code>). Unrecognized or unsupported values won’t write a destination object and will receive a <code>400 Bad Request</code> response.</p>
1548 /// <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 default encryption configuration that uses server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or 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>
1549 /// <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>
1550 /// <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><note>
1551 /// <p>For directory buckets, only server-side encryption with Amazon S3 managed keys (SSE-S3) (<code>AES256</code>) is supported.</p>
1552 /// </note>
1553 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1554 &self.server_side_encryption
1555 }
1556 /// <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>
1557 /// <ul>
1558 /// <li>
1559 /// <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>
1560 /// <li>
1561 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1562 /// </ul>
1563 /// </note>
1564 /// <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>
1565 /// <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>
1566 /// <ul>
1567 /// <li>
1568 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1569 /// <li>
1570 /// <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>
1571 /// </ul>
1572 /// <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>
1573 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1574 self.storage_class = ::std::option::Option::Some(input);
1575 self
1576 }
1577 /// <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>
1578 /// <ul>
1579 /// <li>
1580 /// <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>
1581 /// <li>
1582 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1583 /// </ul>
1584 /// </note>
1585 /// <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>
1586 /// <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>
1587 /// <ul>
1588 /// <li>
1589 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1590 /// <li>
1591 /// <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>
1592 /// </ul>
1593 /// <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>
1594 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1595 self.storage_class = input;
1596 self
1597 }
1598 /// <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>
1599 /// <ul>
1600 /// <li>
1601 /// <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>
1602 /// <li>
1603 /// <p><b>Amazon S3 on Outposts </b> - S3 on Outposts only uses the <code>OUTPOSTS</code> Storage Class.</p></li>
1604 /// </ul>
1605 /// </note>
1606 /// <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>
1607 /// <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>
1608 /// <ul>
1609 /// <li>
1610 /// <p>The storage class of the source object is <code>GLACIER</code> or <code>DEEP_ARCHIVE</code>.</p></li>
1611 /// <li>
1612 /// <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>
1613 /// </ul>
1614 /// <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>
1615 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1616 &self.storage_class
1617 }
1618 /// <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>
1619 /// <p>This functionality is not supported for directory buckets.</p>
1620 /// </note>
1621 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1622 self.website_redirect_location = ::std::option::Option::Some(input.into());
1623 self
1624 }
1625 /// <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>
1626 /// <p>This functionality is not supported for directory buckets.</p>
1627 /// </note>
1628 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1629 self.website_redirect_location = input;
1630 self
1631 }
1632 /// <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>
1633 /// <p>This functionality is not supported for directory buckets.</p>
1634 /// </note>
1635 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1636 &self.website_redirect_location
1637 }
1638 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1639 /// <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>
1640 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1641 /// </note>
1642 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1643 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
1644 self
1645 }
1646 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1647 /// <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>
1648 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1649 /// </note>
1650 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1651 self.sse_customer_algorithm = input;
1652 self
1653 }
1654 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p>
1655 /// <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>
1656 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1657 /// </note>
1658 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1659 &self.sse_customer_algorithm
1660 }
1661 /// <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>
1662 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1663 /// </note>
1664 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1665 self.sse_customer_key = ::std::option::Option::Some(input.into());
1666 self
1667 }
1668 /// <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>
1669 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1670 /// </note>
1671 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1672 self.sse_customer_key = input;
1673 self
1674 }
1675 /// <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>
1676 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1677 /// </note>
1678 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1679 &self.sse_customer_key
1680 }
1681 /// <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>
1682 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1683 /// </note>
1684 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1685 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1686 self
1687 }
1688 /// <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>
1689 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1690 /// </note>
1691 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1692 self.sse_customer_key_md5 = input;
1693 self
1694 }
1695 /// <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>
1696 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1697 /// </note>
1698 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1699 &self.sse_customer_key_md5
1700 }
1701 /// <p>Specifies the KMS 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><note>
1702 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1703 /// </note>
1704 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1705 self.ssekms_key_id = ::std::option::Option::Some(input.into());
1706 self
1707 }
1708 /// <p>Specifies the KMS 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><note>
1709 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1710 /// </note>
1711 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1712 self.ssekms_key_id = input;
1713 self
1714 }
1715 /// <p>Specifies the KMS 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><note>
1716 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1717 /// </note>
1718 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1719 &self.ssekms_key_id
1720 }
1721 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests.</p><note>
1722 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1723 /// </note>
1724 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1725 self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
1726 self
1727 }
1728 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests.</p><note>
1729 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1730 /// </note>
1731 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1732 self.ssekms_encryption_context = input;
1733 self
1734 }
1735 /// <p>Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. This value must be explicitly added to specify encryption context for <code>CopyObject</code> requests.</p><note>
1736 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1737 /// </note>
1738 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1739 &self.ssekms_encryption_context
1740 }
1741 /// <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>
1742 /// <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>
1743 /// <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>
1744 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1745 /// </note>
1746 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1747 self.bucket_key_enabled = ::std::option::Option::Some(input);
1748 self
1749 }
1750 /// <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>
1751 /// <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>
1752 /// <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>
1753 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1754 /// </note>
1755 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1756 self.bucket_key_enabled = input;
1757 self
1758 }
1759 /// <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>
1760 /// <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>
1761 /// <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>
1762 /// <p>This functionality is not supported when the destination bucket is a directory bucket.</p>
1763 /// </note>
1764 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1765 &self.bucket_key_enabled
1766 }
1767 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1768 /// <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>
1769 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1770 /// </note>
1771 pub fn copy_source_sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1772 self.copy_source_sse_customer_algorithm = ::std::option::Option::Some(input.into());
1773 self
1774 }
1775 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1776 /// <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>
1777 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1778 /// </note>
1779 pub fn set_copy_source_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1780 self.copy_source_sse_customer_algorithm = input;
1781 self
1782 }
1783 /// <p>Specifies the algorithm to use when decrypting the source object (for example, <code>AES256</code>).</p>
1784 /// <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>
1785 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1786 /// </note>
1787 pub fn get_copy_source_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1788 &self.copy_source_sse_customer_algorithm
1789 }
1790 /// <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>
1791 /// <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>
1792 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1793 /// </note>
1794 pub fn copy_source_sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1795 self.copy_source_sse_customer_key = ::std::option::Option::Some(input.into());
1796 self
1797 }
1798 /// <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>
1799 /// <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>
1800 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1801 /// </note>
1802 pub fn set_copy_source_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1803 self.copy_source_sse_customer_key = input;
1804 self
1805 }
1806 /// <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>
1807 /// <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>
1808 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1809 /// </note>
1810 pub fn get_copy_source_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1811 &self.copy_source_sse_customer_key
1812 }
1813 /// <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>
1814 /// <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>
1815 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1816 /// </note>
1817 pub fn copy_source_sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1818 self.copy_source_sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1819 self
1820 }
1821 /// <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>
1822 /// <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>
1823 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1824 /// </note>
1825 pub fn set_copy_source_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1826 self.copy_source_sse_customer_key_md5 = input;
1827 self
1828 }
1829 /// <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>
1830 /// <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>
1831 /// <p>This functionality is not supported when the source object is in a directory bucket.</p>
1832 /// </note>
1833 pub fn get_copy_source_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1834 &self.copy_source_sse_customer_key_md5
1835 }
1836 /// <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>
1837 /// <p>This functionality is not supported for directory buckets.</p>
1838 /// </note>
1839 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1840 self.request_payer = ::std::option::Option::Some(input);
1841 self
1842 }
1843 /// <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>
1844 /// <p>This functionality is not supported for directory buckets.</p>
1845 /// </note>
1846 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1847 self.request_payer = input;
1848 self
1849 }
1850 /// <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>
1851 /// <p>This functionality is not supported for directory buckets.</p>
1852 /// </note>
1853 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1854 &self.request_payer
1855 }
1856 /// <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>
1857 /// <p>The default value is the empty value.</p><note>
1858 /// <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>
1859 /// <ul>
1860 /// <li>
1861 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1862 /// <li>
1863 /// <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>
1864 /// <li>
1865 /// <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>
1866 /// </ul>
1867 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1868 /// <ul>
1869 /// <li>
1870 /// <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>
1871 /// <li>
1872 /// <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>
1873 /// <li>
1874 /// <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>
1875 /// <li>
1876 /// <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>
1877 /// </ul>
1878 /// </note>
1879 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1880 self.tagging = ::std::option::Option::Some(input.into());
1881 self
1882 }
1883 /// <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>
1884 /// <p>The default value is the empty value.</p><note>
1885 /// <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>
1886 /// <ul>
1887 /// <li>
1888 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1889 /// <li>
1890 /// <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>
1891 /// <li>
1892 /// <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>
1893 /// </ul>
1894 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1895 /// <ul>
1896 /// <li>
1897 /// <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>
1898 /// <li>
1899 /// <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>
1900 /// <li>
1901 /// <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>
1902 /// <li>
1903 /// <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>
1904 /// </ul>
1905 /// </note>
1906 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1907 self.tagging = input;
1908 self
1909 }
1910 /// <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>
1911 /// <p>The default value is the empty value.</p><note>
1912 /// <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>
1913 /// <ul>
1914 /// <li>
1915 /// <p>When you attempt to <code>COPY</code> the tag-set from an S3 source object that has non-empty tags.</p></li>
1916 /// <li>
1917 /// <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>
1918 /// <li>
1919 /// <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>
1920 /// </ul>
1921 /// <p>Because only the empty tag-set is supported for directory buckets in a <code>CopyObject</code> operation, the following situations are allowed:</p>
1922 /// <ul>
1923 /// <li>
1924 /// <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>
1925 /// <li>
1926 /// <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>
1927 /// <li>
1928 /// <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>
1929 /// <li>
1930 /// <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>
1931 /// </ul>
1932 /// </note>
1933 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1934 &self.tagging
1935 }
1936 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1937 /// <p>This functionality is not supported for directory buckets.</p>
1938 /// </note>
1939 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1940 self.object_lock_mode = ::std::option::Option::Some(input);
1941 self
1942 }
1943 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1944 /// <p>This functionality is not supported for directory buckets.</p>
1945 /// </note>
1946 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1947 self.object_lock_mode = input;
1948 self
1949 }
1950 /// <p>The Object Lock mode that you want to apply to the object copy.</p><note>
1951 /// <p>This functionality is not supported for directory buckets.</p>
1952 /// </note>
1953 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1954 &self.object_lock_mode
1955 }
1956 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1957 /// <p>This functionality is not supported for directory buckets.</p>
1958 /// </note>
1959 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1960 self.object_lock_retain_until_date = ::std::option::Option::Some(input);
1961 self
1962 }
1963 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1964 /// <p>This functionality is not supported for directory buckets.</p>
1965 /// </note>
1966 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1967 self.object_lock_retain_until_date = input;
1968 self
1969 }
1970 /// <p>The date and time when you want the Object Lock of the object copy to expire.</p><note>
1971 /// <p>This functionality is not supported for directory buckets.</p>
1972 /// </note>
1973 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1974 &self.object_lock_retain_until_date
1975 }
1976 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1977 /// <p>This functionality is not supported for directory buckets.</p>
1978 /// </note>
1979 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1980 self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
1981 self
1982 }
1983 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1984 /// <p>This functionality is not supported for directory buckets.</p>
1985 /// </note>
1986 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1987 self.object_lock_legal_hold_status = input;
1988 self
1989 }
1990 /// <p>Specifies whether you want to apply a legal hold to the object copy.</p><note>
1991 /// <p>This functionality is not supported for directory buckets.</p>
1992 /// </note>
1993 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1994 &self.object_lock_legal_hold_status
1995 }
1996 /// <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>
1997 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1998 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
1999 self
2000 }
2001 /// <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>
2002 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2003 self.expected_bucket_owner = input;
2004 self
2005 }
2006 /// <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>
2007 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
2008 &self.expected_bucket_owner
2009 }
2010 /// <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>
2011 pub fn expected_source_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
2012 self.expected_source_bucket_owner = ::std::option::Option::Some(input.into());
2013 self
2014 }
2015 /// <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>
2016 pub fn set_expected_source_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
2017 self.expected_source_bucket_owner = input;
2018 self
2019 }
2020 /// <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>
2021 pub fn get_expected_source_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
2022 &self.expected_source_bucket_owner
2023 }
2024 /// Consumes the builder and constructs a [`CopyObjectInput`](crate::operation::copy_object::CopyObjectInput).
2025 pub fn build(self) -> ::std::result::Result<crate::operation::copy_object::CopyObjectInput, ::aws_smithy_types::error::operation::BuildError> {
2026 ::std::result::Result::Ok(crate::operation::copy_object::CopyObjectInput {
2027 acl: self.acl,
2028 bucket: self.bucket,
2029 cache_control: self.cache_control,
2030 checksum_algorithm: self.checksum_algorithm,
2031 content_disposition: self.content_disposition,
2032 content_encoding: self.content_encoding,
2033 content_language: self.content_language,
2034 content_type: self.content_type,
2035 copy_source: self.copy_source,
2036 copy_source_if_match: self.copy_source_if_match,
2037 copy_source_if_modified_since: self.copy_source_if_modified_since,
2038 copy_source_if_none_match: self.copy_source_if_none_match,
2039 copy_source_if_unmodified_since: self.copy_source_if_unmodified_since,
2040 expires: self.expires,
2041 grant_full_control: self.grant_full_control,
2042 grant_read: self.grant_read,
2043 grant_read_acp: self.grant_read_acp,
2044 grant_write_acp: self.grant_write_acp,
2045 key: self.key,
2046 metadata: self.metadata,
2047 metadata_directive: self.metadata_directive,
2048 tagging_directive: self.tagging_directive,
2049 server_side_encryption: self.server_side_encryption,
2050 storage_class: self.storage_class,
2051 website_redirect_location: self.website_redirect_location,
2052 sse_customer_algorithm: self.sse_customer_algorithm,
2053 sse_customer_key: self.sse_customer_key,
2054 sse_customer_key_md5: self.sse_customer_key_md5,
2055 ssekms_key_id: self.ssekms_key_id,
2056 ssekms_encryption_context: self.ssekms_encryption_context,
2057 bucket_key_enabled: self.bucket_key_enabled,
2058 copy_source_sse_customer_algorithm: self.copy_source_sse_customer_algorithm,
2059 copy_source_sse_customer_key: self.copy_source_sse_customer_key,
2060 copy_source_sse_customer_key_md5: self.copy_source_sse_customer_key_md5,
2061 request_payer: self.request_payer,
2062 tagging: self.tagging,
2063 object_lock_mode: self.object_lock_mode,
2064 object_lock_retain_until_date: self.object_lock_retain_until_date,
2065 object_lock_legal_hold_status: self.object_lock_legal_hold_status,
2066 expected_bucket_owner: self.expected_bucket_owner,
2067 expected_source_bucket_owner: self.expected_source_bucket_owner,
2068 })
2069 }
2070}
2071impl ::std::fmt::Debug for CopyObjectInputBuilder {
2072 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2073 let mut formatter = f.debug_struct("CopyObjectInputBuilder");
2074 formatter.field("acl", &self.acl);
2075 formatter.field("bucket", &self.bucket);
2076 formatter.field("cache_control", &self.cache_control);
2077 formatter.field("checksum_algorithm", &self.checksum_algorithm);
2078 formatter.field("content_disposition", &self.content_disposition);
2079 formatter.field("content_encoding", &self.content_encoding);
2080 formatter.field("content_language", &self.content_language);
2081 formatter.field("content_type", &self.content_type);
2082 formatter.field("copy_source", &self.copy_source);
2083 formatter.field("copy_source_if_match", &self.copy_source_if_match);
2084 formatter.field("copy_source_if_modified_since", &self.copy_source_if_modified_since);
2085 formatter.field("copy_source_if_none_match", &self.copy_source_if_none_match);
2086 formatter.field("copy_source_if_unmodified_since", &self.copy_source_if_unmodified_since);
2087 formatter.field("expires", &self.expires);
2088 formatter.field("grant_full_control", &self.grant_full_control);
2089 formatter.field("grant_read", &self.grant_read);
2090 formatter.field("grant_read_acp", &self.grant_read_acp);
2091 formatter.field("grant_write_acp", &self.grant_write_acp);
2092 formatter.field("key", &self.key);
2093 formatter.field("metadata", &self.metadata);
2094 formatter.field("metadata_directive", &self.metadata_directive);
2095 formatter.field("tagging_directive", &self.tagging_directive);
2096 formatter.field("server_side_encryption", &self.server_side_encryption);
2097 formatter.field("storage_class", &self.storage_class);
2098 formatter.field("website_redirect_location", &self.website_redirect_location);
2099 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
2100 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
2101 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
2102 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
2103 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
2104 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
2105 formatter.field("copy_source_sse_customer_algorithm", &self.copy_source_sse_customer_algorithm);
2106 formatter.field("copy_source_sse_customer_key", &"*** Sensitive Data Redacted ***");
2107 formatter.field("copy_source_sse_customer_key_md5", &self.copy_source_sse_customer_key_md5);
2108 formatter.field("request_payer", &self.request_payer);
2109 formatter.field("tagging", &self.tagging);
2110 formatter.field("object_lock_mode", &self.object_lock_mode);
2111 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
2112 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
2113 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
2114 formatter.field("expected_source_bucket_owner", &self.expected_source_bucket_owner);
2115 formatter.finish()
2116 }
2117}