aws_sdk_dynamodb/operation/describe_table/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_table::_describe_table_output::DescribeTableOutputBuilder;
3
4pub use crate::operation::describe_table::_describe_table_input::DescribeTableInputBuilder;
5
6impl crate::operation::describe_table::builders::DescribeTableInputBuilder {
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::describe_table::DescribeTableOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::describe_table::DescribeTableError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.describe_table();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `DescribeTable`.
21/// 
22/// <p>Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.</p><important>
23/// <p>For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version).</p>
24/// </important> <note>
25/// <p>If you issue a <code>DescribeTable</code> request immediately after a <code>CreateTable</code> request, DynamoDB might return a <code>ResourceNotFoundException</code>. This is because <code>DescribeTable</code> uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the <code>DescribeTable</code> request again.</p>
26/// </note>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct DescribeTableFluentBuilder {
29                handle: ::std::sync::Arc<crate::client::Handle>,
30                inner: crate::operation::describe_table::builders::DescribeTableInputBuilder,
31config_override: ::std::option::Option<crate::config::Builder>,
32            }
33impl
34                crate::client::customize::internal::CustomizableSend<
35                    crate::operation::describe_table::DescribeTableOutput,
36                    crate::operation::describe_table::DescribeTableError,
37                > for DescribeTableFluentBuilder
38            {
39                fn send(
40                    self,
41                    config_override: crate::config::Builder,
42                ) -> crate::client::customize::internal::BoxFuture<
43                    crate::client::customize::internal::SendResult<
44                        crate::operation::describe_table::DescribeTableOutput,
45                        crate::operation::describe_table::DescribeTableError,
46                    >,
47                > {
48                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49                }
50            }
51impl DescribeTableFluentBuilder {
52    /// Creates a new `DescribeTableFluentBuilder`.
53                    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54                        Self {
55                            handle,
56                            inner: ::std::default::Default::default(),
57    config_override: ::std::option::Option::None,
58                        }
59                    }
60    /// Access the DescribeTable as a reference.
61                    pub fn as_input(&self) -> &crate::operation::describe_table::builders::DescribeTableInputBuilder {
62                        &self.inner
63                    }
64    /// Sends the request and returns the response.
65                    ///
66                    /// If an error occurs, an `SdkError` will be returned with additional details that
67                    /// can be matched against.
68                    ///
69                    /// By default, any retryable failures will be retried twice. Retry behavior
70                    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71                    /// set when configuring the client.
72                    pub async fn send(self) -> ::std::result::Result<crate::operation::describe_table::DescribeTableOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_table::DescribeTableError, ::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::describe_table::DescribeTable::operation_runtime_plugins(
75                            self.handle.runtime_plugins.clone(),
76                            &self.handle.conf,
77                            self.config_override,
78                        );
79                        crate::operation::describe_table::DescribeTable::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::describe_table::DescribeTableOutput, crate::operation::describe_table::DescribeTableError, 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 name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
104    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105                    self.inner = self.inner.table_name(input.into());
106                    self
107                }
108    /// <p>The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
109    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110                    self.inner = self.inner.set_table_name(input);
111                    self
112                }
113    /// <p>The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
114    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
115                    self.inner.get_table_name()
116                }
117}
118