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><note>
40 /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
41 /// </note>
42 pub replica_updates: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationGroupUpdate>>,
43 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
44 pub table_class: ::std::option::Option<crate::types::TableClass>,
45 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
46 pub deletion_protection_enabled: ::std::option::Option<bool>,
47 /// <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>
48 /// <p>You can specify one of the following consistency modes:</p>
49 /// <ul>
50 /// <li>
51 /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
52 /// <li>
53 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
54 /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
55 /// </note></li>
56 /// </ul>
57 /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
58 pub multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
59 /// <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>
60 pub on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
61 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
62 pub warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
63}
64impl UpdateTableInput {
65 /// <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>
66 ///
67 /// 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()`.
68 pub fn attribute_definitions(&self) -> &[crate::types::AttributeDefinition] {
69 self.attribute_definitions.as_deref().unwrap_or_default()
70 }
71 /// <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>
72 pub fn table_name(&self) -> ::std::option::Option<&str> {
73 self.table_name.as_deref()
74 }
75 /// <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>
76 /// <ul>
77 /// <li>
78 /// <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>
79 /// <li>
80 /// <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>
81 /// </ul>
82 pub fn billing_mode(&self) -> ::std::option::Option<&crate::types::BillingMode> {
83 self.billing_mode.as_ref()
84 }
85 /// <p>The new provisioned throughput settings for the specified table or index.</p>
86 pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
87 self.provisioned_throughput.as_ref()
88 }
89 /// <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>
90 /// <ul>
91 /// <li>
92 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
93 /// <li>
94 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
95 /// <li>
96 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
97 /// </ul>
98 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
99 /// <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>
100 ///
101 /// 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()`.
102 pub fn global_secondary_index_updates(&self) -> &[crate::types::GlobalSecondaryIndexUpdate] {
103 self.global_secondary_index_updates.as_deref().unwrap_or_default()
104 }
105 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
106 /// <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>
107 /// </note>
108 pub fn stream_specification(&self) -> ::std::option::Option<&crate::types::StreamSpecification> {
109 self.stream_specification.as_ref()
110 }
111 /// <p>The new server-side encryption settings for the specified table.</p>
112 pub fn sse_specification(&self) -> ::std::option::Option<&crate::types::SseSpecification> {
113 self.sse_specification.as_ref()
114 }
115 /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
116 /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
117 /// </note>
118 ///
119 /// 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()`.
120 pub fn replica_updates(&self) -> &[crate::types::ReplicationGroupUpdate] {
121 self.replica_updates.as_deref().unwrap_or_default()
122 }
123 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
124 pub fn table_class(&self) -> ::std::option::Option<&crate::types::TableClass> {
125 self.table_class.as_ref()
126 }
127 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
128 pub fn deletion_protection_enabled(&self) -> ::std::option::Option<bool> {
129 self.deletion_protection_enabled
130 }
131 /// <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>
132 /// <p>You can specify one of the following consistency modes:</p>
133 /// <ul>
134 /// <li>
135 /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
136 /// <li>
137 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
138 /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
139 /// </note></li>
140 /// </ul>
141 /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
142 pub fn multi_region_consistency(&self) -> ::std::option::Option<&crate::types::MultiRegionConsistency> {
143 self.multi_region_consistency.as_ref()
144 }
145 /// <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>
146 pub fn on_demand_throughput(&self) -> ::std::option::Option<&crate::types::OnDemandThroughput> {
147 self.on_demand_throughput.as_ref()
148 }
149 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
150 pub fn warm_throughput(&self) -> ::std::option::Option<&crate::types::WarmThroughput> {
151 self.warm_throughput.as_ref()
152 }
153}
154impl UpdateTableInput {
155 /// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
156 pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
157 crate::operation::update_table::builders::UpdateTableInputBuilder::default()
158 }
159}
160
161/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
162#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
163#[non_exhaustive]
164pub struct UpdateTableInputBuilder {
165 pub(crate) attribute_definitions: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>>,
166 pub(crate) table_name: ::std::option::Option<::std::string::String>,
167 pub(crate) billing_mode: ::std::option::Option<crate::types::BillingMode>,
168 pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
169 pub(crate) global_secondary_index_updates: ::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndexUpdate>>,
170 pub(crate) stream_specification: ::std::option::Option<crate::types::StreamSpecification>,
171 pub(crate) sse_specification: ::std::option::Option<crate::types::SseSpecification>,
172 pub(crate) replica_updates: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationGroupUpdate>>,
173 pub(crate) table_class: ::std::option::Option<crate::types::TableClass>,
174 pub(crate) deletion_protection_enabled: ::std::option::Option<bool>,
175 pub(crate) multi_region_consistency: ::std::option::Option<crate::types::MultiRegionConsistency>,
176 pub(crate) on_demand_throughput: ::std::option::Option<crate::types::OnDemandThroughput>,
177 pub(crate) warm_throughput: ::std::option::Option<crate::types::WarmThroughput>,
178}
179impl UpdateTableInputBuilder {
180 /// Appends an item to `attribute_definitions`.
181 ///
182 /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
183 ///
184 /// <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>
185 pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
186 let mut v = self.attribute_definitions.unwrap_or_default();
187 v.push(input);
188 self.attribute_definitions = ::std::option::Option::Some(v);
189 self
190 }
191 /// <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>
192 pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>>) -> Self {
193 self.attribute_definitions = input;
194 self
195 }
196 /// <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>
197 pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>> {
198 &self.attribute_definitions
199 }
200 /// <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>
201 /// This field is required.
202 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203 self.table_name = ::std::option::Option::Some(input.into());
204 self
205 }
206 /// <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>
207 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208 self.table_name = input;
209 self
210 }
211 /// <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>
212 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
213 &self.table_name
214 }
215 /// <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>
216 /// <ul>
217 /// <li>
218 /// <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>
219 /// <li>
220 /// <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>
221 /// </ul>
222 pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
223 self.billing_mode = ::std::option::Option::Some(input);
224 self
225 }
226 /// <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>
227 /// <ul>
228 /// <li>
229 /// <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>
230 /// <li>
231 /// <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>
232 /// </ul>
233 pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
234 self.billing_mode = input;
235 self
236 }
237 /// <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>
238 /// <ul>
239 /// <li>
240 /// <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>
241 /// <li>
242 /// <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>
243 /// </ul>
244 pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
245 &self.billing_mode
246 }
247 /// <p>The new provisioned throughput settings for the specified table or index.</p>
248 pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
249 self.provisioned_throughput = ::std::option::Option::Some(input);
250 self
251 }
252 /// <p>The new provisioned throughput settings for the specified table or index.</p>
253 pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
254 self.provisioned_throughput = input;
255 self
256 }
257 /// <p>The new provisioned throughput settings for the specified table or index.</p>
258 pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
259 &self.provisioned_throughput
260 }
261 /// Appends an item to `global_secondary_index_updates`.
262 ///
263 /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
264 ///
265 /// <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>
266 /// <ul>
267 /// <li>
268 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
269 /// <li>
270 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
271 /// <li>
272 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
273 /// </ul>
274 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
275 /// <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>
276 pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexUpdate) -> Self {
277 let mut v = self.global_secondary_index_updates.unwrap_or_default();
278 v.push(input);
279 self.global_secondary_index_updates = ::std::option::Option::Some(v);
280 self
281 }
282 /// <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>
283 /// <ul>
284 /// <li>
285 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
286 /// <li>
287 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
288 /// <li>
289 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
290 /// </ul>
291 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
292 /// <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>
293 pub fn set_global_secondary_index_updates(
294 mut self,
295 input: ::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndexUpdate>>,
296 ) -> Self {
297 self.global_secondary_index_updates = input;
298 self
299 }
300 /// <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>
301 /// <ul>
302 /// <li>
303 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
304 /// <li>
305 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
306 /// <li>
307 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
308 /// </ul>
309 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
310 /// <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>
311 pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndexUpdate>> {
312 &self.global_secondary_index_updates
313 }
314 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
315 /// <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>
316 /// </note>
317 pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
318 self.stream_specification = ::std::option::Option::Some(input);
319 self
320 }
321 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
322 /// <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>
323 /// </note>
324 pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
325 self.stream_specification = input;
326 self
327 }
328 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
329 /// <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>
330 /// </note>
331 pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
332 &self.stream_specification
333 }
334 /// <p>The new server-side encryption settings for the specified table.</p>
335 pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
336 self.sse_specification = ::std::option::Option::Some(input);
337 self
338 }
339 /// <p>The new server-side encryption settings for the specified table.</p>
340 pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
341 self.sse_specification = input;
342 self
343 }
344 /// <p>The new server-side encryption settings for the specified table.</p>
345 pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
346 &self.sse_specification
347 }
348 /// Appends an item to `replica_updates`.
349 ///
350 /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
351 ///
352 /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
353 /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
354 /// </note>
355 pub fn replica_updates(mut self, input: crate::types::ReplicationGroupUpdate) -> Self {
356 let mut v = self.replica_updates.unwrap_or_default();
357 v.push(input);
358 self.replica_updates = ::std::option::Option::Some(v);
359 self
360 }
361 /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
362 /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
363 /// </note>
364 pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationGroupUpdate>>) -> Self {
365 self.replica_updates = input;
366 self
367 }
368 /// <p>A list of replica update actions (create, delete, or update) for the table.</p><note>
369 /// <p>For global tables, this property only applies to global tables using Version 2019.11.21 (Current version).</p>
370 /// </note>
371 pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicationGroupUpdate>> {
372 &self.replica_updates
373 }
374 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
375 pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
376 self.table_class = ::std::option::Option::Some(input);
377 self
378 }
379 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
380 pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
381 self.table_class = input;
382 self
383 }
384 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
385 pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
386 &self.table_class
387 }
388 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
389 pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
390 self.deletion_protection_enabled = ::std::option::Option::Some(input);
391 self
392 }
393 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
394 pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
395 self.deletion_protection_enabled = input;
396 self
397 }
398 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
399 pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
400 &self.deletion_protection_enabled
401 }
402 /// <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>
403 /// <p>You can specify one of the following consistency modes:</p>
404 /// <ul>
405 /// <li>
406 /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
407 /// <li>
408 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
409 /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
410 /// </note></li>
411 /// </ul>
412 /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
413 pub fn multi_region_consistency(mut self, input: crate::types::MultiRegionConsistency) -> Self {
414 self.multi_region_consistency = ::std::option::Option::Some(input);
415 self
416 }
417 /// <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>
418 /// <p>You can specify one of the following consistency modes:</p>
419 /// <ul>
420 /// <li>
421 /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
422 /// <li>
423 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
424 /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
425 /// </note></li>
426 /// </ul>
427 /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
428 pub fn set_multi_region_consistency(mut self, input: ::std::option::Option<crate::types::MultiRegionConsistency>) -> Self {
429 self.multi_region_consistency = input;
430 self
431 }
432 /// <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>
433 /// <p>You can specify one of the following consistency modes:</p>
434 /// <ul>
435 /// <li>
436 /// <p><code>EVENTUAL</code>: Configures a new global table for multi-Region eventual consistency. This is the default consistency mode for global tables.</p></li>
437 /// <li>
438 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (preview).</p><note>
439 /// <p>Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt">Global tables multi-Region strong consistency</a>.</p>
440 /// </note></li>
441 /// </ul>
442 /// <p>If you don't specify this parameter, the global table consistency mode defaults to <code>EVENTUAL</code>.</p>
443 pub fn get_multi_region_consistency(&self) -> &::std::option::Option<crate::types::MultiRegionConsistency> {
444 &self.multi_region_consistency
445 }
446 /// <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>
447 pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
448 self.on_demand_throughput = ::std::option::Option::Some(input);
449 self
450 }
451 /// <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>
452 pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
453 self.on_demand_throughput = input;
454 self
455 }
456 /// <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>
457 pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
458 &self.on_demand_throughput
459 }
460 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
461 pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
462 self.warm_throughput = ::std::option::Option::Some(input);
463 self
464 }
465 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
466 pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
467 self.warm_throughput = input;
468 self
469 }
470 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
471 pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
472 &self.warm_throughput
473 }
474 /// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
475 pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
476 ::std::result::Result::Ok(crate::operation::update_table::UpdateTableInput {
477 attribute_definitions: self.attribute_definitions,
478 table_name: self.table_name,
479 billing_mode: self.billing_mode,
480 provisioned_throughput: self.provisioned_throughput,
481 global_secondary_index_updates: self.global_secondary_index_updates,
482 stream_specification: self.stream_specification,
483 sse_specification: self.sse_specification,
484 replica_updates: self.replica_updates,
485 table_class: self.table_class,
486 deletion_protection_enabled: self.deletion_protection_enabled,
487 multi_region_consistency: self.multi_region_consistency,
488 on_demand_throughput: self.on_demand_throughput,
489 warm_throughput: self.warm_throughput,
490 })
491 }
492}