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>SHA1</code></p></li>
54 /// <li>
55 /// <p><code>SHA256</code></p></li>
56 /// </ul>
57 /// <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>
58 /// <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>
59 /// <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>
60 /// </note>
61 /// <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>
62 pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
63 /// <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>
64 pub checksum_crc32: ::std::option::Option<::std::string::String>,
65 /// <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>
66 pub checksum_crc32_c: ::std::option::Option<::std::string::String>,
67 /// <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>
68 pub checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
69 /// <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>
70 pub checksum_sha1: ::std::option::Option<::std::string::String>,
71 /// <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>
72 pub checksum_sha256: ::std::option::Option<::std::string::String>,
73 /// <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>
74 pub expires: ::std::option::Option<::aws_smithy_types::DateTime>,
75 /// <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>
76 /// <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>
77 /// <p>Expects the ETag value as a string.</p>
78 /// <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>
79 pub if_match: ::std::option::Option<::std::string::String>,
80 /// <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>
81 /// <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>
82 /// <p>Expects the '*' (asterisk) character.</p>
83 /// <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>
84 pub if_none_match: ::std::option::Option<::std::string::String>,
85 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
86 /// <ul>
87 /// <li>
88 /// <p>This functionality is not supported for directory buckets.</p></li>
89 /// <li>
90 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
91 /// </ul>
92 /// </note>
93 pub grant_full_control: ::std::option::Option<::std::string::String>,
94 /// <p>Allows grantee to read the object data and its metadata.</p><note>
95 /// <ul>
96 /// <li>
97 /// <p>This functionality is not supported for directory buckets.</p></li>
98 /// <li>
99 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
100 /// </ul>
101 /// </note>
102 pub grant_read: ::std::option::Option<::std::string::String>,
103 /// <p>Allows grantee to read the object ACL.</p><note>
104 /// <ul>
105 /// <li>
106 /// <p>This functionality is not supported for directory buckets.</p></li>
107 /// <li>
108 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
109 /// </ul>
110 /// </note>
111 pub grant_read_acp: ::std::option::Option<::std::string::String>,
112 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
113 /// <ul>
114 /// <li>
115 /// <p>This functionality is not supported for directory buckets.</p></li>
116 /// <li>
117 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
118 /// </ul>
119 /// </note>
120 pub grant_write_acp: ::std::option::Option<::std::string::String>,
121 /// <p>Object key for which the PUT action was initiated.</p>
122 pub key: ::std::option::Option<::std::string::String>,
123 /// <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>
124 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
125 /// </note>
126 pub write_offset_bytes: ::std::option::Option<i64>,
127 /// <p>A map of metadata to store with the object in S3.</p>
128 pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
129 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
130 /// <ul>
131 /// <li>
132 /// <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>
133 /// <li>
134 /// <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>
135 /// <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>
136 /// <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>
137 /// </note></li>
138 /// <li>
139 /// <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>
140 /// </ul>
141 pub server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
142 /// <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>
143 /// <ul>
144 /// <li>
145 /// <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>
146 /// <li>
147 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
148 /// </ul>
149 /// </note>
150 pub storage_class: ::std::option::Option<crate::types::StorageClass>,
151 /// <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>
152 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
153 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
154 /// <p>In the following example, the request header sets the object redirect to another website:</p>
155 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
156 /// <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>
157 /// <p>This functionality is not supported for directory buckets.</p>
158 /// </note>
159 pub website_redirect_location: ::std::option::Option<::std::string::String>,
160 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
161 /// <p>This functionality is not supported for directory buckets.</p>
162 /// </note>
163 pub sse_customer_algorithm: ::std::option::Option<::std::string::String>,
164 /// <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>
165 /// <p>This functionality is not supported for directory buckets.</p>
166 /// </note>
167 pub sse_customer_key: ::std::option::Option<::std::string::String>,
168 /// <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>
169 /// <p>This functionality is not supported for directory buckets.</p>
170 /// </note>
171 pub sse_customer_key_md5: ::std::option::Option<::std::string::String>,
172 /// <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>
173 /// <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>
174 /// <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>
175 pub ssekms_key_id: ::std::option::Option<::std::string::String>,
176 /// <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>
177 /// <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>
178 /// <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>
179 pub ssekms_encryption_context: ::std::option::Option<::std::string::String>,
180 /// <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>
181 /// <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>
182 /// <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>
183 pub bucket_key_enabled: ::std::option::Option<bool>,
184 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
185 /// <p>This functionality is not supported for directory buckets.</p>
186 /// </note>
187 pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
188 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
189 /// <p>This functionality is not supported for directory buckets.</p>
190 /// </note>
191 pub tagging: ::std::option::Option<::std::string::String>,
192 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
193 /// <p>This functionality is not supported for directory buckets.</p>
194 /// </note>
195 pub object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
196 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
197 /// <p>This functionality is not supported for directory buckets.</p>
198 /// </note>
199 pub object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
200 /// <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>
201 /// <p>This functionality is not supported for directory buckets.</p>
202 /// </note>
203 pub object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
204 /// <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>
205 pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
206}
207impl PutObjectInput {
208 /// <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>
209 /// <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>
210 /// <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>
211 /// <ul>
212 /// <li>
213 /// <p>This functionality is not supported for directory buckets.</p></li>
214 /// <li>
215 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
216 /// </ul>
217 /// </note>
218 pub fn acl(&self) -> ::std::option::Option<&crate::types::ObjectCannedAcl> {
219 self.acl.as_ref()
220 }
221 /// <p>Object data.</p>
222 pub fn body(&self) -> &::aws_smithy_types::byte_stream::ByteStream {
223 &self.body
224 }
225 /// <p>The bucket name to which the PUT action was initiated.</p>
226 /// <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>
227 /// <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>
228 /// <p>Object Lambda access points are not supported by directory buckets.</p>
229 /// </note>
230 /// <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>
231 pub fn bucket(&self) -> ::std::option::Option<&str> {
232 self.bucket.as_deref()
233 }
234 /// <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>
235 pub fn cache_control(&self) -> ::std::option::Option<&str> {
236 self.cache_control.as_deref()
237 }
238 /// <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>
239 pub fn content_disposition(&self) -> ::std::option::Option<&str> {
240 self.content_disposition.as_deref()
241 }
242 /// <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>
243 pub fn content_encoding(&self) -> ::std::option::Option<&str> {
244 self.content_encoding.as_deref()
245 }
246 /// <p>The language the content is in.</p>
247 pub fn content_language(&self) -> ::std::option::Option<&str> {
248 self.content_language.as_deref()
249 }
250 /// <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>
251 pub fn content_length(&self) -> ::std::option::Option<i64> {
252 self.content_length
253 }
254 /// <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>
255 /// <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>
256 /// </note> <note>
257 /// <p>This functionality is not supported for directory buckets.</p>
258 /// </note>
259 pub fn content_md5(&self) -> ::std::option::Option<&str> {
260 self.content_md5.as_deref()
261 }
262 /// <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>
263 pub fn content_type(&self) -> ::std::option::Option<&str> {
264 self.content_type.as_deref()
265 }
266 /// <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>
267 /// <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>
268 /// <ul>
269 /// <li>
270 /// <p><code>CRC32</code></p></li>
271 /// <li>
272 /// <p><code>CRC32C</code></p></li>
273 /// <li>
274 /// <p><code>CRC64NVME</code></p></li>
275 /// <li>
276 /// <p><code>SHA1</code></p></li>
277 /// <li>
278 /// <p><code>SHA256</code></p></li>
279 /// </ul>
280 /// <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>
281 /// <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>
282 /// <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>
283 /// </note>
284 /// <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>
285 pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
286 self.checksum_algorithm.as_ref()
287 }
288 /// <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>
289 pub fn checksum_crc32(&self) -> ::std::option::Option<&str> {
290 self.checksum_crc32.as_deref()
291 }
292 /// <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>
293 pub fn checksum_crc32_c(&self) -> ::std::option::Option<&str> {
294 self.checksum_crc32_c.as_deref()
295 }
296 /// <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>
297 pub fn checksum_crc64_nvme(&self) -> ::std::option::Option<&str> {
298 self.checksum_crc64_nvme.as_deref()
299 }
300 /// <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>
301 pub fn checksum_sha1(&self) -> ::std::option::Option<&str> {
302 self.checksum_sha1.as_deref()
303 }
304 /// <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>
305 pub fn checksum_sha256(&self) -> ::std::option::Option<&str> {
306 self.checksum_sha256.as_deref()
307 }
308 /// <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>
309 pub fn expires(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
310 self.expires.as_ref()
311 }
312 /// <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>
313 /// <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>
314 /// <p>Expects the ETag value as a string.</p>
315 /// <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>
316 pub fn if_match(&self) -> ::std::option::Option<&str> {
317 self.if_match.as_deref()
318 }
319 /// <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>
320 /// <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>
321 /// <p>Expects the '*' (asterisk) character.</p>
322 /// <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>
323 pub fn if_none_match(&self) -> ::std::option::Option<&str> {
324 self.if_none_match.as_deref()
325 }
326 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
327 /// <ul>
328 /// <li>
329 /// <p>This functionality is not supported for directory buckets.</p></li>
330 /// <li>
331 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
332 /// </ul>
333 /// </note>
334 pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
335 self.grant_full_control.as_deref()
336 }
337 /// <p>Allows grantee to read the object data and its metadata.</p><note>
338 /// <ul>
339 /// <li>
340 /// <p>This functionality is not supported for directory buckets.</p></li>
341 /// <li>
342 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
343 /// </ul>
344 /// </note>
345 pub fn grant_read(&self) -> ::std::option::Option<&str> {
346 self.grant_read.as_deref()
347 }
348 /// <p>Allows grantee to read the object ACL.</p><note>
349 /// <ul>
350 /// <li>
351 /// <p>This functionality is not supported for directory buckets.</p></li>
352 /// <li>
353 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
354 /// </ul>
355 /// </note>
356 pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
357 self.grant_read_acp.as_deref()
358 }
359 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
360 /// <ul>
361 /// <li>
362 /// <p>This functionality is not supported for directory buckets.</p></li>
363 /// <li>
364 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
365 /// </ul>
366 /// </note>
367 pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
368 self.grant_write_acp.as_deref()
369 }
370 /// <p>Object key for which the PUT action was initiated.</p>
371 pub fn key(&self) -> ::std::option::Option<&str> {
372 self.key.as_deref()
373 }
374 /// <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>
375 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
376 /// </note>
377 pub fn write_offset_bytes(&self) -> ::std::option::Option<i64> {
378 self.write_offset_bytes
379 }
380 /// <p>A map of metadata to store with the object in S3.</p>
381 pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
382 self.metadata.as_ref()
383 }
384 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
385 /// <ul>
386 /// <li>
387 /// <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>
388 /// <li>
389 /// <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>
390 /// <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>
391 /// <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>
392 /// </note></li>
393 /// <li>
394 /// <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>
395 /// </ul>
396 pub fn server_side_encryption(&self) -> ::std::option::Option<&crate::types::ServerSideEncryption> {
397 self.server_side_encryption.as_ref()
398 }
399 /// <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>
400 /// <ul>
401 /// <li>
402 /// <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>
403 /// <li>
404 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
405 /// </ul>
406 /// </note>
407 pub fn storage_class(&self) -> ::std::option::Option<&crate::types::StorageClass> {
408 self.storage_class.as_ref()
409 }
410 /// <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>
411 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
412 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
413 /// <p>In the following example, the request header sets the object redirect to another website:</p>
414 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
415 /// <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>
416 /// <p>This functionality is not supported for directory buckets.</p>
417 /// </note>
418 pub fn website_redirect_location(&self) -> ::std::option::Option<&str> {
419 self.website_redirect_location.as_deref()
420 }
421 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
422 /// <p>This functionality is not supported for directory buckets.</p>
423 /// </note>
424 pub fn sse_customer_algorithm(&self) -> ::std::option::Option<&str> {
425 self.sse_customer_algorithm.as_deref()
426 }
427 /// <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>
428 /// <p>This functionality is not supported for directory buckets.</p>
429 /// </note>
430 pub fn sse_customer_key(&self) -> ::std::option::Option<&str> {
431 self.sse_customer_key.as_deref()
432 }
433 /// <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>
434 /// <p>This functionality is not supported for directory buckets.</p>
435 /// </note>
436 pub fn sse_customer_key_md5(&self) -> ::std::option::Option<&str> {
437 self.sse_customer_key_md5.as_deref()
438 }
439 /// <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>
440 /// <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>
441 /// <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>
442 pub fn ssekms_key_id(&self) -> ::std::option::Option<&str> {
443 self.ssekms_key_id.as_deref()
444 }
445 /// <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>
446 /// <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>
447 /// <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>
448 pub fn ssekms_encryption_context(&self) -> ::std::option::Option<&str> {
449 self.ssekms_encryption_context.as_deref()
450 }
451 /// <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>
452 /// <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>
453 /// <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>
454 pub fn bucket_key_enabled(&self) -> ::std::option::Option<bool> {
455 self.bucket_key_enabled
456 }
457 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
458 /// <p>This functionality is not supported for directory buckets.</p>
459 /// </note>
460 pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
461 self.request_payer.as_ref()
462 }
463 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
464 /// <p>This functionality is not supported for directory buckets.</p>
465 /// </note>
466 pub fn tagging(&self) -> ::std::option::Option<&str> {
467 self.tagging.as_deref()
468 }
469 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
470 /// <p>This functionality is not supported for directory buckets.</p>
471 /// </note>
472 pub fn object_lock_mode(&self) -> ::std::option::Option<&crate::types::ObjectLockMode> {
473 self.object_lock_mode.as_ref()
474 }
475 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
476 /// <p>This functionality is not supported for directory buckets.</p>
477 /// </note>
478 pub fn object_lock_retain_until_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
479 self.object_lock_retain_until_date.as_ref()
480 }
481 /// <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>
482 /// <p>This functionality is not supported for directory buckets.</p>
483 /// </note>
484 pub fn object_lock_legal_hold_status(&self) -> ::std::option::Option<&crate::types::ObjectLockLegalHoldStatus> {
485 self.object_lock_legal_hold_status.as_ref()
486 }
487 /// <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>
488 pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
489 self.expected_bucket_owner.as_deref()
490 }
491}
492impl ::std::fmt::Debug for PutObjectInput {
493 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
494 let mut formatter = f.debug_struct("PutObjectInput");
495 formatter.field("acl", &self.acl);
496 formatter.field("body", &self.body);
497 formatter.field("bucket", &self.bucket);
498 formatter.field("cache_control", &self.cache_control);
499 formatter.field("content_disposition", &self.content_disposition);
500 formatter.field("content_encoding", &self.content_encoding);
501 formatter.field("content_language", &self.content_language);
502 formatter.field("content_length", &self.content_length);
503 formatter.field("content_md5", &self.content_md5);
504 formatter.field("content_type", &self.content_type);
505 formatter.field("checksum_algorithm", &self.checksum_algorithm);
506 formatter.field("checksum_crc32", &self.checksum_crc32);
507 formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
508 formatter.field("checksum_crc64_nvme", &self.checksum_crc64_nvme);
509 formatter.field("checksum_sha1", &self.checksum_sha1);
510 formatter.field("checksum_sha256", &self.checksum_sha256);
511 formatter.field("expires", &self.expires);
512 formatter.field("if_match", &self.if_match);
513 formatter.field("if_none_match", &self.if_none_match);
514 formatter.field("grant_full_control", &self.grant_full_control);
515 formatter.field("grant_read", &self.grant_read);
516 formatter.field("grant_read_acp", &self.grant_read_acp);
517 formatter.field("grant_write_acp", &self.grant_write_acp);
518 formatter.field("key", &self.key);
519 formatter.field("write_offset_bytes", &self.write_offset_bytes);
520 formatter.field("metadata", &self.metadata);
521 formatter.field("server_side_encryption", &self.server_side_encryption);
522 formatter.field("storage_class", &self.storage_class);
523 formatter.field("website_redirect_location", &self.website_redirect_location);
524 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
525 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
526 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
527 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
528 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
529 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
530 formatter.field("request_payer", &self.request_payer);
531 formatter.field("tagging", &self.tagging);
532 formatter.field("object_lock_mode", &self.object_lock_mode);
533 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
534 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
535 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
536 formatter.finish()
537 }
538}
539impl PutObjectInput {
540 /// Creates a new builder-style object to manufacture [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
541 pub fn builder() -> crate::operation::put_object::builders::PutObjectInputBuilder {
542 crate::operation::put_object::builders::PutObjectInputBuilder::default()
543 }
544}
545
546/// A builder for [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
547#[derive(::std::default::Default)]
548#[non_exhaustive]
549pub struct PutObjectInputBuilder {
550 pub(crate) acl: ::std::option::Option<crate::types::ObjectCannedAcl>,
551 pub(crate) body: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>,
552 pub(crate) bucket: ::std::option::Option<::std::string::String>,
553 pub(crate) cache_control: ::std::option::Option<::std::string::String>,
554 pub(crate) content_disposition: ::std::option::Option<::std::string::String>,
555 pub(crate) content_encoding: ::std::option::Option<::std::string::String>,
556 pub(crate) content_language: ::std::option::Option<::std::string::String>,
557 pub(crate) content_length: ::std::option::Option<i64>,
558 pub(crate) content_md5: ::std::option::Option<::std::string::String>,
559 pub(crate) content_type: ::std::option::Option<::std::string::String>,
560 pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
561 pub(crate) checksum_crc32: ::std::option::Option<::std::string::String>,
562 pub(crate) checksum_crc32_c: ::std::option::Option<::std::string::String>,
563 pub(crate) checksum_crc64_nvme: ::std::option::Option<::std::string::String>,
564 pub(crate) checksum_sha1: ::std::option::Option<::std::string::String>,
565 pub(crate) checksum_sha256: ::std::option::Option<::std::string::String>,
566 pub(crate) expires: ::std::option::Option<::aws_smithy_types::DateTime>,
567 pub(crate) if_match: ::std::option::Option<::std::string::String>,
568 pub(crate) if_none_match: ::std::option::Option<::std::string::String>,
569 pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
570 pub(crate) grant_read: ::std::option::Option<::std::string::String>,
571 pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
572 pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
573 pub(crate) key: ::std::option::Option<::std::string::String>,
574 pub(crate) write_offset_bytes: ::std::option::Option<i64>,
575 pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
576 pub(crate) server_side_encryption: ::std::option::Option<crate::types::ServerSideEncryption>,
577 pub(crate) storage_class: ::std::option::Option<crate::types::StorageClass>,
578 pub(crate) website_redirect_location: ::std::option::Option<::std::string::String>,
579 pub(crate) sse_customer_algorithm: ::std::option::Option<::std::string::String>,
580 pub(crate) sse_customer_key: ::std::option::Option<::std::string::String>,
581 pub(crate) sse_customer_key_md5: ::std::option::Option<::std::string::String>,
582 pub(crate) ssekms_key_id: ::std::option::Option<::std::string::String>,
583 pub(crate) ssekms_encryption_context: ::std::option::Option<::std::string::String>,
584 pub(crate) bucket_key_enabled: ::std::option::Option<bool>,
585 pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
586 pub(crate) tagging: ::std::option::Option<::std::string::String>,
587 pub(crate) object_lock_mode: ::std::option::Option<crate::types::ObjectLockMode>,
588 pub(crate) object_lock_retain_until_date: ::std::option::Option<::aws_smithy_types::DateTime>,
589 pub(crate) object_lock_legal_hold_status: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>,
590 pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
591}
592impl PutObjectInputBuilder {
593 /// <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>
594 /// <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>
595 /// <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>
596 /// <ul>
597 /// <li>
598 /// <p>This functionality is not supported for directory buckets.</p></li>
599 /// <li>
600 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
601 /// </ul>
602 /// </note>
603 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
604 self.acl = ::std::option::Option::Some(input);
605 self
606 }
607 /// <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>
608 /// <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>
609 /// <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>
610 /// <ul>
611 /// <li>
612 /// <p>This functionality is not supported for directory buckets.</p></li>
613 /// <li>
614 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
615 /// </ul>
616 /// </note>
617 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
618 self.acl = input;
619 self
620 }
621 /// <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>
622 /// <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>
623 /// <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>
624 /// <ul>
625 /// <li>
626 /// <p>This functionality is not supported for directory buckets.</p></li>
627 /// <li>
628 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
629 /// </ul>
630 /// </note>
631 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
632 &self.acl
633 }
634 /// <p>Object data.</p>
635 pub fn body(mut self, input: ::aws_smithy_types::byte_stream::ByteStream) -> Self {
636 self.body = ::std::option::Option::Some(input);
637 self
638 }
639 /// <p>Object data.</p>
640 pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::byte_stream::ByteStream>) -> Self {
641 self.body = input;
642 self
643 }
644 /// <p>Object data.</p>
645 pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::byte_stream::ByteStream> {
646 &self.body
647 }
648 /// <p>The bucket name to which the PUT action was initiated.</p>
649 /// <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>
650 /// <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>
651 /// <p>Object Lambda access points are not supported by directory buckets.</p>
652 /// </note>
653 /// <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>
654 /// This field is required.
655 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
656 self.bucket = ::std::option::Option::Some(input.into());
657 self
658 }
659 /// <p>The bucket name to which the PUT action was initiated.</p>
660 /// <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>
661 /// <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>
662 /// <p>Object Lambda access points are not supported by directory buckets.</p>
663 /// </note>
664 /// <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>
665 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
666 self.bucket = input;
667 self
668 }
669 /// <p>The bucket name to which the PUT action was initiated.</p>
670 /// <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>
671 /// <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>
672 /// <p>Object Lambda access points are not supported by directory buckets.</p>
673 /// </note>
674 /// <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>
675 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
676 &self.bucket
677 }
678 /// <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>
679 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
680 self.cache_control = ::std::option::Option::Some(input.into());
681 self
682 }
683 /// <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>
684 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
685 self.cache_control = input;
686 self
687 }
688 /// <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>
689 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
690 &self.cache_control
691 }
692 /// <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>
693 pub fn content_disposition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
694 self.content_disposition = ::std::option::Option::Some(input.into());
695 self
696 }
697 /// <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>
698 pub fn set_content_disposition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
699 self.content_disposition = input;
700 self
701 }
702 /// <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>
703 pub fn get_content_disposition(&self) -> &::std::option::Option<::std::string::String> {
704 &self.content_disposition
705 }
706 /// <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>
707 pub fn content_encoding(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
708 self.content_encoding = ::std::option::Option::Some(input.into());
709 self
710 }
711 /// <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>
712 pub fn set_content_encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
713 self.content_encoding = input;
714 self
715 }
716 /// <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>
717 pub fn get_content_encoding(&self) -> &::std::option::Option<::std::string::String> {
718 &self.content_encoding
719 }
720 /// <p>The language the content is in.</p>
721 pub fn content_language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
722 self.content_language = ::std::option::Option::Some(input.into());
723 self
724 }
725 /// <p>The language the content is in.</p>
726 pub fn set_content_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
727 self.content_language = input;
728 self
729 }
730 /// <p>The language the content is in.</p>
731 pub fn get_content_language(&self) -> &::std::option::Option<::std::string::String> {
732 &self.content_language
733 }
734 /// <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>
735 pub fn content_length(mut self, input: i64) -> Self {
736 self.content_length = ::std::option::Option::Some(input);
737 self
738 }
739 /// <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>
740 pub fn set_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
741 self.content_length = input;
742 self
743 }
744 /// <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>
745 pub fn get_content_length(&self) -> &::std::option::Option<i64> {
746 &self.content_length
747 }
748 /// <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>
749 /// <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>
750 /// </note> <note>
751 /// <p>This functionality is not supported for directory buckets.</p>
752 /// </note>
753 pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
754 self.content_md5 = ::std::option::Option::Some(input.into());
755 self
756 }
757 /// <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>
758 /// <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>
759 /// </note> <note>
760 /// <p>This functionality is not supported for directory buckets.</p>
761 /// </note>
762 pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
763 self.content_md5 = input;
764 self
765 }
766 /// <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>
767 /// <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>
768 /// </note> <note>
769 /// <p>This functionality is not supported for directory buckets.</p>
770 /// </note>
771 pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
772 &self.content_md5
773 }
774 /// <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>
775 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
776 self.content_type = ::std::option::Option::Some(input.into());
777 self
778 }
779 /// <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>
780 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
781 self.content_type = input;
782 self
783 }
784 /// <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>
785 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
786 &self.content_type
787 }
788 /// <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>
789 /// <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>
790 /// <ul>
791 /// <li>
792 /// <p><code>CRC32</code></p></li>
793 /// <li>
794 /// <p><code>CRC32C</code></p></li>
795 /// <li>
796 /// <p><code>CRC64NVME</code></p></li>
797 /// <li>
798 /// <p><code>SHA1</code></p></li>
799 /// <li>
800 /// <p><code>SHA256</code></p></li>
801 /// </ul>
802 /// <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>
803 /// <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>
804 /// <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>
805 /// </note>
806 /// <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>
807 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
808 self.checksum_algorithm = ::std::option::Option::Some(input);
809 self
810 }
811 /// <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>
812 /// <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>
813 /// <ul>
814 /// <li>
815 /// <p><code>CRC32</code></p></li>
816 /// <li>
817 /// <p><code>CRC32C</code></p></li>
818 /// <li>
819 /// <p><code>CRC64NVME</code></p></li>
820 /// <li>
821 /// <p><code>SHA1</code></p></li>
822 /// <li>
823 /// <p><code>SHA256</code></p></li>
824 /// </ul>
825 /// <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>
826 /// <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>
827 /// <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>
828 /// </note>
829 /// <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>
830 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
831 self.checksum_algorithm = input;
832 self
833 }
834 /// <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>
835 /// <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>
836 /// <ul>
837 /// <li>
838 /// <p><code>CRC32</code></p></li>
839 /// <li>
840 /// <p><code>CRC32C</code></p></li>
841 /// <li>
842 /// <p><code>CRC64NVME</code></p></li>
843 /// <li>
844 /// <p><code>SHA1</code></p></li>
845 /// <li>
846 /// <p><code>SHA256</code></p></li>
847 /// </ul>
848 /// <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>
849 /// <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>
850 /// <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>
851 /// </note>
852 /// <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>
853 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
854 &self.checksum_algorithm
855 }
856 /// <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>
857 pub fn checksum_crc32(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
858 self.checksum_crc32 = ::std::option::Option::Some(input.into());
859 self
860 }
861 /// <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>
862 pub fn set_checksum_crc32(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
863 self.checksum_crc32 = input;
864 self
865 }
866 /// <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>
867 pub fn get_checksum_crc32(&self) -> &::std::option::Option<::std::string::String> {
868 &self.checksum_crc32
869 }
870 /// <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>
871 pub fn checksum_crc32_c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
872 self.checksum_crc32_c = ::std::option::Option::Some(input.into());
873 self
874 }
875 /// <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>
876 pub fn set_checksum_crc32_c(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
877 self.checksum_crc32_c = input;
878 self
879 }
880 /// <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>
881 pub fn get_checksum_crc32_c(&self) -> &::std::option::Option<::std::string::String> {
882 &self.checksum_crc32_c
883 }
884 /// <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>
885 pub fn checksum_crc64_nvme(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
886 self.checksum_crc64_nvme = ::std::option::Option::Some(input.into());
887 self
888 }
889 /// <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>
890 pub fn set_checksum_crc64_nvme(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
891 self.checksum_crc64_nvme = input;
892 self
893 }
894 /// <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>
895 pub fn get_checksum_crc64_nvme(&self) -> &::std::option::Option<::std::string::String> {
896 &self.checksum_crc64_nvme
897 }
898 /// <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>
899 pub fn checksum_sha1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
900 self.checksum_sha1 = ::std::option::Option::Some(input.into());
901 self
902 }
903 /// <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>
904 pub fn set_checksum_sha1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
905 self.checksum_sha1 = input;
906 self
907 }
908 /// <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>
909 pub fn get_checksum_sha1(&self) -> &::std::option::Option<::std::string::String> {
910 &self.checksum_sha1
911 }
912 /// <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>
913 pub fn checksum_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
914 self.checksum_sha256 = ::std::option::Option::Some(input.into());
915 self
916 }
917 /// <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>
918 pub fn set_checksum_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
919 self.checksum_sha256 = input;
920 self
921 }
922 /// <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>
923 pub fn get_checksum_sha256(&self) -> &::std::option::Option<::std::string::String> {
924 &self.checksum_sha256
925 }
926 /// <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>
927 pub fn expires(mut self, input: ::aws_smithy_types::DateTime) -> Self {
928 self.expires = ::std::option::Option::Some(input);
929 self
930 }
931 /// <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>
932 pub fn set_expires(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
933 self.expires = input;
934 self
935 }
936 /// <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>
937 pub fn get_expires(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
938 &self.expires
939 }
940 /// <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>
941 /// <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>
942 /// <p>Expects the ETag value as a string.</p>
943 /// <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>
944 pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
945 self.if_match = ::std::option::Option::Some(input.into());
946 self
947 }
948 /// <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>
949 /// <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>
950 /// <p>Expects the ETag value as a string.</p>
951 /// <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>
952 pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
953 self.if_match = input;
954 self
955 }
956 /// <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>
957 /// <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>
958 /// <p>Expects the ETag value as a string.</p>
959 /// <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>
960 pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
961 &self.if_match
962 }
963 /// <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>
964 /// <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>
965 /// <p>Expects the '*' (asterisk) character.</p>
966 /// <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>
967 pub fn if_none_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
968 self.if_none_match = ::std::option::Option::Some(input.into());
969 self
970 }
971 /// <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>
972 /// <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>
973 /// <p>Expects the '*' (asterisk) character.</p>
974 /// <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>
975 pub fn set_if_none_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
976 self.if_none_match = input;
977 self
978 }
979 /// <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>
980 /// <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>
981 /// <p>Expects the '*' (asterisk) character.</p>
982 /// <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>
983 pub fn get_if_none_match(&self) -> &::std::option::Option<::std::string::String> {
984 &self.if_none_match
985 }
986 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
987 /// <ul>
988 /// <li>
989 /// <p>This functionality is not supported for directory buckets.</p></li>
990 /// <li>
991 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
992 /// </ul>
993 /// </note>
994 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
995 self.grant_full_control = ::std::option::Option::Some(input.into());
996 self
997 }
998 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
999 /// <ul>
1000 /// <li>
1001 /// <p>This functionality is not supported for directory buckets.</p></li>
1002 /// <li>
1003 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1004 /// </ul>
1005 /// </note>
1006 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1007 self.grant_full_control = input;
1008 self
1009 }
1010 /// <p>Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.</p><note>
1011 /// <ul>
1012 /// <li>
1013 /// <p>This functionality is not supported for directory buckets.</p></li>
1014 /// <li>
1015 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1016 /// </ul>
1017 /// </note>
1018 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
1019 &self.grant_full_control
1020 }
1021 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1022 /// <ul>
1023 /// <li>
1024 /// <p>This functionality is not supported for directory buckets.</p></li>
1025 /// <li>
1026 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1027 /// </ul>
1028 /// </note>
1029 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1030 self.grant_read = ::std::option::Option::Some(input.into());
1031 self
1032 }
1033 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1034 /// <ul>
1035 /// <li>
1036 /// <p>This functionality is not supported for directory buckets.</p></li>
1037 /// <li>
1038 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1039 /// </ul>
1040 /// </note>
1041 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1042 self.grant_read = input;
1043 self
1044 }
1045 /// <p>Allows grantee to read the object data and its metadata.</p><note>
1046 /// <ul>
1047 /// <li>
1048 /// <p>This functionality is not supported for directory buckets.</p></li>
1049 /// <li>
1050 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1051 /// </ul>
1052 /// </note>
1053 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
1054 &self.grant_read
1055 }
1056 /// <p>Allows grantee to read the object ACL.</p><note>
1057 /// <ul>
1058 /// <li>
1059 /// <p>This functionality is not supported for directory buckets.</p></li>
1060 /// <li>
1061 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1062 /// </ul>
1063 /// </note>
1064 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1065 self.grant_read_acp = ::std::option::Option::Some(input.into());
1066 self
1067 }
1068 /// <p>Allows grantee to read the object ACL.</p><note>
1069 /// <ul>
1070 /// <li>
1071 /// <p>This functionality is not supported for directory buckets.</p></li>
1072 /// <li>
1073 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1074 /// </ul>
1075 /// </note>
1076 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1077 self.grant_read_acp = input;
1078 self
1079 }
1080 /// <p>Allows grantee to read the object ACL.</p><note>
1081 /// <ul>
1082 /// <li>
1083 /// <p>This functionality is not supported for directory buckets.</p></li>
1084 /// <li>
1085 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1086 /// </ul>
1087 /// </note>
1088 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
1089 &self.grant_read_acp
1090 }
1091 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1092 /// <ul>
1093 /// <li>
1094 /// <p>This functionality is not supported for directory buckets.</p></li>
1095 /// <li>
1096 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1097 /// </ul>
1098 /// </note>
1099 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1100 self.grant_write_acp = ::std::option::Option::Some(input.into());
1101 self
1102 }
1103 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1104 /// <ul>
1105 /// <li>
1106 /// <p>This functionality is not supported for directory buckets.</p></li>
1107 /// <li>
1108 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1109 /// </ul>
1110 /// </note>
1111 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1112 self.grant_write_acp = input;
1113 self
1114 }
1115 /// <p>Allows grantee to write the ACL for the applicable object.</p><note>
1116 /// <ul>
1117 /// <li>
1118 /// <p>This functionality is not supported for directory buckets.</p></li>
1119 /// <li>
1120 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p></li>
1121 /// </ul>
1122 /// </note>
1123 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
1124 &self.grant_write_acp
1125 }
1126 /// <p>Object key for which the PUT action was initiated.</p>
1127 /// This field is required.
1128 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1129 self.key = ::std::option::Option::Some(input.into());
1130 self
1131 }
1132 /// <p>Object key for which the PUT action was initiated.</p>
1133 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1134 self.key = input;
1135 self
1136 }
1137 /// <p>Object key for which the PUT action was initiated.</p>
1138 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
1139 &self.key
1140 }
1141 /// <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>
1142 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
1143 /// </note>
1144 pub fn write_offset_bytes(mut self, input: i64) -> Self {
1145 self.write_offset_bytes = ::std::option::Option::Some(input);
1146 self
1147 }
1148 /// <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>
1149 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
1150 /// </note>
1151 pub fn set_write_offset_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
1152 self.write_offset_bytes = input;
1153 self
1154 }
1155 /// <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>
1156 /// <p>This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.</p>
1157 /// </note>
1158 pub fn get_write_offset_bytes(&self) -> &::std::option::Option<i64> {
1159 &self.write_offset_bytes
1160 }
1161 /// Adds a key-value pair to `metadata`.
1162 ///
1163 /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
1164 ///
1165 /// <p>A map of metadata to store with the object in S3.</p>
1166 pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
1167 let mut hash_map = self.metadata.unwrap_or_default();
1168 hash_map.insert(k.into(), v.into());
1169 self.metadata = ::std::option::Option::Some(hash_map);
1170 self
1171 }
1172 /// <p>A map of metadata to store with the object in S3.</p>
1173 pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
1174 self.metadata = input;
1175 self
1176 }
1177 /// <p>A map of metadata to store with the object in S3.</p>
1178 pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
1179 &self.metadata
1180 }
1181 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
1182 /// <ul>
1183 /// <li>
1184 /// <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>
1185 /// <li>
1186 /// <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>
1187 /// <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>
1188 /// <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>
1189 /// </note></li>
1190 /// <li>
1191 /// <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>
1192 /// </ul>
1193 pub fn server_side_encryption(mut self, input: crate::types::ServerSideEncryption) -> Self {
1194 self.server_side_encryption = ::std::option::Option::Some(input);
1195 self
1196 }
1197 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
1198 /// <ul>
1199 /// <li>
1200 /// <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>
1201 /// <li>
1202 /// <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>
1203 /// <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>
1204 /// <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>
1205 /// </note></li>
1206 /// <li>
1207 /// <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>
1208 /// </ul>
1209 pub fn set_server_side_encryption(mut self, input: ::std::option::Option<crate::types::ServerSideEncryption>) -> Self {
1210 self.server_side_encryption = input;
1211 self
1212 }
1213 /// <p>The server-side encryption algorithm that was used when you store this object in Amazon S3 or Amazon FSx.</p>
1214 /// <ul>
1215 /// <li>
1216 /// <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>
1217 /// <li>
1218 /// <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>
1219 /// <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>
1220 /// <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>
1221 /// </note></li>
1222 /// <li>
1223 /// <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>
1224 /// </ul>
1225 pub fn get_server_side_encryption(&self) -> &::std::option::Option<crate::types::ServerSideEncryption> {
1226 &self.server_side_encryption
1227 }
1228 /// <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>
1229 /// <ul>
1230 /// <li>
1231 /// <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>
1232 /// <li>
1233 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1234 /// </ul>
1235 /// </note>
1236 pub fn storage_class(mut self, input: crate::types::StorageClass) -> Self {
1237 self.storage_class = ::std::option::Option::Some(input);
1238 self
1239 }
1240 /// <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>
1241 /// <ul>
1242 /// <li>
1243 /// <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>
1244 /// <li>
1245 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1246 /// </ul>
1247 /// </note>
1248 pub fn set_storage_class(mut self, input: ::std::option::Option<crate::types::StorageClass>) -> Self {
1249 self.storage_class = input;
1250 self
1251 }
1252 /// <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>
1253 /// <ul>
1254 /// <li>
1255 /// <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>
1256 /// <li>
1257 /// <p>Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.</p></li>
1258 /// </ul>
1259 /// </note>
1260 pub fn get_storage_class(&self) -> &::std::option::Option<crate::types::StorageClass> {
1261 &self.storage_class
1262 }
1263 /// <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>
1264 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1265 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1266 /// <p>In the following example, the request header sets the object redirect to another website:</p>
1267 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1268 /// <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>
1269 /// <p>This functionality is not supported for directory buckets.</p>
1270 /// </note>
1271 pub fn website_redirect_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1272 self.website_redirect_location = ::std::option::Option::Some(input.into());
1273 self
1274 }
1275 /// <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>
1276 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1277 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1278 /// <p>In the following example, the request header sets the object redirect to another website:</p>
1279 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1280 /// <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>
1281 /// <p>This functionality is not supported for directory buckets.</p>
1282 /// </note>
1283 pub fn set_website_redirect_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1284 self.website_redirect_location = input;
1285 self
1286 }
1287 /// <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>
1288 /// <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p>
1289 /// <p><code>x-amz-website-redirect-location: /anotherPage.html</code></p>
1290 /// <p>In the following example, the request header sets the object redirect to another website:</p>
1291 /// <p><code>x-amz-website-redirect-location: http://www.example.com/</code></p>
1292 /// <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>
1293 /// <p>This functionality is not supported for directory buckets.</p>
1294 /// </note>
1295 pub fn get_website_redirect_location(&self) -> &::std::option::Option<::std::string::String> {
1296 &self.website_redirect_location
1297 }
1298 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1299 /// <p>This functionality is not supported for directory buckets.</p>
1300 /// </note>
1301 pub fn sse_customer_algorithm(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1302 self.sse_customer_algorithm = ::std::option::Option::Some(input.into());
1303 self
1304 }
1305 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1306 /// <p>This functionality is not supported for directory buckets.</p>
1307 /// </note>
1308 pub fn set_sse_customer_algorithm(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1309 self.sse_customer_algorithm = input;
1310 self
1311 }
1312 /// <p>Specifies the algorithm to use when encrypting the object (for example, <code>AES256</code>).</p><note>
1313 /// <p>This functionality is not supported for directory buckets.</p>
1314 /// </note>
1315 pub fn get_sse_customer_algorithm(&self) -> &::std::option::Option<::std::string::String> {
1316 &self.sse_customer_algorithm
1317 }
1318 /// <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>
1319 /// <p>This functionality is not supported for directory buckets.</p>
1320 /// </note>
1321 pub fn sse_customer_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1322 self.sse_customer_key = ::std::option::Option::Some(input.into());
1323 self
1324 }
1325 /// <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>
1326 /// <p>This functionality is not supported for directory buckets.</p>
1327 /// </note>
1328 pub fn set_sse_customer_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1329 self.sse_customer_key = input;
1330 self
1331 }
1332 /// <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>
1333 /// <p>This functionality is not supported for directory buckets.</p>
1334 /// </note>
1335 pub fn get_sse_customer_key(&self) -> &::std::option::Option<::std::string::String> {
1336 &self.sse_customer_key
1337 }
1338 /// <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>
1339 /// <p>This functionality is not supported for directory buckets.</p>
1340 /// </note>
1341 pub fn sse_customer_key_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1342 self.sse_customer_key_md5 = ::std::option::Option::Some(input.into());
1343 self
1344 }
1345 /// <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>
1346 /// <p>This functionality is not supported for directory buckets.</p>
1347 /// </note>
1348 pub fn set_sse_customer_key_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1349 self.sse_customer_key_md5 = input;
1350 self
1351 }
1352 /// <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>
1353 /// <p>This functionality is not supported for directory buckets.</p>
1354 /// </note>
1355 pub fn get_sse_customer_key_md5(&self) -> &::std::option::Option<::std::string::String> {
1356 &self.sse_customer_key_md5
1357 }
1358 /// <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>
1359 /// <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>
1360 /// <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>
1361 pub fn ssekms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1362 self.ssekms_key_id = ::std::option::Option::Some(input.into());
1363 self
1364 }
1365 /// <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>
1366 /// <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>
1367 /// <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>
1368 pub fn set_ssekms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1369 self.ssekms_key_id = input;
1370 self
1371 }
1372 /// <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>
1373 /// <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>
1374 /// <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>
1375 pub fn get_ssekms_key_id(&self) -> &::std::option::Option<::std::string::String> {
1376 &self.ssekms_key_id
1377 }
1378 /// <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>
1379 /// <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>
1380 /// <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>
1381 pub fn ssekms_encryption_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1382 self.ssekms_encryption_context = ::std::option::Option::Some(input.into());
1383 self
1384 }
1385 /// <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>
1386 /// <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>
1387 /// <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>
1388 pub fn set_ssekms_encryption_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1389 self.ssekms_encryption_context = input;
1390 self
1391 }
1392 /// <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>
1393 /// <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>
1394 /// <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>
1395 pub fn get_ssekms_encryption_context(&self) -> &::std::option::Option<::std::string::String> {
1396 &self.ssekms_encryption_context
1397 }
1398 /// <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>
1399 /// <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>
1400 /// <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>
1401 pub fn bucket_key_enabled(mut self, input: bool) -> Self {
1402 self.bucket_key_enabled = ::std::option::Option::Some(input);
1403 self
1404 }
1405 /// <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>
1406 /// <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>
1407 /// <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>
1408 pub fn set_bucket_key_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
1409 self.bucket_key_enabled = input;
1410 self
1411 }
1412 /// <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>
1413 /// <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>
1414 /// <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>
1415 pub fn get_bucket_key_enabled(&self) -> &::std::option::Option<bool> {
1416 &self.bucket_key_enabled
1417 }
1418 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1419 /// <p>This functionality is not supported for directory buckets.</p>
1420 /// </note>
1421 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
1422 self.request_payer = ::std::option::Option::Some(input);
1423 self
1424 }
1425 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1426 /// <p>This functionality is not supported for directory buckets.</p>
1427 /// </note>
1428 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
1429 self.request_payer = input;
1430 self
1431 }
1432 /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding charges to copy the object. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
1433 /// <p>This functionality is not supported for directory buckets.</p>
1434 /// </note>
1435 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
1436 &self.request_payer
1437 }
1438 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1439 /// <p>This functionality is not supported for directory buckets.</p>
1440 /// </note>
1441 pub fn tagging(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1442 self.tagging = ::std::option::Option::Some(input.into());
1443 self
1444 }
1445 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1446 /// <p>This functionality is not supported for directory buckets.</p>
1447 /// </note>
1448 pub fn set_tagging(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1449 self.tagging = input;
1450 self
1451 }
1452 /// <p>The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1")</p><note>
1453 /// <p>This functionality is not supported for directory buckets.</p>
1454 /// </note>
1455 pub fn get_tagging(&self) -> &::std::option::Option<::std::string::String> {
1456 &self.tagging
1457 }
1458 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1459 /// <p>This functionality is not supported for directory buckets.</p>
1460 /// </note>
1461 pub fn object_lock_mode(mut self, input: crate::types::ObjectLockMode) -> Self {
1462 self.object_lock_mode = ::std::option::Option::Some(input);
1463 self
1464 }
1465 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1466 /// <p>This functionality is not supported for directory buckets.</p>
1467 /// </note>
1468 pub fn set_object_lock_mode(mut self, input: ::std::option::Option<crate::types::ObjectLockMode>) -> Self {
1469 self.object_lock_mode = input;
1470 self
1471 }
1472 /// <p>The Object Lock mode that you want to apply to this object.</p><note>
1473 /// <p>This functionality is not supported for directory buckets.</p>
1474 /// </note>
1475 pub fn get_object_lock_mode(&self) -> &::std::option::Option<crate::types::ObjectLockMode> {
1476 &self.object_lock_mode
1477 }
1478 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1479 /// <p>This functionality is not supported for directory buckets.</p>
1480 /// </note>
1481 pub fn object_lock_retain_until_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
1482 self.object_lock_retain_until_date = ::std::option::Option::Some(input);
1483 self
1484 }
1485 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1486 /// <p>This functionality is not supported for directory buckets.</p>
1487 /// </note>
1488 pub fn set_object_lock_retain_until_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
1489 self.object_lock_retain_until_date = input;
1490 self
1491 }
1492 /// <p>The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.</p><note>
1493 /// <p>This functionality is not supported for directory buckets.</p>
1494 /// </note>
1495 pub fn get_object_lock_retain_until_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
1496 &self.object_lock_retain_until_date
1497 }
1498 /// <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>
1499 /// <p>This functionality is not supported for directory buckets.</p>
1500 /// </note>
1501 pub fn object_lock_legal_hold_status(mut self, input: crate::types::ObjectLockLegalHoldStatus) -> Self {
1502 self.object_lock_legal_hold_status = ::std::option::Option::Some(input);
1503 self
1504 }
1505 /// <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>
1506 /// <p>This functionality is not supported for directory buckets.</p>
1507 /// </note>
1508 pub fn set_object_lock_legal_hold_status(mut self, input: ::std::option::Option<crate::types::ObjectLockLegalHoldStatus>) -> Self {
1509 self.object_lock_legal_hold_status = input;
1510 self
1511 }
1512 /// <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>
1513 /// <p>This functionality is not supported for directory buckets.</p>
1514 /// </note>
1515 pub fn get_object_lock_legal_hold_status(&self) -> &::std::option::Option<crate::types::ObjectLockLegalHoldStatus> {
1516 &self.object_lock_legal_hold_status
1517 }
1518 /// <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>
1519 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1520 self.expected_bucket_owner = ::std::option::Option::Some(input.into());
1521 self
1522 }
1523 /// <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>
1524 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
1525 self.expected_bucket_owner = input;
1526 self
1527 }
1528 /// <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>
1529 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
1530 &self.expected_bucket_owner
1531 }
1532 /// Consumes the builder and constructs a [`PutObjectInput`](crate::operation::put_object::PutObjectInput).
1533 pub fn build(self) -> ::std::result::Result<crate::operation::put_object::PutObjectInput, ::aws_smithy_types::error::operation::BuildError> {
1534 ::std::result::Result::Ok(crate::operation::put_object::PutObjectInput {
1535 acl: self.acl,
1536 body: self.body.unwrap_or_default(),
1537 bucket: self.bucket,
1538 cache_control: self.cache_control,
1539 content_disposition: self.content_disposition,
1540 content_encoding: self.content_encoding,
1541 content_language: self.content_language,
1542 content_length: self.content_length,
1543 content_md5: self.content_md5,
1544 content_type: self.content_type,
1545 checksum_algorithm: self.checksum_algorithm,
1546 checksum_crc32: self.checksum_crc32,
1547 checksum_crc32_c: self.checksum_crc32_c,
1548 checksum_crc64_nvme: self.checksum_crc64_nvme,
1549 checksum_sha1: self.checksum_sha1,
1550 checksum_sha256: self.checksum_sha256,
1551 expires: self.expires,
1552 if_match: self.if_match,
1553 if_none_match: self.if_none_match,
1554 grant_full_control: self.grant_full_control,
1555 grant_read: self.grant_read,
1556 grant_read_acp: self.grant_read_acp,
1557 grant_write_acp: self.grant_write_acp,
1558 key: self.key,
1559 write_offset_bytes: self.write_offset_bytes,
1560 metadata: self.metadata,
1561 server_side_encryption: self.server_side_encryption,
1562 storage_class: self.storage_class,
1563 website_redirect_location: self.website_redirect_location,
1564 sse_customer_algorithm: self.sse_customer_algorithm,
1565 sse_customer_key: self.sse_customer_key,
1566 sse_customer_key_md5: self.sse_customer_key_md5,
1567 ssekms_key_id: self.ssekms_key_id,
1568 ssekms_encryption_context: self.ssekms_encryption_context,
1569 bucket_key_enabled: self.bucket_key_enabled,
1570 request_payer: self.request_payer,
1571 tagging: self.tagging,
1572 object_lock_mode: self.object_lock_mode,
1573 object_lock_retain_until_date: self.object_lock_retain_until_date,
1574 object_lock_legal_hold_status: self.object_lock_legal_hold_status,
1575 expected_bucket_owner: self.expected_bucket_owner,
1576 })
1577 }
1578}
1579impl ::std::fmt::Debug for PutObjectInputBuilder {
1580 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1581 let mut formatter = f.debug_struct("PutObjectInputBuilder");
1582 formatter.field("acl", &self.acl);
1583 formatter.field("body", &self.body);
1584 formatter.field("bucket", &self.bucket);
1585 formatter.field("cache_control", &self.cache_control);
1586 formatter.field("content_disposition", &self.content_disposition);
1587 formatter.field("content_encoding", &self.content_encoding);
1588 formatter.field("content_language", &self.content_language);
1589 formatter.field("content_length", &self.content_length);
1590 formatter.field("content_md5", &self.content_md5);
1591 formatter.field("content_type", &self.content_type);
1592 formatter.field("checksum_algorithm", &self.checksum_algorithm);
1593 formatter.field("checksum_crc32", &self.checksum_crc32);
1594 formatter.field("checksum_crc32_c", &self.checksum_crc32_c);
1595 formatter.field("checksum_crc64_nvme", &self.checksum_crc64_nvme);
1596 formatter.field("checksum_sha1", &self.checksum_sha1);
1597 formatter.field("checksum_sha256", &self.checksum_sha256);
1598 formatter.field("expires", &self.expires);
1599 formatter.field("if_match", &self.if_match);
1600 formatter.field("if_none_match", &self.if_none_match);
1601 formatter.field("grant_full_control", &self.grant_full_control);
1602 formatter.field("grant_read", &self.grant_read);
1603 formatter.field("grant_read_acp", &self.grant_read_acp);
1604 formatter.field("grant_write_acp", &self.grant_write_acp);
1605 formatter.field("key", &self.key);
1606 formatter.field("write_offset_bytes", &self.write_offset_bytes);
1607 formatter.field("metadata", &self.metadata);
1608 formatter.field("server_side_encryption", &self.server_side_encryption);
1609 formatter.field("storage_class", &self.storage_class);
1610 formatter.field("website_redirect_location", &self.website_redirect_location);
1611 formatter.field("sse_customer_algorithm", &self.sse_customer_algorithm);
1612 formatter.field("sse_customer_key", &"*** Sensitive Data Redacted ***");
1613 formatter.field("sse_customer_key_md5", &self.sse_customer_key_md5);
1614 formatter.field("ssekms_key_id", &"*** Sensitive Data Redacted ***");
1615 formatter.field("ssekms_encryption_context", &"*** Sensitive Data Redacted ***");
1616 formatter.field("bucket_key_enabled", &self.bucket_key_enabled);
1617 formatter.field("request_payer", &self.request_payer);
1618 formatter.field("tagging", &self.tagging);
1619 formatter.field("object_lock_mode", &self.object_lock_mode);
1620 formatter.field("object_lock_retain_until_date", &self.object_lock_retain_until_date);
1621 formatter.field("object_lock_legal_hold_status", &self.object_lock_legal_hold_status);
1622 formatter.field("expected_bucket_owner", &self.expected_bucket_owner);
1623 formatter.finish()
1624 }
1625}