aws_sdk_s3/operation/create_bucket_metadata_table_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_bucket_metadata_table_configuration::_create_bucket_metadata_table_configuration_output::CreateBucketMetadataTableConfigurationOutputBuilder;
3
4pub use crate::operation::create_bucket_metadata_table_configuration::_create_bucket_metadata_table_configuration_input::CreateBucketMetadataTableConfigurationInputBuilder;
5
6impl crate::operation::create_bucket_metadata_table_configuration::builders::CreateBucketMetadataTableConfigurationInputBuilder {
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::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_bucket_metadata_table_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateBucketMetadataTableConfiguration`.
24///
25/// <p>Creates a 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 following permissions. 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/// <p>If you also want to integrate your table bucket with Amazon Web Services analytics services so that you can query your metadata table, you need additional permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-integrating-aws.html"> Integrating Amazon S3 Tables with Amazon Web Services analytics services</a> in the <i>Amazon S3 User Guide</i>.</p>
33/// <ul>
34/// <li>
35/// <p><code>s3:CreateBucketMetadataTableConfiguration</code></p></li>
36/// <li>
37/// <p><code>s3tables:CreateNamespace</code></p></li>
38/// <li>
39/// <p><code>s3tables:GetTable</code></p></li>
40/// <li>
41/// <p><code>s3tables:CreateTable</code></p></li>
42/// <li>
43/// <p><code>s3tables:PutTablePolicy</code></p></li>
44/// </ul>
45/// </dd>
46/// </dl>
47/// <p>The following operations are related to <code>CreateBucketMetadataTableConfiguration</code>:</p>
48/// <ul>
49/// <li>
50/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataTableConfiguration.html">DeleteBucketMetadataTableConfiguration</a></p></li>
51/// <li>
52/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataTableConfiguration.html">GetBucketMetadataTableConfiguration</a></p></li>
53/// </ul>
54#[derive(::std::clone::Clone, ::std::fmt::Debug)]
55pub struct CreateBucketMetadataTableConfigurationFluentBuilder {
56    handle: ::std::sync::Arc<crate::client::Handle>,
57    inner: crate::operation::create_bucket_metadata_table_configuration::builders::CreateBucketMetadataTableConfigurationInputBuilder,
58    config_override: ::std::option::Option<crate::config::Builder>,
59}
60impl
61    crate::client::customize::internal::CustomizableSend<
62        crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput,
63        crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationError,
64    > for CreateBucketMetadataTableConfigurationFluentBuilder
65{
66    fn send(
67        self,
68        config_override: crate::config::Builder,
69    ) -> crate::client::customize::internal::BoxFuture<
70        crate::client::customize::internal::SendResult<
71            crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput,
72            crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationError,
73        >,
74    > {
75        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
76    }
77}
78impl CreateBucketMetadataTableConfigurationFluentBuilder {
79    /// Creates a new `CreateBucketMetadataTableConfigurationFluentBuilder`.
80    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
81        Self {
82            handle,
83            inner: ::std::default::Default::default(),
84            config_override: ::std::option::Option::None,
85        }
86    }
87    /// Access the CreateBucketMetadataTableConfiguration as a reference.
88    pub fn as_input(
89        &self,
90    ) -> &crate::operation::create_bucket_metadata_table_configuration::builders::CreateBucketMetadataTableConfigurationInputBuilder {
91        &self.inner
92    }
93    /// Sends the request and returns the response.
94    ///
95    /// If an error occurs, an `SdkError` will be returned with additional details that
96    /// can be matched against.
97    ///
98    /// By default, any retryable failures will be retried twice. Retry behavior
99    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
100    /// set when configuring the client.
101    pub async fn send(
102        self,
103    ) -> ::std::result::Result<
104        crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput,
105        ::aws_smithy_runtime_api::client::result::SdkError<
106            crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationError,
107            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
108        >,
109    > {
110        let input = self
111            .inner
112            .build()
113            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
114        let runtime_plugins =
115            crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfiguration::operation_runtime_plugins(
116                self.handle.runtime_plugins.clone(),
117                &self.handle.conf,
118                self.config_override,
119            );
120        crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfiguration::orchestrate(&runtime_plugins, input)
121            .await
122    }
123
124    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
125    pub fn customize(
126        self,
127    ) -> crate::client::customize::CustomizableOperation<
128        crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput,
129        crate::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationError,
130        Self,
131    > {
132        crate::client::customize::CustomizableOperation::new(self)
133    }
134    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
135        self.set_config_override(::std::option::Option::Some(config_override.into()));
136        self
137    }
138
139    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
140        self.config_override = config_override;
141        self
142    }
143    /// <p>The general purpose bucket that you want to create the metadata table configuration in.</p>
144    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.bucket(input.into());
146        self
147    }
148    /// <p>The general purpose bucket that you want to create the metadata table configuration in.</p>
149    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.inner = self.inner.set_bucket(input);
151        self
152    }
153    /// <p>The general purpose bucket that you want to create the metadata table configuration in.</p>
154    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
155        self.inner.get_bucket()
156    }
157    /// <p>The <code>Content-MD5</code> header for the metadata table configuration.</p>
158    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.content_md5(input.into());
160        self
161    }
162    /// <p>The <code>Content-MD5</code> header for the metadata table configuration.</p>
163    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.inner = self.inner.set_content_md5(input);
165        self
166    }
167    /// <p>The <code>Content-MD5</code> header for the metadata table configuration.</p>
168    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
169        self.inner.get_content_md5()
170    }
171    /// <p>The checksum algorithm to use with your metadata table configuration.</p>
172    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
173        self.inner = self.inner.checksum_algorithm(input);
174        self
175    }
176    /// <p>The checksum algorithm to use with your metadata table configuration.</p>
177    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
178        self.inner = self.inner.set_checksum_algorithm(input);
179        self
180    }
181    /// <p>The checksum algorithm to use with your metadata table configuration.</p>
182    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
183        self.inner.get_checksum_algorithm()
184    }
185    /// <p>The contents of your metadata table configuration.</p>
186    pub fn metadata_table_configuration(mut self, input: crate::types::MetadataTableConfiguration) -> Self {
187        self.inner = self.inner.metadata_table_configuration(input);
188        self
189    }
190    /// <p>The contents of your metadata table configuration.</p>
191    pub fn set_metadata_table_configuration(mut self, input: ::std::option::Option<crate::types::MetadataTableConfiguration>) -> Self {
192        self.inner = self.inner.set_metadata_table_configuration(input);
193        self
194    }
195    /// <p>The contents of your metadata table configuration.</p>
196    pub fn get_metadata_table_configuration(&self) -> &::std::option::Option<crate::types::MetadataTableConfiguration> {
197        self.inner.get_metadata_table_configuration()
198    }
199    /// <p>The expected owner of the general purpose bucket that contains your metadata table configuration.</p>
200    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201        self.inner = self.inner.expected_bucket_owner(input.into());
202        self
203    }
204    /// <p>The expected owner of the general purpose bucket that contains your metadata table configuration.</p>
205    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206        self.inner = self.inner.set_expected_bucket_owner(input);
207        self
208    }
209    /// <p>The expected owner of the general purpose bucket that contains your metadata table configuration.</p>
210    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
211        self.inner.get_expected_bucket_owner()
212    }
213}