aws_sdk_dynamodb/operation/update_table/
_update_table_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of an <code>UpdateTable</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateTableInput  {
7    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
8    pub attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
9    /// <p>The name of the table to be updated. 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>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
12    /// <ul>
13    /// <li>
14    /// <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>
15    /// <li>
16    /// <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>
17    /// </ul>
18    pub billing_mode: ::std::option::Option<crate::types::BillingMode>,
19    /// <p>The new provisioned throughput settings for the specified table or index.</p>
20    pub provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
21    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
22    /// <ul>
23    /// <li>
24    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
25    /// <li>
26    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
27    /// <li>
28    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
29    /// </ul>
30    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
31    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
32    pub global_secondary_index_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>,
33    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
34    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
35    /// </note>
36    pub stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
37    /// <p>The new server-side encryption settings for the specified table.</p>
38    pub sse_specification: ::std::option::Option<crate::types::SseSpecification>,
39    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
40    pub replica_updates: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>,
41    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
42    pub table_class: ::std::option::Option<crate::types::TableClass>,
43    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
44    pub deletion_protection_enabled: ::std::option::Option<bool>,
45    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
46    /// <p>You can specify one of the following consistency modes:</p>
47    /// <ul>
48    /// <li>
49    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
50    /// <li>
51    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
52    /// </ul>
53    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
54    pub multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
55    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
56    /// <ul>
57    /// <li>
58    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
59    /// <li>
60    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
61    /// </ul>
62    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
63    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
64    pub global_table_witness_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>>,
65    /// <p>Updates 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>
66    pub on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
67    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
68    pub warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
69    /// <p>Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable operation only on a regional table with values:</p>
70    /// <ul>
71    /// <li>
72    /// <p><code>ENABLED</code>: Defines settings replication on a regional table to be used as a source table for creating Multi-Account Global Table.</p></li>
73    /// <li>
74    /// <p><code>DISABLED</code>: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED again in order to create a Multi-Account Global Table using this table.</p></li>
75    /// </ul>
76    pub global_table_settings_replication_mode: ::std::option::Option<crate::types::GlobalTableSettingsReplicationMode>,
77}
78impl  UpdateTableInput  {
79    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
80    ///
81    /// 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()`.
82    pub fn attribute_definitions(&self) -> &[crate::types::AttributeDefinition] {
83        self.attribute_definitions.as_deref()
84        .unwrap_or_default()
85    }
86    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
87    pub fn table_name(&self) -> ::std::option::Option<&str> {
88        self.table_name.as_deref()
89    }
90    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
91    /// <ul>
92    /// <li>
93    /// <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>
94    /// <li>
95    /// <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>
96    /// </ul>
97    pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
98        self.billing_mode.as_ref()
99    }
100    /// <p>The new provisioned throughput settings for the specified table or index.</p>
101    pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
102        self.provisioned_throughput.as_ref()
103    }
104    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
105    /// <ul>
106    /// <li>
107    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
108    /// <li>
109    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
110    /// <li>
111    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
112    /// </ul>
113    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
114    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
115    ///
116    /// 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_index_updates.is_none()`.
117    pub fn global_secondary_index_updates(&self) -> &[crate::types::GlobalSecondaryIndexUpdate] {
118        self.global_secondary_index_updates.as_deref()
119        .unwrap_or_default()
120    }
121    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
122    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
123    /// </note>
124    pub fn stream_specification(&self) -> ::std::option::Option<&crate::types::StreamSpecification> {
125        self.stream_specification.as_ref()
126    }
127    /// <p>The new server-side encryption settings for the specified table.</p>
128    pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
129        self.sse_specification.as_ref()
130    }
131    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
132    ///
133    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replica_updates.is_none()`.
134    pub fn replica_updates(&self) -> &[crate::types::ReplicationGroupUpdate] {
135        self.replica_updates.as_deref()
136        .unwrap_or_default()
137    }
138    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
139    pub fn table_class(&self) -> ::std::option::Option<&crate::types::TableClass> {
140        self.table_class.as_ref()
141    }
142    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
143    pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
144        self.deletion_protection_enabled
145    }
146    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
147    /// <p>You can specify one of the following consistency modes:</p>
148    /// <ul>
149    /// <li>
150    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
151    /// <li>
152    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
153    /// </ul>
154    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
155    pub fn multi_region_consistency(&self) -> ::std::option::Option<&crate::types::MultiRegionConsistency> {
156        self.multi_region_consistency.as_ref()
157    }
158    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
159    /// <ul>
160    /// <li>
161    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
162    /// <li>
163    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
164    /// </ul>
165    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
166    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
167    ///
168    /// 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_table_witness_updates.is_none()`.
169    pub fn global_table_witness_updates(&self) -> &[crate::types::GlobalTableWitnessGroupUpdate] {
170        self.global_table_witness_updates.as_deref()
171        .unwrap_or_default()
172    }
173    /// <p>Updates 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>
174    pub fn on_demand_throughput(&self) -> ::std::option::Option<&crate::types::OnDemandThroughput> {
175        self.on_demand_throughput.as_ref()
176    }
177    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
178    pub fn warm_throughput(&self) -> ::std::option::Option<&crate::types::WarmThroughput> {
179        self.warm_throughput.as_ref()
180    }
181    /// <p>Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable operation only on a regional table with values:</p>
182    /// <ul>
183    /// <li>
184    /// <p><code>ENABLED</code>: Defines settings replication on a regional table to be used as a source table for creating Multi-Account Global Table.</p></li>
185    /// <li>
186    /// <p><code>DISABLED</code>: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED again in order to create a Multi-Account Global Table using this table.</p></li>
187    /// </ul>
188    pub fn global_table_settings_replication_mode(&self) -> ::std::option::Option<&crate::types::GlobalTableSettingsReplicationMode> {
189        self.global_table_settings_replication_mode.as_ref()
190    }
191}
192impl UpdateTableInput {
193    /// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
194    pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
195        crate::operation::update_table::builders::UpdateTableInputBuilder::default()
196    }
197}
198
199/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
200#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
201#[non_exhaustive]
202pub struct UpdateTableInputBuilder {
203    pub(crate) attribute_definitions: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>,
204    pub(crate) table_name: ::std::option::Option<::std::string::String>,
205    pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
206    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
207    pub(crate) global_secondary_index_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>,
208    pub(crate) stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
209    pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
210    pub(crate) replica_updates: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>,
211    pub(crate) table_class: ::std::option::Option<crate::types::TableClass>,
212    pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
213    pub(crate) multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
214    pub(crate) global_table_witness_updates: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>>,
215    pub(crate) on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
216    pub(crate) warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
217    pub(crate) global_table_settings_replication_mode: ::std::option::Option<crate::types::GlobalTableSettingsReplicationMode>,
218}
219impl UpdateTableInputBuilder {
220    /// Appends an item to `attribute_definitions`.
221    ///
222    /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
223    ///
224    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
225    pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
226        let mut v = self.attribute_definitions.unwrap_or_default();
227                        v.push(input);
228                        self.attribute_definitions = ::std::option::Option::Some(v);
229                        self
230    }
231    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
232    pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>>) -> Self {
233        self.attribute_definitions = input; self
234    }
235    /// <p>An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, <code>AttributeDefinitions</code> must include the key element(s) of the new index.</p>
236    pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::AttributeDefinition>> {
237        &self.attribute_definitions
238    }
239    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
240    /// This field is required.
241    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.table_name = ::std::option::Option::Some(input.into());
243        self
244    }
245    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
246    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247        self.table_name = input; self
248    }
249    /// <p>The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
250    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
251        &self.table_name
252    }
253    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
254    /// <ul>
255    /// <li>
256    /// <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>
257    /// <li>
258    /// <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>
259    /// </ul>
260    pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
261        self.billing_mode = ::std::option::Option::Some(input);
262        self
263    }
264    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
265    /// <ul>
266    /// <li>
267    /// <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>
268    /// <li>
269    /// <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>
270    /// </ul>
271    pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
272        self.billing_mode = input; self
273    }
274    /// <p>Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.</p>
275    /// <ul>
276    /// <li>
277    /// <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>
278    /// <li>
279    /// <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>
280    /// </ul>
281    pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
282        &self.billing_mode
283    }
284    /// <p>The new provisioned throughput settings for the specified table or index.</p>
285    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
286        self.provisioned_throughput = ::std::option::Option::Some(input);
287        self
288    }
289    /// <p>The new provisioned throughput settings for the specified table or index.</p>
290    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
291        self.provisioned_throughput = input; self
292    }
293    /// <p>The new provisioned throughput settings for the specified table or index.</p>
294    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
295        &self.provisioned_throughput
296    }
297    /// Appends an item to `global_secondary_index_updates`.
298    ///
299    /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
300    ///
301    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
302    /// <ul>
303    /// <li>
304    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
305    /// <li>
306    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
307    /// <li>
308    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
309    /// </ul>
310    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
311    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
312    pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexUpdate) -> Self {
313        let mut v = self.global_secondary_index_updates.unwrap_or_default();
314                        v.push(input);
315                        self.global_secondary_index_updates = ::std::option::Option::Some(v);
316                        self
317    }
318    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
319    /// <ul>
320    /// <li>
321    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
322    /// <li>
323    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
324    /// <li>
325    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
326    /// </ul>
327    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
328    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
329    pub fn set_global_secondary_index_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>>) -> Self {
330        self.global_secondary_index_updates = input; self
331    }
332    /// <p>An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:</p>
333    /// <ul>
334    /// <li>
335    /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
336    /// <li>
337    /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
338    /// <li>
339    /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
340    /// </ul>
341    /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
342    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.OnlineOps.html">Managing Global Secondary Indexes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
343    pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalSecondaryIndexUpdate>> {
344        &self.global_secondary_index_updates
345    }
346    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
347    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
348    /// </note>
349    pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
350        self.stream_specification = ::std::option::Option::Some(input);
351        self
352    }
353    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
354    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
355    /// </note>
356    pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
357        self.stream_specification = input; self
358    }
359    /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
360    /// <p>You receive a <code>ValidationException</code> if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.</p>
361    /// </note>
362    pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
363        &self.stream_specification
364    }
365    /// <p>The new server-side encryption settings for the specified table.</p>
366    pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
367        self.sse_specification = ::std::option::Option::Some(input);
368        self
369    }
370    /// <p>The new server-side encryption settings for the specified table.</p>
371    pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
372        self.sse_specification = input; self
373    }
374    /// <p>The new server-side encryption settings for the specified table.</p>
375    pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
376        &self.sse_specification
377    }
378    /// Appends an item to `replica_updates`.
379    ///
380    /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
381    ///
382    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
383    pub fn replica_updates(mut self, input: crate::types::ReplicationGroupUpdate) -> Self {
384        let mut v = self.replica_updates.unwrap_or_default();
385                        v.push(input);
386                        self.replica_updates = ::std::option::Option::Some(v);
387                        self
388    }
389    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
390    pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>>) -> Self {
391        self.replica_updates = input; self
392    }
393    /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
394    pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::ReplicationGroupUpdate>> {
395        &self.replica_updates
396    }
397    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
398    pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
399        self.table_class = ::std::option::Option::Some(input);
400        self
401    }
402    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
403    pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
404        self.table_class = input; self
405    }
406    /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
407    pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
408        &self.table_class
409    }
410    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
411    pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
412        self.deletion_protection_enabled = ::std::option::Option::Some(input);
413        self
414    }
415    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
416    pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
417        self.deletion_protection_enabled = input; self
418    }
419    /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
420    pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
421        &self.deletion_protection_enabled
422    }
423    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
424    /// <p>You can specify one of the following consistency modes:</p>
425    /// <ul>
426    /// <li>
427    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
428    /// <li>
429    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
430    /// </ul>
431    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
432    pub fn multi_region_consistency(mut self, input: crate::types::MultiRegionConsistency) -> Self {
433        self.multi_region_consistency = ::std::option::Option::Some(input);
434        self
435    }
436    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
437    /// <p>You can specify one of the following consistency modes:</p>
438    /// <ul>
439    /// <li>
440    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
441    /// <li>
442    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
443    /// </ul>
444    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
445    pub fn set_multi_region_consistency(mut self, input: ::std::option::Option<crate::types::MultiRegionConsistency>) -> Self {
446        self.multi_region_consistency = input; self
447    }
448    /// <p>Specifies the consistency mode for a new global table. This parameter is only valid when you create a global table by specifying one or more <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create">Create</a> actions in the <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates">ReplicaUpdates</a> action list.</p>
449    /// <p>You can specify one of the following consistency modes:</p>
450    /// <ul>
451    /// <li>
452    /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables.</p></li>
453    /// <li>
454    /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
455    /// </ul>
456    /// <p>If you don't specify this field, the global table consistency mode defaults to <code>EVENTUAL</code>. For more information about global tables consistency modes, see <a href="https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes"> Consistency modes</a> in DynamoDB developer guide.</p>
457    pub fn get_multi_region_consistency(&self) -> &::std::option::Option<crate::types::MultiRegionConsistency> {
458        &self.multi_region_consistency
459    }
460    /// Appends an item to `global_table_witness_updates`.
461    ///
462    /// To override the contents of this collection use [`set_global_table_witness_updates`](Self::set_global_table_witness_updates).
463    ///
464    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
465    /// <ul>
466    /// <li>
467    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
468    /// <li>
469    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
470    /// </ul>
471    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
472    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
473    pub fn global_table_witness_updates(mut self, input: crate::types::GlobalTableWitnessGroupUpdate) -> Self {
474        let mut v = self.global_table_witness_updates.unwrap_or_default();
475                        v.push(input);
476                        self.global_table_witness_updates = ::std::option::Option::Some(v);
477                        self
478    }
479    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
480    /// <ul>
481    /// <li>
482    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
483    /// <li>
484    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
485    /// </ul>
486    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
487    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
488    pub fn set_global_table_witness_updates(mut self, input: ::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>>) -> Self {
489        self.global_table_witness_updates = input; self
490    }
491    /// <p>A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform read or write operations on a witness. For each witness, you can request one action:</p>
492    /// <ul>
493    /// <li>
494    /// <p><code>Create</code> - add a new witness to the global table.</p></li>
495    /// <li>
496    /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
497    /// </ul>
498    /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
499    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes">Multi-Region strong consistency (MRSC)</a> in the Amazon DynamoDB Developer Guide</p>
500    pub fn get_global_table_witness_updates(&self) -> &::std::option::Option<::std::vec::Vec::<crate::types::GlobalTableWitnessGroupUpdate>> {
501        &self.global_table_witness_updates
502    }
503    /// <p>Updates 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>
504    pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
505        self.on_demand_throughput = ::std::option::Option::Some(input);
506        self
507    }
508    /// <p>Updates 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>
509    pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
510        self.on_demand_throughput = input; self
511    }
512    /// <p>Updates 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>
513    pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
514        &self.on_demand_throughput
515    }
516    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
517    pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
518        self.warm_throughput = ::std::option::Option::Some(input);
519        self
520    }
521    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
522    pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
523        self.warm_throughput = input; self
524    }
525    /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
526    pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
527        &self.warm_throughput
528    }
529    /// <p>Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable operation only on a regional table with values:</p>
530    /// <ul>
531    /// <li>
532    /// <p><code>ENABLED</code>: Defines settings replication on a regional table to be used as a source table for creating Multi-Account Global Table.</p></li>
533    /// <li>
534    /// <p><code>DISABLED</code>: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED again in order to create a Multi-Account Global Table using this table.</p></li>
535    /// </ul>
536    pub fn global_table_settings_replication_mode(mut self, input: crate::types::GlobalTableSettingsReplicationMode) -> Self {
537        self.global_table_settings_replication_mode = ::std::option::Option::Some(input);
538        self
539    }
540    /// <p>Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable operation only on a regional table with values:</p>
541    /// <ul>
542    /// <li>
543    /// <p><code>ENABLED</code>: Defines settings replication on a regional table to be used as a source table for creating Multi-Account Global Table.</p></li>
544    /// <li>
545    /// <p><code>DISABLED</code>: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED again in order to create a Multi-Account Global Table using this table.</p></li>
546    /// </ul>
547    pub fn set_global_table_settings_replication_mode(mut self, input: ::std::option::Option<crate::types::GlobalTableSettingsReplicationMode>) -> Self {
548        self.global_table_settings_replication_mode = input; self
549    }
550    /// <p>Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable operation only on a regional table with values:</p>
551    /// <ul>
552    /// <li>
553    /// <p><code>ENABLED</code>: Defines settings replication on a regional table to be used as a source table for creating Multi-Account Global Table.</p></li>
554    /// <li>
555    /// <p><code>DISABLED</code>: Remove settings replication on a regional table. Settings replication needs to be defined to ENABLED again in order to create a Multi-Account Global Table using this table.</p></li>
556    /// </ul>
557    pub fn get_global_table_settings_replication_mode(&self) -> &::std::option::Option<crate::types::GlobalTableSettingsReplicationMode> {
558        &self.global_table_settings_replication_mode
559    }
560    /// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
561    pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
562        ::std::result::Result::Ok(
563            crate::operation::update_table::UpdateTableInput {
564                attribute_definitions: self.attribute_definitions
565                ,
566                table_name: self.table_name
567                ,
568                billing_mode: self.billing_mode
569                ,
570                provisioned_throughput: self.provisioned_throughput
571                ,
572                global_secondary_index_updates: self.global_secondary_index_updates
573                ,
574                stream_specification: self.stream_specification
575                ,
576                sse_specification: self.sse_specification
577                ,
578                replica_updates: self.replica_updates
579                ,
580                table_class: self.table_class
581                ,
582                deletion_protection_enabled: self.deletion_protection_enabled
583                ,
584                multi_region_consistency: self.multi_region_consistency
585                ,
586                global_table_witness_updates: self.global_table_witness_updates
587                ,
588                on_demand_throughput: self.on_demand_throughput
589                ,
590                warm_throughput: self.warm_throughput
591                ,
592                global_table_settings_replication_mode: self.global_table_settings_replication_mode
593                ,
594            }
595        )
596    }
597}
598