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