aws_sdk_dynamodb/operation/list_global_tables/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_global_tables::_list_global_tables_output::ListGlobalTablesOutputBuilder;
3
4pub use crate::operation::list_global_tables::_list_global_tables_input::ListGlobalTablesInputBuilder;
5
6impl crate::operation::list_global_tables::builders::ListGlobalTablesInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(self, client: &crate::Client) -> ::std::result::Result<
9 crate::operation::list_global_tables::ListGlobalTablesOutput,
10 ::aws_smithy_runtime_api::client::result::SdkError<
11 crate::operation::list_global_tables::ListGlobalTablesError,
12 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13 >
14 > {
15 let mut fluent_builder = client.list_global_tables();
16 fluent_builder.inner = self;
17 fluent_builder.send().await
18 }
19 }
20/// Fluent builder constructing a request to `ListGlobalTables`.
21///
22/// <p>Lists all global tables that have a replica in the specified Region.</p><important>
23/// <p>This documentation is for version 2017.11.29 (Legacy) of global tables, which should be avoided for new global tables. Customers should use <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html">Global Tables version 2019.11.21 (Current)</a> when possible, because it provides greater flexibility, higher efficiency, and consumes less write capacity than 2017.11.29 (Legacy).</p>
24/// <p>To determine which version you're using, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html">Determining the global table version you are using</a>. To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.html">Upgrading global tables</a>.</p>
25/// </important>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListGlobalTablesFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::list_global_tables::builders::ListGlobalTablesInputBuilder,
30config_override: ::std::option::Option<crate::config::Builder>,
31 }
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::list_global_tables::ListGlobalTablesOutput,
35 crate::operation::list_global_tables::ListGlobalTablesError,
36 > for ListGlobalTablesFluentBuilder
37 {
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::list_global_tables::ListGlobalTablesOutput,
44 crate::operation::list_global_tables::ListGlobalTablesError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49 }
50impl ListGlobalTablesFluentBuilder {
51 /// Creates a new `ListGlobalTablesFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the ListGlobalTables as a reference.
60 pub fn as_input(&self) -> &crate::operation::list_global_tables::builders::ListGlobalTablesInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client. Note: retries are enabled by default when using
71 /// `aws_config::load_from_env()` or when using `BehaviorVersion::v2025_01_17()` or later.
72 pub async fn send(self) -> ::std::result::Result<crate::operation::list_global_tables::ListGlobalTablesOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_global_tables::ListGlobalTablesError, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>> {
73 let input = self.inner.build().map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
74 let runtime_plugins = crate::operation::list_global_tables::ListGlobalTables::operation_runtime_plugins(
75 self.handle.runtime_plugins.clone(),
76 &self.handle.conf,
77 self.config_override,
78 );
79 crate::operation::list_global_tables::ListGlobalTables::orchestrate(&runtime_plugins, input).await
80 }
81
82 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
83 pub fn customize(
84 self,
85 ) -> crate::client::customize::CustomizableOperation<crate::operation::list_global_tables::ListGlobalTablesOutput, crate::operation::list_global_tables::ListGlobalTablesError, Self> {
86 crate::client::customize::CustomizableOperation::new(self)
87 }
88 pub(crate) fn config_override(
89 mut self,
90 config_override: impl ::std::convert::Into<crate::config::Builder>,
91 ) -> Self {
92 self.set_config_override(::std::option::Option::Some(config_override.into()));
93 self
94 }
95
96 pub(crate) fn set_config_override(
97 &mut self,
98 config_override: ::std::option::Option<crate::config::Builder>,
99 ) -> &mut Self {
100 self.config_override = config_override;
101 self
102 }
103 /// <p>The first global table name that this operation will evaluate.</p>
104 pub fn exclusive_start_global_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.inner = self.inner.exclusive_start_global_table_name(input.into());
106 self
107 }
108 /// <p>The first global table name that this operation will evaluate.</p>
109 pub fn set_exclusive_start_global_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.inner = self.inner.set_exclusive_start_global_table_name(input);
111 self
112 }
113 /// <p>The first global table name that this operation will evaluate.</p>
114 pub fn get_exclusive_start_global_table_name(&self) -> &::std::option::Option<::std::string::String> {
115 self.inner.get_exclusive_start_global_table_name()
116 }
117 /// <p>The maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.</p>
118 /// <p>If the number of global tables DynamoDB finds reaches this limit, it stops the operation and returns the table names collected up to that point, with a table name in the <code>LastEvaluatedGlobalTableName</code> to apply in a subsequent operation to the <code>ExclusiveStartGlobalTableName</code> parameter.</p>
119 pub fn limit(mut self, input: i32) -> Self {
120 self.inner = self.inner.limit(input);
121 self
122 }
123 /// <p>The maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.</p>
124 /// <p>If the number of global tables DynamoDB finds reaches this limit, it stops the operation and returns the table names collected up to that point, with a table name in the <code>LastEvaluatedGlobalTableName</code> to apply in a subsequent operation to the <code>ExclusiveStartGlobalTableName</code> parameter.</p>
125 pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
126 self.inner = self.inner.set_limit(input);
127 self
128 }
129 /// <p>The maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.</p>
130 /// <p>If the number of global tables DynamoDB finds reaches this limit, it stops the operation and returns the table names collected up to that point, with a table name in the <code>LastEvaluatedGlobalTableName</code> to apply in a subsequent operation to the <code>ExclusiveStartGlobalTableName</code> parameter.</p>
131 pub fn get_limit(&self) -> &::std::option::Option<i32> {
132 self.inner.get_limit()
133 }
134 /// <p>Lists the global tables in a specific Region.</p>
135 pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.inner = self.inner.region_name(input.into());
137 self
138 }
139 /// <p>Lists the global tables in a specific Region.</p>
140 pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.inner = self.inner.set_region_name(input);
142 self
143 }
144 /// <p>Lists the global tables in a specific Region.</p>
145 pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
146 self.inner.get_region_name()
147 }
148}
149