aws_sdk_s3/operation/delete_bucket_metadata_table_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_bucket_metadata_table_configuration::_delete_bucket_metadata_table_configuration_output::DeleteBucketMetadataTableConfigurationOutputBuilder;
3
4pub use crate::operation::delete_bucket_metadata_table_configuration::_delete_bucket_metadata_table_configuration_input::DeleteBucketMetadataTableConfigurationInputBuilder;
5
6impl crate::operation::delete_bucket_metadata_table_configuration::builders::DeleteBucketMetadataTableConfigurationInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.delete_bucket_metadata_table_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DeleteBucketMetadataTableConfiguration`.
24///
25/// <p>Deletes a metadata table configuration from a general purpose bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html">Accelerating data discovery with S3 Metadata</a> in the <i>Amazon S3 User Guide</i>.</p>
26/// <dl>
27/// <dt>
28/// Permissions
29/// </dt>
30/// <dd>
31/// <p>To use this operation, you must have the <code>s3:DeleteBucketMetadataTableConfiguration</code> permission. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html">Setting up permissions for configuring metadata tables</a> in the <i>Amazon S3 User Guide</i>.</p>
32/// </dd>
33/// </dl>
34/// <p>The following operations are related to <code>DeleteBucketMetadataTableConfiguration</code>:</p>
35/// <ul>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html">CreateBucketMetadataTableConfiguration</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html">GetBucketMetadataTableConfiguration</a></p></li>
40/// </ul>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct DeleteBucketMetadataTableConfigurationFluentBuilder {
43    handle: ::std::sync::Arc<crate::client::Handle>,
44    inner: crate::operation::delete_bucket_metadata_table_configuration::builders::DeleteBucketMetadataTableConfigurationInputBuilder,
45    config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48    crate::client::customize::internal::CustomizableSend<
49        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
50        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
51    > for DeleteBucketMetadataTableConfigurationFluentBuilder
52{
53    fn send(
54        self,
55        config_override: crate::config::Builder,
56    ) -> crate::client::customize::internal::BoxFuture<
57        crate::client::customize::internal::SendResult<
58            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
59            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
60        >,
61    > {
62        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63    }
64}
65impl DeleteBucketMetadataTableConfigurationFluentBuilder {
66    /// Creates a new `DeleteBucketMetadataTableConfigurationFluentBuilder`.
67    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
68        Self {
69            handle,
70            inner: ::std::default::Default::default(),
71            config_override: ::std::option::Option::None,
72        }
73    }
74    /// Access the DeleteBucketMetadataTableConfiguration as a reference.
75    pub fn as_input(
76        &self,
77    ) -> &crate::operation::delete_bucket_metadata_table_configuration::builders::DeleteBucketMetadataTableConfigurationInputBuilder {
78        &self.inner
79    }
80    /// Sends the request and returns the response.
81    ///
82    /// If an error occurs, an `SdkError` will be returned with additional details that
83    /// can be matched against.
84    ///
85    /// By default, any retryable failures will be retried twice. Retry behavior
86    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
87    /// set when configuring the client.
88    pub async fn send(
89        self,
90    ) -> ::std::result::Result<
91        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
92        ::aws_smithy_runtime_api::client::result::SdkError<
93            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
94            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
95        >,
96    > {
97        let input = self
98            .inner
99            .build()
100            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
101        let runtime_plugins =
102            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfiguration::operation_runtime_plugins(
103                self.handle.runtime_plugins.clone(),
104                &self.handle.conf,
105                self.config_override,
106            );
107        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfiguration::orchestrate(&runtime_plugins, input)
108            .await
109    }
110
111    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
112    pub fn customize(
113        self,
114    ) -> crate::client::customize::CustomizableOperation<
115        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
116        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
117        Self,
118    > {
119        crate::client::customize::CustomizableOperation::new(self)
120    }
121    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
122        self.set_config_override(::std::option::Option::Some(config_override.into()));
123        self
124    }
125
126    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
127        self.config_override = config_override;
128        self
129    }
130    /// <p>The general purpose bucket that you want to remove the metadata table configuration from.</p>
131    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.inner = self.inner.bucket(input.into());
133        self
134    }
135    /// <p>The general purpose bucket that you want to remove the metadata table configuration from.</p>
136    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.inner = self.inner.set_bucket(input);
138        self
139    }
140    /// <p>The general purpose bucket that you want to remove the metadata table configuration from.</p>
141    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_bucket()
143    }
144    /// <p>The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.</p>
145    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.expected_bucket_owner(input.into());
147        self
148    }
149    /// <p>The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.</p>
150    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_expected_bucket_owner(input);
152        self
153    }
154    /// <p>The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.</p>
155    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_expected_bucket_owner()
157    }
158}