Skip to main content

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. Each global secondary index supports up to 4 partition keys and up to 4 sort keys.</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    /// <p>The Amazon Resource Name (ARN) of the source table used for the creation of a multi-account global table.</p>
134    pub global_table_source_arn: ::std::option::Option<::std::string::String>,
135    /// <p>Controls the settings synchronization mode for the global table. For multi-account global tables, this parameter is required and the only supported value is ENABLED. For same-account global tables, this parameter is set to ENABLED_WITH_OVERRIDES.</p>
136    pub global_table_settings_replication_mode: ::std::option::Option<crate::types::GlobalTableSettingsReplicationMode>,
137    /// <p>One or more vector indexes to be created on the table. Each vector index enables similarity search on a vector attribute. Each element in the list consists of:</p>
138    /// <ul>
139    /// <li>
140    /// <p><code>IndexName</code> - The name of the vector index. Must be unique within the table.</p></li>
141    /// <li>
142    /// <p><code>VectorAttribute</code> - The attribute that contains vector embeddings. If multiple vector indexes reference the same attribute, they must all use the same number of dimensions.</p></li>
143    /// <li>
144    /// <p><code>Dimensions</code> - The number of dimensions in each vector.</p></li>
145    /// <li>
146    /// <p><code>DistanceFunction</code> - The distance function used to calculate similarity. Valid values: <code>COSINE</code>, <code>EUCLIDEAN</code>, <code>DOT_PRODUCT</code>.</p></li>
147    /// <li>
148    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the vector index. The total number of projected non-key attributes is shared across the vector attribute (counts as 1) and <code>INLINE_FILTER</code> search schema elements (each counts as 1). <code>HASH</code> search schema elements do not count toward this limit.</p></li>
149    /// <li>
150    /// <p><code>SearchSchema</code> - (Optional) Defines the partition key (<code>HASH</code>) and inline filter (<code>INLINE_FILTER</code>) attributes for the vector index.</p></li>
151    /// </ul>
152    pub vector_indexes: ::std::option::Option<::std::vec::Vec<crate::types::VectorIndex>>,
153}
154impl CreateTableInput {
155    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
156    ///
157    /// 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()`.
158    pub fn attribute_definitions(&self) -> &[crate::types::AttributeDefinition] {
159        self.attribute_definitions.as_deref().unwrap_or_default()
160    }
161    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
162    pub fn table_name(&self) -> ::std::option::Option<&str> {
163        self.table_name.as_deref()
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    ///
186    /// 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()`.
187    pub fn key_schema(&self) -> &[crate::types::KeySchemaElement] {
188        self.key_schema.as_deref().unwrap_or_default()
189    }
190    /// <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>
191    /// <p>Each local secondary index in the array includes the following:</p>
192    /// <ul>
193    /// <li>
194    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
195    /// <p></p></li>
196    /// <li>
197    /// <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>
198    /// <li>
199    /// <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>
200    /// <ul>
201    /// <li>
202    /// <p><code>ProjectionType</code> - One of the following:</p>
203    /// <ul>
204    /// <li>
205    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
206    /// <li>
207    /// <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>
208    /// <li>
209    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
210    /// </ul></li>
211    /// <li>
212    /// <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>
213    /// </ul></li>
214    /// </ul>
215    ///
216    /// 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()`.
217    pub fn local_secondary_indexes(&self) -> &[crate::types::LocalSecondaryIndex] {
218        self.local_secondary_indexes.as_deref().unwrap_or_default()
219    }
220    /// <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>
221    /// <ul>
222    /// <li>
223    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
224    /// <p></p></li>
225    /// <li>
226    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index. Each global secondary index supports up to 4 partition keys and up to 4 sort keys.</p></li>
227    /// <li>
228    /// <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>
229    /// <ul>
230    /// <li>
231    /// <p><code>ProjectionType</code> - One of the following:</p>
232    /// <ul>
233    /// <li>
234    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
235    /// <li>
236    /// <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>
237    /// <li>
238    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
239    /// </ul></li>
240    /// <li>
241    /// <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>
242    /// </ul></li>
243    /// <li>
244    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
245    /// </ul>
246    ///
247    /// 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()`.
248    pub fn global_secondary_indexes(&self) -> &[crate::types::GlobalSecondaryIndex] {
249        self.global_secondary_indexes.as_deref().unwrap_or_default()
250    }
251    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
252    /// <ul>
253    /// <li>
254    /// <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>
255    /// <li>
256    /// <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>
257    /// </ul>
258    pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
259        self.billing_mode.as_ref()
260    }
261    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
262    /// <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>
263    /// <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>
264    pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
265        self.provisioned_throughput.as_ref()
266    }
267    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
268    /// <ul>
269    /// <li>
270    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
271    /// <li>
272    /// <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>
273    /// <ul>
274    /// <li>
275    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
276    /// <li>
277    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
278    /// <li>
279    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
280    /// <li>
281    /// <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>
282    /// </ul></li>
283    /// </ul>
284    pub fn stream_specification(&self) -> ::std::option::Option<&crate::types::StreamSpecification> {
285        self.stream_specification.as_ref()
286    }
287    /// <p>Represents the settings used to enable server-side encryption.</p>
288    pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
289        self.sse_specification.as_ref()
290    }
291    /// <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>
292    ///
293    /// 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()`.
294    pub fn tags(&self) -> &[crate::types::Tag] {
295        self.tags.as_deref().unwrap_or_default()
296    }
297    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
298    pub fn table_class(&self) -> ::std::option::Option<&crate::types::TableClass> {
299        self.table_class.as_ref()
300    }
301    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
302    pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
303        self.deletion_protection_enabled
304    }
305    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
306    pub fn warm_throughput(&self) -> ::std::option::Option<&crate::types::WarmThroughput> {
307        self.warm_throughput.as_ref()
308    }
309    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
310    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
311    /// <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>
312    /// <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>
313    /// </note>
314    pub fn resource_policy(&self) -> ::std::option::Option<&str> {
315        self.resource_policy.as_deref()
316    }
317    /// <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>
318    pub fn on_demand_throughput(&self) -> ::std::option::Option<&crate::types::OnDemandThroughput> {
319        self.on_demand_throughput.as_ref()
320    }
321    /// <p>The Amazon Resource Name (ARN) of the source table used for the creation of a multi-account global table.</p>
322    pub fn global_table_source_arn(&self) -> ::std::option::Option<&str> {
323        self.global_table_source_arn.as_deref()
324    }
325    /// <p>Controls the settings synchronization mode for the global table. For multi-account global tables, this parameter is required and the only supported value is ENABLED. For same-account global tables, this parameter is set to ENABLED_WITH_OVERRIDES.</p>
326    pub fn global_table_settings_replication_mode(&self) -> ::std::option::Option<&crate::types::GlobalTableSettingsReplicationMode> {
327        self.global_table_settings_replication_mode.as_ref()
328    }
329    /// <p>One or more vector indexes to be created on the table. Each vector index enables similarity search on a vector attribute. Each element in the list consists of:</p>
330    /// <ul>
331    /// <li>
332    /// <p><code>IndexName</code> - The name of the vector index. Must be unique within the table.</p></li>
333    /// <li>
334    /// <p><code>VectorAttribute</code> - The attribute that contains vector embeddings. If multiple vector indexes reference the same attribute, they must all use the same number of dimensions.</p></li>
335    /// <li>
336    /// <p><code>Dimensions</code> - The number of dimensions in each vector.</p></li>
337    /// <li>
338    /// <p><code>DistanceFunction</code> - The distance function used to calculate similarity. Valid values: <code>COSINE</code>, <code>EUCLIDEAN</code>, <code>DOT_PRODUCT</code>.</p></li>
339    /// <li>
340    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the vector index. The total number of projected non-key attributes is shared across the vector attribute (counts as 1) and <code>INLINE_FILTER</code> search schema elements (each counts as 1). <code>HASH</code> search schema elements do not count toward this limit.</p></li>
341    /// <li>
342    /// <p><code>SearchSchema</code> - (Optional) Defines the partition key (<code>HASH</code>) and inline filter (<code>INLINE_FILTER</code>) attributes for the vector index.</p></li>
343    /// </ul>
344    ///
345    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vector_indexes.is_none()`.
346    pub fn vector_indexes(&self) -> &[crate::types::VectorIndex] {
347        self.vector_indexes.as_deref().unwrap_or_default()
348    }
349}
350impl CreateTableInput {
351    /// Creates a new builder-style object to manufacture [`CreateTableInput`](crate::operation::create_table::CreateTableInput).
352    pub fn builder() -> crate::operation::create_table::builders::CreateTableInputBuilder {
353        crate::operation::create_table::builders::CreateTableInputBuilder::default()
354    }
355}
356
357/// A builder for [`CreateTableInput`](crate::operation::create_table::CreateTableInput).
358#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
359#[non_exhaustive]
360pub struct CreateTableInputBuilder {
361    pub(crate) attribute_definitions: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>>,
362    pub(crate) table_name: ::std::option::Option<::std::string::String>,
363    pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
364    pub(crate) local_secondary_indexes: ::std::option::Option<::std::vec::Vec<crate::types::LocalSecondaryIndex>>,
365    pub(crate) global_secondary_indexes: ::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndex>>,
366    pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
367    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
368    pub(crate) stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
369    pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
370    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
371    pub(crate) table_class: ::std::option::Option<crate::types::TableClass>,
372    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
373    pub(crate) warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
374    pub(crate) resource_policy: ::std::option::Option<::std::string::String>,
375    pub(crate) on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
376    pub(crate) global_table_source_arn: ::std::option::Option<::std::string::String>,
377    pub(crate) global_table_settings_replication_mode: ::std::option::Option<crate::types::GlobalTableSettingsReplicationMode>,
378    pub(crate) vector_indexes: ::std::option::Option<::std::vec::Vec<crate::types::VectorIndex>>,
379}
380impl CreateTableInputBuilder {
381    /// Appends an item to `attribute_definitions`.
382    ///
383    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
384    ///
385    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
386    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
387        let mut v = self.attribute_definitions.unwrap_or_default();
388        v.push(input);
389        self.attribute_definitions = ::std::option::Option::Some(v);
390        self
391    }
392    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
393    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>>) -> Self {
394        self.attribute_definitions = input;
395        self
396    }
397    /// <p>An array of attributes that describe the key schema for the table and indexes.</p>
398    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>> {
399        &self.attribute_definitions
400    }
401    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
402    /// This field is required.
403    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
404        self.table_name = ::std::option::Option::Some(input.into());
405        self
406    }
407    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
408    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
409        self.table_name = input;
410        self
411    }
412    /// <p>The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
413    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
414        &self.table_name
415    }
416    /// Appends an item to `key_schema`.
417    ///
418    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
419    ///
420    /// <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>
421    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
422    /// <ul>
423    /// <li>
424    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
425    /// <li>
426    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
427    /// <ul>
428    /// <li>
429    /// <p><code>HASH</code> - partition key</p></li>
430    /// <li>
431    /// <p><code>RANGE</code> - sort key</p></li>
432    /// </ul></li>
433    /// </ul><note>
434    /// <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>
435    /// <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>
436    /// </note>
437    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
438    /// <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>
439    /// <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>
440    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
441        let mut v = self.key_schema.unwrap_or_default();
442        v.push(input);
443        self.key_schema = ::std::option::Option::Some(v);
444        self
445    }
446    /// <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>
447    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
448    /// <ul>
449    /// <li>
450    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
451    /// <li>
452    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
453    /// <ul>
454    /// <li>
455    /// <p><code>HASH</code> - partition key</p></li>
456    /// <li>
457    /// <p><code>RANGE</code> - sort key</p></li>
458    /// </ul></li>
459    /// </ul><note>
460    /// <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>
461    /// <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>
462    /// </note>
463    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
464    /// <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>
465    /// <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>
466    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>) -> Self {
467        self.key_schema = input;
468        self
469    }
470    /// <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>
471    /// <p>Each <code>KeySchemaElement</code> in the array is composed of:</p>
472    /// <ul>
473    /// <li>
474    /// <p><code>AttributeName</code> - The name of this key attribute.</p></li>
475    /// <li>
476    /// <p><code>KeyType</code> - The role that the key attribute will assume:</p>
477    /// <ul>
478    /// <li>
479    /// <p><code>HASH</code> - partition key</p></li>
480    /// <li>
481    /// <p><code>RANGE</code> - sort key</p></li>
482    /// </ul></li>
483    /// </ul><note>
484    /// <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>
485    /// <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>
486    /// </note>
487    /// <p>For a simple primary key (partition key), you must provide exactly one element with a <code>KeyType</code> of <code>HASH</code>.</p>
488    /// <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>
489    /// <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>
490    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>> {
491        &self.key_schema
492    }
493    /// Appends an item to `local_secondary_indexes`.
494    ///
495    /// To override the contents of this collection use [`set_local_secondary_indexes`](Self::set_local_secondary_indexes).
496    ///
497    /// <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>
498    /// <p>Each local secondary index in the array includes the following:</p>
499    /// <ul>
500    /// <li>
501    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
502    /// <p></p></li>
503    /// <li>
504    /// <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>
505    /// <li>
506    /// <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>
507    /// <ul>
508    /// <li>
509    /// <p><code>ProjectionType</code> - One of the following:</p>
510    /// <ul>
511    /// <li>
512    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
513    /// <li>
514    /// <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>
515    /// <li>
516    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
517    /// </ul></li>
518    /// <li>
519    /// <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>
520    /// </ul></li>
521    /// </ul>
522    pub fn local_secondary_indexes(mut self, input: crate::types::LocalSecondaryIndex) -> Self {
523        let mut v = self.local_secondary_indexes.unwrap_or_default();
524        v.push(input);
525        self.local_secondary_indexes = ::std::option::Option::Some(v);
526        self
527    }
528    /// <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>
529    /// <p>Each local secondary index in the array includes the following:</p>
530    /// <ul>
531    /// <li>
532    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
533    /// <p></p></li>
534    /// <li>
535    /// <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>
536    /// <li>
537    /// <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>
538    /// <ul>
539    /// <li>
540    /// <p><code>ProjectionType</code> - One of the following:</p>
541    /// <ul>
542    /// <li>
543    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
544    /// <li>
545    /// <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>
546    /// <li>
547    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
548    /// </ul></li>
549    /// <li>
550    /// <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>
551    /// </ul></li>
552    /// </ul>
553    pub fn set_local_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LocalSecondaryIndex>>) -> Self {
554        self.local_secondary_indexes = input;
555        self
556    }
557    /// <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>
558    /// <p>Each local secondary index in the array includes the following:</p>
559    /// <ul>
560    /// <li>
561    /// <p><code>IndexName</code> - The name of the local secondary index. Must be unique only for this table.</p>
562    /// <p></p></li>
563    /// <li>
564    /// <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>
565    /// <li>
566    /// <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>
567    /// <ul>
568    /// <li>
569    /// <p><code>ProjectionType</code> - One of the following:</p>
570    /// <ul>
571    /// <li>
572    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
573    /// <li>
574    /// <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>
575    /// <li>
576    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
577    /// </ul></li>
578    /// <li>
579    /// <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>
580    /// </ul></li>
581    /// </ul>
582    pub fn get_local_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LocalSecondaryIndex>> {
583        &self.local_secondary_indexes
584    }
585    /// Appends an item to `global_secondary_indexes`.
586    ///
587    /// To override the contents of this collection use [`set_global_secondary_indexes`](Self::set_global_secondary_indexes).
588    ///
589    /// <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>
590    /// <ul>
591    /// <li>
592    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
593    /// <p></p></li>
594    /// <li>
595    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index. Each global secondary index supports up to 4 partition keys and up to 4 sort keys.</p></li>
596    /// <li>
597    /// <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>
598    /// <ul>
599    /// <li>
600    /// <p><code>ProjectionType</code> - One of the following:</p>
601    /// <ul>
602    /// <li>
603    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
604    /// <li>
605    /// <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>
606    /// <li>
607    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
608    /// </ul></li>
609    /// <li>
610    /// <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>
611    /// </ul></li>
612    /// <li>
613    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
614    /// </ul>
615    pub fn global_secondary_indexes(mut self, input: crate::types::GlobalSecondaryIndex) -> Self {
616        let mut v = self.global_secondary_indexes.unwrap_or_default();
617        v.push(input);
618        self.global_secondary_indexes = ::std::option::Option::Some(v);
619        self
620    }
621    /// <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>
622    /// <ul>
623    /// <li>
624    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
625    /// <p></p></li>
626    /// <li>
627    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index. Each global secondary index supports up to 4 partition keys and up to 4 sort keys.</p></li>
628    /// <li>
629    /// <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>
630    /// <ul>
631    /// <li>
632    /// <p><code>ProjectionType</code> - One of the following:</p>
633    /// <ul>
634    /// <li>
635    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
636    /// <li>
637    /// <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>
638    /// <li>
639    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
640    /// </ul></li>
641    /// <li>
642    /// <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>
643    /// </ul></li>
644    /// <li>
645    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
646    /// </ul>
647    pub fn set_global_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndex>>) -> Self {
648        self.global_secondary_indexes = input;
649        self
650    }
651    /// <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>
652    /// <ul>
653    /// <li>
654    /// <p><code>IndexName</code> - The name of the global secondary index. Must be unique only for this table.</p>
655    /// <p></p></li>
656    /// <li>
657    /// <p><code>KeySchema</code> - Specifies the key schema for the global secondary index. Each global secondary index supports up to 4 partition keys and up to 4 sort keys.</p></li>
658    /// <li>
659    /// <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>
660    /// <ul>
661    /// <li>
662    /// <p><code>ProjectionType</code> - One of the following:</p>
663    /// <ul>
664    /// <li>
665    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
666    /// <li>
667    /// <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>
668    /// <li>
669    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
670    /// </ul></li>
671    /// <li>
672    /// <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>
673    /// </ul></li>
674    /// <li>
675    /// <p><code>ProvisionedThroughput</code> - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.</p></li>
676    /// </ul>
677    pub fn get_global_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndex>> {
678        &self.global_secondary_indexes
679    }
680    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
681    /// <ul>
682    /// <li>
683    /// <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>
684    /// <li>
685    /// <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>
686    /// </ul>
687    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
688        self.billing_mode = ::std::option::Option::Some(input);
689        self
690    }
691    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
692    /// <ul>
693    /// <li>
694    /// <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>
695    /// <li>
696    /// <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>
697    /// </ul>
698    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
699        self.billing_mode = input;
700        self
701    }
702    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.</p>
703    /// <ul>
704    /// <li>
705    /// <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>
706    /// <li>
707    /// <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>
708    /// </ul>
709    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
710        &self.billing_mode
711    }
712    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
713    /// <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>
714    /// <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>
715    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
716        self.provisioned_throughput = ::std::option::Option::Some(input);
717        self
718    }
719    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
720    /// <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>
721    /// <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>
722    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
723        self.provisioned_throughput = input;
724        self
725    }
726    /// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
727    /// <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>
728    /// <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>
729    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
730        &self.provisioned_throughput
731    }
732    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
733    /// <ul>
734    /// <li>
735    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
736    /// <li>
737    /// <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>
738    /// <ul>
739    /// <li>
740    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
741    /// <li>
742    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
743    /// <li>
744    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
745    /// <li>
746    /// <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>
747    /// </ul></li>
748    /// </ul>
749    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
750        self.stream_specification = ::std::option::Option::Some(input);
751        self
752    }
753    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
754    /// <ul>
755    /// <li>
756    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
757    /// <li>
758    /// <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>
759    /// <ul>
760    /// <li>
761    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
762    /// <li>
763    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
764    /// <li>
765    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
766    /// <li>
767    /// <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>
768    /// </ul></li>
769    /// </ul>
770    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
771        self.stream_specification = input;
772        self
773    }
774    /// <p>The settings for DynamoDB Streams on the table. These settings consist of:</p>
775    /// <ul>
776    /// <li>
777    /// <p><code>StreamEnabled</code> - Indicates whether DynamoDB Streams is to be enabled (true) or disabled (false).</p></li>
778    /// <li>
779    /// <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>
780    /// <ul>
781    /// <li>
782    /// <p><code>KEYS_ONLY</code> - Only the key attributes of the modified item are written to the stream.</p></li>
783    /// <li>
784    /// <p><code>NEW_IMAGE</code> - The entire item, as it appears after it was modified, is written to the stream.</p></li>
785    /// <li>
786    /// <p><code>OLD_IMAGE</code> - The entire item, as it appeared before it was modified, is written to the stream.</p></li>
787    /// <li>
788    /// <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>
789    /// </ul></li>
790    /// </ul>
791    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
792        &self.stream_specification
793    }
794    /// <p>Represents the settings used to enable server-side encryption.</p>
795    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
796        self.sse_specification = ::std::option::Option::Some(input);
797        self
798    }
799    /// <p>Represents the settings used to enable server-side encryption.</p>
800    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
801        self.sse_specification = input;
802        self
803    }
804    /// <p>Represents the settings used to enable server-side encryption.</p>
805    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
806        &self.sse_specification
807    }
808    /// Appends an item to `tags`.
809    ///
810    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
811    ///
812    /// <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>
813    pub fn tags(mut self, input: crate::types::Tag) -> Self {
814        let mut v = self.tags.unwrap_or_default();
815        v.push(input);
816        self.tags = ::std::option::Option::Some(v);
817        self
818    }
819    /// <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>
820    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
821        self.tags = input;
822        self
823    }
824    /// <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>
825    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
826        &self.tags
827    }
828    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
829    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
830        self.table_class = ::std::option::Option::Some(input);
831        self
832    }
833    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
834    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
835        self.table_class = input;
836        self
837    }
838    /// <p>The table class of the new table. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
839    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
840        &self.table_class
841    }
842    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
843    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
844        self.deletion_protection_enabled = ::std::option::Option::Some(input);
845        self
846    }
847    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
848    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
849        self.deletion_protection_enabled = input;
850        self
851    }
852    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
853    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
854        &self.deletion_protection_enabled
855    }
856    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
857    pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
858        self.warm_throughput = ::std::option::Option::Some(input);
859        self
860    }
861    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
862    pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
863        self.warm_throughput = input;
864        self
865    }
866    /// <p>Represents the warm throughput (in read units per second and write units per second) for creating a table.</p>
867    pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
868        &self.warm_throughput
869    }
870    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
871    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
872    /// <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>
873    /// <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>
874    /// </note>
875    pub fn resource_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
876        self.resource_policy = ::std::option::Option::Some(input.into());
877        self
878    }
879    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
880    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
881    /// <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>
882    /// <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>
883    /// </note>
884    pub fn set_resource_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
885        self.resource_policy = input;
886        self
887    }
888    /// <p>An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.</p>
889    /// <p>When you attach a resource-based policy while creating a table, the policy application is <i>strongly consistent</i>.</p>
890    /// <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>
891    /// <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>
892    /// </note>
893    pub fn get_resource_policy(&self) -> &::std::option::Option<::std::string::String> {
894        &self.resource_policy
895    }
896    /// <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>
897    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
898        self.on_demand_throughput = ::std::option::Option::Some(input);
899        self
900    }
901    /// <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>
902    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
903        self.on_demand_throughput = input;
904        self
905    }
906    /// <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>
907    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
908        &self.on_demand_throughput
909    }
910    /// <p>The Amazon Resource Name (ARN) of the source table used for the creation of a multi-account global table.</p>
911    pub fn global_table_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
912        self.global_table_source_arn = ::std::option::Option::Some(input.into());
913        self
914    }
915    /// <p>The Amazon Resource Name (ARN) of the source table used for the creation of a multi-account global table.</p>
916    pub fn set_global_table_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
917        self.global_table_source_arn = input;
918        self
919    }
920    /// <p>The Amazon Resource Name (ARN) of the source table used for the creation of a multi-account global table.</p>
921    pub fn get_global_table_source_arn(&self) -> &::std::option::Option<::std::string::String> {
922        &self.global_table_source_arn
923    }
924    /// <p>Controls the settings synchronization mode for the global table. For multi-account global tables, this parameter is required and the only supported value is ENABLED. For same-account global tables, this parameter is set to ENABLED_WITH_OVERRIDES.</p>
925    pub fn global_table_settings_replication_mode(mut self, input: crate::types::GlobalTableSettingsReplicationMode) -> Self {
926        self.global_table_settings_replication_mode = ::std::option::Option::Some(input);
927        self
928    }
929    /// <p>Controls the settings synchronization mode for the global table. For multi-account global tables, this parameter is required and the only supported value is ENABLED. For same-account global tables, this parameter is set to ENABLED_WITH_OVERRIDES.</p>
930    pub fn set_global_table_settings_replication_mode(
931        mut self,
932        input: ::std::option::Option<crate::types::GlobalTableSettingsReplicationMode>,
933    ) -> Self {
934        self.global_table_settings_replication_mode = input;
935        self
936    }
937    /// <p>Controls the settings synchronization mode for the global table. For multi-account global tables, this parameter is required and the only supported value is ENABLED. For same-account global tables, this parameter is set to ENABLED_WITH_OVERRIDES.</p>
938    pub fn get_global_table_settings_replication_mode(&self) -> &::std::option::Option<crate::types::GlobalTableSettingsReplicationMode> {
939        &self.global_table_settings_replication_mode
940    }
941    /// Appends an item to `vector_indexes`.
942    ///
943    /// To override the contents of this collection use [`set_vector_indexes`](Self::set_vector_indexes).
944    ///
945    /// <p>One or more vector indexes to be created on the table. Each vector index enables similarity search on a vector attribute. Each element in the list consists of:</p>
946    /// <ul>
947    /// <li>
948    /// <p><code>IndexName</code> - The name of the vector index. Must be unique within the table.</p></li>
949    /// <li>
950    /// <p><code>VectorAttribute</code> - The attribute that contains vector embeddings. If multiple vector indexes reference the same attribute, they must all use the same number of dimensions.</p></li>
951    /// <li>
952    /// <p><code>Dimensions</code> - The number of dimensions in each vector.</p></li>
953    /// <li>
954    /// <p><code>DistanceFunction</code> - The distance function used to calculate similarity. Valid values: <code>COSINE</code>, <code>EUCLIDEAN</code>, <code>DOT_PRODUCT</code>.</p></li>
955    /// <li>
956    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the vector index. The total number of projected non-key attributes is shared across the vector attribute (counts as 1) and <code>INLINE_FILTER</code> search schema elements (each counts as 1). <code>HASH</code> search schema elements do not count toward this limit.</p></li>
957    /// <li>
958    /// <p><code>SearchSchema</code> - (Optional) Defines the partition key (<code>HASH</code>) and inline filter (<code>INLINE_FILTER</code>) attributes for the vector index.</p></li>
959    /// </ul>
960    pub fn vector_indexes(mut self, input: crate::types::VectorIndex) -> Self {
961        let mut v = self.vector_indexes.unwrap_or_default();
962        v.push(input);
963        self.vector_indexes = ::std::option::Option::Some(v);
964        self
965    }
966    /// <p>One or more vector indexes to be created on the table. Each vector index enables similarity search on a vector attribute. Each element in the list consists of:</p>
967    /// <ul>
968    /// <li>
969    /// <p><code>IndexName</code> - The name of the vector index. Must be unique within the table.</p></li>
970    /// <li>
971    /// <p><code>VectorAttribute</code> - The attribute that contains vector embeddings. If multiple vector indexes reference the same attribute, they must all use the same number of dimensions.</p></li>
972    /// <li>
973    /// <p><code>Dimensions</code> - The number of dimensions in each vector.</p></li>
974    /// <li>
975    /// <p><code>DistanceFunction</code> - The distance function used to calculate similarity. Valid values: <code>COSINE</code>, <code>EUCLIDEAN</code>, <code>DOT_PRODUCT</code>.</p></li>
976    /// <li>
977    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the vector index. The total number of projected non-key attributes is shared across the vector attribute (counts as 1) and <code>INLINE_FILTER</code> search schema elements (each counts as 1). <code>HASH</code> search schema elements do not count toward this limit.</p></li>
978    /// <li>
979    /// <p><code>SearchSchema</code> - (Optional) Defines the partition key (<code>HASH</code>) and inline filter (<code>INLINE_FILTER</code>) attributes for the vector index.</p></li>
980    /// </ul>
981    pub fn set_vector_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::VectorIndex>>) -> Self {
982        self.vector_indexes = input;
983        self
984    }
985    /// <p>One or more vector indexes to be created on the table. Each vector index enables similarity search on a vector attribute. Each element in the list consists of:</p>
986    /// <ul>
987    /// <li>
988    /// <p><code>IndexName</code> - The name of the vector index. Must be unique within the table.</p></li>
989    /// <li>
990    /// <p><code>VectorAttribute</code> - The attribute that contains vector embeddings. If multiple vector indexes reference the same attribute, they must all use the same number of dimensions.</p></li>
991    /// <li>
992    /// <p><code>Dimensions</code> - The number of dimensions in each vector.</p></li>
993    /// <li>
994    /// <p><code>DistanceFunction</code> - The distance function used to calculate similarity. Valid values: <code>COSINE</code>, <code>EUCLIDEAN</code>, <code>DOT_PRODUCT</code>.</p></li>
995    /// <li>
996    /// <p><code>Projection</code> - Specifies attributes that are copied (projected) from the table into the vector index. The total number of projected non-key attributes is shared across the vector attribute (counts as 1) and <code>INLINE_FILTER</code> search schema elements (each counts as 1). <code>HASH</code> search schema elements do not count toward this limit.</p></li>
997    /// <li>
998    /// <p><code>SearchSchema</code> - (Optional) Defines the partition key (<code>HASH</code>) and inline filter (<code>INLINE_FILTER</code>) attributes for the vector index.</p></li>
999    /// </ul>
1000    pub fn get_vector_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::VectorIndex>> {
1001        &self.vector_indexes
1002    }
1003    /// Consumes the builder and constructs a [`CreateTableInput`](crate::operation::create_table::CreateTableInput).
1004    pub fn build(self) -> ::std::result::Result<crate::operation::create_table::CreateTableInput, ::aws_smithy_types::error::operation::BuildError> {
1005        ::std::result::Result::Ok(crate::operation::create_table::CreateTableInput {
1006            attribute_definitions: self.attribute_definitions,
1007            table_name: self.table_name,
1008            key_schema: self.key_schema,
1009            local_secondary_indexes: self.local_secondary_indexes,
1010            global_secondary_indexes: self.global_secondary_indexes,
1011            billing_mode: self.billing_mode,
1012            provisioned_throughput: self.provisioned_throughput,
1013            stream_specification: self.stream_specification,
1014            sse_specification: self.sse_specification,
1015            tags: self.tags,
1016            table_class: self.table_class,
1017            deletion_protection_enabled: self.deletion_protection_enabled,
1018            warm_throughput: self.warm_throughput,
1019            resource_policy: self.resource_policy,
1020            on_demand_throughput: self.on_demand_throughput,
1021            global_table_source_arn: self.global_table_source_arn,
1022            global_table_settings_replication_mode: self.global_table_settings_replication_mode,
1023            vector_indexes: self.vector_indexes,
1024        })
1025    }
1026}