aws_sdk_s3/operation/create_bucket/_create_bucket_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]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateBucketInput {
6 /// <p>The canned ACL to apply to the bucket.</p><note>
7 /// <p>This functionality is not supported for directory buckets.</p>
8 /// </note>
9 pub acl: ::std::option::Option<crate::types::BucketCannedAcl>,
10 /// <p>The name of the bucket to create.</p>
11 /// <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>
12 /// <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>
13 pub bucket: ::std::option::Option<::std::string::String>,
14 /// <p>The configuration information for the bucket.</p>
15 pub create_bucket_configuration: ::std::option::Option<crate::types::CreateBucketConfiguration>,
16 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
17 /// <p>This functionality is not supported for directory buckets.</p>
18 /// </note>
19 pub grant_full_control: ::std::option::Option<::std::string::String>,
20 /// <p>Allows grantee to list the objects in the bucket.</p><note>
21 /// <p>This functionality is not supported for directory buckets.</p>
22 /// </note>
23 pub grant_read: ::std::option::Option<::std::string::String>,
24 /// <p>Allows grantee to read the bucket ACL.</p><note>
25 /// <p>This functionality is not supported for directory buckets.</p>
26 /// </note>
27 pub grant_read_acp: ::std::option::Option<::std::string::String>,
28 /// <p>Allows grantee to create new objects in the bucket.</p>
29 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
30 /// <p>This functionality is not supported for directory buckets.</p>
31 /// </note>
32 pub grant_write: ::std::option::Option<::std::string::String>,
33 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
34 /// <p>This functionality is not supported for directory buckets.</p>
35 /// </note>
36 pub grant_write_acp: ::std::option::Option<::std::string::String>,
37 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
38 /// <p>This functionality is not supported for directory buckets.</p>
39 /// </note>
40 pub object_lock_enabled_for_bucket: ::std::option::Option<bool>,
41 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
42 /// <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>
43 /// <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>
44 /// <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>
45 /// <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>
46 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
47 /// </note>
48 pub object_ownership: ::std::option::Option<crate::types::ObjectOwnership>,
49}
50impl CreateBucketInput {
51 /// <p>The canned ACL to apply to the bucket.</p><note>
52 /// <p>This functionality is not supported for directory buckets.</p>
53 /// </note>
54 pub fn acl(&self) -> ::std::option::Option<&crate::types::BucketCannedAcl> {
55 self.acl.as_ref()
56 }
57 /// <p>The name of the bucket to create.</p>
58 /// <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>
59 /// <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>
60 pub fn bucket(&self) -> ::std::option::Option<&str> {
61 self.bucket.as_deref()
62 }
63 /// <p>The configuration information for the bucket.</p>
64 pub fn create_bucket_configuration(&self) -> ::std::option::Option<&crate::types::CreateBucketConfiguration> {
65 self.create_bucket_configuration.as_ref()
66 }
67 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
68 /// <p>This functionality is not supported for directory buckets.</p>
69 /// </note>
70 pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
71 self.grant_full_control.as_deref()
72 }
73 /// <p>Allows grantee to list the objects in the bucket.</p><note>
74 /// <p>This functionality is not supported for directory buckets.</p>
75 /// </note>
76 pub fn grant_read(&self) -> ::std::option::Option<&str> {
77 self.grant_read.as_deref()
78 }
79 /// <p>Allows grantee to read the bucket ACL.</p><note>
80 /// <p>This functionality is not supported for directory buckets.</p>
81 /// </note>
82 pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
83 self.grant_read_acp.as_deref()
84 }
85 /// <p>Allows grantee to create new objects in the bucket.</p>
86 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
87 /// <p>This functionality is not supported for directory buckets.</p>
88 /// </note>
89 pub fn grant_write(&self) -> ::std::option::Option<&str> {
90 self.grant_write.as_deref()
91 }
92 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
93 /// <p>This functionality is not supported for directory buckets.</p>
94 /// </note>
95 pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
96 self.grant_write_acp.as_deref()
97 }
98 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
99 /// <p>This functionality is not supported for directory buckets.</p>
100 /// </note>
101 pub fn object_lock_enabled_for_bucket(&self) -> ::std::option::Option<bool> {
102 self.object_lock_enabled_for_bucket
103 }
104 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
105 /// <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>
106 /// <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>
107 /// <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>
108 /// <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>
109 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
110 /// </note>
111 pub fn object_ownership(&self) -> ::std::option::Option<&crate::types::ObjectOwnership> {
112 self.object_ownership.as_ref()
113 }
114}
115impl CreateBucketInput {
116 /// Creates a new builder-style object to manufacture [`CreateBucketInput`](crate::operation::create_bucket::CreateBucketInput).
117 pub fn builder() -> crate::operation::create_bucket::builders::CreateBucketInputBuilder {
118 crate::operation::create_bucket::builders::CreateBucketInputBuilder::default()
119 }
120}
121
122/// A builder for [`CreateBucketInput`](crate::operation::create_bucket::CreateBucketInput).
123#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
124#[non_exhaustive]
125pub struct CreateBucketInputBuilder {
126 pub(crate) acl: ::std::option::Option<crate::types::BucketCannedAcl>,
127 pub(crate) bucket: ::std::option::Option<::std::string::String>,
128 pub(crate) create_bucket_configuration: ::std::option::Option<crate::types::CreateBucketConfiguration>,
129 pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
130 pub(crate) grant_read: ::std::option::Option<::std::string::String>,
131 pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
132 pub(crate) grant_write: ::std::option::Option<::std::string::String>,
133 pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
134 pub(crate) object_lock_enabled_for_bucket: ::std::option::Option<bool>,
135 pub(crate) object_ownership: ::std::option::Option<crate::types::ObjectOwnership>,
136}
137impl CreateBucketInputBuilder {
138 /// <p>The canned ACL to apply to the bucket.</p><note>
139 /// <p>This functionality is not supported for directory buckets.</p>
140 /// </note>
141 pub fn acl(mut self, input: crate::types::BucketCannedAcl) -> Self {
142 self.acl = ::std::option::Option::Some(input);
143 self
144 }
145 /// <p>The canned ACL to apply to the bucket.</p><note>
146 /// <p>This functionality is not supported for directory buckets.</p>
147 /// </note>
148 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::BucketCannedAcl>) -> Self {
149 self.acl = input;
150 self
151 }
152 /// <p>The canned ACL to apply to the bucket.</p><note>
153 /// <p>This functionality is not supported for directory buckets.</p>
154 /// </note>
155 pub fn get_acl(&self) -> &::std::option::Option<crate::types::BucketCannedAcl> {
156 &self.acl
157 }
158 /// <p>The name of the bucket to create.</p>
159 /// <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>
160 /// <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>
161 /// This field is required.
162 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 self.bucket = ::std::option::Option::Some(input.into());
164 self
165 }
166 /// <p>The name of the bucket to create.</p>
167 /// <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>
168 /// <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>
169 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.bucket = input;
171 self
172 }
173 /// <p>The name of the bucket to create.</p>
174 /// <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>
175 /// <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>
176 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
177 &self.bucket
178 }
179 /// <p>The configuration information for the bucket.</p>
180 pub fn create_bucket_configuration(mut self, input: crate::types::CreateBucketConfiguration) -> Self {
181 self.create_bucket_configuration = ::std::option::Option::Some(input);
182 self
183 }
184 /// <p>The configuration information for the bucket.</p>
185 pub fn set_create_bucket_configuration(mut self, input: ::std::option::Option<crate::types::CreateBucketConfiguration>) -> Self {
186 self.create_bucket_configuration = input;
187 self
188 }
189 /// <p>The configuration information for the bucket.</p>
190 pub fn get_create_bucket_configuration(&self) -> &::std::option::Option<crate::types::CreateBucketConfiguration> {
191 &self.create_bucket_configuration
192 }
193 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
194 /// <p>This functionality is not supported for directory buckets.</p>
195 /// </note>
196 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197 self.grant_full_control = ::std::option::Option::Some(input.into());
198 self
199 }
200 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
201 /// <p>This functionality is not supported for directory buckets.</p>
202 /// </note>
203 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204 self.grant_full_control = input;
205 self
206 }
207 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
208 /// <p>This functionality is not supported for directory buckets.</p>
209 /// </note>
210 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
211 &self.grant_full_control
212 }
213 /// <p>Allows grantee to list the objects in the bucket.</p><note>
214 /// <p>This functionality is not supported for directory buckets.</p>
215 /// </note>
216 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
217 self.grant_read = ::std::option::Option::Some(input.into());
218 self
219 }
220 /// <p>Allows grantee to list the objects in the bucket.</p><note>
221 /// <p>This functionality is not supported for directory buckets.</p>
222 /// </note>
223 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224 self.grant_read = input;
225 self
226 }
227 /// <p>Allows grantee to list the objects in the bucket.</p><note>
228 /// <p>This functionality is not supported for directory buckets.</p>
229 /// </note>
230 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
231 &self.grant_read
232 }
233 /// <p>Allows grantee to read the bucket ACL.</p><note>
234 /// <p>This functionality is not supported for directory buckets.</p>
235 /// </note>
236 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.grant_read_acp = ::std::option::Option::Some(input.into());
238 self
239 }
240 /// <p>Allows grantee to read the bucket ACL.</p><note>
241 /// <p>This functionality is not supported for directory buckets.</p>
242 /// </note>
243 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.grant_read_acp = input;
245 self
246 }
247 /// <p>Allows grantee to read the bucket ACL.</p><note>
248 /// <p>This functionality is not supported for directory buckets.</p>
249 /// </note>
250 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
251 &self.grant_read_acp
252 }
253 /// <p>Allows grantee to create new objects in the bucket.</p>
254 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
255 /// <p>This functionality is not supported for directory buckets.</p>
256 /// </note>
257 pub fn grant_write(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
258 self.grant_write = ::std::option::Option::Some(input.into());
259 self
260 }
261 /// <p>Allows grantee to create new objects in the bucket.</p>
262 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
263 /// <p>This functionality is not supported for directory buckets.</p>
264 /// </note>
265 pub fn set_grant_write(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266 self.grant_write = input;
267 self
268 }
269 /// <p>Allows grantee to create new objects in the bucket.</p>
270 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
271 /// <p>This functionality is not supported for directory buckets.</p>
272 /// </note>
273 pub fn get_grant_write(&self) -> &::std::option::Option<::std::string::String> {
274 &self.grant_write
275 }
276 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
277 /// <p>This functionality is not supported for directory buckets.</p>
278 /// </note>
279 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
280 self.grant_write_acp = ::std::option::Option::Some(input.into());
281 self
282 }
283 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
284 /// <p>This functionality is not supported for directory buckets.</p>
285 /// </note>
286 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
287 self.grant_write_acp = input;
288 self
289 }
290 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
291 /// <p>This functionality is not supported for directory buckets.</p>
292 /// </note>
293 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
294 &self.grant_write_acp
295 }
296 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
297 /// <p>This functionality is not supported for directory buckets.</p>
298 /// </note>
299 pub fn object_lock_enabled_for_bucket(mut self, input: bool) -> Self {
300 self.object_lock_enabled_for_bucket = ::std::option::Option::Some(input);
301 self
302 }
303 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
304 /// <p>This functionality is not supported for directory buckets.</p>
305 /// </note>
306 pub fn set_object_lock_enabled_for_bucket(mut self, input: ::std::option::Option<bool>) -> Self {
307 self.object_lock_enabled_for_bucket = input;
308 self
309 }
310 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
311 /// <p>This functionality is not supported for directory buckets.</p>
312 /// </note>
313 pub fn get_object_lock_enabled_for_bucket(&self) -> &::std::option::Option<bool> {
314 &self.object_lock_enabled_for_bucket
315 }
316 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
317 /// <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>
318 /// <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>
319 /// <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>
320 /// <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>
321 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
322 /// </note>
323 pub fn object_ownership(mut self, input: crate::types::ObjectOwnership) -> Self {
324 self.object_ownership = ::std::option::Option::Some(input);
325 self
326 }
327 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
328 /// <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>
329 /// <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>
330 /// <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>
331 /// <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>
332 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
333 /// </note>
334 pub fn set_object_ownership(mut self, input: ::std::option::Option<crate::types::ObjectOwnership>) -> Self {
335 self.object_ownership = input;
336 self
337 }
338 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
339 /// <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>
340 /// <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>
341 /// <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>
342 /// <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>
343 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
344 /// </note>
345 pub fn get_object_ownership(&self) -> &::std::option::Option<crate::types::ObjectOwnership> {
346 &self.object_ownership
347 }
348 /// Consumes the builder and constructs a [`CreateBucketInput`](crate::operation::create_bucket::CreateBucketInput).
349 pub fn build(
350 self,
351 ) -> ::std::result::Result<crate::operation::create_bucket::CreateBucketInput, ::aws_smithy_types::error::operation::BuildError> {
352 ::std::result::Result::Ok(crate::operation::create_bucket::CreateBucketInput {
353 acl: self.acl,
354 bucket: self.bucket,
355 create_bucket_configuration: self.create_bucket_configuration,
356 grant_full_control: self.grant_full_control,
357 grant_read: self.grant_read,
358 grant_read_acp: self.grant_read_acp,
359 grant_write: self.grant_write,
360 grant_write_acp: self.grant_write_acp,
361 object_lock_enabled_for_bucket: self.object_lock_enabled_for_bucket,
362 object_ownership: self.object_ownership,
363 })
364 }
365}