aws_sdk_dynamodb/operation/update_table/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_table::_update_table_output::UpdateTableOutputBuilder;
3
4pub use crate::operation::update_table::_update_table_input::UpdateTableInputBuilder;
5
6impl crate::operation::update_table::builders::UpdateTableInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_table::UpdateTableOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_table::UpdateTableError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_table();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateTable`.
24///
25/// <p>Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.</p>
26/// <p>You can only perform one of the following operations at once:</p>
27/// <ul>
28/// <li>
29/// <p>Modify the provisioned throughput settings of the table.</p></li>
30/// <li>
31/// <p>Remove a global secondary index from the table.</p></li>
32/// <li>
33/// <p>Create a new global secondary index on the table. After the index begins backfilling, you can use <code>UpdateTable</code> to perform other operations.</p></li>
34/// </ul>
35/// <p><code>UpdateTable</code> is an asynchronous operation; while it's executing, the table status changes from <code>ACTIVE</code> to <code>UPDATING</code>. While it's <code>UPDATING</code>, you can't issue another <code>UpdateTable</code> request. When the table returns to the <code>ACTIVE</code> state, the <code>UpdateTable</code> operation is complete.</p>
36#[derive(::std::clone::Clone, ::std::fmt::Debug)]
37pub struct UpdateTableFluentBuilder {
38 handle: ::std::sync::Arc<crate::client::Handle>,
39 inner: crate::operation::update_table::builders::UpdateTableInputBuilder,
40 config_override: ::std::option::Option<crate::config::Builder>,
41}
42impl
43 crate::client::customize::internal::CustomizableSend<
44 crate::operation::update_table::UpdateTableOutput,
45 crate::operation::update_table::UpdateTableError,
46 > for UpdateTableFluentBuilder
47{
48 fn send(
49 self,
50 config_override: crate::config::Builder,
51 ) -> crate::client::customize::internal::BoxFuture<
52 crate::client::customize::internal::SendResult<
53 crate::operation::update_table::UpdateTableOutput,
54 crate::operation::update_table::UpdateTableError,
55 >,
56 > {
57 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
58 }
59}
60impl UpdateTableFluentBuilder {
61 /// Creates a new `UpdateTableFluentBuilder`.
62 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
63 Self {
64 handle,
65 inner: ::std::default::Default::default(),
66 config_override: ::std::option::Option::None,
67 }
68 }
69 /// Access the UpdateTable as a reference.
70 pub fn as_input(&self) -> &crate::operation::update_table::builders::UpdateTableInputBuilder {
71 &self.inner
72 }
73 /// Sends the request and returns the response.
74 ///
75 /// If an error occurs, an `SdkError` will be returned with additional details that
76 /// can be matched against.
77 ///
78 /// By default, any retryable failures will be retried twice. Retry behavior
79 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
80 /// set when configuring the client.
81 pub async fn send(
82 self,
83 ) -> ::std::result::Result<
84 crate::operation::update_table::UpdateTableOutput,
85 ::aws_smithy_runtime_api::client::result::SdkError<
86 crate::operation::update_table::UpdateTableError,
87 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
88 >,
89 > {
90 let input = self
91 .inner
92 .build()
93 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
94 let runtime_plugins = crate::operation::update_table::UpdateTable::operation_runtime_plugins(
95 self.handle.runtime_plugins.clone(),
96 &self.handle.conf,
97 self.config_override,
98 );
99 crate::operation::update_table::UpdateTable::orchestrate(&runtime_plugins, input).await
100 }
101
102 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
103 pub fn customize(
104 self,
105 ) -> crate::client::customize::CustomizableOperation<
106 crate::operation::update_table::UpdateTableOutput,
107 crate::operation::update_table::UpdateTableError,
108 Self,
109 > {
110 crate::client::customize::CustomizableOperation::new(self)
111 }
112 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
113 self.set_config_override(::std::option::Option::Some(config_override.into()));
114 self
115 }
116
117 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
118 self.config_override = config_override;
119 self
120 }
121 ///
122 /// Appends an item to `AttributeDefinitions`.
123 ///
124 /// To override the contents of this collection use [`set_attribute_definitions`](Self::set_attribute_definitions).
125 ///
126 /// <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>
127 pub fn attribute_definitions(mut self, input: crate::types::AttributeDefinition) -> Self {
128 self.inner = self.inner.attribute_definitions(input);
129 self
130 }
131 /// <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>
132 pub fn set_attribute_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>>) -> Self {
133 self.inner = self.inner.set_attribute_definitions(input);
134 self
135 }
136 /// <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>
137 pub fn get_attribute_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeDefinition>> {
138 self.inner.get_attribute_definitions()
139 }
140 /// <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>
141 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.inner = self.inner.table_name(input.into());
143 self
144 }
145 /// <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>
146 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.inner = self.inner.set_table_name(input);
148 self
149 }
150 /// <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>
151 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
152 self.inner.get_table_name()
153 }
154 /// <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>
155 /// <ul>
156 /// <li>
157 /// <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>
158 /// <li>
159 /// <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>
160 /// </ul>
161 pub fn billing_mode(mut self, input: crate::types::BillingMode) -> Self {
162 self.inner = self.inner.billing_mode(input);
163 self
164 }
165 /// <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>
166 /// <ul>
167 /// <li>
168 /// <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>
169 /// <li>
170 /// <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>
171 /// </ul>
172 pub fn set_billing_mode(mut self, input: ::std::option::Option<crate::types::BillingMode>) -> Self {
173 self.inner = self.inner.set_billing_mode(input);
174 self
175 }
176 /// <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>
177 /// <ul>
178 /// <li>
179 /// <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>
180 /// <li>
181 /// <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>
182 /// </ul>
183 pub fn get_billing_mode(&self) -> &::std::option::Option<crate::types::BillingMode> {
184 self.inner.get_billing_mode()
185 }
186 /// <p>The new provisioned throughput settings for the specified table or index.</p>
187 pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
188 self.inner = self.inner.provisioned_throughput(input);
189 self
190 }
191 /// <p>The new provisioned throughput settings for the specified table or index.</p>
192 pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
193 self.inner = self.inner.set_provisioned_throughput(input);
194 self
195 }
196 /// <p>The new provisioned throughput settings for the specified table or index.</p>
197 pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
198 self.inner.get_provisioned_throughput()
199 }
200 ///
201 /// Appends an item to `GlobalSecondaryIndexUpdates`.
202 ///
203 /// To override the contents of this collection use [`set_global_secondary_index_updates`](Self::set_global_secondary_index_updates).
204 ///
205 /// <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>
206 /// <ul>
207 /// <li>
208 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
209 /// <li>
210 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
211 /// <li>
212 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
213 /// </ul>
214 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
215 /// <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>
216 pub fn global_secondary_index_updates(mut self, input: crate::types::GlobalSecondaryIndexUpdate) -> Self {
217 self.inner = self.inner.global_secondary_index_updates(input);
218 self
219 }
220 /// <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>
221 /// <ul>
222 /// <li>
223 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
224 /// <li>
225 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
226 /// <li>
227 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
228 /// </ul>
229 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
230 /// <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>
231 pub fn set_global_secondary_index_updates(
232 mut self,
233 input: ::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndexUpdate>>,
234 ) -> Self {
235 self.inner = self.inner.set_global_secondary_index_updates(input);
236 self
237 }
238 /// <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>
239 /// <ul>
240 /// <li>
241 /// <p><code>Create</code> - add a new global secondary index to the table.</p></li>
242 /// <li>
243 /// <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li>
244 /// <li>
245 /// <p><code>Delete</code> - remove a global secondary index from the table.</p></li>
246 /// </ul>
247 /// <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p>
248 /// <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>
249 pub fn get_global_secondary_index_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GlobalSecondaryIndexUpdate>> {
250 self.inner.get_global_secondary_index_updates()
251 }
252 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
253 /// <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>
254 /// </note>
255 pub fn stream_specification(mut self, input: crate::types::StreamSpecification) -> Self {
256 self.inner = self.inner.stream_specification(input);
257 self
258 }
259 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
260 /// <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>
261 /// </note>
262 pub fn set_stream_specification(mut self, input: ::std::option::Option<crate::types::StreamSpecification>) -> Self {
263 self.inner = self.inner.set_stream_specification(input);
264 self
265 }
266 /// <p>Represents the DynamoDB Streams configuration for the table.</p><note>
267 /// <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>
268 /// </note>
269 pub fn get_stream_specification(&self) -> &::std::option::Option<crate::types::StreamSpecification> {
270 self.inner.get_stream_specification()
271 }
272 /// <p>The new server-side encryption settings for the specified table.</p>
273 pub fn sse_specification(mut self, input: crate::types::SseSpecification) -> Self {
274 self.inner = self.inner.sse_specification(input);
275 self
276 }
277 /// <p>The new server-side encryption settings for the specified table.</p>
278 pub fn set_sse_specification(mut self, input: ::std::option::Option<crate::types::SseSpecification>) -> Self {
279 self.inner = self.inner.set_sse_specification(input);
280 self
281 }
282 /// <p>The new server-side encryption settings for the specified table.</p>
283 pub fn get_sse_specification(&self) -> &::std::option::Option<crate::types::SseSpecification> {
284 self.inner.get_sse_specification()
285 }
286 ///
287 /// Appends an item to `ReplicaUpdates`.
288 ///
289 /// To override the contents of this collection use [`set_replica_updates`](Self::set_replica_updates).
290 ///
291 /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
292 pub fn replica_updates(mut self, input: crate::types::ReplicationGroupUpdate) -> Self {
293 self.inner = self.inner.replica_updates(input);
294 self
295 }
296 /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
297 pub fn set_replica_updates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicationGroupUpdate>>) -> Self {
298 self.inner = self.inner.set_replica_updates(input);
299 self
300 }
301 /// <p>A list of replica update actions (create, delete, or update) for the table.</p>
302 pub fn get_replica_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicationGroupUpdate>> {
303 self.inner.get_replica_updates()
304 }
305 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
306 pub fn table_class(mut self, input: crate::types::TableClass) -> Self {
307 self.inner = self.inner.table_class(input);
308 self
309 }
310 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
311 pub fn set_table_class(mut self, input: ::std::option::Option<crate::types::TableClass>) -> Self {
312 self.inner = self.inner.set_table_class(input);
313 self
314 }
315 /// <p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p>
316 pub fn get_table_class(&self) -> &::std::option::Option<crate::types::TableClass> {
317 self.inner.get_table_class()
318 }
319 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
320 pub fn deletion_protection_enabled(mut self, input: bool) -> Self {
321 self.inner = self.inner.deletion_protection_enabled(input);
322 self
323 }
324 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
325 pub fn set_deletion_protection_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
326 self.inner = self.inner.set_deletion_protection_enabled(input);
327 self
328 }
329 /// <p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p>
330 pub fn get_deletion_protection_enabled(&self) -> &::std::option::Option<bool> {
331 self.inner.get_deletion_protection_enabled()
332 }
333 /// <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>
334 /// <p>You can specify one of the following consistency modes:</p>
335 /// <ul>
336 /// <li>
337 /// <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>
338 /// <li>
339 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
340 /// </ul>
341 /// <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>
342 pub fn multi_region_consistency(mut self, input: crate::types::MultiRegionConsistency) -> Self {
343 self.inner = self.inner.multi_region_consistency(input);
344 self
345 }
346 /// <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>
347 /// <p>You can specify one of the following consistency modes:</p>
348 /// <ul>
349 /// <li>
350 /// <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>
351 /// <li>
352 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
353 /// </ul>
354 /// <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>
355 pub fn set_multi_region_consistency(mut self, input: ::std::option::Option<crate::types::MultiRegionConsistency>) -> Self {
356 self.inner = self.inner.set_multi_region_consistency(input);
357 self
358 }
359 /// <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>
360 /// <p>You can specify one of the following consistency modes:</p>
361 /// <ul>
362 /// <li>
363 /// <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>
364 /// <li>
365 /// <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li>
366 /// </ul>
367 /// <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>
368 pub fn get_multi_region_consistency(&self) -> &::std::option::Option<crate::types::MultiRegionConsistency> {
369 self.inner.get_multi_region_consistency()
370 }
371 ///
372 /// Appends an item to `GlobalTableWitnessUpdates`.
373 ///
374 /// To override the contents of this collection use [`set_global_table_witness_updates`](Self::set_global_table_witness_updates).
375 ///
376 /// <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>
377 /// <ul>
378 /// <li>
379 /// <p><code>Create</code> - add a new witness to the global table.</p></li>
380 /// <li>
381 /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
382 /// </ul>
383 /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
384 /// <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>
385 pub fn global_table_witness_updates(mut self, input: crate::types::GlobalTableWitnessGroupUpdate) -> Self {
386 self.inner = self.inner.global_table_witness_updates(input);
387 self
388 }
389 /// <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>
390 /// <ul>
391 /// <li>
392 /// <p><code>Create</code> - add a new witness to the global table.</p></li>
393 /// <li>
394 /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
395 /// </ul>
396 /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
397 /// <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>
398 pub fn set_global_table_witness_updates(
399 mut self,
400 input: ::std::option::Option<::std::vec::Vec<crate::types::GlobalTableWitnessGroupUpdate>>,
401 ) -> Self {
402 self.inner = self.inner.set_global_table_witness_updates(input);
403 self
404 }
405 /// <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>
406 /// <ul>
407 /// <li>
408 /// <p><code>Create</code> - add a new witness to the global table.</p></li>
409 /// <li>
410 /// <p><code>Delete</code> - remove a witness from the global table.</p></li>
411 /// </ul>
412 /// <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p>
413 /// <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>
414 pub fn get_global_table_witness_updates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::GlobalTableWitnessGroupUpdate>> {
415 self.inner.get_global_table_witness_updates()
416 }
417 /// <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>
418 pub fn on_demand_throughput(mut self, input: crate::types::OnDemandThroughput) -> Self {
419 self.inner = self.inner.on_demand_throughput(input);
420 self
421 }
422 /// <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>
423 pub fn set_on_demand_throughput(mut self, input: ::std::option::Option<crate::types::OnDemandThroughput>) -> Self {
424 self.inner = self.inner.set_on_demand_throughput(input);
425 self
426 }
427 /// <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>
428 pub fn get_on_demand_throughput(&self) -> &::std::option::Option<crate::types::OnDemandThroughput> {
429 self.inner.get_on_demand_throughput()
430 }
431 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
432 pub fn warm_throughput(mut self, input: crate::types::WarmThroughput) -> Self {
433 self.inner = self.inner.warm_throughput(input);
434 self
435 }
436 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
437 pub fn set_warm_throughput(mut self, input: ::std::option::Option<crate::types::WarmThroughput>) -> Self {
438 self.inner = self.inner.set_warm_throughput(input);
439 self
440 }
441 /// <p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p>
442 pub fn get_warm_throughput(&self) -> &::std::option::Option<crate::types::WarmThroughput> {
443 self.inner.get_warm_throughput()
444 }
445}