aws_sdk_lightsail/client/delete_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 [`DeleteBucket`](crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`bucket_name(impl Into<String>)`](crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder::bucket_name) / [`set_bucket_name(Option<String>)`](crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder::set_bucket_name):<br>required: **true**<br><p>The name of the bucket to delete.</p> <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBuckets.html">GetBuckets</a> action to get a list of bucket names that you can specify.</p><br>
7 /// - [`force_delete(bool)`](crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder::force_delete) / [`set_force_delete(Option<bool>)`](crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder::set_force_delete):<br>required: **false**<br><p>A Boolean value that indicates whether to force delete the bucket.</p> <p>You must force delete the bucket if it has one of the following conditions:</p> <ul> <li> <p>The bucket is the origin of a distribution.</p></li> <li> <p>The bucket has instances that were granted access to it using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p></li> <li> <p>The bucket has objects.</p></li> <li> <p>The bucket has access keys.</p></li> </ul><important> <p>Force deleting a bucket might impact other resources that rely on the bucket, such as instances, distributions, or software that use the issued access keys.</p> </important><br>
8 /// - On success, responds with [`DeleteBucketOutput`](crate::operation::delete_bucket::DeleteBucketOutput) with field(s):
9 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::delete_bucket::DeleteBucketOutput::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>
10 /// - On failure, responds with [`SdkError<DeleteBucketError>`](crate::operation::delete_bucket::DeleteBucketError)
11 pub fn delete_bucket(&self) -> crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder {
12 crate::operation::delete_bucket::builders::DeleteBucketFluentBuilder::new(self.handle.clone())
13 }
14}