aws_sdk_s3/operation/get_bucket_metadata_table_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_bucket_metadata_table_configuration::_get_bucket_metadata_table_configuration_output::GetBucketMetadataTableConfigurationOutputBuilder;
3
4pub use crate::operation::get_bucket_metadata_table_configuration::_get_bucket_metadata_table_configuration_input::GetBucketMetadataTableConfigurationInputBuilder;
5
6impl crate::operation::get_bucket_metadata_table_configuration::builders::GetBucketMetadataTableConfigurationInputBuilder {
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::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_bucket_metadata_table_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetBucketMetadataTableConfiguration`.
24///
25/// <p>Retrieves the metadata table configuration for 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:GetBucketMetadataTableConfiguration</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>GetBucketMetadataTableConfiguration</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_DeleteBucketMetadataTableConfiguration.html">DeleteBucketMetadataTableConfiguration</a></p></li>
40/// </ul>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct GetBucketMetadataTableConfigurationFluentBuilder {
43    handle: ::std::sync::Arc<crate::client::Handle>,
44    inner: crate::operation::get_bucket_metadata_table_configuration::builders::GetBucketMetadataTableConfigurationInputBuilder,
45    config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48    crate::client::customize::internal::CustomizableSend<
49        crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
50        crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
51    > for GetBucketMetadataTableConfigurationFluentBuilder
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::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
59            crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
60        >,
61    > {
62        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63    }
64}
65impl GetBucketMetadataTableConfigurationFluentBuilder {
66    /// Creates a new `GetBucketMetadataTableConfigurationFluentBuilder`.
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 GetBucketMetadataTableConfiguration as a reference.
75    pub fn as_input(&self) -> &crate::operation::get_bucket_metadata_table_configuration::builders::GetBucketMetadataTableConfigurationInputBuilder {
76        &self.inner
77    }
78    /// Sends the request and returns the response.
79    ///
80    /// If an error occurs, an `SdkError` will be returned with additional details that
81    /// can be matched against.
82    ///
83    /// By default, any retryable failures will be retried twice. Retry behavior
84    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
85    /// set when configuring the client.
86    pub async fn send(
87        self,
88    ) -> ::std::result::Result<
89        crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
90        ::aws_smithy_runtime_api::client::result::SdkError<
91            crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
92            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
93        >,
94    > {
95        let input = self
96            .inner
97            .build()
98            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
99        let runtime_plugins =
100            crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfiguration::operation_runtime_plugins(
101                self.handle.runtime_plugins.clone(),
102                &self.handle.conf,
103                self.config_override,
104            );
105        crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfiguration::orchestrate(&runtime_plugins, input).await
106    }
107
108    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
109    pub fn customize(
110        self,
111    ) -> crate::client::customize::CustomizableOperation<
112        crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput,
113        crate::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationError,
114        Self,
115    > {
116        crate::client::customize::CustomizableOperation::new(self)
117    }
118    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
119        self.set_config_override(::std::option::Option::Some(config_override.into()));
120        self
121    }
122
123    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
124        self.config_override = config_override;
125        self
126    }
127    /// <p>The general purpose bucket that contains the metadata table configuration that you want to retrieve.</p>
128    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.bucket(input.into());
130        self
131    }
132    /// <p>The general purpose bucket that contains the metadata table configuration that you want to retrieve.</p>
133    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_bucket(input);
135        self
136    }
137    /// <p>The general purpose bucket that contains the metadata table configuration that you want to retrieve.</p>
138    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_bucket()
140    }
141    /// <p>The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.</p>
142    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.expected_bucket_owner(input.into());
144        self
145    }
146    /// <p>The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.</p>
147    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.inner = self.inner.set_expected_bucket_owner(input);
149        self
150    }
151    /// <p>The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from.</p>
152    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
153        self.inner.get_expected_bucket_owner()
154    }
155}