aws_sdk_s3/operation/create_bucket/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_bucket::_create_bucket_output::CreateBucketOutputBuilder;
3
4pub use crate::operation::create_bucket::_create_bucket_input::CreateBucketInputBuilder;
5
6impl crate::operation::create_bucket::builders::CreateBucketInputBuilder {
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::create_bucket::CreateBucketOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_bucket::CreateBucketError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_bucket();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateBucket`.
24///
25/// <note>
26/// <p>This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html"> <code>CreateBucket</code> </a>.</p>
27/// </note>
28/// <p>Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests are never allowed to create buckets. By creating the bucket, you become the bucket owner.</p>
29/// <p>There are two types of buckets: general purpose buckets and directory buckets. For more information about these bucket types, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html">Creating, configuring, and working with Amazon S3 buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
30/// <ul>
31/// <li>
32/// <p><b>General purpose buckets</b> - If you send your <code>CreateBucket</code> request to the <code>s3.amazonaws.com</code> global endpoint, the request goes to the <code>us-east-1</code> Region. So the signature calculations in Signature Version 4 must use <code>us-east-1</code> as the Region, even if the location constraint in the request specifies another Region where the bucket is to be created. If you create a bucket in a Region other than US East (N. Virginia), your application must be able to handle 307 redirect. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html">Virtual hosting of buckets</a> in the <i>Amazon S3 User Guide</i>.</p></li>
33/// <li>
34/// <p><b>Directory buckets </b> - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format <code>https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> </code>. Virtual-hosted-style requests aren't supported. For more information about endpoints in Availability Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/endpoint-directory-buckets-AZ.html">Regional and Zonal endpoints for directory buckets in Availability Zones</a> in the <i>Amazon S3 User Guide</i>. For more information about endpoints in Local Zones, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-lzs-for-directory-buckets.html">Concepts for directory buckets in Local Zones</a> in the <i>Amazon S3 User Guide</i>.</p></li>
35/// </ul>
36/// </note>
37/// <dl>
38/// <dt>
39/// Permissions
40/// </dt>
41/// <dd>
42/// <ul>
43/// <li>
44/// <p><b>General purpose bucket permissions</b> - In addition to the <code>s3:CreateBucket</code> permission, the following permissions are required in a policy when your <code>CreateBucket</code> request includes specific headers:</p>
45/// <ul>
46/// <li>
47/// <p><b>Access control lists (ACLs)</b> - In your <code>CreateBucket</code> request, if you specify an access control list (ACL) and set it to <code>public-read</code>, <code>public-read-write</code>, <code>authenticated-read</code>, or if you explicitly specify any other custom ACLs, both <code>s3:CreateBucket</code> and <code>s3:PutBucketAcl</code> permissions are required. In your <code>CreateBucket</code> request, if you set the ACL to <code>private</code>, or if you don't specify any ACLs, only the <code>s3:CreateBucket</code> permission is required.</p></li>
48/// <li>
49/// <p><b>Object Lock</b> - In your <code>CreateBucket</code> request, if you set <code>x-amz-bucket-object-lock-enabled</code> to true, the <code>s3:PutBucketObjectLockConfiguration</code> and <code>s3:PutBucketVersioning</code> permissions are required.</p></li>
50/// <li>
51/// <p><b>S3 Object Ownership</b> - If your <code>CreateBucket</code> request includes the <code>x-amz-object-ownership</code> header, then the <code>s3:PutBucketOwnershipControls</code> permission is required.</p><important>
52/// <p>To set an ACL on a bucket as part of a <code>CreateBucket</code> request, you must explicitly set S3 Object Ownership for the bucket to a different value than the default, <code>BucketOwnerEnforced</code>. Additionally, if your desired bucket ACL grants public access, you must first create the bucket (without the bucket ACL) and then explicitly disable Block Public Access on the bucket before using <code>PutBucketAcl</code> to set the ACL. If you try to create a bucket with a public ACL, the request will fail.</p>
53/// <p>For the majority of modern use cases in S3, we recommend that you keep all Block Public Access settings enabled and keep ACLs disabled. If you would like to share data with users outside of your account, you can use bucket policies as needed. 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 for your bucket </a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html">Blocking public access to your Amazon S3 storage </a> in the <i>Amazon S3 User Guide</i>.</p>
54/// </important></li>
55/// <li>
56/// <p><b>S3 Block Public Access</b> - If your specific use case requires granting public access to your S3 resources, you can disable Block Public Access. Specifically, you can create a new bucket with Block Public Access enabled, then separately call the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html"> <code>DeletePublicAccessBlock</code> </a> API. To use this operation, you must have the <code>s3:PutBucketPublicAccessBlock</code> permission. For more information about S3 Block Public Access, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html">Blocking public access to your Amazon S3 storage </a> in the <i>Amazon S3 User Guide</i>.</p></li>
57/// </ul></li>
58/// <li>
59/// <p><b>Directory bucket permissions</b> - You must have the <code>s3express:CreateBucket</code> permission in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. For more information about directory bucket policies and permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html">Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p><important>
60/// <p>The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access are not supported for directory buckets. For directory buckets, all Block Public Access settings are enabled at the bucket level and S3 Object Ownership is set to Bucket owner enforced (ACLs disabled). These settings can't be modified.</p>
61/// <p>For more information about permissions for creating and working with directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html">Directory buckets</a> in the <i>Amazon S3 User Guide</i>. For more information about supported S3 features for directory buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features">Features of S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p>
62/// </important></li>
63/// </ul>
64/// </dd>
65/// <dt>
66/// HTTP Host header syntax
67/// </dt>
68/// <dd>
69/// <p><b>Directory buckets </b> - The HTTP Host header syntax is <code>s3express-control.<i>region-code</i>.amazonaws.com</code>.</p>
70/// </dd>
71/// </dl>
72/// <p>The following operations are related to <code>CreateBucket</code>:</p>
73/// <ul>
74/// <li>
75/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html">PutObject</a></p></li>
76/// <li>
77/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html">DeleteBucket</a></p></li>
78/// </ul>
79#[derive(::std::clone::Clone, ::std::fmt::Debug)]
80pub struct CreateBucketFluentBuilder {
81 handle: ::std::sync::Arc<crate::client::Handle>,
82 inner: crate::operation::create_bucket::builders::CreateBucketInputBuilder,
83 config_override: ::std::option::Option<crate::config::Builder>,
84}
85impl
86 crate::client::customize::internal::CustomizableSend<
87 crate::operation::create_bucket::CreateBucketOutput,
88 crate::operation::create_bucket::CreateBucketError,
89 > for CreateBucketFluentBuilder
90{
91 fn send(
92 self,
93 config_override: crate::config::Builder,
94 ) -> crate::client::customize::internal::BoxFuture<
95 crate::client::customize::internal::SendResult<
96 crate::operation::create_bucket::CreateBucketOutput,
97 crate::operation::create_bucket::CreateBucketError,
98 >,
99 > {
100 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
101 }
102}
103impl CreateBucketFluentBuilder {
104 /// Creates a new `CreateBucketFluentBuilder`.
105 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
106 Self {
107 handle,
108 inner: ::std::default::Default::default(),
109 config_override: ::std::option::Option::None,
110 }
111 }
112 /// Access the CreateBucket as a reference.
113 pub fn as_input(&self) -> &crate::operation::create_bucket::builders::CreateBucketInputBuilder {
114 &self.inner
115 }
116 /// Sends the request and returns the response.
117 ///
118 /// If an error occurs, an `SdkError` will be returned with additional details that
119 /// can be matched against.
120 ///
121 /// By default, any retryable failures will be retried twice. Retry behavior
122 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
123 /// set when configuring the client.
124 pub async fn send(
125 self,
126 ) -> ::std::result::Result<
127 crate::operation::create_bucket::CreateBucketOutput,
128 ::aws_smithy_runtime_api::client::result::SdkError<
129 crate::operation::create_bucket::CreateBucketError,
130 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
131 >,
132 > {
133 let input = self
134 .inner
135 .build()
136 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
137 let runtime_plugins = crate::operation::create_bucket::CreateBucket::operation_runtime_plugins(
138 self.handle.runtime_plugins.clone(),
139 &self.handle.conf,
140 self.config_override,
141 );
142 crate::operation::create_bucket::CreateBucket::orchestrate(&runtime_plugins, input).await
143 }
144
145 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
146 pub fn customize(
147 self,
148 ) -> crate::client::customize::CustomizableOperation<
149 crate::operation::create_bucket::CreateBucketOutput,
150 crate::operation::create_bucket::CreateBucketError,
151 Self,
152 > {
153 crate::client::customize::CustomizableOperation::new(self)
154 }
155 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
156 self.set_config_override(::std::option::Option::Some(config_override.into()));
157 self
158 }
159
160 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
161 self.config_override = config_override;
162 self
163 }
164 /// <p>The canned ACL to apply to the bucket.</p><note>
165 /// <p>This functionality is not supported for directory buckets.</p>
166 /// </note>
167 pub fn acl(mut self, input: crate::types::BucketCannedAcl) -> Self {
168 self.inner = self.inner.acl(input);
169 self
170 }
171 /// <p>The canned ACL to apply to the bucket.</p><note>
172 /// <p>This functionality is not supported for directory buckets.</p>
173 /// </note>
174 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::BucketCannedAcl>) -> Self {
175 self.inner = self.inner.set_acl(input);
176 self
177 }
178 /// <p>The canned ACL to apply to the bucket.</p><note>
179 /// <p>This functionality is not supported for directory buckets.</p>
180 /// </note>
181 pub fn get_acl(&self) -> &::std::option::Option<crate::types::BucketCannedAcl> {
182 self.inner.get_acl()
183 }
184 /// <p>The name of the bucket to create.</p>
185 /// <p><b>General purpose buckets</b> - For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html">Bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
186 /// <p><b>Directory buckets </b> - When you use this operation with a directory bucket, you must use path-style requests in the format <code>https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> </code>. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also 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>
187 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188 self.inner = self.inner.bucket(input.into());
189 self
190 }
191 /// <p>The name of the bucket to create.</p>
192 /// <p><b>General purpose buckets</b> - For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html">Bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
193 /// <p><b>Directory buckets </b> - When you use this operation with a directory bucket, you must use path-style requests in the format <code>https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> </code>. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also 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>
194 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195 self.inner = self.inner.set_bucket(input);
196 self
197 }
198 /// <p>The name of the bucket to create.</p>
199 /// <p><b>General purpose buckets</b> - For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html">Bucket naming rules</a> in the <i>Amazon S3 User Guide</i>.</p>
200 /// <p><b>Directory buckets </b> - When you use this operation with a directory bucket, you must use path-style requests in the format <code>https://s3express-control.<i>region-code</i>.amazonaws.com/<i>bucket-name</i> </code>. Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also 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>
201 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
202 self.inner.get_bucket()
203 }
204 /// <p>The configuration information for the bucket.</p>
205 pub fn create_bucket_configuration(mut self, input: crate::types::CreateBucketConfiguration) -> Self {
206 self.inner = self.inner.create_bucket_configuration(input);
207 self
208 }
209 /// <p>The configuration information for the bucket.</p>
210 pub fn set_create_bucket_configuration(mut self, input: ::std::option::Option<crate::types::CreateBucketConfiguration>) -> Self {
211 self.inner = self.inner.set_create_bucket_configuration(input);
212 self
213 }
214 /// <p>The configuration information for the bucket.</p>
215 pub fn get_create_bucket_configuration(&self) -> &::std::option::Option<crate::types::CreateBucketConfiguration> {
216 self.inner.get_create_bucket_configuration()
217 }
218 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
219 /// <p>This functionality is not supported for directory buckets.</p>
220 /// </note>
221 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.inner = self.inner.grant_full_control(input.into());
223 self
224 }
225 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
226 /// <p>This functionality is not supported for directory buckets.</p>
227 /// </note>
228 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229 self.inner = self.inner.set_grant_full_control(input);
230 self
231 }
232 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
233 /// <p>This functionality is not supported for directory buckets.</p>
234 /// </note>
235 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
236 self.inner.get_grant_full_control()
237 }
238 /// <p>Allows grantee to list the objects in the bucket.</p><note>
239 /// <p>This functionality is not supported for directory buckets.</p>
240 /// </note>
241 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242 self.inner = self.inner.grant_read(input.into());
243 self
244 }
245 /// <p>Allows grantee to list the objects in the bucket.</p><note>
246 /// <p>This functionality is not supported for directory buckets.</p>
247 /// </note>
248 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249 self.inner = self.inner.set_grant_read(input);
250 self
251 }
252 /// <p>Allows grantee to list the objects in the bucket.</p><note>
253 /// <p>This functionality is not supported for directory buckets.</p>
254 /// </note>
255 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
256 self.inner.get_grant_read()
257 }
258 /// <p>Allows grantee to read the bucket ACL.</p><note>
259 /// <p>This functionality is not supported for directory buckets.</p>
260 /// </note>
261 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
262 self.inner = self.inner.grant_read_acp(input.into());
263 self
264 }
265 /// <p>Allows grantee to read the bucket ACL.</p><note>
266 /// <p>This functionality is not supported for directory buckets.</p>
267 /// </note>
268 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.inner = self.inner.set_grant_read_acp(input);
270 self
271 }
272 /// <p>Allows grantee to read the bucket ACL.</p><note>
273 /// <p>This functionality is not supported for directory buckets.</p>
274 /// </note>
275 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
276 self.inner.get_grant_read_acp()
277 }
278 /// <p>Allows grantee to create new objects in the bucket.</p>
279 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
280 /// <p>This functionality is not supported for directory buckets.</p>
281 /// </note>
282 pub fn grant_write(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
283 self.inner = self.inner.grant_write(input.into());
284 self
285 }
286 /// <p>Allows grantee to create new objects in the bucket.</p>
287 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
288 /// <p>This functionality is not supported for directory buckets.</p>
289 /// </note>
290 pub fn set_grant_write(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291 self.inner = self.inner.set_grant_write(input);
292 self
293 }
294 /// <p>Allows grantee to create new objects in the bucket.</p>
295 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
296 /// <p>This functionality is not supported for directory buckets.</p>
297 /// </note>
298 pub fn get_grant_write(&self) -> &::std::option::Option<::std::string::String> {
299 self.inner.get_grant_write()
300 }
301 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
302 /// <p>This functionality is not supported for directory buckets.</p>
303 /// </note>
304 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
305 self.inner = self.inner.grant_write_acp(input.into());
306 self
307 }
308 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
309 /// <p>This functionality is not supported for directory buckets.</p>
310 /// </note>
311 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
312 self.inner = self.inner.set_grant_write_acp(input);
313 self
314 }
315 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
316 /// <p>This functionality is not supported for directory buckets.</p>
317 /// </note>
318 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
319 self.inner.get_grant_write_acp()
320 }
321 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
322 /// <p>This functionality is not supported for directory buckets.</p>
323 /// </note>
324 pub fn object_lock_enabled_for_bucket(mut self, input: bool) -> Self {
325 self.inner = self.inner.object_lock_enabled_for_bucket(input);
326 self
327 }
328 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
329 /// <p>This functionality is not supported for directory buckets.</p>
330 /// </note>
331 pub fn set_object_lock_enabled_for_bucket(mut self, input: ::std::option::Option<bool>) -> Self {
332 self.inner = self.inner.set_object_lock_enabled_for_bucket(input);
333 self
334 }
335 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
336 /// <p>This functionality is not supported for directory buckets.</p>
337 /// </note>
338 pub fn get_object_lock_enabled_for_bucket(&self) -> &::std::option::Option<bool> {
339 self.inner.get_object_lock_enabled_for_bucket()
340 }
341 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
342 /// <p><code>BucketOwnerPreferred</code> - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the <code>bucket-owner-full-control</code> canned ACL.</p>
343 /// <p><code>ObjectWriter</code> - The uploading account will own the object if the object is uploaded with the <code>bucket-owner-full-control</code> canned ACL.</p>
344 /// <p><code>BucketOwnerEnforced</code> - Access control lists (ACLs) are disabled and no longer affect permissions. The bucket owner automatically owns and has full control over every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL or specify bucket owner full control ACLs (such as the predefined <code>bucket-owner-full-control</code> canned ACL or a custom ACL in XML format that grants the same permissions).</p>
345 /// <p>By default, <code>ObjectOwnership</code> is set to <code>BucketOwnerEnforced</code> and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where you must control access for each object individually. For more information about S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs for your bucket</a> in the <i>Amazon S3 User Guide</i>.</p><note>
346 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
347 /// </note>
348 pub fn object_ownership(mut self, input: crate::types::ObjectOwnership) -> Self {
349 self.inner = self.inner.object_ownership(input);
350 self
351 }
352 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
353 /// <p><code>BucketOwnerPreferred</code> - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the <code>bucket-owner-full-control</code> canned ACL.</p>
354 /// <p><code>ObjectWriter</code> - The uploading account will own the object if the object is uploaded with the <code>bucket-owner-full-control</code> canned ACL.</p>
355 /// <p><code>BucketOwnerEnforced</code> - Access control lists (ACLs) are disabled and no longer affect permissions. The bucket owner automatically owns and has full control over every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL or specify bucket owner full control ACLs (such as the predefined <code>bucket-owner-full-control</code> canned ACL or a custom ACL in XML format that grants the same permissions).</p>
356 /// <p>By default, <code>ObjectOwnership</code> is set to <code>BucketOwnerEnforced</code> and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where you must control access for each object individually. For more information about S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs for your bucket</a> in the <i>Amazon S3 User Guide</i>.</p><note>
357 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
358 /// </note>
359 pub fn set_object_ownership(mut self, input: ::std::option::Option<crate::types::ObjectOwnership>) -> Self {
360 self.inner = self.inner.set_object_ownership(input);
361 self
362 }
363 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
364 /// <p><code>BucketOwnerPreferred</code> - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the <code>bucket-owner-full-control</code> canned ACL.</p>
365 /// <p><code>ObjectWriter</code> - The uploading account will own the object if the object is uploaded with the <code>bucket-owner-full-control</code> canned ACL.</p>
366 /// <p><code>BucketOwnerEnforced</code> - Access control lists (ACLs) are disabled and no longer affect permissions. The bucket owner automatically owns and has full control over every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL or specify bucket owner full control ACLs (such as the predefined <code>bucket-owner-full-control</code> canned ACL or a custom ACL in XML format that grants the same permissions).</p>
367 /// <p>By default, <code>ObjectOwnership</code> is set to <code>BucketOwnerEnforced</code> and ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where you must control access for each object individually. For more information about S3 Object Ownership, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html">Controlling ownership of objects and disabling ACLs for your bucket</a> in the <i>Amazon S3 User Guide</i>.</p><note>
368 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
369 /// </note>
370 pub fn get_object_ownership(&self) -> &::std::option::Option<crate::types::ObjectOwnership> {
371 self.inner.get_object_ownership()
372 }
373}