aws_sdk_lightsail/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 /// - [`bucket_name(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::bucket_name) / [`set_bucket_name(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_bucket_name):<br>required: **true**<br><p>The name for the bucket.</p> <p>For more information about bucket names, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/bucket-naming-rules-in-amazon-lightsail">Bucket naming rules in Amazon Lightsail</a> in the <i>Amazon Lightsail Developer Guide</i>.</p><br>
7 /// - [`bundle_id(impl Into<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::bundle_id) / [`set_bundle_id(Option<String>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_bundle_id):<br>required: **true**<br><p>The ID of the bundle to use for the bucket.</p> <p>A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.</p> <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBucketBundles.html">GetBucketBundles</a> action to get a list of bundle IDs that you can specify.</p> <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_UpdateBucketBundle.html">UpdateBucketBundle</a> action to change the bundle after the bucket is created.</p><br>
8 /// - [`tags(Tag)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_tags):<br>required: **false**<br><p>The tag keys and optional values to add to the bucket during creation.</p> <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_TagResource.html">TagResource</a> action to tag the bucket after it's created.</p><br>
9 /// - [`enable_object_versioning(bool)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::enable_object_versioning) / [`set_enable_object_versioning(Option<bool>)`](crate::operation::create_bucket::builders::CreateBucketFluentBuilder::set_enable_object_versioning):<br>required: **false**<br><p>A Boolean value that indicates whether to enable versioning of objects in the bucket.</p> <p>For more information about versioning, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-managing-bucket-object-versioning">Enabling and suspending object versioning in a bucket in Amazon Lightsail</a> in the <i>Amazon Lightsail Developer Guide</i>.</p><br>
10 /// - On success, responds with [`CreateBucketOutput`](crate::operation::create_bucket::CreateBucketOutput) with field(s):
11 /// - [`bucket(Option<Bucket>)`](crate::operation::create_bucket::CreateBucketOutput::bucket): <p>An object that describes the bucket that is created.</p>
12 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::create_bucket::CreateBucketOutput::operations): <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
13 /// - On failure, responds with [`SdkError<CreateBucketError>`](crate::operation::create_bucket::CreateBucketError)
14 pub fn create_bucket(&self) -> crate::operation::create_bucket::builders::CreateBucketFluentBuilder {
15 crate::operation::create_bucket::builders::CreateBucketFluentBuilder::new(self.handle.clone())
16 }
17}