aws_sdk_s3control/client/create_bucket.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateBucket`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`acl(BucketCannedAcl)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::acl) / [`set_acl(Option<BucketCannedAcl>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_acl):<br>required: **false**<br><p>The canned ACL to apply to the bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
7 /// - [`bucket(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::bucket) / [`set_bucket(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_bucket):<br>required: **true**<br><p>The name of the bucket.</p><br>
8 /// - [`create_bucket_configuration(CreateBucketConfiguration)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::create_bucket_configuration) / [`set_create_bucket_configuration(Option<CreateBucketConfiguration>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_create_bucket_configuration):<br>required: **false**<br><p>The configuration information for the bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
9 /// - [`grant_full_control(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::grant_full_control) / [`set_grant_full_control(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_grant_full_control):<br>required: **false**<br><p>Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
10 /// - [`grant_read(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::grant_read) / [`set_grant_read(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_grant_read):<br>required: **false**<br><p>Allows grantee to list the objects in the bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
11 /// - [`grant_read_acp(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::grant_read_acp) / [`set_grant_read_acp(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_grant_read_acp):<br>required: **false**<br><p>Allows grantee to read the bucket ACL.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
12 /// - [`grant_write(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::grant_write) / [`set_grant_write(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_grant_write):<br>required: **false**<br><p>Allows grantee to create, overwrite, and delete any object in the bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
13 /// - [`grant_write_acp(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::grant_write_acp) / [`set_grant_write_acp(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_grant_write_acp):<br>required: **false**<br><p>Allows grantee to write the ACL for the applicable bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
14 /// - [`object_lock_enabled_for_bucket(bool)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::object_lock_enabled_for_bucket) / [`set_object_lock_enabled_for_bucket(Option<bool>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_object_lock_enabled_for_bucket):<br>required: **false**<br><p>Specifies whether you want S3 Object Lock to be enabled for the new bucket.</p><note> <p>This is not supported by Amazon S3 on Outposts buckets.</p> </note><br>
15 /// - [`outpost_id(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::outpost_id) / [`set_outpost_id(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_outpost_id):<br>required: **false**<br><p>The ID of the Outposts where the bucket is being created.</p><note> <p>This ID is required by Amazon S3 on Outposts buckets.</p> </note><br>
16 /// - On success, responds with [`CreateBucketOutput`](crate::operation::create_bucket::CreateBucketOutput) with field(s):
17 /// - [`location(Option<String>)`](crate::operation::create_bucket::CreateBucketOutput::location): <p>The location of the bucket.</p>
18 /// - [`bucket_arn(Option<String>)`](crate::operation::create_bucket::CreateBucketOutput::bucket_arn): <p>The Amazon Resource Name (ARN) of the bucket.</p> <p>For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.</p> <p>For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format <code>arn:aws:s3-outposts:<region> : <account-id> :outpost/ <outpost-id> /bucket/ <my-bucket-name></my-bucket-name> </outpost-id> </account-id> </region></code>. For example, to access the bucket <code>reports</code> through Outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports</code>. The value must be URL encoded.</p>
19 /// - On failure, responds with [`SdkError<CreateBucketError>`](crate::operation::create_bucket::CreateBucketError)
20 pub fn create_bucket(&self) -> crate::operation::create_bucket::builders::CreateBucketFluentBuilder {
21 crate::operation::create_bucket::builders::CreateBucketFluentBuilder::new(self.handle.clone())
22 }
23}