aws_sdk_s3/operation/list_bucket_intelligent_tiering_configurations/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_bucket_intelligent_tiering_configurations::_list_bucket_intelligent_tiering_configurations_output::ListBucketIntelligentTieringConfigurationsOutputBuilder;
3
4pub use crate::operation::list_bucket_intelligent_tiering_configurations::_list_bucket_intelligent_tiering_configurations_input::ListBucketIntelligentTieringConfigurationsInputBuilder;
5
6impl crate::operation::list_bucket_intelligent_tiering_configurations::builders::ListBucketIntelligentTieringConfigurationsInputBuilder {
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::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_bucket_intelligent_tiering_configurations();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListBucketIntelligentTieringConfigurations`.
24///
25/// <note>
26/// <p>This operation is not supported for directory buckets.</p>
27/// </note>
28/// <p>Lists 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>ListBucketIntelligentTieringConfigurations</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_GetBucketIntelligentTieringConfiguration.html">GetBucketIntelligentTieringConfiguration</a></p></li>
40/// </ul>
41#[derive(::std::clone::Clone, ::std::fmt::Debug)]
42pub struct ListBucketIntelligentTieringConfigurationsFluentBuilder {
43    handle: ::std::sync::Arc<crate::client::Handle>,
44    inner: crate::operation::list_bucket_intelligent_tiering_configurations::builders::ListBucketIntelligentTieringConfigurationsInputBuilder,
45    config_override: ::std::option::Option<crate::config::Builder>,
46}
47impl
48    crate::client::customize::internal::CustomizableSend<
49        crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput,
50        crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsError,
51    > for ListBucketIntelligentTieringConfigurationsFluentBuilder
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::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput,
59            crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsError,
60        >,
61    > {
62        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
63    }
64}
65impl ListBucketIntelligentTieringConfigurationsFluentBuilder {
66    /// Creates a new `ListBucketIntelligentTieringConfigurationsFluentBuilder`.
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 ListBucketIntelligentTieringConfigurations as a reference.
75    pub fn as_input(
76        &self,
77    ) -> &crate::operation::list_bucket_intelligent_tiering_configurations::builders::ListBucketIntelligentTieringConfigurationsInputBuilder {
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::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput,
92        ::aws_smithy_runtime_api::client::result::SdkError<
93            crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsError,
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::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurations::operation_runtime_plugins(
103                self.handle.runtime_plugins.clone(),
104                &self.handle.conf,
105                self.config_override,
106            );
107        crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurations::orchestrate(
108            &runtime_plugins,
109            input,
110        )
111        .await
112    }
113
114    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
115    pub fn customize(
116        self,
117    ) -> crate::client::customize::CustomizableOperation<
118        crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput,
119        crate::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsError,
120        Self,
121    > {
122        crate::client::customize::CustomizableOperation::new(self)
123    }
124    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
125        self.set_config_override(::std::option::Option::Some(config_override.into()));
126        self
127    }
128
129    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
130        self.config_override = config_override;
131        self
132    }
133    /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
134    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.inner = self.inner.bucket(input.into());
136        self
137    }
138    /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
139    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.inner = self.inner.set_bucket(input);
141        self
142    }
143    /// <p>The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.</p>
144    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
145        self.inner.get_bucket()
146    }
147    /// <p>The <code>ContinuationToken</code> that represents a placeholder from where this request should begin.</p>
148    pub fn continuation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.inner = self.inner.continuation_token(input.into());
150        self
151    }
152    /// <p>The <code>ContinuationToken</code> that represents a placeholder from where this request should begin.</p>
153    pub fn set_continuation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.inner = self.inner.set_continuation_token(input);
155        self
156    }
157    /// <p>The <code>ContinuationToken</code> that represents a placeholder from where this request should begin.</p>
158    pub fn get_continuation_token(&self) -> &::std::option::Option<::std::string::String> {
159        self.inner.get_continuation_token()
160    }
161}