aws_sdk_s3/operation/put_object/_put_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]
4pub struct PutObjectInput {
5 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
6 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
7 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
8 /// <ul>
9 /// <li>
10 /// <p>This functionality is not supported for directory buckets.</p></li>
11 /// <li>
12 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
13 /// </ul>
14 /// </note>
15 pub acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
16 /// <p>Object data.</p>
17 pub body: ::aws_smithy_types::byte_stream::ByteStream,
18 /// <p>The bucket name to which the PUT action was initiated.</p>
19 /// <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>
20 /// <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>
21 /// <p>Object Lambda access points are not supported by directory buckets.</p>
22 /// </note>
23 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. 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>Amazon S3 User Guide</i>.</p>
24 pub bucket: ::std::option::Option<::std::string::String>,
25 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
26 pub cache_control: ::std::option::Option<::std::string::String>,
27 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
28 pub content_disposition: ::std::option::Option<::std::string::String>,
29 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
30 pub content_encoding: ::std::option::Option<::std::string::String>,
31 /// <p>The language the content is in.</p>
32 pub content_language: ::std::option::Option<::std::string::String>,
33 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
34 pub content_length: ::std::option::Option<i64>,
35 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
36 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
37 /// </note> <note>
38 /// <p>This functionality is not supported for directory buckets.</p>
39 /// </note>
40 pub content_md5: ::std::option::Option<::std::string::String>,
41 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
42 pub content_type: ::std::option::Option<::std::string::String>,
43 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
44 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
45 /// <ul>
46 /// <li>
47 /// <p><code>CRC32</code></p></li>
48 /// <li>
49 /// <p><code>CRC32C</code></p></li>
50 /// <li>
51 /// <p><code>CRC64NVME</code></p></li>
52 /// <li>
53 /// <p><code>MD5</code></p></li>
54 /// <li>
55 /// <p><code>SHA1</code></p></li>
56 /// <li>
57 /// <p><code>SHA256</code></p></li>
58 /// <li>
59 /// <p><code>SHA512</code></p></li>
60 /// <li>
61 /// <p><code>XXHASH3</code></p></li>
62 /// <li>
63 /// <p><code>XXHASH64</code></p></li>
64 /// <li>
65 /// <p><code>XXHASH128</code></p></li>
66 /// </ul>
67 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
68 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
69 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
70 /// </note>
71 /// <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>
72 pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
73 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
74 pub checksum_crc32: ::std::option::Option<::std::string::String>,
75 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
76 pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
77 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
78 pub checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
79 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
80 pub checksum_sha1: ::std::option::Option<::std::string::String>,
81 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
82 pub checksum_sha256: ::std::option::Option<::std::string::String>,
83 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit <code>SHA512</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
84 pub checksum_sha512: ::std::option::Option<::std::string::String>,
85 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>MD5</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
86 pub checksum_md5: ::std::option::Option<::std::string::String>,
87 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH64</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
88 pub checksum_xxhash64: ::std::option::Option<::std::string::String>,
89 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH3</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
90 pub checksum_xxhash3: ::std::option::Option<::std::string::String>,
91 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>XXHASH128</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
92 pub checksum_xxhash128: ::std::option::Option<::std::string::String>,
93 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
94 pub expires: ::std::option::Option<::aws_smithy_types::DateTime>,
95 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
96 /// <p>If a conflicting 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>
97 /// <p>Expects the ETag value as a string.</p>
98 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
99 pub if_match: ::std::option::Option<::std::string::String>,
100 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
101 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
102 /// <p>Expects the '*' (asterisk) character.</p>
103 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
104 pub if_none_match: ::std::option::Option<::std::string::String>,
105 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
106 /// <ul>
107 /// <li>
108 /// <p>This functionality is not supported for directory buckets.</p></li>
109 /// <li>
110 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
111 /// </ul>
112 /// </note>
113 pub grant_full_control: ::std::option::Option<::std::string::String>,
114 /// <p>Allows grantee to read the object data and its metadata.</p><note>
115 /// <ul>
116 /// <li>
117 /// <p>This functionality is not supported for directory buckets.</p></li>
118 /// <li>
119 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
120 /// </ul>
121 /// </note>
122 pub grant_read: ::std::option::Option<::std::string::String>,
123 /// <p>Allows grantee to read the object ACL.</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_read_acp: ::std::option::Option<::std::string::String>,
132 /// <p>Allows grantee to write the ACL for the applicable object.</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_write_acp: ::std::option::Option<::std::string::String>,
141 /// <p>Object key for which the PUT action was initiated.</p>
142 pub key: ::std::option::Option<::std::string::String>,
143 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
144 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
145 /// </note>
146 pub write_offset_bytes: ::std::option::Option<i64>,
147 /// <p>A map of metadata to store with the object in S3.</p>
148 pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
149 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
150 /// <ul>
151 /// <li>
152 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
153 /// <li>
154 /// <p><b>Directory buckets </b> - 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>
155 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
156 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
157 /// </note></li>
158 /// <li>
159 /// <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>
160 /// </ul>
161 pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
162 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
163 /// <ul>
164 /// <li>
165 /// <p>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.</p></li>
166 /// <li>
167 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
168 /// </ul>
169 /// </note>
170 pub storage_class: ::std::option::Option<crate::types::StorageClass>,
171 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
172 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
173 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
174 /// <p>In the following example, the request header sets the object redirect to another website:</p>
175 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
176 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
177 /// <p>This functionality is not supported for directory buckets.</p>
178 /// </note>
179 pub website_redirect_location: ::std::option::Option<::std::string::String>,
180 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
181 /// <p>This functionality is not supported for directory buckets.</p>
182 /// </note>
183 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
184 /// <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>
185 /// <p>This functionality is not supported for directory buckets.</p>
186 /// </note>
187 pub sse_customer_key: ::std::option::Option<::std::string::String>,
188 /// <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>
189 /// <p>This functionality is not supported for directory buckets.</p>
190 /// </note>
191 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
192 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
193 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
194 /// <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>
195 pub ssekms_key_id: ::std::option::Option<::std::string::String>,
196 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
197 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your 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>
198 /// <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>
199 pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
200 /// <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).</p>
201 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
202 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. 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>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
203 pub bucket_key_enabled: ::std::option::Option<bool>,
204 /// <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 the corresponding charges. 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>
205 /// <p>This functionality is not supported for directory buckets.</p>
206 /// </note>
207 pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
208 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
209 /// <p>This functionality is not supported for directory buckets.</p>
210 /// </note>
211 pub tagging: ::std::option::Option<::std::string::String>,
212 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
213 /// <p>This functionality is not supported for directory buckets.</p>
214 /// </note>
215 pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
216 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
217 /// <p>This functionality is not supported for directory buckets.</p>
218 /// </note>
219 pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
220 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
221 /// <p>This functionality is not supported for directory buckets.</p>
222 /// </note>
223 pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
224 /// <p>Specifies the event hold status to apply to this object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
225 /// <p>This functionality is not supported for directory buckets.</p>
226 /// </note>
227 pub object_lock_event_hold: ::std::option::Option<crate::types::ObjectLockEventHold>,
228 /// <p>Specifies the event hold duration in days to apply to this object. You cannot specify a duration in both days and years.</p><note>
229 /// <p>This functionality is not supported for directory buckets.</p>
230 /// </note>
231 pub object_lock_event_hold_duration_days: ::std::option::Option<i32>,
232 /// <p>Specifies the event hold duration in years to apply to this object. You cannot specify a duration in both days and years.</p><note>
233 /// <p>This functionality is not supported for directory buckets.</p>
234 /// </note>
235 pub object_lock_event_hold_duration_years: ::std::option::Option<i32>,
236 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
237 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
238}
239impl PutObjectInput {
240 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
241 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
242 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
243 /// <ul>
244 /// <li>
245 /// <p>This functionality is not supported for directory buckets.</p></li>
246 /// <li>
247 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
248 /// </ul>
249 /// </note>
250 pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
251 self.acl.as_ref()
252 }
253 /// <p>Object data.</p>
254 pub fn body(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
255 &self.body
256 }
257 /// <p>The bucket name to which the PUT action was initiated.</p>
258 /// <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>
259 /// <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>
260 /// <p>Object Lambda access points are not supported by directory buckets.</p>
261 /// </note>
262 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. 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>Amazon S3 User Guide</i>.</p>
263 pub fn bucket(&self) -> ::std::option::Option<&str> {
264 self.bucket.as_deref()
265 }
266 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
267 pub fn cache_control(&self) -> ::std::option::Option<&str> {
268 self.cache_control.as_deref()
269 }
270 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
271 pub fn content_disposition(&self) -> ::std::option::Option<&str> {
272 self.content_disposition.as_deref()
273 }
274 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
275 pub fn content_encoding(&self) -> ::std::option::Option<&str> {
276 self.content_encoding.as_deref()
277 }
278 /// <p>The language the content is in.</p>
279 pub fn content_language(&self) -> ::std::option::Option<&str> {
280 self.content_language.as_deref()
281 }
282 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
283 pub fn content_length(&self) -> ::std::option::Option<i64> {
284 self.content_length
285 }
286 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
287 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
288 /// </note> <note>
289 /// <p>This functionality is not supported for directory buckets.</p>
290 /// </note>
291 pub fn content_md5(&self) -> ::std::option::Option<&str> {
292 self.content_md5.as_deref()
293 }
294 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
295 pub fn content_type(&self) -> ::std::option::Option<&str> {
296 self.content_type.as_deref()
297 }
298 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
299 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
300 /// <ul>
301 /// <li>
302 /// <p><code>CRC32</code></p></li>
303 /// <li>
304 /// <p><code>CRC32C</code></p></li>
305 /// <li>
306 /// <p><code>CRC64NVME</code></p></li>
307 /// <li>
308 /// <p><code>MD5</code></p></li>
309 /// <li>
310 /// <p><code>SHA1</code></p></li>
311 /// <li>
312 /// <p><code>SHA256</code></p></li>
313 /// <li>
314 /// <p><code>SHA512</code></p></li>
315 /// <li>
316 /// <p><code>XXHASH3</code></p></li>
317 /// <li>
318 /// <p><code>XXHASH64</code></p></li>
319 /// <li>
320 /// <p><code>XXHASH128</code></p></li>
321 /// </ul>
322 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
323 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
324 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
325 /// </note>
326 /// <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>
327 pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
328 self.checksum_algorithm.as_ref()
329 }
330 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
331 pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
332 self.checksum_crc32.as_deref()
333 }
334 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
335 pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
336 self.checksum_crc32_c.as_deref()
337 }
338 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
339 pub fn checksum_crc64_nvme(&self) -> ::std::option::Option<&str> {
340 self.checksum_crc64_nvme.as_deref()
341 }
342 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
343 pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
344 self.checksum_sha1.as_deref()
345 }
346 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
347 pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
348 self.checksum_sha256.as_deref()
349 }
350 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit <code>SHA512</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
351 pub fn checksum_sha512(&self) -> ::std::option::Option<&str> {
352 self.checksum_sha512.as_deref()
353 }
354 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>MD5</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
355 pub fn checksum_md5(&self) -> ::std::option::Option<&str> {
356 self.checksum_md5.as_deref()
357 }
358 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH64</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
359 pub fn checksum_xxhash64(&self) -> ::std::option::Option<&str> {
360 self.checksum_xxhash64.as_deref()
361 }
362 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH3</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
363 pub fn checksum_xxhash3(&self) -> ::std::option::Option<&str> {
364 self.checksum_xxhash3.as_deref()
365 }
366 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>XXHASH128</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
367 pub fn checksum_xxhash128(&self) -> ::std::option::Option<&str> {
368 self.checksum_xxhash128.as_deref()
369 }
370 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
371 pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
372 self.expires.as_ref()
373 }
374 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
375 /// <p>If a conflicting 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>
376 /// <p>Expects the ETag value as a string.</p>
377 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
378 pub fn if_match(&self) -> ::std::option::Option<&str> {
379 self.if_match.as_deref()
380 }
381 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
382 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
383 /// <p>Expects the '*' (asterisk) character.</p>
384 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
385 pub fn if_none_match(&self) -> ::std::option::Option<&str> {
386 self.if_none_match.as_deref()
387 }
388 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
389 /// <ul>
390 /// <li>
391 /// <p>This functionality is not supported for directory buckets.</p></li>
392 /// <li>
393 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
394 /// </ul>
395 /// </note>
396 pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
397 self.grant_full_control.as_deref()
398 }
399 /// <p>Allows grantee to read the object data and its metadata.</p><note>
400 /// <ul>
401 /// <li>
402 /// <p>This functionality is not supported for directory buckets.</p></li>
403 /// <li>
404 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
405 /// </ul>
406 /// </note>
407 pub fn grant_read(&self) -> ::std::option::Option<&str> {
408 self.grant_read.as_deref()
409 }
410 /// <p>Allows grantee to read the object ACL.</p><note>
411 /// <ul>
412 /// <li>
413 /// <p>This functionality is not supported for directory buckets.</p></li>
414 /// <li>
415 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
416 /// </ul>
417 /// </note>
418 pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
419 self.grant_read_acp.as_deref()
420 }
421 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
422 /// <ul>
423 /// <li>
424 /// <p>This functionality is not supported for directory buckets.</p></li>
425 /// <li>
426 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
427 /// </ul>
428 /// </note>
429 pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
430 self.grant_write_acp.as_deref()
431 }
432 /// <p>Object key for which the PUT action was initiated.</p>
433 pub fn key(&self) -> ::std::option::Option<&str> {
434 self.key.as_deref()
435 }
436 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
437 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
438 /// </note>
439 pub fn write_offset_bytes(&self) -> ::std::option::Option<i64> {
440 self.write_offset_bytes
441 }
442 /// <p>A map of metadata to store with the object in S3.</p>
443 pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
444 self.metadata.as_ref()
445 }
446 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
447 /// <ul>
448 /// <li>
449 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
450 /// <li>
451 /// <p><b>Directory buckets </b> - 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>
452 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
453 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
454 /// </note></li>
455 /// <li>
456 /// <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>
457 /// </ul>
458 pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
459 self.server_side_encryption.as_ref()
460 }
461 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
462 /// <ul>
463 /// <li>
464 /// <p>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.</p></li>
465 /// <li>
466 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
467 /// </ul>
468 /// </note>
469 pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
470 self.storage_class.as_ref()
471 }
472 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
473 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
474 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
475 /// <p>In the following example, the request header sets the object redirect to another website:</p>
476 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
477 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
478 /// <p>This functionality is not supported for directory buckets.</p>
479 /// </note>
480 pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
481 self.website_redirect_location.as_deref()
482 }
483 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
484 /// <p>This functionality is not supported for directory buckets.</p>
485 /// </note>
486 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
487 self.sse_customer_algorithm.as_deref()
488 }
489 /// <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>
490 /// <p>This functionality is not supported for directory buckets.</p>
491 /// </note>
492 pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
493 self.sse_customer_key.as_deref()
494 }
495 /// <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>
496 /// <p>This functionality is not supported for directory buckets.</p>
497 /// </note>
498 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
499 self.sse_customer_key_md5.as_deref()
500 }
501 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
502 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
503 /// <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>
504 pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
505 self.ssekms_key_id.as_deref()
506 }
507 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
508 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your 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>
509 /// <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>
510 pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
511 self.ssekms_encryption_context.as_deref()
512 }
513 /// <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).</p>
514 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
515 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. 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>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
516 pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
517 self.bucket_key_enabled
518 }
519 /// <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 the corresponding charges. 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>
520 /// <p>This functionality is not supported for directory buckets.</p>
521 /// </note>
522 pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
523 self.request_payer.as_ref()
524 }
525 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
526 /// <p>This functionality is not supported for directory buckets.</p>
527 /// </note>
528 pub fn tagging(&self) -> ::std::option::Option<&str> {
529 self.tagging.as_deref()
530 }
531 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
532 /// <p>This functionality is not supported for directory buckets.</p>
533 /// </note>
534 pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
535 self.object_lock_mode.as_ref()
536 }
537 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
538 /// <p>This functionality is not supported for directory buckets.</p>
539 /// </note>
540 pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
541 self.object_lock_retain_until_date.as_ref()
542 }
543 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
544 /// <p>This functionality is not supported for directory buckets.</p>
545 /// </note>
546 pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
547 self.object_lock_legal_hold_status.as_ref()
548 }
549 /// <p>Specifies the event hold status to apply to this object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
550 /// <p>This functionality is not supported for directory buckets.</p>
551 /// </note>
552 pub fn object_lock_event_hold(&self) -> ::std::option::Option<&crate::types::ObjectLockEventHold> {
553 self.object_lock_event_hold.as_ref()
554 }
555 /// <p>Specifies the event hold duration in days to apply to this object. You cannot specify a duration in both days and years.</p><note>
556 /// <p>This functionality is not supported for directory buckets.</p>
557 /// </note>
558 pub fn object_lock_event_hold_duration_days(&self) -> ::std::option::Option<i32> {
559 self.object_lock_event_hold_duration_days
560 }
561 /// <p>Specifies the event hold duration in years to apply to this object. You cannot specify a duration in both days and years.</p><note>
562 /// <p>This functionality is not supported for directory buckets.</p>
563 /// </note>
564 pub fn object_lock_event_hold_duration_years(&self) -> ::std::option::Option<i32> {
565 self.object_lock_event_hold_duration_years
566 }
567 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
568 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
569 self.expected_bucket_owner.as_deref()
570 }
571}
572impl ::std::fmt::Debug for PutObjectInput {
573 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
574 let mut formatter = f.debug_struct("PutObjectInput");
575 formatter.field("acl", &self.acl);
576 formatter.field("body", &self.body);
577 formatter.field("bucket", &self.bucket);
578 formatter.field("cache_control", &self.cache_control);
579 formatter.field("content_disposition", &self.content_disposition);
580 formatter.field("content_encoding", &self.content_encoding);
581 formatter.field("content_language", &self.content_language);
582 formatter.field("content_length", &self.content_length);
583 formatter.field("content_md5", &self.content_md5);
584 formatter.field("content_type", &self.content_type);
585 formatter.field("checksum_algorithm", &self.checksum_algorithm);
586 formatter.field("checksum_crc32", &self.checksum_crc32);
587 formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
588 formatter.field("checksum_crc64_nvme", &self.checksum_crc64_nvme);
589 formatter.field("checksum_sha1", &self.checksum_sha1);
590 formatter.field("checksum_sha256", &self.checksum_sha256);
591 formatter.field("checksum_sha512", &self.checksum_sha512);
592 formatter.field("checksum_md5", &self.checksum_md5);
593 formatter.field("checksum_xxhash64", &self.checksum_xxhash64);
594 formatter.field("checksum_xxhash3", &self.checksum_xxhash3);
595 formatter.field("checksum_xxhash128", &self.checksum_xxhash128);
596 formatter.field("expires", &self.expires);
597 formatter.field("if_match", &self.if_match);
598 formatter.field("if_none_match", &self.if_none_match);
599 formatter.field("grant_full_control", &self.grant_full_control);
600 formatter.field("grant_read", &self.grant_read);
601 formatter.field("grant_read_acp", &self.grant_read_acp);
602 formatter.field("grant_write_acp", &self.grant_write_acp);
603 formatter.field("key", &self.key);
604 formatter.field("write_offset_bytes", &self.write_offset_bytes);
605 formatter.field("metadata", &self.metadata);
606 formatter.field("server_side_encryption", &self.server_side_encryption);
607 formatter.field("storage_class", &self.storage_class);
608 formatter.field("website_redirect_location", &self.website_redirect_location);
609 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
610 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
611 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
612 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
613 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
614 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
615 formatter.field("request_payer", &self.request_payer);
616 formatter.field("tagging", &self.tagging);
617 formatter.field("object_lock_mode", &self.object_lock_mode);
618 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
619 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
620 formatter.field("object_lock_event_hold", &self.object_lock_event_hold);
621 formatter.field("object_lock_event_hold_duration_days", &self.object_lock_event_hold_duration_days);
622 formatter.field("object_lock_event_hold_duration_years", &self.object_lock_event_hold_duration_years);
623 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
624 formatter.finish()
625 }
626}
627impl PutObjectInput {
628 /// Creates a new builder-style object to manufacture [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
629 pub fn builder() -> crate::operation::put_object::builders::PutObjectInputBuilder {
630 crate::operation::put_object::builders::PutObjectInputBuilder::default()
631 }
632}
633
634/// A builder for [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
635#[derive(::std::default::Default)]
636#[non_exhaustive]
637pub struct PutObjectInputBuilder {
638 pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
639 pub(crate) body: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
640 pub(crate) bucket: ::std::option::Option<::std::string::String>,
641 pub(crate) cache_control: ::std::option::Option<::std::string::String>,
642 pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
643 pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
644 pub(crate) content_language: ::std::option::Option<::std::string::String>,
645 pub(crate) content_length: ::std::option::Option<i64>,
646 pub(crate) content_md5: ::std::option::Option<::std::string::String>,
647 pub(crate) content_type: ::std::option::Option<::std::string::String>,
648 pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
649 pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
650 pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
651 pub(crate) checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
652 pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
653 pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
654 pub(crate) checksum_sha512: ::std::option::Option<::std::string::String>,
655 pub(crate) checksum_md5: ::std::option::Option<::std::string::String>,
656 pub(crate) checksum_xxhash64: ::std::option::Option<::std::string::String>,
657 pub(crate) checksum_xxhash3: ::std::option::Option<::std::string::String>,
658 pub(crate) checksum_xxhash128: ::std::option::Option<::std::string::String>,
659 pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
660 pub(crate) if_match: ::std::option::Option<::std::string::String>,
661 pub(crate) if_none_match: ::std::option::Option<::std::string::String>,
662 pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
663 pub(crate) grant_read: ::std::option::Option<::std::string::String>,
664 pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
665 pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
666 pub(crate) key: ::std::option::Option<::std::string::String>,
667 pub(crate) write_offset_bytes: ::std::option::Option<i64>,
668 pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
669 pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
670 pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
671 pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
672 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
673 pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
674 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
675 pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
676 pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
677 pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
678 pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
679 pub(crate) tagging: ::std::option::Option<::std::string::String>,
680 pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
681 pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
682 pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
683 pub(crate) object_lock_event_hold: ::std::option::Option<crate::types::ObjectLockEventHold>,
684 pub(crate) object_lock_event_hold_duration_days: ::std::option::Option<i32>,
685 pub(crate) object_lock_event_hold_duration_years: ::std::option::Option<i32>,
686 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
687}
688impl PutObjectInputBuilder {
689 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
690 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
691 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
692 /// <ul>
693 /// <li>
694 /// <p>This functionality is not supported for directory buckets.</p></li>
695 /// <li>
696 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
697 /// </ul>
698 /// </note>
699 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
700 self.acl = ::std::option::Option::Some(input);
701 self
702 }
703 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
704 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
705 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
706 /// <ul>
707 /// <li>
708 /// <p>This functionality is not supported for directory buckets.</p></li>
709 /// <li>
710 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
711 /// </ul>
712 /// </note>
713 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
714 self.acl = input;
715 self
716 }
717 /// <p>The canned ACL to apply to the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a> in the <i>Amazon S3 User Guide</i>.</p>
718 /// <p>When adding a new object, you can use headers to grant ACL-based permissions to individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are then added to the ACL on the object. By default, all objects are private. Only the owner has full access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html">Managing ACLs Using the REST API</a> in the <i>Amazon S3 User Guide</i>.</p>
719 /// <p>If the bucket that you're uploading objects to uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that use this setting only accept PUT requests that don't specify an ACL or PUT requests that specify bucket owner full control ACLs, such as the <code>bucket-owner-full-control</code> canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a <code>400</code> error with the error code <code>AccessControlListNotSupported</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html"> Controlling ownership of objects and disabling ACLs</a> in the <i>Amazon S3 User Guide</i>.</p><note>
720 /// <ul>
721 /// <li>
722 /// <p>This functionality is not supported for directory buckets.</p></li>
723 /// <li>
724 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
725 /// </ul>
726 /// </note>
727 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
728 &self.acl
729 }
730 /// <p>Object data.</p>
731 pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
732 self.body = ::std::option::Option::Some(input);
733 self
734 }
735 /// <p>Object data.</p>
736 pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
737 self.body = input;
738 self
739 }
740 /// <p>Object data.</p>
741 pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
742 &self.body
743 }
744 /// <p>The bucket name to which the PUT action was initiated.</p>
745 /// <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>
746 /// <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>
747 /// <p>Object Lambda access points are not supported by directory buckets.</p>
748 /// </note>
749 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. 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>Amazon S3 User Guide</i>.</p>
750 /// This field is required.
751 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
752 self.bucket = ::std::option::Option::Some(input.into());
753 self
754 }
755 /// <p>The bucket name to which the PUT action was initiated.</p>
756 /// <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>
757 /// <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>
758 /// <p>Object Lambda access points are not supported by directory buckets.</p>
759 /// </note>
760 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. 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>Amazon S3 User Guide</i>.</p>
761 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
762 self.bucket = input;
763 self
764 }
765 /// <p>The bucket name to which the PUT action was initiated.</p>
766 /// <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>
767 /// <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>
768 /// <p>Object Lambda access points are not supported by directory buckets.</p>
769 /// </note>
770 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. 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>Amazon S3 User Guide</i>.</p>
771 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
772 &self.bucket
773 }
774 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
775 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
776 self.cache_control = ::std::option::Option::Some(input.into());
777 self
778 }
779 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
780 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
781 self.cache_control = input;
782 self
783 }
784 /// <p>Can be used to specify caching behavior along the request/reply chain. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9</a>.</p>
785 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
786 &self.cache_control
787 }
788 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
789 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
790 self.content_disposition = ::std::option::Option::Some(input.into());
791 self
792 }
793 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
794 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
795 self.content_disposition = input;
796 self
797 }
798 /// <p>Specifies presentational information for the object. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc6266#section-4">https://www.rfc-editor.org/rfc/rfc6266#section-4</a>.</p>
799 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
800 &self.content_disposition
801 }
802 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
803 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
804 self.content_encoding = ::std::option::Option::Some(input.into());
805 self
806 }
807 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
808 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
809 self.content_encoding = input;
810 self
811 }
812 /// <p>Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding">https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding</a>.</p>
813 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
814 &self.content_encoding
815 }
816 /// <p>The language the content is in.</p>
817 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
818 self.content_language = ::std::option::Option::Some(input.into());
819 self
820 }
821 /// <p>The language the content is in.</p>
822 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
823 self.content_language = input;
824 self
825 }
826 /// <p>The language the content is in.</p>
827 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
828 &self.content_language
829 }
830 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
831 pub fn content_length(mut self, input: i64) -> Self {
832 self.content_length = ::std::option::Option::Some(input);
833 self
834 }
835 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
836 pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
837 self.content_length = input;
838 self
839 }
840 /// <p>Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length</a>.</p>
841 pub fn get_content_length(&self) -> &::std::option::Option<i64> {
842 &self.content_length
843 }
844 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
845 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
846 /// </note> <note>
847 /// <p>This functionality is not supported for directory buckets.</p>
848 /// </note>
849 pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
850 self.content_md5 = ::std::option::Option::Some(input.into());
851 self
852 }
853 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
854 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
855 /// </note> <note>
856 /// <p>This functionality is not supported for directory buckets.</p>
857 /// </note>
858 pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
859 self.content_md5 = input;
860 self
861 }
862 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html">REST Authentication</a>.</p><note>
863 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
864 /// </note> <note>
865 /// <p>This functionality is not supported for directory buckets.</p>
866 /// </note>
867 pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
868 &self.content_md5
869 }
870 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
871 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
872 self.content_type = ::std::option::Option::Some(input.into());
873 self
874 }
875 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
876 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
877 self.content_type = input;
878 self
879 }
880 /// <p>A standard MIME type describing the format of the contents. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type">https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type</a>.</p>
881 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
882 &self.content_type
883 }
884 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
885 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
886 /// <ul>
887 /// <li>
888 /// <p><code>CRC32</code></p></li>
889 /// <li>
890 /// <p><code>CRC32C</code></p></li>
891 /// <li>
892 /// <p><code>CRC64NVME</code></p></li>
893 /// <li>
894 /// <p><code>MD5</code></p></li>
895 /// <li>
896 /// <p><code>SHA1</code></p></li>
897 /// <li>
898 /// <p><code>SHA256</code></p></li>
899 /// <li>
900 /// <p><code>SHA512</code></p></li>
901 /// <li>
902 /// <p><code>XXHASH3</code></p></li>
903 /// <li>
904 /// <p><code>XXHASH64</code></p></li>
905 /// <li>
906 /// <p><code>XXHASH128</code></p></li>
907 /// </ul>
908 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
909 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
910 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
911 /// </note>
912 /// <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>
913 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
914 self.checksum_algorithm = ::std::option::Option::Some(input);
915 self
916 }
917 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
918 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
919 /// <ul>
920 /// <li>
921 /// <p><code>CRC32</code></p></li>
922 /// <li>
923 /// <p><code>CRC32C</code></p></li>
924 /// <li>
925 /// <p><code>CRC64NVME</code></p></li>
926 /// <li>
927 /// <p><code>MD5</code></p></li>
928 /// <li>
929 /// <p><code>SHA1</code></p></li>
930 /// <li>
931 /// <p><code>SHA256</code></p></li>
932 /// <li>
933 /// <p><code>SHA512</code></p></li>
934 /// <li>
935 /// <p><code>XXHASH3</code></p></li>
936 /// <li>
937 /// <p><code>XXHASH64</code></p></li>
938 /// <li>
939 /// <p><code>XXHASH128</code></p></li>
940 /// </ul>
941 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
942 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
943 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
944 /// </note>
945 /// <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>
946 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
947 self.checksum_algorithm = input;
948 self
949 }
950 /// <p>Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any additional functionality if you don't use the SDK. When you send this header, there must be a corresponding <code>x-amz-checksum-<i>algorithm</i> </code> or <code>x-amz-trailer</code> header sent. Otherwise, Amazon S3 fails the request with the HTTP status code <code>400 Bad Request</code>.</p>
951 /// <p>For the <code>x-amz-checksum-<i>algorithm</i> </code> header, replace <code> <i>algorithm</i> </code> with the supported algorithm from the following list:</p>
952 /// <ul>
953 /// <li>
954 /// <p><code>CRC32</code></p></li>
955 /// <li>
956 /// <p><code>CRC32C</code></p></li>
957 /// <li>
958 /// <p><code>CRC64NVME</code></p></li>
959 /// <li>
960 /// <p><code>MD5</code></p></li>
961 /// <li>
962 /// <p><code>SHA1</code></p></li>
963 /// <li>
964 /// <p><code>SHA256</code></p></li>
965 /// <li>
966 /// <p><code>SHA512</code></p></li>
967 /// <li>
968 /// <p><code>XXHASH3</code></p></li>
969 /// <li>
970 /// <p><code>XXHASH64</code></p></li>
971 /// <li>
972 /// <p><code>XXHASH128</code></p></li>
973 /// </ul>
974 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
975 /// <p>If the individual checksum value you provide through <code>x-amz-checksum-<i>algorithm</i> </code> doesn't match the checksum algorithm you set through <code>x-amz-sdk-checksum-algorithm</code>, Amazon S3 fails the request with a <code>BadDigest</code> error.</p><note>
976 /// <p>The <code>Content-MD5</code> or <code>x-amz-sdk-checksum-algorithm</code> header is required for any request to upload an object with a retention period configured using Amazon S3 Object Lock. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object">Uploading objects to an Object Lock enabled bucket </a> in the <i>Amazon S3 User Guide</i>.</p>
977 /// </note>
978 /// <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>
979 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
980 &self.checksum_algorithm
981 }
982 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
983 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
984 self.checksum_crc32 = ::std::option::Option::Some(input.into());
985 self
986 }
987 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
988 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
989 self.checksum_crc32 = input;
990 self
991 }
992 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
993 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
994 &self.checksum_crc32
995 }
996 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
997 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
998 self.checksum_crc32_c = ::std::option::Option::Some(input.into());
999 self
1000 }
1001 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1002 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1003 self.checksum_crc32_c = input;
1004 self
1005 }
1006 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 32-bit <code>CRC32C</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1007 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
1008 &self.checksum_crc32_c
1009 }
1010 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1011 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1012 self.checksum_crc64_nvme = ::std::option::Option::Some(input.into());
1013 self
1014 }
1015 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1016 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1017 self.checksum_crc64_nvme = input;
1018 self
1019 }
1020 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>CRC64NVME</code> checksum of the object. The <code>CRC64NVME</code> checksum is always a full object checksum. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1021 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
1022 &self.checksum_crc64_nvme
1023 }
1024 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1025 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1026 self.checksum_sha1 = ::std::option::Option::Some(input.into());
1027 self
1028 }
1029 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1030 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1031 self.checksum_sha1 = input;
1032 self
1033 }
1034 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 160-bit <code>SHA1</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1035 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
1036 &self.checksum_sha1
1037 }
1038 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1039 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1040 self.checksum_sha256 = ::std::option::Option::Some(input.into());
1041 self
1042 }
1043 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1044 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1045 self.checksum_sha256 = input;
1046 self
1047 }
1048 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 256-bit <code>SHA256</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity</a> in the <i>Amazon S3 User Guide</i>.</p>
1049 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
1050 &self.checksum_sha256
1051 }
1052 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit <code>SHA512</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1053 pub fn checksum_sha512(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1054 self.checksum_sha512 = ::std::option::Option::Some(input.into());
1055 self
1056 }
1057 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit <code>SHA512</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1058 pub fn set_checksum_sha512(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1059 self.checksum_sha512 = input;
1060 self
1061 }
1062 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 512-bit <code>SHA512</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1063 pub fn get_checksum_sha512(&self) -> &::std::option::Option<::std::string::String> {
1064 &self.checksum_sha512
1065 }
1066 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>MD5</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1067 pub fn checksum_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1068 self.checksum_md5 = ::std::option::Option::Some(input.into());
1069 self
1070 }
1071 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>MD5</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1072 pub fn set_checksum_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1073 self.checksum_md5 = input;
1074 self
1075 }
1076 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>MD5</code> digest of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1077 pub fn get_checksum_md5(&self) -> &::std::option::Option<::std::string::String> {
1078 &self.checksum_md5
1079 }
1080 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH64</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1081 pub fn checksum_xxhash64(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1082 self.checksum_xxhash64 = ::std::option::Option::Some(input.into());
1083 self
1084 }
1085 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH64</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1086 pub fn set_checksum_xxhash64(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1087 self.checksum_xxhash64 = input;
1088 self
1089 }
1090 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH64</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1091 pub fn get_checksum_xxhash64(&self) -> &::std::option::Option<::std::string::String> {
1092 &self.checksum_xxhash64
1093 }
1094 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH3</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1095 pub fn checksum_xxhash3(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1096 self.checksum_xxhash3 = ::std::option::Option::Some(input.into());
1097 self
1098 }
1099 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH3</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1100 pub fn set_checksum_xxhash3(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1101 self.checksum_xxhash3 = input;
1102 self
1103 }
1104 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 64-bit <code>XXHASH3</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1105 pub fn get_checksum_xxhash3(&self) -> &::std::option::Option<::std::string::String> {
1106 &self.checksum_xxhash3
1107 }
1108 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>XXHASH128</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1109 pub fn checksum_xxhash128(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1110 self.checksum_xxhash128 = ::std::option::Option::Some(input.into());
1111 self
1112 }
1113 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>XXHASH128</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1114 pub fn set_checksum_xxhash128(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1115 self.checksum_xxhash128 = input;
1116 self
1117 }
1118 /// <p>This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the Base64 encoded, 128-bit <code>XXHASH128</code> checksum of the object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html">Checking object integrity in the Amazon S3 User Guide</a>.</p>
1119 pub fn get_checksum_xxhash128(&self) -> &::std::option::Option<::std::string::String> {
1120 &self.checksum_xxhash128
1121 }
1122 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
1123 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1124 self.expires = ::std::option::Option::Some(input);
1125 self
1126 }
1127 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
1128 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1129 self.expires = input;
1130 self
1131 }
1132 /// <p>The date and time at which the object is no longer cacheable. For more information, see <a href="https://www.rfc-editor.org/rfc/rfc7234#section-5.3">https://www.rfc-editor.org/rfc/rfc7234#section-5.3</a>.</p>
1133 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1134 &self.expires
1135 }
1136 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
1137 /// <p>If a conflicting 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>
1138 /// <p>Expects the ETag value as a string.</p>
1139 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
1140 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1141 self.if_match = ::std::option::Option::Some(input.into());
1142 self
1143 }
1144 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
1145 /// <p>If a conflicting 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>
1146 /// <p>Expects the ETag value as a string.</p>
1147 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
1148 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1149 self.if_match = input;
1150 self
1151 }
1152 /// <p>Uploads the object only if the ETag (entity tag) value provided during the WRITE operation matches the ETag of the object in S3. If the ETag values do not match, the operation returns a <code>412 Precondition Failed</code> error.</p>
1153 /// <p>If a conflicting 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>
1154 /// <p>Expects the ETag value as a string.</p>
1155 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
1156 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
1157 &self.if_match
1158 }
1159 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
1160 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
1161 /// <p>Expects the '*' (asterisk) character.</p>
1162 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
1163 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1164 self.if_none_match = ::std::option::Option::Some(input.into());
1165 self
1166 }
1167 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
1168 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
1169 /// <p>Expects the '*' (asterisk) character.</p>
1170 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
1171 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1172 self.if_none_match = input;
1173 self
1174 }
1175 /// <p>Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a <code>412 Precondition Failed</code> error.</p>
1176 /// <p>If a conflicting operation occurs during the upload S3 returns a <code>409 ConditionalRequestConflict</code> response. On a 409 failure you should retry the upload.</p>
1177 /// <p>Expects the '*' (asterisk) character.</p>
1178 /// <p>For more information about conditional requests, see <a href="https://tools.ietf.org/html/rfc7232">RFC 7232</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html">Conditional requests</a> in the <i>Amazon S3 User Guide</i>.</p>
1179 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
1180 &self.if_none_match
1181 }
1182 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1183 /// <ul>
1184 /// <li>
1185 /// <p>This functionality is not supported for directory buckets.</p></li>
1186 /// <li>
1187 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1188 /// </ul>
1189 /// </note>
1190 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1191 self.grant_full_control = ::std::option::Option::Some(input.into());
1192 self
1193 }
1194 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1195 /// <ul>
1196 /// <li>
1197 /// <p>This functionality is not supported for directory buckets.</p></li>
1198 /// <li>
1199 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1200 /// </ul>
1201 /// </note>
1202 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1203 self.grant_full_control = input;
1204 self
1205 }
1206 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1207 /// <ul>
1208 /// <li>
1209 /// <p>This functionality is not supported for directory buckets.</p></li>
1210 /// <li>
1211 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1212 /// </ul>
1213 /// </note>
1214 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
1215 &self.grant_full_control
1216 }
1217 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1218 /// <ul>
1219 /// <li>
1220 /// <p>This functionality is not supported for directory buckets.</p></li>
1221 /// <li>
1222 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1223 /// </ul>
1224 /// </note>
1225 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1226 self.grant_read = ::std::option::Option::Some(input.into());
1227 self
1228 }
1229 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1230 /// <ul>
1231 /// <li>
1232 /// <p>This functionality is not supported for directory buckets.</p></li>
1233 /// <li>
1234 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1235 /// </ul>
1236 /// </note>
1237 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1238 self.grant_read = input;
1239 self
1240 }
1241 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1242 /// <ul>
1243 /// <li>
1244 /// <p>This functionality is not supported for directory buckets.</p></li>
1245 /// <li>
1246 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1247 /// </ul>
1248 /// </note>
1249 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
1250 &self.grant_read
1251 }
1252 /// <p>Allows grantee to read the object ACL.</p><note>
1253 /// <ul>
1254 /// <li>
1255 /// <p>This functionality is not supported for directory buckets.</p></li>
1256 /// <li>
1257 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1258 /// </ul>
1259 /// </note>
1260 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1261 self.grant_read_acp = ::std::option::Option::Some(input.into());
1262 self
1263 }
1264 /// <p>Allows grantee to read the object ACL.</p><note>
1265 /// <ul>
1266 /// <li>
1267 /// <p>This functionality is not supported for directory buckets.</p></li>
1268 /// <li>
1269 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1270 /// </ul>
1271 /// </note>
1272 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1273 self.grant_read_acp = input;
1274 self
1275 }
1276 /// <p>Allows grantee to read the object ACL.</p><note>
1277 /// <ul>
1278 /// <li>
1279 /// <p>This functionality is not supported for directory buckets.</p></li>
1280 /// <li>
1281 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1282 /// </ul>
1283 /// </note>
1284 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
1285 &self.grant_read_acp
1286 }
1287 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1288 /// <ul>
1289 /// <li>
1290 /// <p>This functionality is not supported for directory buckets.</p></li>
1291 /// <li>
1292 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1293 /// </ul>
1294 /// </note>
1295 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1296 self.grant_write_acp = ::std::option::Option::Some(input.into());
1297 self
1298 }
1299 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1300 /// <ul>
1301 /// <li>
1302 /// <p>This functionality is not supported for directory buckets.</p></li>
1303 /// <li>
1304 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1305 /// </ul>
1306 /// </note>
1307 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1308 self.grant_write_acp = input;
1309 self
1310 }
1311 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1312 /// <ul>
1313 /// <li>
1314 /// <p>This functionality is not supported for directory buckets.</p></li>
1315 /// <li>
1316 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1317 /// </ul>
1318 /// </note>
1319 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
1320 &self.grant_write_acp
1321 }
1322 /// <p>Object key for which the PUT action was initiated.</p>
1323 /// This field is required.
1324 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1325 self.key = ::std::option::Option::Some(input.into());
1326 self
1327 }
1328 /// <p>Object key for which the PUT action was initiated.</p>
1329 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1330 self.key = input;
1331 self
1332 }
1333 /// <p>Object key for which the PUT action was initiated.</p>
1334 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
1335 &self.key
1336 }
1337 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
1338 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
1339 /// </note>
1340 pub fn write_offset_bytes(mut self, input: i64) -> Self {
1341 self.write_offset_bytes = ::std::option::Option::Some(input);
1342 self
1343 }
1344 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
1345 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
1346 /// </note>
1347 pub fn set_write_offset_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
1348 self.write_offset_bytes = input;
1349 self
1350 }
1351 /// <p>Specifies the offset for appending data to existing objects in bytes. The offset must be equal to the size of the existing object being appended to. If no object exists, setting this header to 0 will create a new object.</p><note>
1352 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
1353 /// </note>
1354 pub fn get_write_offset_bytes(&self) -> &::std::option::Option<i64> {
1355 &self.write_offset_bytes
1356 }
1357 /// Adds a key-value pair to `metadata`.
1358 ///
1359 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
1360 ///
1361 /// <p>A map of metadata to store with the object in S3.</p>
1362 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
1363 let mut hash_map = self.metadata.unwrap_or_default();
1364 hash_map.insert(k.into(), v.into());
1365 self.metadata = ::std::option::Option::Some(hash_map);
1366 self
1367 }
1368 /// <p>A map of metadata to store with the object in S3.</p>
1369 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
1370 self.metadata = input;
1371 self
1372 }
1373 /// <p>A map of metadata to store with the object in S3.</p>
1374 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
1375 &self.metadata
1376 }
1377 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
1378 /// <ul>
1379 /// <li>
1380 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
1381 /// <li>
1382 /// <p><b>Directory buckets </b> - 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>
1383 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
1384 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
1385 /// </note></li>
1386 /// <li>
1387 /// <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>
1388 /// </ul>
1389 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
1390 self.server_side_encryption = ::std::option::Option::Some(input);
1391 self
1392 }
1393 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
1394 /// <ul>
1395 /// <li>
1396 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
1397 /// <li>
1398 /// <p><b>Directory buckets </b> - 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>
1399 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
1400 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
1401 /// </note></li>
1402 /// <li>
1403 /// <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>
1404 /// </ul>
1405 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
1406 self.server_side_encryption = input;
1407 self
1408 }
1409 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
1410 /// <ul>
1411 /// <li>
1412 /// <p><b>General purpose buckets </b> - You have four mutually exclusive options to protect data using server-side encryption in Amazon S3, depending on how you choose to manage the encryption keys. Specifically, the encryption key options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest by using server-side encryption with other key options. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html">Using Server-Side Encryption</a> in the <i>Amazon S3 User Guide</i>.</p></li>
1413 /// <li>
1414 /// <p><b>Directory buckets </b> - 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>
1415 /// <p>In the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>) using the REST API, the encryption request headers must match the encryption settings that are specified in the <code>CreateSession</code> request. You can't override the values of the encryption settings (<code>x-amz-server-side-encryption</code>, <code>x-amz-server-side-encryption-aws-kms-key-id</code>, <code>x-amz-server-side-encryption-context</code>, and <code>x-amz-server-side-encryption-bucket-key-enabled</code>) that are specified in the <code>CreateSession</code> request. You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and Amazon S3 will use the encryption settings values from the <code>CreateSession</code> request to protect new objects in the directory bucket.</p><note>
1416 /// <p>When you use the CLI or the Amazon Web Services SDKs, for <code>CreateSession</code>, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the <code>CreateSession</code> request. It's not supported to override the encryption settings values in the <code>CreateSession</code> request. So in the Zonal endpoint API calls (except <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>), the encryption request headers must match the default encryption configuration of the directory bucket.</p>
1417 /// </note></li>
1418 /// <li>
1419 /// <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>
1420 /// </ul>
1421 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1422 &self.server_side_encryption
1423 }
1424 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1425 /// <ul>
1426 /// <li>
1427 /// <p>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.</p></li>
1428 /// <li>
1429 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1430 /// </ul>
1431 /// </note>
1432 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1433 self.storage_class = ::std::option::Option::Some(input);
1434 self
1435 }
1436 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1437 /// <ul>
1438 /// <li>
1439 /// <p>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.</p></li>
1440 /// <li>
1441 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1442 /// </ul>
1443 /// </note>
1444 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1445 self.storage_class = input;
1446 self
1447 }
1448 /// <p>By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability. Depending on performance needs, you can specify a different Storage Class. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html">Storage Classes</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1449 /// <ul>
1450 /// <li>
1451 /// <p>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.</p></li>
1452 /// <li>
1453 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1454 /// </ul>
1455 /// </note>
1456 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1457 &self.storage_class
1458 }
1459 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
1460 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1461 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1462 /// <p>In the following example, the request header sets the object redirect to another website:</p>
1463 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1464 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1465 /// <p>This functionality is not supported for directory buckets.</p>
1466 /// </note>
1467 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1468 self.website_redirect_location = ::std::option::Option::Some(input.into());
1469 self
1470 }
1471 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
1472 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1473 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1474 /// <p>In the following example, the request header sets the object redirect to another website:</p>
1475 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1476 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1477 /// <p>This functionality is not supported for directory buckets.</p>
1478 /// </note>
1479 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1480 self.website_redirect_location = input;
1481 self
1482 }
1483 /// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores the value of this header in the object metadata. For information about object metadata, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
1484 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1485 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1486 /// <p>In the following example, the request header sets the object redirect to another website:</p>
1487 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1488 /// <p>For more information about website hosting in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html">Hosting Websites on Amazon S3</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html">How to Configure Website Page Redirects</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1489 /// <p>This functionality is not supported for directory buckets.</p>
1490 /// </note>
1491 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1492 &self.website_redirect_location
1493 }
1494 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1495 /// <p>This functionality is not supported for directory buckets.</p>
1496 /// </note>
1497 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1498 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
1499 self
1500 }
1501 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1502 /// <p>This functionality is not supported for directory buckets.</p>
1503 /// </note>
1504 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1505 self.sse_customer_algorithm = input;
1506 self
1507 }
1508 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1509 /// <p>This functionality is not supported for directory buckets.</p>
1510 /// </note>
1511 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1512 &self.sse_customer_algorithm
1513 }
1514 /// <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>
1515 /// <p>This functionality is not supported for directory buckets.</p>
1516 /// </note>
1517 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1518 self.sse_customer_key = ::std::option::Option::Some(input.into());
1519 self
1520 }
1521 /// <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>
1522 /// <p>This functionality is not supported for directory buckets.</p>
1523 /// </note>
1524 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1525 self.sse_customer_key = input;
1526 self
1527 }
1528 /// <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>
1529 /// <p>This functionality is not supported for directory buckets.</p>
1530 /// </note>
1531 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1532 &self.sse_customer_key
1533 }
1534 /// <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>
1535 /// <p>This functionality is not supported for directory buckets.</p>
1536 /// </note>
1537 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1538 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1539 self
1540 }
1541 /// <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>
1542 /// <p>This functionality is not supported for directory buckets.</p>
1543 /// </note>
1544 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1545 self.sse_customer_key_md5 = input;
1546 self
1547 }
1548 /// <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>
1549 /// <p>This functionality is not supported for directory buckets.</p>
1550 /// </note>
1551 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1552 &self.sse_customer_key_md5
1553 }
1554 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1555 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
1556 /// <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>
1557 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1558 self.ssekms_key_id = ::std::option::Option::Some(input.into());
1559 self
1560 }
1561 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1562 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
1563 /// <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>
1564 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1565 self.ssekms_key_id = input;
1566 self
1567 }
1568 /// <p>Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same account that's issuing the command, you must use the full Key ARN not the Key ID.</p>
1569 /// <p><b>General purpose buckets</b> - If you specify <code>x-amz-server-side-encryption</code> with <code>aws:kms</code> or <code>aws:kms:dsse</code>, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key to use. If you specify <code>x-amz-server-side-encryption:aws:kms</code> or <code>x-amz-server-side-encryption:aws:kms:dsse</code>, but do not provide <code>x-amz-server-side-encryption-aws-kms-key-id</code>, Amazon S3 uses the Amazon Web Services managed key (<code>aws/s3</code>) to protect the data.</p>
1570 /// <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>
1571 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1572 &self.ssekms_key_id
1573 }
1574 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1575 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your 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>
1576 /// <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>
1577 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1578 self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
1579 self
1580 }
1581 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1582 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your 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>
1583 /// <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>
1584 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1585 self.ssekms_encryption_context = input;
1586 self
1587 }
1588 /// <p>Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future <code>GetObject</code> operations on this object.</p>
1589 /// <p><b>General purpose buckets</b> - This value must be explicitly added during <code>CopyObject</code> operations if you want an additional encryption context for your 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>
1590 /// <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>
1591 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1592 &self.ssekms_encryption_context
1593 }
1594 /// <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).</p>
1595 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1596 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. 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>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1597 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1598 self.bucket_key_enabled = ::std::option::Option::Some(input);
1599 self
1600 }
1601 /// <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).</p>
1602 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1603 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. 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>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1604 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1605 self.bucket_key_enabled = input;
1606 self
1607 }
1608 /// <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).</p>
1609 /// <p><b>General purpose buckets</b> - Setting this header to <code>true</code> causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 Bucket Key.</p>
1610 /// <p><b>Directory buckets</b> - S3 Bucket Keys are always enabled for <code>GET</code> and <code>PUT</code> operations in a directory bucket and can’t be disabled. 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>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html">UploadPartCopy</a>, <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops">the Copy operation in Batch Operations</a>, or <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job">the import jobs</a>. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.</p>
1611 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1612 &self.bucket_key_enabled
1613 }
1614 /// <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 the corresponding charges. 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>
1615 /// <p>This functionality is not supported for directory buckets.</p>
1616 /// </note>
1617 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1618 self.request_payer = ::std::option::Option::Some(input);
1619 self
1620 }
1621 /// <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 the corresponding charges. 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>
1622 /// <p>This functionality is not supported for directory buckets.</p>
1623 /// </note>
1624 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1625 self.request_payer = input;
1626 self
1627 }
1628 /// <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 the corresponding charges. 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>
1629 /// <p>This functionality is not supported for directory buckets.</p>
1630 /// </note>
1631 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1632 &self.request_payer
1633 }
1634 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1635 /// <p>This functionality is not supported for directory buckets.</p>
1636 /// </note>
1637 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1638 self.tagging = ::std::option::Option::Some(input.into());
1639 self
1640 }
1641 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1642 /// <p>This functionality is not supported for directory buckets.</p>
1643 /// </note>
1644 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1645 self.tagging = input;
1646 self
1647 }
1648 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1649 /// <p>This functionality is not supported for directory buckets.</p>
1650 /// </note>
1651 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1652 &self.tagging
1653 }
1654 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1655 /// <p>This functionality is not supported for directory buckets.</p>
1656 /// </note>
1657 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1658 self.object_lock_mode = ::std::option::Option::Some(input);
1659 self
1660 }
1661 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1662 /// <p>This functionality is not supported for directory buckets.</p>
1663 /// </note>
1664 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1665 self.object_lock_mode = input;
1666 self
1667 }
1668 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1669 /// <p>This functionality is not supported for directory buckets.</p>
1670 /// </note>
1671 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1672 &self.object_lock_mode
1673 }
1674 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1675 /// <p>This functionality is not supported for directory buckets.</p>
1676 /// </note>
1677 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1678 self.object_lock_retain_until_date = ::std::option::Option::Some(input);
1679 self
1680 }
1681 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1682 /// <p>This functionality is not supported for directory buckets.</p>
1683 /// </note>
1684 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1685 self.object_lock_retain_until_date = input;
1686 self
1687 }
1688 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1689 /// <p>This functionality is not supported for directory buckets.</p>
1690 /// </note>
1691 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1692 &self.object_lock_retain_until_date
1693 }
1694 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1695 /// <p>This functionality is not supported for directory buckets.</p>
1696 /// </note>
1697 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1698 self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
1699 self
1700 }
1701 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1702 /// <p>This functionality is not supported for directory buckets.</p>
1703 /// </note>
1704 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1705 self.object_lock_legal_hold_status = input;
1706 self
1707 }
1708 /// <p>Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html">Object Lock</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1709 /// <p>This functionality is not supported for directory buckets.</p>
1710 /// </note>
1711 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1712 &self.object_lock_legal_hold_status
1713 }
1714 /// <p>Specifies the event hold status to apply to this object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
1715 /// <p>This functionality is not supported for directory buckets.</p>
1716 /// </note>
1717 pub fn object_lock_event_hold(mut self, input: crate::types::ObjectLockEventHold) -> Self {
1718 self.object_lock_event_hold = ::std::option::Option::Some(input);
1719 self
1720 }
1721 /// <p>Specifies the event hold status to apply to this object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
1722 /// <p>This functionality is not supported for directory buckets.</p>
1723 /// </note>
1724 pub fn set_object_lock_event_hold(mut self, input: ::std::option::Option<crate::types::ObjectLockEventHold>) -> Self {
1725 self.object_lock_event_hold = input;
1726 self
1727 }
1728 /// <p>Specifies the event hold status to apply to this object. Set to <code>ON</code> to enable or <code>OFF</code> to disable.</p><note>
1729 /// <p>This functionality is not supported for directory buckets.</p>
1730 /// </note>
1731 pub fn get_object_lock_event_hold(&self) -> &::std::option::Option<crate::types::ObjectLockEventHold> {
1732 &self.object_lock_event_hold
1733 }
1734 /// <p>Specifies the event hold duration in days to apply to this object. You cannot specify a duration in both days and years.</p><note>
1735 /// <p>This functionality is not supported for directory buckets.</p>
1736 /// </note>
1737 pub fn object_lock_event_hold_duration_days(mut self, input: i32) -> Self {
1738 self.object_lock_event_hold_duration_days = ::std::option::Option::Some(input);
1739 self
1740 }
1741 /// <p>Specifies the event hold duration in days to apply to this object. You cannot specify a duration in both days and years.</p><note>
1742 /// <p>This functionality is not supported for directory buckets.</p>
1743 /// </note>
1744 pub fn set_object_lock_event_hold_duration_days(mut self, input: ::std::option::Option<i32>) -> Self {
1745 self.object_lock_event_hold_duration_days = input;
1746 self
1747 }
1748 /// <p>Specifies the event hold duration in days to apply to this object. You cannot specify a duration in both days and years.</p><note>
1749 /// <p>This functionality is not supported for directory buckets.</p>
1750 /// </note>
1751 pub fn get_object_lock_event_hold_duration_days(&self) -> &::std::option::Option<i32> {
1752 &self.object_lock_event_hold_duration_days
1753 }
1754 /// <p>Specifies the event hold duration in years to apply to this object. You cannot specify a duration in both days and years.</p><note>
1755 /// <p>This functionality is not supported for directory buckets.</p>
1756 /// </note>
1757 pub fn object_lock_event_hold_duration_years(mut self, input: i32) -> Self {
1758 self.object_lock_event_hold_duration_years = ::std::option::Option::Some(input);
1759 self
1760 }
1761 /// <p>Specifies the event hold duration in years to apply to this object. You cannot specify a duration in both days and years.</p><note>
1762 /// <p>This functionality is not supported for directory buckets.</p>
1763 /// </note>
1764 pub fn set_object_lock_event_hold_duration_years(mut self, input: ::std::option::Option<i32>) -> Self {
1765 self.object_lock_event_hold_duration_years = input;
1766 self
1767 }
1768 /// <p>Specifies the event hold duration in years to apply to this object. You cannot specify a duration in both days and years.</p><note>
1769 /// <p>This functionality is not supported for directory buckets.</p>
1770 /// </note>
1771 pub fn get_object_lock_event_hold_duration_years(&self) -> &::std::option::Option<i32> {
1772 &self.object_lock_event_hold_duration_years
1773 }
1774 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1775 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1776 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
1777 self
1778 }
1779 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1780 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1781 self.expected_bucket_owner = input;
1782 self
1783 }
1784 /// <p>The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).</p>
1785 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1786 &self.expected_bucket_owner
1787 }
1788 /// Consumes the builder and constructs a [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
1789 pub fn build(self) -> ::std::result::Result<crate::operation::put_object::PutObjectInput, ::aws_smithy_types::error::operation::BuildError> {
1790 ::std::result::Result::Ok(crate::operation::put_object::PutObjectInput {
1791 acl: self.acl,
1792 body: self.body.unwrap_or_default(),
1793 bucket: self.bucket,
1794 cache_control: self.cache_control,
1795 content_disposition: self.content_disposition,
1796 content_encoding: self.content_encoding,
1797 content_language: self.content_language,
1798 content_length: self.content_length,
1799 content_md5: self.content_md5,
1800 content_type: self.content_type,
1801 checksum_algorithm: self.checksum_algorithm,
1802 checksum_crc32: self.checksum_crc32,
1803 checksum_crc32_c: self.checksum_crc32_c,
1804 checksum_crc64_nvme: self.checksum_crc64_nvme,
1805 checksum_sha1: self.checksum_sha1,
1806 checksum_sha256: self.checksum_sha256,
1807 checksum_sha512: self.checksum_sha512,
1808 checksum_md5: self.checksum_md5,
1809 checksum_xxhash64: self.checksum_xxhash64,
1810 checksum_xxhash3: self.checksum_xxhash3,
1811 checksum_xxhash128: self.checksum_xxhash128,
1812 expires: self.expires,
1813 if_match: self.if_match,
1814 if_none_match: self.if_none_match,
1815 grant_full_control: self.grant_full_control,
1816 grant_read: self.grant_read,
1817 grant_read_acp: self.grant_read_acp,
1818 grant_write_acp: self.grant_write_acp,
1819 key: self.key,
1820 write_offset_bytes: self.write_offset_bytes,
1821 metadata: self.metadata,
1822 server_side_encryption: self.server_side_encryption,
1823 storage_class: self.storage_class,
1824 website_redirect_location: self.website_redirect_location,
1825 sse_customer_algorithm: self.sse_customer_algorithm,
1826 sse_customer_key: self.sse_customer_key,
1827 sse_customer_key_md5: self.sse_customer_key_md5,
1828 ssekms_key_id: self.ssekms_key_id,
1829 ssekms_encryption_context: self.ssekms_encryption_context,
1830 bucket_key_enabled: self.bucket_key_enabled,
1831 request_payer: self.request_payer,
1832 tagging: self.tagging,
1833 object_lock_mode: self.object_lock_mode,
1834 object_lock_retain_until_date: self.object_lock_retain_until_date,
1835 object_lock_legal_hold_status: self.object_lock_legal_hold_status,
1836 object_lock_event_hold: self.object_lock_event_hold,
1837 object_lock_event_hold_duration_days: self.object_lock_event_hold_duration_days,
1838 object_lock_event_hold_duration_years: self.object_lock_event_hold_duration_years,
1839 expected_bucket_owner: self.expected_bucket_owner,
1840 })
1841 }
1842}
1843impl ::std::fmt::Debug for PutObjectInputBuilder {
1844 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1845 let mut formatter = f.debug_struct("PutObjectInputBuilder");
1846 formatter.field("acl", &self.acl);
1847 formatter.field("body", &self.body);
1848 formatter.field("bucket", &self.bucket);
1849 formatter.field("cache_control", &self.cache_control);
1850 formatter.field("content_disposition", &self.content_disposition);
1851 formatter.field("content_encoding", &self.content_encoding);
1852 formatter.field("content_language", &self.content_language);
1853 formatter.field("content_length", &self.content_length);
1854 formatter.field("content_md5", &self.content_md5);
1855 formatter.field("content_type", &self.content_type);
1856 formatter.field("checksum_algorithm", &self.checksum_algorithm);
1857 formatter.field("checksum_crc32", &self.checksum_crc32);
1858 formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
1859 formatter.field("checksum_crc64_nvme", &self.checksum_crc64_nvme);
1860 formatter.field("checksum_sha1", &self.checksum_sha1);
1861 formatter.field("checksum_sha256", &self.checksum_sha256);
1862 formatter.field("checksum_sha512", &self.checksum_sha512);
1863 formatter.field("checksum_md5", &self.checksum_md5);
1864 formatter.field("checksum_xxhash64", &self.checksum_xxhash64);
1865 formatter.field("checksum_xxhash3", &self.checksum_xxhash3);
1866 formatter.field("checksum_xxhash128", &self.checksum_xxhash128);
1867 formatter.field("expires", &self.expires);
1868 formatter.field("if_match", &self.if_match);
1869 formatter.field("if_none_match", &self.if_none_match);
1870 formatter.field("grant_full_control", &self.grant_full_control);
1871 formatter.field("grant_read", &self.grant_read);
1872 formatter.field("grant_read_acp", &self.grant_read_acp);
1873 formatter.field("grant_write_acp", &self.grant_write_acp);
1874 formatter.field("key", &self.key);
1875 formatter.field("write_offset_bytes", &self.write_offset_bytes);
1876 formatter.field("metadata", &self.metadata);
1877 formatter.field("server_side_encryption", &self.server_side_encryption);
1878 formatter.field("storage_class", &self.storage_class);
1879 formatter.field("website_redirect_location", &self.website_redirect_location);
1880 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
1881 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
1882 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
1883 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
1884 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
1885 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
1886 formatter.field("request_payer", &self.request_payer);
1887 formatter.field("tagging", &self.tagging);
1888 formatter.field("object_lock_mode", &self.object_lock_mode);
1889 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
1890 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
1891 formatter.field("object_lock_event_hold", &self.object_lock_event_hold);
1892 formatter.field("object_lock_event_hold_duration_days", &self.object_lock_event_hold_duration_days);
1893 formatter.field("object_lock_event_hold_duration_years", &self.object_lock_event_hold_duration_years);
1894 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
1895 formatter.finish()
1896 }
1897}