aws_sdk_s3/operation/update_bucket_metadata_journal_table_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_bucket_metadata_journal_table_configuration::_update_bucket_metadata_journal_table_configuration_output::UpdateBucketMetadataJournalTableConfigurationOutputBuilder;
3
4pub use crate::operation::update_bucket_metadata_journal_table_configuration::_update_bucket_metadata_journal_table_configuration_input::UpdateBucketMetadataJournalTableConfigurationInputBuilder;
5
6impl crate::operation::update_bucket_metadata_journal_table_configuration::builders::UpdateBucketMetadataJournalTableConfigurationInputBuilder {
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::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_bucket_metadata_journal_table_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateBucketMetadataJournalTableConfiguration`.
24///
25/// <p>Enables or disables journal table record expiration for an S3 Metadata configuration on 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:UpdateBucketMetadataJournalTableConfiguration</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>UpdateBucketMetadataJournalTableConfiguration</code>:</p>
35/// <ul>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataConfiguration.html">DeleteBucketMetadataConfiguration</a></p></li>
40/// <li>
41/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataConfiguration.html">GetBucketMetadataConfiguration</a></p></li>
42/// <li>
43/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UpdateBucketMetadataInventoryTableConfiguration.html">UpdateBucketMetadataInventoryTableConfiguration</a></p></li>
44/// </ul><important>
45/// <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>
46/// </important>
47#[derive(::std::clone::Clone, ::std::fmt::Debug)]
48pub struct UpdateBucketMetadataJournalTableConfigurationFluentBuilder {
49    handle: ::std::sync::Arc<crate::client::Handle>,
50    inner: crate::operation::update_bucket_metadata_journal_table_configuration::builders::UpdateBucketMetadataJournalTableConfigurationInputBuilder,
51    config_override: ::std::option::Option<crate::config::Builder>,
52}
53impl
54    crate::client::customize::internal::CustomizableSend<
55        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
56        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
57    > for UpdateBucketMetadataJournalTableConfigurationFluentBuilder
58{
59    fn send(
60        self,
61        config_override: crate::config::Builder,
62    ) -> crate::client::customize::internal::BoxFuture<
63        crate::client::customize::internal::SendResult<
64            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
65            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
66        >,
67    > {
68        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
69    }
70}
71impl UpdateBucketMetadataJournalTableConfigurationFluentBuilder {
72    /// Creates a new `UpdateBucketMetadataJournalTableConfigurationFluentBuilder`.
73    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
74        Self {
75            handle,
76            inner: ::std::default::Default::default(),
77            config_override: ::std::option::Option::None,
78        }
79    }
80    /// Access the UpdateBucketMetadataJournalTableConfiguration as a reference.
81    pub fn as_input(
82        &self,
83    ) -> &crate::operation::update_bucket_metadata_journal_table_configuration::builders::UpdateBucketMetadataJournalTableConfigurationInputBuilder
84    {
85        &self.inner
86    }
87    /// Sends the request and returns the response.
88    ///
89    /// If an error occurs, an `SdkError` will be returned with additional details that
90    /// can be matched against.
91    ///
92    /// By default, any retryable failures will be retried twice. Retry behavior
93    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
94    /// set when configuring the client.
95    pub async fn send(
96        self,
97    ) -> ::std::result::Result<
98        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
99        ::aws_smithy_runtime_api::client::result::SdkError<
100            crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
101            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
102        >,
103    > {
104        let input = self
105            .inner
106            .build()
107            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
108        let runtime_plugins = crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfiguration::operation_runtime_plugins(
109                            self.handle.runtime_plugins.clone(),
110                            &self.handle.conf,
111                            self.config_override,
112                        );
113        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfiguration::orchestrate(
114            &runtime_plugins,
115            input,
116        )
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::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationOutput,
125        crate::operation::update_bucket_metadata_journal_table_configuration::UpdateBucketMetadataJournalTableConfigurationError,
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 corresponds to the metadata configuration that you want to enable or disable journal table record expiration for.</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 corresponds to the metadata configuration that you want to enable or disable journal table record expiration for.</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 corresponds to the metadata configuration that you want to enable or disable journal table record expiration for.</p>
150    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_bucket()
152    }
153    /// <p>The <code>Content-MD5</code> header for the journal table configuration.</p>
154    pub fn content_md5(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.inner = self.inner.content_md5(input.into());
156        self
157    }
158    /// <p>The <code>Content-MD5</code> header for the journal table configuration.</p>
159    pub fn set_content_md5(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.inner = self.inner.set_content_md5(input);
161        self
162    }
163    /// <p>The <code>Content-MD5</code> header for the journal table configuration.</p>
164    pub fn get_content_md5(&self) -> &::std::option::Option<::std::string::String> {
165        self.inner.get_content_md5()
166    }
167    /// <p>The checksum algorithm to use with your journal table configuration.</p>
168    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
169        self.inner = self.inner.checksum_algorithm(input);
170        self
171    }
172    /// <p>The checksum algorithm to use with your journal table configuration.</p>
173    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
174        self.inner = self.inner.set_checksum_algorithm(input);
175        self
176    }
177    /// <p>The checksum algorithm to use with your journal table configuration.</p>
178    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
179        self.inner.get_checksum_algorithm()
180    }
181    /// <p>The contents of your journal table configuration.</p>
182    pub fn journal_table_configuration(mut self, input: crate::types::JournalTableConfigurationUpdates) -> Self {
183        self.inner = self.inner.journal_table_configuration(input);
184        self
185    }
186    /// <p>The contents of your journal table configuration.</p>
187    pub fn set_journal_table_configuration(mut self, input: ::std::option::Option<crate::types::JournalTableConfigurationUpdates>) -> Self {
188        self.inner = self.inner.set_journal_table_configuration(input);
189        self
190    }
191    /// <p>The contents of your journal table configuration.</p>
192    pub fn get_journal_table_configuration(&self) -> &::std::option::Option<crate::types::JournalTableConfigurationUpdates> {
193        self.inner.get_journal_table_configuration()
194    }
195    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable journal table record expiration for.</p>
196    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.inner = self.inner.expected_bucket_owner(input.into());
198        self
199    }
200    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable journal table record expiration for.</p>
201    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202        self.inner = self.inner.set_expected_bucket_owner(input);
203        self
204    }
205    /// <p>The expected owner of the general purpose bucket that corresponds to the metadata table configuration that you want to enable or disable journal table record expiration for.</p>
206    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
207        self.inner.get_expected_bucket_owner()
208    }
209}