aws_sdk_lightsail/client/update_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 [`UpdateBucket`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`bucket_name(impl Into<String>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::bucket_name) / [`set_bucket_name(Option<String>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::set_bucket_name):<br>required: **true**<br><p>The name of the bucket to update.</p><br>
7 /// - [`access_rules(AccessRules)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::access_rules) / [`set_access_rules(Option<AccessRules>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::set_access_rules):<br>required: **false**<br><p>An object that sets the public accessibility of objects in the specified bucket.</p><br>
8 /// - [`versioning(impl Into<String>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::versioning) / [`set_versioning(Option<String>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::set_versioning):<br>required: **false**<br><p>Specifies whether to enable or suspend versioning of objects in the bucket.</p> <p>The following options can be specified:</p> <ul> <li> <p><code>Enabled</code> - Enables versioning of objects in the specified bucket.</p></li> <li> <p><code>Suspended</code> - Suspends versioning of objects in the specified bucket. Existing object versions are retained.</p></li> </ul><br>
9 /// - [`readonly_access_accounts(impl Into<String>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::readonly_access_accounts) / [`set_readonly_access_accounts(Option<Vec::<String>>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::set_readonly_access_accounts):<br>required: **false**<br><p>An array of strings to specify the Amazon Web Services account IDs that can access the bucket.</p> <p>You can give a maximum of 10 Amazon Web Services accounts access to a bucket.</p><br>
10 /// - [`access_log_config(BucketAccessLogConfig)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::access_log_config) / [`set_access_log_config(Option<BucketAccessLogConfig>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::set_access_log_config):<br>required: **false**<br><p>An object that describes the access log configuration for the bucket.</p><br>
11 /// - [`cors(BucketCorsConfig)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::cors) / [`set_cors(Option<BucketCorsConfig>)`](crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::set_cors):<br>required: **false**<br><p>Sets the cross-origin resource sharing (CORS) configuration for your bucket. If a CORS configuration exists, it is replaced with the specified configuration. For AWS CLI operations, this parameter can also be passed as a file. For more information, see <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/configure-cors.html">Configuring cross-origin resource sharing (CORS)</a>.</p><note> <p>CORS information is only returned in a response when you update the CORS policy.</p> </note><br>
12 /// - On success, responds with [`UpdateBucketOutput`](crate::operation::update_bucket::UpdateBucketOutput) with field(s):
13 /// - [`bucket(Option<Bucket>)`](crate::operation::update_bucket::UpdateBucketOutput::bucket): <p>An object that describes the bucket that is updated.</p>
14 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::update_bucket::UpdateBucketOutput::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>
15 /// - On failure, responds with [`SdkError<UpdateBucketError>`](crate::operation::update_bucket::UpdateBucketError)
16 pub fn update_bucket(&self) -> crate::operation::update_bucket::builders::UpdateBucketFluentBuilder {
17 crate::operation::update_bucket::builders::UpdateBucketFluentBuilder::new(self.handle.clone())
18 }
19}