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