aws_sdk_s3/operation/get_bucket_intelligent_tiering_configuration/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_bucket_intelligent_tiering_configuration::_get_bucket_intelligent_tiering_configuration_output::GetBucketIntelligentTieringConfigurationOutputBuilder;
3
4pub use crate::operation::get_bucket_intelligent_tiering_configuration::_get_bucket_intelligent_tiering_configuration_input::GetBucketIntelligentTieringConfigurationInputBuilder;
5
6impl crate::operation::get_bucket_intelligent_tiering_configuration::builders::GetBucketIntelligentTieringConfigurationInputBuilder {
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_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_bucket_intelligent_tiering_configuration();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetBucketIntelligentTieringConfiguration`.
24///
25/// <note>
26/// <p>This operation is not supported for directory buckets.</p>
27/// </note>
28/// <p>Gets the S3 Intelligent-Tiering configuration from the specified bucket.</p>
29/// <p>The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.</p>
30/// <p>The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.</p>
31/// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access">Storage class for automatically optimizing frequently and infrequently accessed objects</a>.</p>
32/// <p>Operations related to <code>GetBucketIntelligentTieringConfiguration</code> include:</p>
33/// <ul>
34/// <li>
35/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html">DeleteBucketIntelligentTieringConfiguration</a></p></li>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html">PutBucketIntelligentTieringConfiguration</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html">ListBucketIntelligentTieringConfigurations</a></p></li>
40/// </ul>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct GetBucketIntelligentTieringConfigurationFluentBuilder {
43    handle: ::std::sync::Arc<crate::client::Handle>,
44    inner: crate::operation::get_bucket_intelligent_tiering_configuration::builders::GetBucketIntelligentTieringConfigurationInputBuilder,
45    config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48    crate::client::customize::internal::CustomizableSend<
49        crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
50        crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
51    > for GetBucketIntelligentTieringConfigurationFluentBuilder
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_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
59            crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
60        >,
61    > {
62        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63    }
64}
65impl GetBucketIntelligentTieringConfigurationFluentBuilder {
66    /// Creates a new `GetBucketIntelligentTieringConfigurationFluentBuilder`.
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 GetBucketIntelligentTieringConfiguration as a reference.
75    pub fn as_input(
76        &self,
77    ) -> &crate::operation::get_bucket_intelligent_tiering_configuration::builders::GetBucketIntelligentTieringConfigurationInputBuilder {
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::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
92        ::aws_smithy_runtime_api::client::result::SdkError<
93            crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
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::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfiguration::operation_runtime_plugins(
103                self.handle.runtime_plugins.clone(),
104                &self.handle.conf,
105                self.config_override,
106            );
107        crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfiguration::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::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput,
116        crate::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationError,
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 name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</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 name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</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 name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
141    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
142        self.inner.get_bucket()
143    }
144    /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
145    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.inner = self.inner.id(input.into());
147        self
148    }
149    /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
150    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.inner = self.inner.set_id(input);
152        self
153    }
154    /// <p>The ID used to identify the S3 Intelligent-Tiering configuration.</p>
155    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
156        self.inner.get_id()
157    }
158}