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/// <important>
26/// <p>We recommend that you delete your S3 Metadata configurations by using the V2 <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html">DeleteBucketMetadataTableConfiguration</a> API operation. We no longer recommend using the V1 <code>DeleteBucketMetadataTableConfiguration</code> API operation.</p>
27/// <p>If you created your S3 Metadata configuration before July 15, 2025, we recommend that you delete and re-create your configuration by using <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> so that you can expire journal table records and create a live inventory table.</p>
28/// </important>
29/// <p>Deletes a V1 S3 Metadata 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><note>
30/// <p>You can use the V2 <code>DeleteBucketMetadataConfiguration</code> API operation with V1 or V2 metadata table configurations. However, if you try to use the V1 <code>DeleteBucketMetadataTableConfiguration</code> API operation with V2 configurations, you will receive an HTTP <code>405 Method Not Allowed</code> error.</p>
31/// <p>Make sure that you update your processes to use the new V2 API operations (<code>CreateBucketMetadataConfiguration</code>, <code>GetBucketMetadataConfiguration</code>, and <code>DeleteBucketMetadataConfiguration</code>) instead of the V1 API operations.</p>
32/// </note>
33/// <dl>
34/// <dt>
35/// Permissions
36/// </dt>
37/// <dd>
38/// <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>
39/// </dd>
40/// </dl>
41/// <p>The following operations are related to <code>DeleteBucketMetadataTableConfiguration</code>:</p>
42/// <ul>
43/// <li>
44/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataTableConfiguration.html">CreateBucketMetadataTableConfiguration</a></p></li>
45/// <li>
46/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html">GetBucketMetadataTableConfiguration</a></p></li>
47/// </ul><important>
48/// <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p>
49/// </important>
50#[derive(::std::clone::Clone, ::std::fmt::Debug)]
51pub struct DeleteBucketMetadataTableConfigurationFluentBuilder {
52    handle: ::std::sync::Arc<crate::client::Handle>,
53    inner: crate::operation::delete_bucket_metadata_table_configuration::builders::DeleteBucketMetadataTableConfigurationInputBuilder,
54    config_override: ::std::option::Option<crate::config::Builder>,
55}
56impl
57    crate::client::customize::internal::CustomizableSend<
58        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
59        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
60    > for DeleteBucketMetadataTableConfigurationFluentBuilder
61{
62    fn send(
63        self,
64        config_override: crate::config::Builder,
65    ) -> crate::client::customize::internal::BoxFuture<
66        crate::client::customize::internal::SendResult<
67            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
68            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
69        >,
70    > {
71        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
72    }
73}
74impl DeleteBucketMetadataTableConfigurationFluentBuilder {
75    /// Creates a new `DeleteBucketMetadataTableConfigurationFluentBuilder`.
76    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
77        Self {
78            handle,
79            inner: ::std::default::Default::default(),
80            config_override: ::std::option::Option::None,
81        }
82    }
83    /// Access the DeleteBucketMetadataTableConfiguration as a reference.
84    pub fn as_input(
85        &self,
86    ) -> &crate::operation::delete_bucket_metadata_table_configuration::builders::DeleteBucketMetadataTableConfigurationInputBuilder {
87        &self.inner
88    }
89    /// Sends the request and returns the response.
90    ///
91    /// If an error occurs, an `SdkError` will be returned with additional details that
92    /// can be matched against.
93    ///
94    /// By default, any retryable failures will be retried twice. Retry behavior
95    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
96    /// set when configuring the client.
97    pub async fn send(
98        self,
99    ) -> ::std::result::Result<
100        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
101        ::aws_smithy_runtime_api::client::result::SdkError<
102            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
103            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
104        >,
105    > {
106        let input = self
107            .inner
108            .build()
109            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
110        let runtime_plugins =
111            crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfiguration::operation_runtime_plugins(
112                self.handle.runtime_plugins.clone(),
113                &self.handle.conf,
114                self.config_override,
115            );
116        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfiguration::orchestrate(&runtime_plugins, input)
117            .await
118    }
119
120    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
121    pub fn customize(
122        self,
123    ) -> crate::client::customize::CustomizableOperation<
124        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput,
125        crate::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationError,
126        Self,
127    > {
128        crate::client::customize::CustomizableOperation::new(self)
129    }
130    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
131        self.set_config_override(::std::option::Option::Some(config_override.into()));
132        self
133    }
134
135    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
136        self.config_override = config_override;
137        self
138    }
139    /// <p>The general purpose bucket that you want to remove the metadata table configuration from.</p>
140    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.bucket(input.into());
142        self
143    }
144    /// <p>The general purpose bucket that you want to remove the metadata table configuration from.</p>
145    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_bucket(input);
147        self
148    }
149    /// <p>The general purpose bucket that you want to remove the metadata table configuration from.</p>
150    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_bucket()
152    }
153    /// <p>The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.</p>
154    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.expected_bucket_owner(input.into());
156        self
157    }
158    /// <p>The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.</p>
159    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_expected_bucket_owner(input);
161        self
162    }
163    /// <p>The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.</p>
164    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_expected_bucket_owner()
166    }
167}