aws_sdk_dynamodb/operation/create_table/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_table::_create_table_output::CreateTableOutputBuilder;
3
4pub use crate::operation::create_table::_create_table_input::CreateTableInputBuilder;
5
6impl crate::operation::create_table::builders::CreateTableInputBuilder {
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::create_table::CreateTableOutput,
10                        ::aws_smithy_runtime_api::client::result::SdkError<
11                            crate::operation::create_table::CreateTableError,
12                            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse
13                        >
14                    > {
15                        let mut fluent_builder = client.create_table();
16                        fluent_builder.inner = self;
17                        fluent_builder.send().await
18                    }
19                }
20/// Fluent builder constructing a request to `CreateTable`.
21/// 
22/// <p>The <code>CreateTable</code> operation adds a new table to your account. In an Amazon Web Services account, table names must be unique within each Region. That is, you can have two tables with same name if you create the tables in different Regions.</p>
23/// <p><code>CreateTable</code> is an asynchronous operation. Upon receiving a <code>CreateTable</code> request, DynamoDB immediately returns a response with a <code>TableStatus</code> of <code>CREATING</code>. After the table is created, DynamoDB sets the <code>TableStatus</code> to <code>ACTIVE</code>. You can perform read and write operations only on an <code>ACTIVE</code> table.</p>
24/// <p>You can optionally define secondary indexes on the new table, as part of the <code>CreateTable</code> operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the <code>CREATING</code> state at any given time.</p>
25/// <p>You can use the <code>DescribeTable</code> action to check the table status.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateTableFluentBuilder {
28                handle: ::std::sync::Arc<crate::client::Handle>,
29                inner: crate::operation::create_table::builders::CreateTableInputBuilder,
30config_override: ::std::option::Option<crate::config::Builder>,
31            }
32impl
33                crate::client::customize::internal::CustomizableSend<
34                    crate::operation::create_table::CreateTableOutput,
35                    crate::operation::create_table::CreateTableError,
36                > for CreateTableFluentBuilder
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::create_table::CreateTableOutput,
44                        crate::operation::create_table::CreateTableError,
45                    >,
46                > {
47                    ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48                }
49            }
50impl CreateTableFluentBuilder {
51    /// Creates a new `CreateTableFluentBuilder`.
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 CreateTable as a reference.
60                    pub fn as_input(&self) -> &crate::operation::create_table::builders::CreateTableInputBuilder {
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::create_table::CreateTableOutput, ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_table::CreateTableError, ::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::create_table::CreateTable::operation_runtime_plugins(
75                            self.handle.runtime_plugins.clone(),
76                            &self.handle.conf,
77                            self.config_override,
78                        );
79                        crate::operation::create_table::CreateTable::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::create_table::CreateTableOutput, crate::operation::create_table::CreateTableError, 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    /// 
104    /// Appends an item to `AttributeDefinitions`.
105    /// 
106    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
107    /// 
108    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
109    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
110                        self.inner = self.inner.attribute_definitions(input);
111                        self
112                    }
113    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
114    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>) -> Self {
115                    self.inner = self.inner.set_attribute_definitions(input);
116                    self
117                }
118    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
119    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>> {
120                    self.inner.get_attribute_definitions()
121                }
122    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
123    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124                    self.inner = self.inner.table_name(input.into());
125                    self
126                }
127    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
128    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129                    self.inner = self.inner.set_table_name(input);
130                    self
131                }
132    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
133    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
134                    self.inner.get_table_name()
135                }
136    /// 
137    /// Appends an item to `KeySchema`.
138    /// 
139    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
140    /// 
141    /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
142    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
143    /// <ul>
144    /// <li>
145    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
146    /// <li>
147    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
148    /// <ul>
149    /// <li>
150    /// <p><code>HASH</code> - partition key</p></li>
151    /// <li>
152    /// <p><code>RANGE</code> - sort key</p></li>
153    /// </ul></li>
154    /// </ul><note>
155    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
156    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
157    /// </note>
158    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
159    /// <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p>
160    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
161    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
162                        self.inner = self.inner.key_schema(input);
163                        self
164                    }
165    /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
166    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
167    /// <ul>
168    /// <li>
169    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
170    /// <li>
171    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
172    /// <ul>
173    /// <li>
174    /// <p><code>HASH</code> - partition key</p></li>
175    /// <li>
176    /// <p><code>RANGE</code> - sort key</p></li>
177    /// </ul></li>
178    /// </ul><note>
179    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
180    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
181    /// </note>
182    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
183    /// <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p>
184    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
185    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::KeySchemaElement>>) -> Self {
186                    self.inner = self.inner.set_key_schema(input);
187                    self
188                }
189    /// <p>Specifies the attributes that make up the primary key for a table or an index. The attributes in <code>KeySchema</code> must also be defined in the <code>AttributeDefinitions</code> array. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html">Data Model</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
190    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
191    /// <ul>
192    /// <li>
193    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
194    /// <li>
195    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
196    /// <ul>
197    /// <li>
198    /// <p><code>HASH</code> - partition key</p></li>
199    /// <li>
200    /// <p><code>RANGE</code> - sort key</p></li>
201    /// </ul></li>
202    /// </ul><note>
203    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from the DynamoDB usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
204    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
205    /// </note>
206    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
207    /// <p>For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a <code>KeyType</code> of <code>HASH</code>, and the second element must have a <code>KeyType</code> of <code>RANGE</code>.</p>
208    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
209    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::KeySchemaElement>> {
210                    self.inner.get_key_schema()
211                }
212    /// 
213    /// Appends an item to `LocalSecondaryIndexes`.
214    /// 
215    /// To override the contents of this collection use [`set_local_secondary_indexes`](Self::set_local_secondary_indexes).
216    /// 
217    /// <p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p>
218    /// <p>Each local secondary index in the array includes the following:</p>
219    /// <ul>
220    /// <li>
221    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
222    /// <p></p></li>
223    /// <li>
224    /// <p><code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p></li>
225    /// <li>
226    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
227    /// <ul>
228    /// <li>
229    /// <p><code>ProjectionType</code> - One of the following:</p>
230    /// <ul>
231    /// <li>
232    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
233    /// <li>
234    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
235    /// <li>
236    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
237    /// </ul></li>
238    /// <li>
239    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of <code>INCLUDE</code>. You still can specify the ProjectionType of <code>ALL</code> to project all attributes from the source table, even if the table has more than 100 attributes.</p></li>
240    /// </ul></li>
241    /// </ul>
242    pub fn local_secondary_indexes(mut self, input: crate::types::LocalSecondaryIndex) -> Self {
243                        self.inner = self.inner.local_secondary_indexes(input);
244                        self
245                    }
246    /// <p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p>
247    /// <p>Each local secondary index in the array includes the following:</p>
248    /// <ul>
249    /// <li>
250    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
251    /// <p></p></li>
252    /// <li>
253    /// <p><code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p></li>
254    /// <li>
255    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
256    /// <ul>
257    /// <li>
258    /// <p><code>ProjectionType</code> - One of the following:</p>
259    /// <ul>
260    /// <li>
261    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
262    /// <li>
263    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
264    /// <li>
265    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
266    /// </ul></li>
267    /// <li>
268    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of <code>INCLUDE</code>. You still can specify the ProjectionType of <code>ALL</code> to project all attributes from the source table, even if the table has more than 100 attributes.</p></li>
269    /// </ul></li>
270    /// </ul>
271    pub fn set_local_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::LocalSecondaryIndex>>) -> Self {
272                    self.inner = self.inner.set_local_secondary_indexes(input);
273                    self
274                }
275    /// <p>One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.</p>
276    /// <p>Each local secondary index in the array includes the following:</p>
277    /// <ul>
278    /// <li>
279    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
280    /// <p></p></li>
281    /// <li>
282    /// <p><code>KeySchema</code> - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.</p></li>
283    /// <li>
284    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
285    /// <ul>
286    /// <li>
287    /// <p><code>ProjectionType</code> - One of the following:</p>
288    /// <ul>
289    /// <li>
290    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
291    /// <li>
292    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
293    /// <li>
294    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
295    /// </ul></li>
296    /// <li>
297    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of <code>INCLUDE</code>. You still can specify the ProjectionType of <code>ALL</code> to project all attributes from the source table, even if the table has more than 100 attributes.</p></li>
298    /// </ul></li>
299    /// </ul>
300    pub fn get_local_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::LocalSecondaryIndex>> {
301                    self.inner.get_local_secondary_indexes()
302                }
303    /// 
304    /// Appends an item to `GlobalSecondaryIndexes`.
305    /// 
306    /// To override the contents of this collection use [`set_global_secondary_indexes`](Self::set_global_secondary_indexes).
307    /// 
308    /// <p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p>
309    /// <ul>
310    /// <li>
311    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
312    /// <p></p></li>
313    /// <li>
314    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
315    /// <li>
316    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
317    /// <ul>
318    /// <li>
319    /// <p><code>ProjectionType</code> - One of the following:</p>
320    /// <ul>
321    /// <li>
322    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
323    /// <li>
324    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
325    /// <li>
326    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
327    /// </ul></li>
328    /// <li>
329    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of <code>INCLUDE</code>. You still can specify the ProjectionType of <code>ALL</code> to project all attributes from the source table, even if the table has more than 100 attributes.</p></li>
330    /// </ul></li>
331    /// <li>
332    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
333    /// </ul>
334    pub fn global_secondary_indexes(mut self, input: crate::types::GlobalSecondaryIndex) -> Self {
335                        self.inner = self.inner.global_secondary_indexes(input);
336                        self
337                    }
338    /// <p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p>
339    /// <ul>
340    /// <li>
341    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
342    /// <p></p></li>
343    /// <li>
344    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
345    /// <li>
346    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
347    /// <ul>
348    /// <li>
349    /// <p><code>ProjectionType</code> - One of the following:</p>
350    /// <ul>
351    /// <li>
352    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
353    /// <li>
354    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
355    /// <li>
356    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
357    /// </ul></li>
358    /// <li>
359    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of <code>INCLUDE</code>. You still can specify the ProjectionType of <code>ALL</code> to project all attributes from the source table, even if the table has more than 100 attributes.</p></li>
360    /// </ul></li>
361    /// <li>
362    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
363    /// </ul>
364    pub fn set_global_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndex>>) -> Self {
365                    self.inner = self.inner.set_global_secondary_indexes(input);
366                    self
367                }
368    /// <p>One or more global secondary indexes (the maximum is 20) to be created on the table. Each global secondary index in the array includes the following:</p>
369    /// <ul>
370    /// <li>
371    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
372    /// <p></p></li>
373    /// <li>
374    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
375    /// <li>
376    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:</p>
377    /// <ul>
378    /// <li>
379    /// <p><code>ProjectionType</code> - One of the following:</p>
380    /// <ul>
381    /// <li>
382    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
383    /// <li>
384    /// <p><code>INCLUDE</code> - Only the specified table attributes are projected into the index. The list of projected attributes is in <code>NonKeyAttributes</code>.</p></li>
385    /// <li>
386    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
387    /// </ul></li>
388    /// <li>
389    /// <p><code>NonKeyAttributes</code> - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in <code>NonKeyAttributes</code>, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total. This limit only applies when you specify the ProjectionType of <code>INCLUDE</code>. You still can specify the ProjectionType of <code>ALL</code> to project all attributes from the source table, even if the table has more than 100 attributes.</p></li>
390    /// </ul></li>
391    /// <li>
392    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
393    /// </ul>
394    pub fn get_global_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndex>> {
395                    self.inner.get_global_secondary_indexes()
396                }
397    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
398    /// <ul>
399    /// <li>
400    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB workloads. <code>PAY_PER_REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html">On-demand capacity mode</a>.</p></li>
401    /// <li>
402    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html">Provisioned capacity mode</a>.</p></li>
403    /// </ul>
404    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
405                    self.inner = self.inner.billing_mode(input);
406                    self
407                }
408    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
409    /// <ul>
410    /// <li>
411    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB workloads. <code>PAY_PER_REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html">On-demand capacity mode</a>.</p></li>
412    /// <li>
413    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html">Provisioned capacity mode</a>.</p></li>
414    /// </ul>
415    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
416                    self.inner = self.inner.set_billing_mode(input);
417                    self
418                }
419    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
420    /// <ul>
421    /// <li>
422    /// <p><code>PAY_PER_REQUEST</code> - We recommend using <code>PAY_PER_REQUEST</code> for most DynamoDB workloads. <code>PAY_PER_REQUEST</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/on-demand-capacity-mode.html">On-demand capacity mode</a>.</p></li>
423    /// <li>
424    /// <p><code>PROVISIONED</code> - We recommend using <code>PROVISIONED</code> for steady workloads with predictable growth where capacity requirements can be reliably forecasted. <code>PROVISIONED</code> sets the billing mode to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/provisioned-capacity-mode.html">Provisioned capacity mode</a>.</p></li>
425    /// </ul>
426    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
427                    self.inner.get_billing_mode()
428                }
429    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
430    /// <p>If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property.</p>
431    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
432    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
433                    self.inner = self.inner.provisioned_throughput(input);
434                    self
435                }
436    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
437    /// <p>If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property.</p>
438    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
439    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
440                    self.inner = self.inner.set_provisioned_throughput(input);
441                    self
442                }
443    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
444    /// <p>If you set BillingMode as <code>PROVISIONED</code>, you must specify this property. If you set BillingMode as <code>PAY_PER_REQUEST</code>, you cannot specify this property.</p>
445    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
446    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
447                    self.inner.get_provisioned_throughput()
448                }
449    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
450    /// <ul>
451    /// <li>
452    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
453    /// <li>
454    /// <p><code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p>
455    /// <ul>
456    /// <li>
457    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
458    /// <li>
459    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
460    /// <li>
461    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
462    /// <li>
463    /// <p><code>NEW_AND_OLD_IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p></li>
464    /// </ul></li>
465    /// </ul>
466    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
467                    self.inner = self.inner.stream_specification(input);
468                    self
469                }
470    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
471    /// <ul>
472    /// <li>
473    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
474    /// <li>
475    /// <p><code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p>
476    /// <ul>
477    /// <li>
478    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
479    /// <li>
480    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
481    /// <li>
482    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
483    /// <li>
484    /// <p><code>NEW_AND_OLD_IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p></li>
485    /// </ul></li>
486    /// </ul>
487    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
488                    self.inner = self.inner.set_stream_specification(input);
489                    self
490                }
491    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
492    /// <ul>
493    /// <li>
494    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
495    /// <li>
496    /// <p><code>StreamViewType</code> - When an item in the table is modified, <code>StreamViewType</code> determines what information is written to the table's stream. Valid values for <code>StreamViewType</code> are:</p>
497    /// <ul>
498    /// <li>
499    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
500    /// <li>
501    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
502    /// <li>
503    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
504    /// <li>
505    /// <p><code>NEW_AND_OLD_IMAGES</code> - Both the new and the old item images of the item are written to the stream.</p></li>
506    /// </ul></li>
507    /// </ul>
508    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
509                    self.inner.get_stream_specification()
510                }
511    /// <p>Represents the settings used to enable server-side encryption.</p>
512    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
513                    self.inner = self.inner.sse_specification(input);
514                    self
515                }
516    /// <p>Represents the settings used to enable server-side encryption.</p>
517    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
518                    self.inner = self.inner.set_sse_specification(input);
519                    self
520                }
521    /// <p>Represents the settings used to enable server-side encryption.</p>
522    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
523                    self.inner.get_sse_specification()
524                }
525    /// 
526    /// Appends an item to `Tags`.
527    /// 
528    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
529    /// 
530    /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
531    pub fn tags(mut self, input: crate::types::Tag) -> Self {
532                        self.inner = self.inner.tags(input);
533                        self
534                    }
535    /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
536    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::Tag>>) -> Self {
537                    self.inner = self.inner.set_tags(input);
538                    self
539                }
540    /// <p>A list of key-value pairs to label the table. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a>.</p>
541    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::Tag>> {
542                    self.inner.get_tags()
543                }
544    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
545    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
546                    self.inner = self.inner.table_class(input);
547                    self
548                }
549    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
550    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
551                    self.inner = self.inner.set_table_class(input);
552                    self
553                }
554    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
555    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
556                    self.inner.get_table_class()
557                }
558    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
559    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
560                    self.inner = self.inner.deletion_protection_enabled(input);
561                    self
562                }
563    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
564    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
565                    self.inner = self.inner.set_deletion_protection_enabled(input);
566                    self
567                }
568    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
569    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
570                    self.inner.get_deletion_protection_enabled()
571                }
572    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
573    pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
574                    self.inner = self.inner.warm_throughput(input);
575                    self
576                }
577    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
578    pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
579                    self.inner = self.inner.set_warm_throughput(input);
580                    self
581                }
582    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
583    pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
584                    self.inner.get_warm_throughput()
585                }
586    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
587    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
588    /// <p>The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html">Resource-based policy considerations</a>.</p><note>
589    /// <p>You need to specify the <code>CreateTable</code> and <code>PutResourcePolicy</code> IAM actions for authorizing a user to create a table with a resource-based policy.</p>
590    /// </note>
591    pub fn resource_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
592                    self.inner = self.inner.resource_policy(input.into());
593                    self
594                }
595    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
596    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
597    /// <p>The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html">Resource-based policy considerations</a>.</p><note>
598    /// <p>You need to specify the <code>CreateTable</code> and <code>PutResourcePolicy</code> IAM actions for authorizing a user to create a table with a resource-based policy.</p>
599    /// </note>
600    pub fn set_resource_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
601                    self.inner = self.inner.set_resource_policy(input);
602                    self
603                }
604    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
605    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
606    /// <p>The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/rbac-considerations.html">Resource-based policy considerations</a>.</p><note>
607    /// <p>You need to specify the <code>CreateTable</code> and <code>PutResourcePolicy</code> IAM actions for authorizing a user to create a table with a resource-based policy.</p>
608    /// </note>
609    pub fn get_resource_policy(&self) -> &::std::option::Option<::std::string::String> {
610                    self.inner.get_resource_policy()
611                }
612    /// <p>Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify <code>MaxReadRequestUnits</code>, <code>MaxWriteRequestUnits</code>, or both.</p>
613    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
614                    self.inner = self.inner.on_demand_throughput(input);
615                    self
616                }
617    /// <p>Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify <code>MaxReadRequestUnits</code>, <code>MaxWriteRequestUnits</code>, or both.</p>
618    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
619                    self.inner = self.inner.set_on_demand_throughput(input);
620                    self
621                }
622    /// <p>Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify <code>MaxReadRequestUnits</code>, <code>MaxWriteRequestUnits</code>, or both.</p>
623    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
624                    self.inner.get_on_demand_throughput()
625                }
626}
627