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