aws_sdk_dynamodb/operation/create_table/
_create_table_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>CreateTable</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateTableInput  {
7    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
8    pub attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
9    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
10    pub table_name: ::std::option::Option<::std::string::String>,
11    /// <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>
12    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
13    /// <ul>
14    /// <li>
15    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
16    /// <li>
17    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
18    /// <ul>
19    /// <li>
20    /// <p><code>HASH</code> - partition key</p></li>
21    /// <li>
22    /// <p><code>RANGE</code> - sort key</p></li>
23    /// </ul></li>
24    /// </ul><note>
25    /// <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>
26    /// <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>
27    /// </note>
28    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
29    /// <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>
30    /// <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>
31    pub key_schema: ::std::option::Option<::std::vec::Vec::<crate::types::KeySchemaElement>>,
32    /// <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>
33    /// <p>Each local secondary index in the array includes the following:</p>
34    /// <ul>
35    /// <li>
36    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
37    /// <p></p></li>
38    /// <li>
39    /// <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>
40    /// <li>
41    /// <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>
42    /// <ul>
43    /// <li>
44    /// <p><code>ProjectionType</code> - One of the following:</p>
45    /// <ul>
46    /// <li>
47    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
48    /// <li>
49    /// <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>
50    /// <li>
51    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
52    /// </ul></li>
53    /// <li>
54    /// <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>
55    /// </ul></li>
56    /// </ul>
57    pub local_secondary_indexes: ::std::option::Option<::std::vec::Vec::<crate::types::LocalSecondaryIndex>>,
58    /// <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>
59    /// <ul>
60    /// <li>
61    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
62    /// <p></p></li>
63    /// <li>
64    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
65    /// <li>
66    /// <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>
67    /// <ul>
68    /// <li>
69    /// <p><code>ProjectionType</code> - One of the following:</p>
70    /// <ul>
71    /// <li>
72    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
73    /// <li>
74    /// <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>
75    /// <li>
76    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
77    /// </ul></li>
78    /// <li>
79    /// <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>
80    /// </ul></li>
81    /// <li>
82    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
83    /// </ul>
84    pub global_secondary_indexes: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndex>>,
85    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
86    /// <ul>
87    /// <li>
88    /// <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>
89    /// <li>
90    /// <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>
91    /// </ul>
92    pub billing_mode: ::std::option::Option<crate::types::BillingMode>,
93    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
94    /// <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>
95    /// <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>
96    pub provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
97    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
98    /// <ul>
99    /// <li>
100    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
101    /// <li>
102    /// <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>
103    /// <ul>
104    /// <li>
105    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
106    /// <li>
107    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
108    /// <li>
109    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
110    /// <li>
111    /// <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>
112    /// </ul></li>
113    /// </ul>
114    pub stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
115    /// <p>Represents the settings used to enable server-side encryption.</p>
116    pub sse_specification: ::std::option::Option<crate::types::SseSpecification>,
117    /// <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>
118    pub tags: ::std::option::Option<::std::vec::Vec::<crate::types::Tag>>,
119    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
120    pub table_class: ::std::option::Option<crate::types::TableClass>,
121    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
122    pub deletion_protection_enabled: ::std::option::Option<bool>,
123    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
124    pub warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
125    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
126    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
127    /// <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>
128    /// <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>
129    /// </note>
130    pub resource_policy: ::std::option::Option<::std::string::String>,
131    /// <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>
132    pub on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
133}
134impl  CreateTableInput  {
135    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
136    /// 
137    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attribute_definitions.is_none()`.
138    pub fn attribute_definitions(&self) -> &[crate::types::AttributeDefinition] {
139        self.attribute_definitions.as_deref()
140        .unwrap_or_default()
141    }
142    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
143    pub fn table_name(&self) -> ::std::option::Option<&str> {
144        self.table_name.as_deref()
145    }
146    /// <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>
147    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
148    /// <ul>
149    /// <li>
150    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
151    /// <li>
152    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
153    /// <ul>
154    /// <li>
155    /// <p><code>HASH</code> - partition key</p></li>
156    /// <li>
157    /// <p><code>RANGE</code> - sort key</p></li>
158    /// </ul></li>
159    /// </ul><note>
160    /// <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>
161    /// <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>
162    /// </note>
163    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
164    /// <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>
165    /// <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>
166    /// 
167    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.key_schema.is_none()`.
168    pub fn key_schema(&self) -> &[crate::types::KeySchemaElement] {
169        self.key_schema.as_deref()
170        .unwrap_or_default()
171    }
172    /// <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>
173    /// <p>Each local secondary index in the array includes the following:</p>
174    /// <ul>
175    /// <li>
176    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
177    /// <p></p></li>
178    /// <li>
179    /// <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>
180    /// <li>
181    /// <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>
182    /// <ul>
183    /// <li>
184    /// <p><code>ProjectionType</code> - One of the following:</p>
185    /// <ul>
186    /// <li>
187    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
188    /// <li>
189    /// <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>
190    /// <li>
191    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
192    /// </ul></li>
193    /// <li>
194    /// <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>
195    /// </ul></li>
196    /// </ul>
197    /// 
198    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.local_secondary_indexes.is_none()`.
199    pub fn local_secondary_indexes(&self) -> &[crate::types::LocalSecondaryIndex] {
200        self.local_secondary_indexes.as_deref()
201        .unwrap_or_default()
202    }
203    /// <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>
204    /// <ul>
205    /// <li>
206    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
207    /// <p></p></li>
208    /// <li>
209    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
210    /// <li>
211    /// <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>
212    /// <ul>
213    /// <li>
214    /// <p><code>ProjectionType</code> - One of the following:</p>
215    /// <ul>
216    /// <li>
217    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
218    /// <li>
219    /// <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>
220    /// <li>
221    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
222    /// </ul></li>
223    /// <li>
224    /// <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>
225    /// </ul></li>
226    /// <li>
227    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
228    /// </ul>
229    /// 
230    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.global_secondary_indexes.is_none()`.
231    pub fn global_secondary_indexes(&self) -> &[crate::types::GlobalSecondaryIndex] {
232        self.global_secondary_indexes.as_deref()
233        .unwrap_or_default()
234    }
235    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
236    /// <ul>
237    /// <li>
238    /// <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>
239    /// <li>
240    /// <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>
241    /// </ul>
242    pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
243        self.billing_mode.as_ref()
244    }
245    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
246    /// <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>
247    /// <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>
248    pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
249        self.provisioned_throughput.as_ref()
250    }
251    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
252    /// <ul>
253    /// <li>
254    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
255    /// <li>
256    /// <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>
257    /// <ul>
258    /// <li>
259    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
260    /// <li>
261    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
262    /// <li>
263    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
264    /// <li>
265    /// <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>
266    /// </ul></li>
267    /// </ul>
268    pub fn stream_specification(&self) -> ::std::option::Option<&crate::types::StreamSpecification> {
269        self.stream_specification.as_ref()
270    }
271    /// <p>Represents the settings used to enable server-side encryption.</p>
272    pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
273        self.sse_specification.as_ref()
274    }
275    /// <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>
276    /// 
277    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
278    pub fn tags(&self) -> &[crate::types::Tag] {
279        self.tags.as_deref()
280        .unwrap_or_default()
281    }
282    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
283    pub fn table_class(&self) -> ::std::option::Option<&crate::types::TableClass> {
284        self.table_class.as_ref()
285    }
286    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
287    pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
288        self.deletion_protection_enabled
289    }
290    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
291    pub fn warm_throughput(&self) -> ::std::option::Option<&crate::types::WarmThroughput> {
292        self.warm_throughput.as_ref()
293    }
294    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
295    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
296    /// <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>
297    /// <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>
298    /// </note>
299    pub fn resource_policy(&self) -> ::std::option::Option<&str> {
300        self.resource_policy.as_deref()
301    }
302    /// <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>
303    pub fn on_demand_throughput(&self) -> ::std::option::Option<&crate::types::OnDemandThroughput> {
304        self.on_demand_throughput.as_ref()
305    }
306}
307impl CreateTableInput {
308    /// Creates a new builder-style object to manufacture [`CreateTableInput`](crate::operation::create_table::CreateTableInput).
309    pub fn builder() -> crate::operation::create_table::builders::CreateTableInputBuilder {
310        crate::operation::create_table::builders::CreateTableInputBuilder::default()
311    }
312}
313
314/// A builder for [`CreateTableInput`](crate::operation::create_table::CreateTableInput).
315#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
316#[non_exhaustive]
317pub struct CreateTableInputBuilder {
318    pub(crate) attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
319    pub(crate) table_name: ::std::option::Option<::std::string::String>,
320    pub(crate) key_schema: ::std::option::Option<::std::vec::Vec::<crate::types::KeySchemaElement>>,
321    pub(crate) local_secondary_indexes: ::std::option::Option<::std::vec::Vec::<crate::types::LocalSecondaryIndex>>,
322    pub(crate) global_secondary_indexes: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndex>>,
323    pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
324    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
325    pub(crate) stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
326    pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
327    pub(crate) tags: ::std::option::Option<::std::vec::Vec::<crate::types::Tag>>,
328    pub(crate) table_class: ::std::option::Option<crate::types::TableClass>,
329    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
330    pub(crate) warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
331    pub(crate) resource_policy: ::std::option::Option<::std::string::String>,
332    pub(crate) on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
333}
334impl CreateTableInputBuilder {
335    /// Appends an item to `attribute_definitions`.
336    ///
337    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
338    ///
339    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
340    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
341        let mut v = self.attribute_definitions.unwrap_or_default();
342                        v.push(input);
343                        self.attribute_definitions = ::std::option::Option::Some(v);
344                        self
345    }
346    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
347    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>) -> Self {
348        self.attribute_definitions = input; self
349    }
350    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
351    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>> {
352        &self.attribute_definitions
353    }
354    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
355    /// This field is required.
356    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
357        self.table_name = ::std::option::Option::Some(input.into());
358        self
359    }
360    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
361    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
362        self.table_name = input; self
363    }
364    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
365    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
366        &self.table_name
367    }
368    /// Appends an item to `key_schema`.
369    ///
370    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
371    ///
372    /// <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>
373    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
374    /// <ul>
375    /// <li>
376    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
377    /// <li>
378    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
379    /// <ul>
380    /// <li>
381    /// <p><code>HASH</code> - partition key</p></li>
382    /// <li>
383    /// <p><code>RANGE</code> - sort key</p></li>
384    /// </ul></li>
385    /// </ul><note>
386    /// <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>
387    /// <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>
388    /// </note>
389    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
390    /// <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>
391    /// <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>
392    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
393        let mut v = self.key_schema.unwrap_or_default();
394                        v.push(input);
395                        self.key_schema = ::std::option::Option::Some(v);
396                        self
397    }
398    /// <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>
399    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
400    /// <ul>
401    /// <li>
402    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
403    /// <li>
404    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
405    /// <ul>
406    /// <li>
407    /// <p><code>HASH</code> - partition key</p></li>
408    /// <li>
409    /// <p><code>RANGE</code> - sort key</p></li>
410    /// </ul></li>
411    /// </ul><note>
412    /// <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>
413    /// <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>
414    /// </note>
415    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
416    /// <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>
417    /// <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>
418    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::KeySchemaElement>>) -> Self {
419        self.key_schema = input; self
420    }
421    /// <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>
422    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
423    /// <ul>
424    /// <li>
425    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
426    /// <li>
427    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
428    /// <ul>
429    /// <li>
430    /// <p><code>HASH</code> - partition key</p></li>
431    /// <li>
432    /// <p><code>RANGE</code> - sort key</p></li>
433    /// </ul></li>
434    /// </ul><note>
435    /// <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>
436    /// <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>
437    /// </note>
438    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
439    /// <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>
440    /// <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>
441    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::KeySchemaElement>> {
442        &self.key_schema
443    }
444    /// Appends an item to `local_secondary_indexes`.
445    ///
446    /// To override the contents of this collection use [`set_local_secondary_indexes`](Self::set_local_secondary_indexes).
447    ///
448    /// <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>
449    /// <p>Each local secondary index in the array includes the following:</p>
450    /// <ul>
451    /// <li>
452    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
453    /// <p></p></li>
454    /// <li>
455    /// <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>
456    /// <li>
457    /// <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>
458    /// <ul>
459    /// <li>
460    /// <p><code>ProjectionType</code> - One of the following:</p>
461    /// <ul>
462    /// <li>
463    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
464    /// <li>
465    /// <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>
466    /// <li>
467    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
468    /// </ul></li>
469    /// <li>
470    /// <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>
471    /// </ul></li>
472    /// </ul>
473    pub fn local_secondary_indexes(mut self, input: crate::types::LocalSecondaryIndex) -> Self {
474        let mut v = self.local_secondary_indexes.unwrap_or_default();
475                        v.push(input);
476                        self.local_secondary_indexes = ::std::option::Option::Some(v);
477                        self
478    }
479    /// <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>
480    /// <p>Each local secondary index in the array includes the following:</p>
481    /// <ul>
482    /// <li>
483    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
484    /// <p></p></li>
485    /// <li>
486    /// <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>
487    /// <li>
488    /// <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>
489    /// <ul>
490    /// <li>
491    /// <p><code>ProjectionType</code> - One of the following:</p>
492    /// <ul>
493    /// <li>
494    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
495    /// <li>
496    /// <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>
497    /// <li>
498    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
499    /// </ul></li>
500    /// <li>
501    /// <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>
502    /// </ul></li>
503    /// </ul>
504    pub fn set_local_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::LocalSecondaryIndex>>) -> Self {
505        self.local_secondary_indexes = input; self
506    }
507    /// <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>
508    /// <p>Each local secondary index in the array includes the following:</p>
509    /// <ul>
510    /// <li>
511    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
512    /// <p></p></li>
513    /// <li>
514    /// <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>
515    /// <li>
516    /// <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>
517    /// <ul>
518    /// <li>
519    /// <p><code>ProjectionType</code> - One of the following:</p>
520    /// <ul>
521    /// <li>
522    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
523    /// <li>
524    /// <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>
525    /// <li>
526    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
527    /// </ul></li>
528    /// <li>
529    /// <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>
530    /// </ul></li>
531    /// </ul>
532    pub fn get_local_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::LocalSecondaryIndex>> {
533        &self.local_secondary_indexes
534    }
535    /// Appends an item to `global_secondary_indexes`.
536    ///
537    /// To override the contents of this collection use [`set_global_secondary_indexes`](Self::set_global_secondary_indexes).
538    ///
539    /// <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>
540    /// <ul>
541    /// <li>
542    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
543    /// <p></p></li>
544    /// <li>
545    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
546    /// <li>
547    /// <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>
548    /// <ul>
549    /// <li>
550    /// <p><code>ProjectionType</code> - One of the following:</p>
551    /// <ul>
552    /// <li>
553    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
554    /// <li>
555    /// <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>
556    /// <li>
557    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
558    /// </ul></li>
559    /// <li>
560    /// <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>
561    /// </ul></li>
562    /// <li>
563    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
564    /// </ul>
565    pub fn global_secondary_indexes(mut self, input: crate::types::GlobalSecondaryIndex) -> Self {
566        let mut v = self.global_secondary_indexes.unwrap_or_default();
567                        v.push(input);
568                        self.global_secondary_indexes = ::std::option::Option::Some(v);
569                        self
570    }
571    /// <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>
572    /// <ul>
573    /// <li>
574    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
575    /// <p></p></li>
576    /// <li>
577    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
578    /// <li>
579    /// <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>
580    /// <ul>
581    /// <li>
582    /// <p><code>ProjectionType</code> - One of the following:</p>
583    /// <ul>
584    /// <li>
585    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
586    /// <li>
587    /// <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>
588    /// <li>
589    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
590    /// </ul></li>
591    /// <li>
592    /// <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>
593    /// </ul></li>
594    /// <li>
595    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
596    /// </ul>
597    pub fn set_global_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndex>>) -> Self {
598        self.global_secondary_indexes = input; self
599    }
600    /// <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>
601    /// <ul>
602    /// <li>
603    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
604    /// <p></p></li>
605    /// <li>
606    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index.</p></li>
607    /// <li>
608    /// <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>
609    /// <ul>
610    /// <li>
611    /// <p><code>ProjectionType</code> - One of the following:</p>
612    /// <ul>
613    /// <li>
614    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
615    /// <li>
616    /// <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>
617    /// <li>
618    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
619    /// </ul></li>
620    /// <li>
621    /// <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>
622    /// </ul></li>
623    /// <li>
624    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
625    /// </ul>
626    pub fn get_global_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndex>> {
627        &self.global_secondary_indexes
628    }
629    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
630    /// <ul>
631    /// <li>
632    /// <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>
633    /// <li>
634    /// <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>
635    /// </ul>
636    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
637        self.billing_mode = ::std::option::Option::Some(input);
638        self
639    }
640    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
641    /// <ul>
642    /// <li>
643    /// <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>
644    /// <li>
645    /// <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>
646    /// </ul>
647    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
648        self.billing_mode = input; self
649    }
650    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
651    /// <ul>
652    /// <li>
653    /// <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>
654    /// <li>
655    /// <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>
656    /// </ul>
657    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
658        &self.billing_mode
659    }
660    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
661    /// <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>
662    /// <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>
663    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
664        self.provisioned_throughput = ::std::option::Option::Some(input);
665        self
666    }
667    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
668    /// <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>
669    /// <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>
670    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
671        self.provisioned_throughput = input; self
672    }
673    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
674    /// <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>
675    /// <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>
676    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
677        &self.provisioned_throughput
678    }
679    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
680    /// <ul>
681    /// <li>
682    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
683    /// <li>
684    /// <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>
685    /// <ul>
686    /// <li>
687    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
688    /// <li>
689    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
690    /// <li>
691    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
692    /// <li>
693    /// <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>
694    /// </ul></li>
695    /// </ul>
696    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
697        self.stream_specification = ::std::option::Option::Some(input);
698        self
699    }
700    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
701    /// <ul>
702    /// <li>
703    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
704    /// <li>
705    /// <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>
706    /// <ul>
707    /// <li>
708    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
709    /// <li>
710    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
711    /// <li>
712    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
713    /// <li>
714    /// <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>
715    /// </ul></li>
716    /// </ul>
717    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
718        self.stream_specification = input; self
719    }
720    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
721    /// <ul>
722    /// <li>
723    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
724    /// <li>
725    /// <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>
726    /// <ul>
727    /// <li>
728    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
729    /// <li>
730    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
731    /// <li>
732    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
733    /// <li>
734    /// <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>
735    /// </ul></li>
736    /// </ul>
737    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
738        &self.stream_specification
739    }
740    /// <p>Represents the settings used to enable server-side encryption.</p>
741    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
742        self.sse_specification = ::std::option::Option::Some(input);
743        self
744    }
745    /// <p>Represents the settings used to enable server-side encryption.</p>
746    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
747        self.sse_specification = input; self
748    }
749    /// <p>Represents the settings used to enable server-side encryption.</p>
750    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
751        &self.sse_specification
752    }
753    /// Appends an item to `tags`.
754    ///
755    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
756    ///
757    /// <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>
758    pub fn tags(mut self, input: crate::types::Tag) -> Self {
759        let mut v = self.tags.unwrap_or_default();
760                        v.push(input);
761                        self.tags = ::std::option::Option::Some(v);
762                        self
763    }
764    /// <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>
765    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::Tag>>) -> Self {
766        self.tags = input; self
767    }
768    /// <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>
769    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::Tag>> {
770        &self.tags
771    }
772    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
773    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
774        self.table_class = ::std::option::Option::Some(input);
775        self
776    }
777    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
778    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
779        self.table_class = input; self
780    }
781    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
782    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
783        &self.table_class
784    }
785    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
786    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
787        self.deletion_protection_enabled = ::std::option::Option::Some(input);
788        self
789    }
790    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
791    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
792        self.deletion_protection_enabled = input; self
793    }
794    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
795    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
796        &self.deletion_protection_enabled
797    }
798    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
799    pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
800        self.warm_throughput = ::std::option::Option::Some(input);
801        self
802    }
803    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
804    pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
805        self.warm_throughput = input; self
806    }
807    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
808    pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
809        &self.warm_throughput
810    }
811    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
812    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
813    /// <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>
814    /// <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>
815    /// </note>
816    pub fn resource_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
817        self.resource_policy = ::std::option::Option::Some(input.into());
818        self
819    }
820    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
821    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
822    /// <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>
823    /// <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>
824    /// </note>
825    pub fn set_resource_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
826        self.resource_policy = input; self
827    }
828    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
829    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
830    /// <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>
831    /// <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>
832    /// </note>
833    pub fn get_resource_policy(&self) -> &::std::option::Option<::std::string::String> {
834        &self.resource_policy
835    }
836    /// <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>
837    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
838        self.on_demand_throughput = ::std::option::Option::Some(input);
839        self
840    }
841    /// <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>
842    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
843        self.on_demand_throughput = input; self
844    }
845    /// <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>
846    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
847        &self.on_demand_throughput
848    }
849    /// Consumes the builder and constructs a [`CreateTableInput`](crate::operation::create_table::CreateTableInput).
850    pub fn build(self) -> ::std::result::Result<crate::operation::create_table::CreateTableInput, ::aws_smithy_types::error::operation::BuildError> {
851        ::std::result::Result::Ok(
852            crate::operation::create_table::CreateTableInput {
853                attribute_definitions: self.attribute_definitions
854                ,
855                table_name: self.table_name
856                ,
857                key_schema: self.key_schema
858                ,
859                local_secondary_indexes: self.local_secondary_indexes
860                ,
861                global_secondary_indexes: self.global_secondary_indexes
862                ,
863                billing_mode: self.billing_mode
864                ,
865                provisioned_throughput: self.provisioned_throughput
866                ,
867                stream_specification: self.stream_specification
868                ,
869                sse_specification: self.sse_specification
870                ,
871                tags: self.tags
872                ,
873                table_class: self.table_class
874                ,
875                deletion_protection_enabled: self.deletion_protection_enabled
876                ,
877                warm_throughput: self.warm_throughput
878                ,
879                resource_policy: self.resource_policy
880                ,
881                on_demand_throughput: self.on_demand_throughput
882                ,
883            }
884        )
885    }
886}
887