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 /// <p>Specifies the namespace where you want to create your general purpose bucket. When you create a general purpose bucket, you can choose to create a bucket in the shared global namespace or you can choose to create a bucket in your account regional namespace. Your account regional namespace is a subdivision of the global namespace that only your account can create buckets in. For more information on bucket namespaces, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html">Namespaces for general purpose buckets</a>.</p>
50 /// <p>General purpose buckets in your account regional namespace must follow a specific naming convention. These buckets consist of a bucket name prefix that you create, and a suffix that contains your 12-digit Amazon Web Services Account ID, the Amazon Web Services Region code, and ends with <code>-an</code>. Bucket names must follow the format <code>bucket-name-prefix-accountId-region-an</code> (for example, <code>amzn-s3-demo-bucket-111122223333-us-west-2-an</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html#account-regional-naming-rules">Account regional namespace naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
51 /// <p>This functionality is not supported for directory buckets.</p>
52 /// </note>
53 pub bucket_namespace: ::std::option::Option<crate::types::BucketNamespace>,
54}
55impl CreateBucketInput {
56 /// <p>The canned ACL to apply to the bucket.</p><note>
57 /// <p>This functionality is not supported for directory buckets.</p>
58 /// </note>
59 pub fn acl(&self) -> ::std::option::Option<&crate::types::BucketCannedAcl> {
60 self.acl.as_ref()
61 }
62 /// <p>The name of the bucket to create.</p>
63 /// <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>
64 /// <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>
65 pub fn bucket(&self) -> ::std::option::Option<&str> {
66 self.bucket.as_deref()
67 }
68 /// <p>The configuration information for the bucket.</p>
69 pub fn create_bucket_configuration(&self) -> ::std::option::Option<&crate::types::CreateBucketConfiguration> {
70 self.create_bucket_configuration.as_ref()
71 }
72 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
73 /// <p>This functionality is not supported for directory buckets.</p>
74 /// </note>
75 pub fn grant_full_control(&self) -> ::std::option::Option<&str> {
76 self.grant_full_control.as_deref()
77 }
78 /// <p>Allows grantee to list the objects in the bucket.</p><note>
79 /// <p>This functionality is not supported for directory buckets.</p>
80 /// </note>
81 pub fn grant_read(&self) -> ::std::option::Option<&str> {
82 self.grant_read.as_deref()
83 }
84 /// <p>Allows grantee to read the bucket ACL.</p><note>
85 /// <p>This functionality is not supported for directory buckets.</p>
86 /// </note>
87 pub fn grant_read_acp(&self) -> ::std::option::Option<&str> {
88 self.grant_read_acp.as_deref()
89 }
90 /// <p>Allows grantee to create new objects in the bucket.</p>
91 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
92 /// <p>This functionality is not supported for directory buckets.</p>
93 /// </note>
94 pub fn grant_write(&self) -> ::std::option::Option<&str> {
95 self.grant_write.as_deref()
96 }
97 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
98 /// <p>This functionality is not supported for directory buckets.</p>
99 /// </note>
100 pub fn grant_write_acp(&self) -> ::std::option::Option<&str> {
101 self.grant_write_acp.as_deref()
102 }
103 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
104 /// <p>This functionality is not supported for directory buckets.</p>
105 /// </note>
106 pub fn object_lock_enabled_for_bucket(&self) -> ::std::option::Option<bool> {
107 self.object_lock_enabled_for_bucket
108 }
109 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
110 /// <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>
111 /// <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>
112 /// <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>
113 /// <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>
114 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
115 /// </note>
116 pub fn object_ownership(&self) -> ::std::option::Option<&crate::types::ObjectOwnership> {
117 self.object_ownership.as_ref()
118 }
119 /// <p>Specifies the namespace where you want to create your general purpose bucket. When you create a general purpose bucket, you can choose to create a bucket in the shared global namespace or you can choose to create a bucket in your account regional namespace. Your account regional namespace is a subdivision of the global namespace that only your account can create buckets in. For more information on bucket namespaces, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html">Namespaces for general purpose buckets</a>.</p>
120 /// <p>General purpose buckets in your account regional namespace must follow a specific naming convention. These buckets consist of a bucket name prefix that you create, and a suffix that contains your 12-digit Amazon Web Services Account ID, the Amazon Web Services Region code, and ends with <code>-an</code>. Bucket names must follow the format <code>bucket-name-prefix-accountId-region-an</code> (for example, <code>amzn-s3-demo-bucket-111122223333-us-west-2-an</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html#account-regional-naming-rules">Account regional namespace naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
121 /// <p>This functionality is not supported for directory buckets.</p>
122 /// </note>
123 pub fn bucket_namespace(&self) -> ::std::option::Option<&crate::types::BucketNamespace> {
124 self.bucket_namespace.as_ref()
125 }
126}
127impl CreateBucketInput {
128 /// Creates a new builder-style object to manufacture [`CreateBucketInput`](crate::operation::create_bucket::CreateBucketInput).
129 pub fn builder() -> crate::operation::create_bucket::builders::CreateBucketInputBuilder {
130 crate::operation::create_bucket::builders::CreateBucketInputBuilder::default()
131 }
132}
133
134/// A builder for [`CreateBucketInput`](crate::operation::create_bucket::CreateBucketInput).
135#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
136#[non_exhaustive]
137pub struct CreateBucketInputBuilder {
138 pub(crate) acl: ::std::option::Option<crate::types::BucketCannedAcl>,
139 pub(crate) bucket: ::std::option::Option<::std::string::String>,
140 pub(crate) create_bucket_configuration: ::std::option::Option<crate::types::CreateBucketConfiguration>,
141 pub(crate) grant_full_control: ::std::option::Option<::std::string::String>,
142 pub(crate) grant_read: ::std::option::Option<::std::string::String>,
143 pub(crate) grant_read_acp: ::std::option::Option<::std::string::String>,
144 pub(crate) grant_write: ::std::option::Option<::std::string::String>,
145 pub(crate) grant_write_acp: ::std::option::Option<::std::string::String>,
146 pub(crate) object_lock_enabled_for_bucket: ::std::option::Option<bool>,
147 pub(crate) object_ownership: ::std::option::Option<crate::types::ObjectOwnership>,
148 pub(crate) bucket_namespace: ::std::option::Option<crate::types::BucketNamespace>,
149}
150impl CreateBucketInputBuilder {
151 /// <p>The canned ACL to apply to the bucket.</p><note>
152 /// <p>This functionality is not supported for directory buckets.</p>
153 /// </note>
154 pub fn acl(mut self, input: crate::types::BucketCannedAcl) -> Self {
155 self.acl = ::std::option::Option::Some(input);
156 self
157 }
158 /// <p>The canned ACL to apply to the bucket.</p><note>
159 /// <p>This functionality is not supported for directory buckets.</p>
160 /// </note>
161 pub fn set_acl(mut self, input: ::std::option::Option<crate::types::BucketCannedAcl>) -> Self {
162 self.acl = input;
163 self
164 }
165 /// <p>The canned ACL to apply to the bucket.</p><note>
166 /// <p>This functionality is not supported for directory buckets.</p>
167 /// </note>
168 pub fn get_acl(&self) -> &::std::option::Option<crate::types::BucketCannedAcl> {
169 &self.acl
170 }
171 /// <p>The name of the bucket to create.</p>
172 /// <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>
173 /// <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>
174 /// This field is required.
175 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
176 self.bucket = ::std::option::Option::Some(input.into());
177 self
178 }
179 /// <p>The name of the bucket to create.</p>
180 /// <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>
181 /// <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>
182 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.bucket = input;
184 self
185 }
186 /// <p>The name of the bucket to create.</p>
187 /// <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>
188 /// <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>
189 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
190 &self.bucket
191 }
192 /// <p>The configuration information for the bucket.</p>
193 pub fn create_bucket_configuration(mut self, input: crate::types::CreateBucketConfiguration) -> Self {
194 self.create_bucket_configuration = ::std::option::Option::Some(input);
195 self
196 }
197 /// <p>The configuration information for the bucket.</p>
198 pub fn set_create_bucket_configuration(mut self, input: ::std::option::Option<crate::types::CreateBucketConfiguration>) -> Self {
199 self.create_bucket_configuration = input;
200 self
201 }
202 /// <p>The configuration information for the bucket.</p>
203 pub fn get_create_bucket_configuration(&self) -> &::std::option::Option<crate::types::CreateBucketConfiguration> {
204 &self.create_bucket_configuration
205 }
206 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
207 /// <p>This functionality is not supported for directory buckets.</p>
208 /// </note>
209 pub fn grant_full_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210 self.grant_full_control = ::std::option::Option::Some(input.into());
211 self
212 }
213 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
214 /// <p>This functionality is not supported for directory buckets.</p>
215 /// </note>
216 pub fn set_grant_full_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217 self.grant_full_control = input;
218 self
219 }
220 /// <p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note>
221 /// <p>This functionality is not supported for directory buckets.</p>
222 /// </note>
223 pub fn get_grant_full_control(&self) -> &::std::option::Option<::std::string::String> {
224 &self.grant_full_control
225 }
226 /// <p>Allows grantee to list the objects in the bucket.</p><note>
227 /// <p>This functionality is not supported for directory buckets.</p>
228 /// </note>
229 pub fn grant_read(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.grant_read = ::std::option::Option::Some(input.into());
231 self
232 }
233 /// <p>Allows grantee to list the objects in the bucket.</p><note>
234 /// <p>This functionality is not supported for directory buckets.</p>
235 /// </note>
236 pub fn set_grant_read(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.grant_read = input;
238 self
239 }
240 /// <p>Allows grantee to list the objects in the bucket.</p><note>
241 /// <p>This functionality is not supported for directory buckets.</p>
242 /// </note>
243 pub fn get_grant_read(&self) -> &::std::option::Option<::std::string::String> {
244 &self.grant_read
245 }
246 /// <p>Allows grantee to read the bucket ACL.</p><note>
247 /// <p>This functionality is not supported for directory buckets.</p>
248 /// </note>
249 pub fn grant_read_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
250 self.grant_read_acp = ::std::option::Option::Some(input.into());
251 self
252 }
253 /// <p>Allows grantee to read the bucket ACL.</p><note>
254 /// <p>This functionality is not supported for directory buckets.</p>
255 /// </note>
256 pub fn set_grant_read_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
257 self.grant_read_acp = input;
258 self
259 }
260 /// <p>Allows grantee to read the bucket ACL.</p><note>
261 /// <p>This functionality is not supported for directory buckets.</p>
262 /// </note>
263 pub fn get_grant_read_acp(&self) -> &::std::option::Option<::std::string::String> {
264 &self.grant_read_acp
265 }
266 /// <p>Allows grantee to create new objects in the bucket.</p>
267 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
268 /// <p>This functionality is not supported for directory buckets.</p>
269 /// </note>
270 pub fn grant_write(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 self.grant_write = ::std::option::Option::Some(input.into());
272 self
273 }
274 /// <p>Allows grantee to create new objects in the bucket.</p>
275 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
276 /// <p>This functionality is not supported for directory buckets.</p>
277 /// </note>
278 pub fn set_grant_write(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
279 self.grant_write = input;
280 self
281 }
282 /// <p>Allows grantee to create new objects in the bucket.</p>
283 /// <p>For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.</p><note>
284 /// <p>This functionality is not supported for directory buckets.</p>
285 /// </note>
286 pub fn get_grant_write(&self) -> &::std::option::Option<::std::string::String> {
287 &self.grant_write
288 }
289 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
290 /// <p>This functionality is not supported for directory buckets.</p>
291 /// </note>
292 pub fn grant_write_acp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
293 self.grant_write_acp = ::std::option::Option::Some(input.into());
294 self
295 }
296 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
297 /// <p>This functionality is not supported for directory buckets.</p>
298 /// </note>
299 pub fn set_grant_write_acp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300 self.grant_write_acp = input;
301 self
302 }
303 /// <p>Allows grantee to write the ACL for the applicable bucket.</p><note>
304 /// <p>This functionality is not supported for directory buckets.</p>
305 /// </note>
306 pub fn get_grant_write_acp(&self) -> &::std::option::Option<::std::string::String> {
307 &self.grant_write_acp
308 }
309 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
310 /// <p>This functionality is not supported for directory buckets.</p>
311 /// </note>
312 pub fn object_lock_enabled_for_bucket(mut self, input: bool) -> Self {
313 self.object_lock_enabled_for_bucket = ::std::option::Option::Some(input);
314 self
315 }
316 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
317 /// <p>This functionality is not supported for directory buckets.</p>
318 /// </note>
319 pub fn set_object_lock_enabled_for_bucket(mut self, input: ::std::option::Option<bool>) -> Self {
320 self.object_lock_enabled_for_bucket = input;
321 self
322 }
323 /// <p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note>
324 /// <p>This functionality is not supported for directory buckets.</p>
325 /// </note>
326 pub fn get_object_lock_enabled_for_bucket(&self) -> &::std::option::Option<bool> {
327 &self.object_lock_enabled_for_bucket
328 }
329 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
330 /// <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>
331 /// <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>
332 /// <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>
333 /// <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>
334 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
335 /// </note>
336 pub fn object_ownership(mut self, input: crate::types::ObjectOwnership) -> Self {
337 self.object_ownership = ::std::option::Option::Some(input);
338 self
339 }
340 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
341 /// <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>
342 /// <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>
343 /// <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>
344 /// <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>
345 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
346 /// </note>
347 pub fn set_object_ownership(mut self, input: ::std::option::Option<crate::types::ObjectOwnership>) -> Self {
348 self.object_ownership = input;
349 self
350 }
351 /// <p>The container element for object ownership for a bucket's ownership controls.</p>
352 /// <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>
353 /// <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>
354 /// <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>
355 /// <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>
356 /// <p>This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.</p>
357 /// </note>
358 pub fn get_object_ownership(&self) -> &::std::option::Option<crate::types::ObjectOwnership> {
359 &self.object_ownership
360 }
361 /// <p>Specifies the namespace where you want to create your general purpose bucket. When you create a general purpose bucket, you can choose to create a bucket in the shared global namespace or you can choose to create a bucket in your account regional namespace. Your account regional namespace is a subdivision of the global namespace that only your account can create buckets in. For more information on bucket namespaces, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html">Namespaces for general purpose buckets</a>.</p>
362 /// <p>General purpose buckets in your account regional namespace must follow a specific naming convention. These buckets consist of a bucket name prefix that you create, and a suffix that contains your 12-digit Amazon Web Services Account ID, the Amazon Web Services Region code, and ends with <code>-an</code>. Bucket names must follow the format <code>bucket-name-prefix-accountId-region-an</code> (for example, <code>amzn-s3-demo-bucket-111122223333-us-west-2-an</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html#account-regional-naming-rules">Account regional namespace naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
363 /// <p>This functionality is not supported for directory buckets.</p>
364 /// </note>
365 pub fn bucket_namespace(mut self, input: crate::types::BucketNamespace) -> Self {
366 self.bucket_namespace = ::std::option::Option::Some(input);
367 self
368 }
369 /// <p>Specifies the namespace where you want to create your general purpose bucket. When you create a general purpose bucket, you can choose to create a bucket in the shared global namespace or you can choose to create a bucket in your account regional namespace. Your account regional namespace is a subdivision of the global namespace that only your account can create buckets in. For more information on bucket namespaces, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html">Namespaces for general purpose buckets</a>.</p>
370 /// <p>General purpose buckets in your account regional namespace must follow a specific naming convention. These buckets consist of a bucket name prefix that you create, and a suffix that contains your 12-digit Amazon Web Services Account ID, the Amazon Web Services Region code, and ends with <code>-an</code>. Bucket names must follow the format <code>bucket-name-prefix-accountId-region-an</code> (for example, <code>amzn-s3-demo-bucket-111122223333-us-west-2-an</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html#account-regional-naming-rules">Account regional namespace naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
371 /// <p>This functionality is not supported for directory buckets.</p>
372 /// </note>
373 pub fn set_bucket_namespace(mut self, input: ::std::option::Option<crate::types::BucketNamespace>) -> Self {
374 self.bucket_namespace = input;
375 self
376 }
377 /// <p>Specifies the namespace where you want to create your general purpose bucket. When you create a general purpose bucket, you can choose to create a bucket in the shared global namespace or you can choose to create a bucket in your account regional namespace. Your account regional namespace is a subdivision of the global namespace that only your account can create buckets in. For more information on bucket namespaces, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/gpbucketnamespaces.html">Namespaces for general purpose buckets</a>.</p>
378 /// <p>General purpose buckets in your account regional namespace must follow a specific naming convention. These buckets consist of a bucket name prefix that you create, and a suffix that contains your 12-digit Amazon Web Services Account ID, the Amazon Web Services Region code, and ends with <code>-an</code>. Bucket names must follow the format <code>bucket-name-prefix-accountId-region-an</code> (for example, <code>amzn-s3-demo-bucket-111122223333-us-west-2-an</code>). For information about bucket naming restrictions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html#account-regional-naming-rules">Account regional namespace naming rules</a> in the <i>Amazon S3 User Guide</i>.</p><note>
379 /// <p>This functionality is not supported for directory buckets.</p>
380 /// </note>
381 pub fn get_bucket_namespace(&self) -> &::std::option::Option<crate::types::BucketNamespace> {
382 &self.bucket_namespace
383 }
384 /// Consumes the builder and constructs a [`CreateBucketInput`](crate::operation::create_bucket::CreateBucketInput).
385 pub fn build(
386 self,
387 ) -> ::std::result::Result<crate::operation::create_bucket::CreateBucketInput, ::aws_smithy_types::error::operation::BuildError> {
388 ::std::result::Result::Ok(crate::operation::create_bucket::CreateBucketInput {
389 acl: self.acl,
390 bucket: self.bucket,
391 create_bucket_configuration: self.create_bucket_configuration,
392 grant_full_control: self.grant_full_control,
393 grant_read: self.grant_read,
394 grant_read_acp: self.grant_read_acp,
395 grant_write: self.grant_write,
396 grant_write_acp: self.grant_write_acp,
397 object_lock_enabled_for_bucket: self.object_lock_enabled_for_bucket,
398 object_ownership: self.object_ownership,
399 bucket_namespace: self.bucket_namespace,
400 })
401 }
402}