aws_sdk_s3/operation/put_object_acl/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::put_object_acl::_put_object_acl_output::PutObjectAclOutputBuilder;
3
4pub use crate::operation::put_object_acl::_put_object_acl_input::PutObjectAclInputBuilder;
5
6impl crate::operation::put_object_acl::builders::PutObjectAclInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::put_object_acl::PutObjectAclOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::put_object_acl::PutObjectAclError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.put_object_acl();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `PutObjectAcl`.
24///
25/// <important>
26/// <p>End of support notice: As of October 1, 2025, Amazon S3 has discontinued support for Email Grantee Access Control Lists (ACLs). If you attempt to use an Email Grantee ACL in a request after October 1, 2025, the request will receive an <code>HTTP 405</code> (Method Not Allowed) error.</p>
27/// <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Europe (Ireland), and South America (São Paulo).</p>
28/// </important> <note>
29/// <p>This operation is not supported for directory buckets.</p>
30/// </note>
31/// <p>Uses the <code>acl</code> subresource to set the access control list (ACL) permissions for a new or existing object in an S3 bucket. You must have the <code>WRITE_ACP</code> permission to set the ACL of an object. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions">What permissions can I grant?</a> in the <i>Amazon S3 User Guide</i>.</p>
32/// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
33/// <p>Depending on your application needs, you can choose to set the ACL on an object using either the request body or the headers. For example, if you have an existing application that updates a bucket ACL using the request body, you can continue to use that approach. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a> in the <i>Amazon S3 User Guide</i>.</p><important>
34/// <p>If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. You must use policies to grant access to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return the <code>AccessControlListNotSupported</code> error code. Requests to read ACLs are still supported. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling object ownership</a> in the <i>Amazon S3 User Guide</i>.</p>
35/// </important>
36/// <dl>
37/// <dt>
38/// Permissions
39/// </dt>
40/// <dd>
41/// <p>You can set access permissions using one of the following methods:</p>
42/// <ul>
43/// <li>
44/// <p>Specify a canned ACL with the <code>x-amz-acl</code> request header. Amazon S3 supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees and permissions. Specify the canned ACL name as the value of <code>x-amz-ac</code>l. If you use this header, you cannot use other access control-specific headers in your request. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL">Canned ACL</a>.</p></li>
45/// <li>
46/// <p>Specify access permissions explicitly with the <code>x-amz-grant-read</code>, <code>x-amz-grant-read-acp</code>, <code>x-amz-grant-write-acp</code>, and <code>x-amz-grant-full-control</code> headers. When using these headers, you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific headers, you cannot use <code>x-amz-acl</code> header to set a canned ACL. These parameters map to the set of permissions that Amazon S3 supports in an ACL. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html">Access Control List (ACL) Overview</a>.</p>
47/// <p>You specify each grantee as a type=value pair, where the type is one of the following:</p>
48/// <ul>
49/// <li>
50/// <p><code>id</code> – if the value specified is the canonical user ID of an Amazon Web Services account</p></li>
51/// <li>
52/// <p><code>uri</code> – if you are granting permissions to a predefined group</p></li>
53/// <li>
54/// <p><code>emailAddress</code> – if the value specified is the email address of an Amazon Web Services account</p><note>
55/// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
56/// <ul>
57/// <li>
58/// <p>US East (N. Virginia)</p></li>
59/// <li>
60/// <p>US West (N. California)</p></li>
61/// <li>
62/// <p>US West (Oregon)</p></li>
63/// <li>
64/// <p>Asia Pacific (Singapore)</p></li>
65/// <li>
66/// <p>Asia Pacific (Sydney)</p></li>
67/// <li>
68/// <p>Asia Pacific (Tokyo)</p></li>
69/// <li>
70/// <p>Europe (Ireland)</p></li>
71/// <li>
72/// <p>South America (São Paulo)</p></li>
73/// </ul>
74/// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
75/// </note></li>
76/// </ul>
77/// <p>For example, the following <code>x-amz-grant-read</code> header grants list objects permission to the two Amazon Web Services accounts identified by their email addresses.</p>
78/// <p><code>x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" </code></p></li>
79/// </ul>
80/// <p>You can use either a canned ACL or specify access permissions explicitly. You cannot do both.</p>
81/// </dd>
82/// <dt>
83/// Grantee Values
84/// </dt>
85/// <dd>
86/// <p>You can specify the person (grantee) to whom you're assigning access rights (using request elements) in the following ways. For examples of how to specify these grantee values in JSON format, see the Amazon Web Services CLI example in <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html"> Enabling Amazon S3 server access logging</a> in the <i>Amazon S3 User Guide</i>.</p>
87/// <ul>
88/// <li>
89/// <p>By the person's ID:</p>
90/// <p><code><grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
91/// <id>
92/// <>ID<>
93/// </id>
94/// <displayname>
95/// <>GranteesEmail<>
96/// </displayname>
97/// </grantee></code></p>
98/// <p>DisplayName is optional and ignored in the request.</p></li>
99/// <li>
100/// <p>By URI:</p>
101/// <p><code><grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group">
102/// <uri>
103/// <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
104/// </uri>
105/// </grantee></code></p></li>
106/// <li>
107/// <p>By Email address:</p>
108/// <p><code><grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail">
109/// <emailaddress>
110/// <>Grantees@email.com<>
111/// </emailaddress>lt;/Grantee>
112/// </grantee></code></p>
113/// <p>The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl request, appears as the CanonicalUser.</p><note>
114/// <p>Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:</p>
115/// <ul>
116/// <li>
117/// <p>US East (N. Virginia)</p></li>
118/// <li>
119/// <p>US West (N. California)</p></li>
120/// <li>
121/// <p>US West (Oregon)</p></li>
122/// <li>
123/// <p>Asia Pacific (Singapore)</p></li>
124/// <li>
125/// <p>Asia Pacific (Sydney)</p></li>
126/// <li>
127/// <p>Asia Pacific (Tokyo)</p></li>
128/// <li>
129/// <p>Europe (Ireland)</p></li>
130/// <li>
131/// <p>South America (São Paulo)</p></li>
132/// </ul>
133/// <p>For a list of all the Amazon S3 supported Regions and endpoints, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region">Regions and Endpoints</a> in the Amazon Web Services General Reference.</p>
134/// </note></li>
135/// </ul>
136/// </dd>
137/// <dt>
138/// Versioning
139/// </dt>
140/// <dd>
141/// <p>The ACL of an object is set at the object version level. By default, PUT sets the ACL of the current version of an object. To set the ACL of a different version, use the <code>versionId</code> subresource.</p>
142/// </dd>
143/// </dl>
144/// <p>The following operations are related to <code>PutObjectAcl</code>:</p>
145/// <ul>
146/// <li>
147/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html">CopyObject</a></p></li>
148/// <li>
149/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html">GetObject</a></p></li>
150/// </ul><important>
151/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
152/// </important>
153#[derive(::std::clone::Clone, ::std::fmt::Debug)]
154pub struct PutObjectAclFluentBuilder {
155 handle: ::std::sync::Arc<crate::client::Handle>,
156 inner: crate::operation::put_object_acl::builders::PutObjectAclInputBuilder,
157 config_override: ::std::option::Option<crate::config::Builder>,
158}
159impl
160 crate::client::customize::internal::CustomizableSend<
161 crate::operation::put_object_acl::PutObjectAclOutput,
162 crate::operation::put_object_acl::PutObjectAclError,
163 > for PutObjectAclFluentBuilder
164{
165 fn send(
166 self,
167 config_override: crate::config::Builder,
168 ) -> crate::client::customize::internal::BoxFuture<
169 crate::client::customize::internal::SendResult<
170 crate::operation::put_object_acl::PutObjectAclOutput,
171 crate::operation::put_object_acl::PutObjectAclError,
172 >,
173 > {
174 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
175 }
176}
177impl PutObjectAclFluentBuilder {
178 /// Creates a new `PutObjectAclFluentBuilder`.
179 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
180 Self {
181 handle,
182 inner: ::std::default::Default::default(),
183 config_override: ::std::option::Option::None,
184 }
185 }
186 /// Access the PutObjectAcl as a reference.
187 pub fn as_input(&self) -> &crate::operation::put_object_acl::builders::PutObjectAclInputBuilder {
188 &self.inner
189 }
190 /// Sends the request and returns the response.
191 ///
192 /// If an error occurs, an `SdkError` will be returned with additional details that
193 /// can be matched against.
194 ///
195 /// By default, any retryable failures will be retried twice. Retry behavior
196 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
197 /// set when configuring the client.
198 pub async fn send(
199 self,
200 ) -> ::std::result::Result<
201 crate::operation::put_object_acl::PutObjectAclOutput,
202 ::aws_smithy_runtime_api::client::result::SdkError<
203 crate::operation::put_object_acl::PutObjectAclError,
204 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
205 >,
206 > {
207 let input = self
208 .inner
209 .build()
210 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
211 let runtime_plugins = crate::operation::put_object_acl::PutObjectAcl::operation_runtime_plugins(
212 self.handle.runtime_plugins.clone(),
213 &self.handle.conf,
214 self.config_override,
215 );
216 crate::operation::put_object_acl::PutObjectAcl::orchestrate(&runtime_plugins, input).await
217 }
218
219 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
220 pub fn customize(
221 self,
222 ) -> crate::client::customize::CustomizableOperation<
223 crate::operation::put_object_acl::PutObjectAclOutput,
224 crate::operation::put_object_acl::PutObjectAclError,
225 Self,
226 > {
227 crate::client::customize::CustomizableOperation::new(self)
228 }
229 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
230 self.set_config_override(::std::option::Option::Some(config_override.into()));
231 self
232 }
233
234 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
235 self.config_override = config_override;
236 self
237 }
238 /// <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>.</p>
239 pub fn acl(mut self, input: crate::types::ObjectCannedAcl) -> Self {
240 self.inner = self.inner.acl(input);
241 self
242 }
243 /// <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>.</p>
244 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::ObjectCannedAcl>) -> Self {
245 self.inner = self.inner.set_acl(input);
246 self
247 }
248 /// <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>.</p>
249 pub fn get_acl(&self) -> &::std::option::Option<crate::types::ObjectCannedAcl> {
250 self.inner.get_acl()
251 }
252 /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
253 pub fn access_control_policy(mut self, input: crate::types::AccessControlPolicy) -> Self {
254 self.inner = self.inner.access_control_policy(input);
255 self
256 }
257 /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
258 pub fn set_access_control_policy(mut self, input: ::std::option::Option<crate::types::AccessControlPolicy>) -> Self {
259 self.inner = self.inner.set_access_control_policy(input);
260 self
261 }
262 /// <p>Contains the elements that set the ACL permissions for an object per grantee.</p>
263 pub fn get_access_control_policy(&self) -> &::std::option::Option<crate::types::AccessControlPolicy> {
264 self.inner.get_access_control_policy()
265 }
266 /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
267 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
268 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
269 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270 self.inner = self.inner.bucket(input.into());
271 self
272 }
273 /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
274 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
275 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
276 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
277 self.inner = self.inner.set_bucket(input);
278 self
279 }
280 /// <p>The bucket name that contains the object to which you want to attach the ACL.</p>
281 /// <p><b>Access points</b> - When you use this action with an access point for general purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
282 /// <p><b>S3 on Outposts</b> - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form <code> <i>AccessPointName</i>-<i>AccountId</i>.<i>outpostID</i>.s3-outposts.<i>Region</i>.amazonaws.com</code>. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">What is S3 on Outposts?</a> in the <i>Amazon S3 User Guide</i>.</p>
283 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
284 self.inner.get_bucket()
285 }
286 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.></a></p>
287 /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
288 pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289 self.inner = self.inner.content_md5(input.into());
290 self
291 }
292 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.></a></p>
293 /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
294 pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
295 self.inner = self.inner.set_content_md5(input);
296 self
297 }
298 /// <p>The Base64 encoded 128-bit <code>MD5</code> digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to <a href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864.></a></p>
299 /// <p>For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.</p>
300 pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
301 self.inner.get_content_md5()
302 }
303 /// <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</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>. 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>
304 /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
305 pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
306 self.inner = self.inner.checksum_algorithm(input);
307 self
308 }
309 /// <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</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>. 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>
310 /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
311 pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
312 self.inner = self.inner.set_checksum_algorithm(input);
313 self
314 }
315 /// <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</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>. 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>
316 /// <p>If you provide an individual checksum, Amazon S3 ignores any provided <code>ChecksumAlgorithm</code> parameter.</p>
317 pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
318 self.inner.get_checksum_algorithm()
319 }
320 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
321 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
322 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
323 self.inner = self.inner.grant_full_control(input.into());
324 self
325 }
326 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
327 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
328 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
329 self.inner = self.inner.set_grant_full_control(input);
330 self
331 }
332 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p>
333 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
334 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
335 self.inner.get_grant_full_control()
336 }
337 /// <p>Allows grantee to list the objects in the bucket.</p>
338 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
339 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340 self.inner = self.inner.grant_read(input.into());
341 self
342 }
343 /// <p>Allows grantee to list the objects in the bucket.</p>
344 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
345 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
346 self.inner = self.inner.set_grant_read(input);
347 self
348 }
349 /// <p>Allows grantee to list the objects in the bucket.</p>
350 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
351 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
352 self.inner.get_grant_read()
353 }
354 /// <p>Allows grantee to read the bucket ACL.</p>
355 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
356 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
357 self.inner = self.inner.grant_read_acp(input.into());
358 self
359 }
360 /// <p>Allows grantee to read the bucket ACL.</p>
361 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
362 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
363 self.inner = self.inner.set_grant_read_acp(input);
364 self
365 }
366 /// <p>Allows grantee to read the bucket ACL.</p>
367 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
368 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
369 self.inner.get_grant_read_acp()
370 }
371 /// <p>Allows grantee to create new objects in the bucket.</p>
372 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
373 pub fn grant_write(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 self.inner = self.inner.grant_write(input.into());
375 self
376 }
377 /// <p>Allows grantee to create new objects in the bucket.</p>
378 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
379 pub fn set_grant_write(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
380 self.inner = self.inner.set_grant_write(input);
381 self
382 }
383 /// <p>Allows grantee to create new objects in the bucket.</p>
384 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p>
385 pub fn get_grant_write(&self) -> &::std::option::Option<::std::string::String> {
386 self.inner.get_grant_write()
387 }
388 /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
389 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
390 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
391 self.inner = self.inner.grant_write_acp(input.into());
392 self
393 }
394 /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
395 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
396 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
397 self.inner = self.inner.set_grant_write_acp(input);
398 self
399 }
400 /// <p>Allows grantee to write the ACL for the applicable bucket.</p>
401 /// <p>This functionality is not supported for Amazon S3 on Outposts.</p>
402 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
403 self.inner.get_grant_write_acp()
404 }
405 /// <p>Key for which the PUT action was initiated.</p>
406 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
407 self.inner = self.inner.key(input.into());
408 self
409 }
410 /// <p>Key for which the PUT action was initiated.</p>
411 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412 self.inner = self.inner.set_key(input);
413 self
414 }
415 /// <p>Key for which the PUT action was initiated.</p>
416 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
417 self.inner.get_key()
418 }
419 /// <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>
420 /// <p>This functionality is not supported for directory buckets.</p>
421 /// </note>
422 pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
423 self.inner = self.inner.request_payer(input);
424 self
425 }
426 /// <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>
427 /// <p>This functionality is not supported for directory buckets.</p>
428 /// </note>
429 pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
430 self.inner = self.inner.set_request_payer(input);
431 self
432 }
433 /// <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>
434 /// <p>This functionality is not supported for directory buckets.</p>
435 /// </note>
436 pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
437 self.inner.get_request_payer()
438 }
439 /// <p>Version ID used to reference a specific version of the object.</p><note>
440 /// <p>This functionality is not supported for directory buckets.</p>
441 /// </note>
442 pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
443 self.inner = self.inner.version_id(input.into());
444 self
445 }
446 /// <p>Version ID used to reference a specific version of the object.</p><note>
447 /// <p>This functionality is not supported for directory buckets.</p>
448 /// </note>
449 pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
450 self.inner = self.inner.set_version_id(input);
451 self
452 }
453 /// <p>Version ID used to reference a specific version of the object.</p><note>
454 /// <p>This functionality is not supported for directory buckets.</p>
455 /// </note>
456 pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
457 self.inner.get_version_id()
458 }
459 /// <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>
460 pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
461 self.inner = self.inner.expected_bucket_owner(input.into());
462 self
463 }
464 /// <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>
465 pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
466 self.inner = self.inner.set_expected_bucket_owner(input);
467 self
468 }
469 /// <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>
470 pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
471 self.inner.get_expected_bucket_owner()
472 }
473}