aws_sdk_keyspaces/operation/update_table/_update_table_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateTableInput {
6 /// <p>The name of the keyspace the specified table is stored in.</p>
7 pub keyspace_name: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the table.</p>
9 pub table_name: ::std::option::Option<::std::string::String>,
10 /// <p>For each column to be added to the specified table:</p>
11 /// <ul>
12 /// <li>
13 /// <p><code>name</code> - The name of the column.</p></li>
14 /// <li>
15 /// <p><code>type</code> - An Amazon Keyspaces data type. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types">Data types</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p></li>
16 /// </ul>
17 pub add_columns: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDefinition>>,
18 /// <p>Modifies the read/write throughput capacity mode for the table. The options are:</p>
19 /// <ul>
20 /// <li>
21 /// <p><code>throughputMode:PAY_PER_REQUEST</code> and</p></li>
22 /// <li>
23 /// <p><code>throughputMode:PROVISIONED</code> - Provisioned capacity mode requires <code>readCapacityUnits</code> and <code>writeCapacityUnits</code> as input.</p></li>
24 /// </ul>
25 /// <p>The default is <code>throughput_mode:PAY_PER_REQUEST</code>.</p>
26 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html">Read/write capacity modes</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
27 pub capacity_specification: ::std::option::Option<crate::types::CapacitySpecification>,
28 /// <p>Modifies the encryption settings of the table. You can choose one of the following KMS key (KMS key):</p>
29 /// <ul>
30 /// <li>
31 /// <p><code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces.</p></li>
32 /// <li>
33 /// <p><code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input.</p></li>
34 /// </ul>
35 /// <p>The default is <code>AWS_OWNED_KMS_KEY</code>.</p>
36 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
37 pub encryption_specification: ::std::option::Option<crate::types::EncryptionSpecification>,
38 /// <p>Modifies the <code>pointInTimeRecovery</code> settings of the table. The options are:</p>
39 /// <ul>
40 /// <li>
41 /// <p><code>status=ENABLED</code></p></li>
42 /// <li>
43 /// <p><code>status=DISABLED</code></p></li>
44 /// </ul>
45 /// <p>If it's not specified, the default is <code>status=DISABLED</code>.</p>
46 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html">Point-in-time recovery</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
47 pub point_in_time_recovery: ::std::option::Option<crate::types::PointInTimeRecovery>,
48 /// <p>Modifies Time to Live custom settings for the table. The options are:</p>
49 /// <ul>
50 /// <li>
51 /// <p><code>status:enabled</code></p></li>
52 /// <li>
53 /// <p><code>status:disabled</code></p></li>
54 /// </ul>
55 /// <p>The default is <code>status:disabled</code>. After <code>ttl</code> is enabled, you can't disable it for the table.</p>
56 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html">Expiring data by using Amazon Keyspaces Time to Live (TTL)</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
57 pub ttl: ::std::option::Option<crate::types::TimeToLive>,
58 /// <p>The default Time to Live setting in seconds for the table.</p>
59 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl">Setting the default TTL value for a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
60 pub default_time_to_live: ::std::option::Option<i32>,
61 /// <p>Enables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:</p>
62 /// <ul>
63 /// <li>
64 /// <p><code>status: "enabled"</code></p></li>
65 /// </ul>
66 /// <p>Once client-side timestamps are enabled for a table, this setting cannot be disabled.</p>
67 pub client_side_timestamps: ::std::option::Option<crate::types::ClientSideTimestamps>,
68 /// <p>The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.</p>
69 /// <p>If auto scaling is already enabled for the table, you can use <code>UpdateTable</code> to update the minimum and maximum values or the auto scaling policy settings independently.</p>
70 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
71 pub auto_scaling_specification: ::std::option::Option<crate::types::AutoScalingSpecification>,
72 /// <p>The Region specific settings of a multi-Regional table.</p>
73 pub replica_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaSpecification>>,
74 /// <p>The CDC stream settings of the table.</p>
75 pub cdc_specification: ::std::option::Option<crate::types::CdcSpecification>,
76 /// <p>Modifies the warm throughput settings for the table. You can update the read and write capacity units to adjust the pre-provisioned throughput.</p>
77 pub warm_throughput_specification: ::std::option::Option<crate::types::WarmThroughputSpecification>,
78}
79impl UpdateTableInput {
80 /// <p>The name of the keyspace the specified table is stored in.</p>
81 pub fn keyspace_name(&self) -> ::std::option::Option<&str> {
82 self.keyspace_name.as_deref()
83 }
84 /// <p>The name of the table.</p>
85 pub fn table_name(&self) -> ::std::option::Option<&str> {
86 self.table_name.as_deref()
87 }
88 /// <p>For each column to be added to the specified table:</p>
89 /// <ul>
90 /// <li>
91 /// <p><code>name</code> - The name of the column.</p></li>
92 /// <li>
93 /// <p><code>type</code> - An Amazon Keyspaces data type. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types">Data types</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p></li>
94 /// </ul>
95 ///
96 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.add_columns.is_none()`.
97 pub fn add_columns(&self) -> &[crate::types::ColumnDefinition] {
98 self.add_columns.as_deref().unwrap_or_default()
99 }
100 /// <p>Modifies the read/write throughput capacity mode for the table. The options are:</p>
101 /// <ul>
102 /// <li>
103 /// <p><code>throughputMode:PAY_PER_REQUEST</code> and</p></li>
104 /// <li>
105 /// <p><code>throughputMode:PROVISIONED</code> - Provisioned capacity mode requires <code>readCapacityUnits</code> and <code>writeCapacityUnits</code> as input.</p></li>
106 /// </ul>
107 /// <p>The default is <code>throughput_mode:PAY_PER_REQUEST</code>.</p>
108 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html">Read/write capacity modes</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
109 pub fn capacity_specification(&self) -> ::std::option::Option<&crate::types::CapacitySpecification> {
110 self.capacity_specification.as_ref()
111 }
112 /// <p>Modifies the encryption settings of the table. You can choose one of the following KMS key (KMS key):</p>
113 /// <ul>
114 /// <li>
115 /// <p><code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces.</p></li>
116 /// <li>
117 /// <p><code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input.</p></li>
118 /// </ul>
119 /// <p>The default is <code>AWS_OWNED_KMS_KEY</code>.</p>
120 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
121 pub fn encryption_specification(&self) -> ::std::option::Option<&crate::types::EncryptionSpecification> {
122 self.encryption_specification.as_ref()
123 }
124 /// <p>Modifies the <code>pointInTimeRecovery</code> settings of the table. The options are:</p>
125 /// <ul>
126 /// <li>
127 /// <p><code>status=ENABLED</code></p></li>
128 /// <li>
129 /// <p><code>status=DISABLED</code></p></li>
130 /// </ul>
131 /// <p>If it's not specified, the default is <code>status=DISABLED</code>.</p>
132 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html">Point-in-time recovery</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
133 pub fn point_in_time_recovery(&self) -> ::std::option::Option<&crate::types::PointInTimeRecovery> {
134 self.point_in_time_recovery.as_ref()
135 }
136 /// <p>Modifies Time to Live custom settings for the table. The options are:</p>
137 /// <ul>
138 /// <li>
139 /// <p><code>status:enabled</code></p></li>
140 /// <li>
141 /// <p><code>status:disabled</code></p></li>
142 /// </ul>
143 /// <p>The default is <code>status:disabled</code>. After <code>ttl</code> is enabled, you can't disable it for the table.</p>
144 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html">Expiring data by using Amazon Keyspaces Time to Live (TTL)</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
145 pub fn ttl(&self) -> ::std::option::Option<&crate::types::TimeToLive> {
146 self.ttl.as_ref()
147 }
148 /// <p>The default Time to Live setting in seconds for the table.</p>
149 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl">Setting the default TTL value for a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
150 pub fn default_time_to_live(&self) -> ::std::option::Option<i32> {
151 self.default_time_to_live
152 }
153 /// <p>Enables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:</p>
154 /// <ul>
155 /// <li>
156 /// <p><code>status: "enabled"</code></p></li>
157 /// </ul>
158 /// <p>Once client-side timestamps are enabled for a table, this setting cannot be disabled.</p>
159 pub fn client_side_timestamps(&self) -> ::std::option::Option<&crate::types::ClientSideTimestamps> {
160 self.client_side_timestamps.as_ref()
161 }
162 /// <p>The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.</p>
163 /// <p>If auto scaling is already enabled for the table, you can use <code>UpdateTable</code> to update the minimum and maximum values or the auto scaling policy settings independently.</p>
164 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
165 pub fn auto_scaling_specification(&self) -> ::std::option::Option<&crate::types::AutoScalingSpecification> {
166 self.auto_scaling_specification.as_ref()
167 }
168 /// <p>The Region specific settings of a multi-Regional table.</p>
169 ///
170 /// 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_specifications.is_none()`.
171 pub fn replica_specifications(&self) -> &[crate::types::ReplicaSpecification] {
172 self.replica_specifications.as_deref().unwrap_or_default()
173 }
174 /// <p>The CDC stream settings of the table.</p>
175 pub fn cdc_specification(&self) -> ::std::option::Option<&crate::types::CdcSpecification> {
176 self.cdc_specification.as_ref()
177 }
178 /// <p>Modifies the warm throughput settings for the table. You can update the read and write capacity units to adjust the pre-provisioned throughput.</p>
179 pub fn warm_throughput_specification(&self) -> ::std::option::Option<&crate::types::WarmThroughputSpecification> {
180 self.warm_throughput_specification.as_ref()
181 }
182}
183impl UpdateTableInput {
184 /// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
185 pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
186 crate::operation::update_table::builders::UpdateTableInputBuilder::default()
187 }
188}
189
190/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
191#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
192#[non_exhaustive]
193pub struct UpdateTableInputBuilder {
194 pub(crate) keyspace_name: ::std::option::Option<::std::string::String>,
195 pub(crate) table_name: ::std::option::Option<::std::string::String>,
196 pub(crate) add_columns: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDefinition>>,
197 pub(crate) capacity_specification: ::std::option::Option<crate::types::CapacitySpecification>,
198 pub(crate) encryption_specification: ::std::option::Option<crate::types::EncryptionSpecification>,
199 pub(crate) point_in_time_recovery: ::std::option::Option<crate::types::PointInTimeRecovery>,
200 pub(crate) ttl: ::std::option::Option<crate::types::TimeToLive>,
201 pub(crate) default_time_to_live: ::std::option::Option<i32>,
202 pub(crate) client_side_timestamps: ::std::option::Option<crate::types::ClientSideTimestamps>,
203 pub(crate) auto_scaling_specification: ::std::option::Option<crate::types::AutoScalingSpecification>,
204 pub(crate) replica_specifications: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaSpecification>>,
205 pub(crate) cdc_specification: ::std::option::Option<crate::types::CdcSpecification>,
206 pub(crate) warm_throughput_specification: ::std::option::Option<crate::types::WarmThroughputSpecification>,
207}
208impl UpdateTableInputBuilder {
209 /// <p>The name of the keyspace the specified table is stored in.</p>
210 /// This field is required.
211 pub fn keyspace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212 self.keyspace_name = ::std::option::Option::Some(input.into());
213 self
214 }
215 /// <p>The name of the keyspace the specified table is stored in.</p>
216 pub fn set_keyspace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217 self.keyspace_name = input;
218 self
219 }
220 /// <p>The name of the keyspace the specified table is stored in.</p>
221 pub fn get_keyspace_name(&self) -> &::std::option::Option<::std::string::String> {
222 &self.keyspace_name
223 }
224 /// <p>The name of the table.</p>
225 /// This field is required.
226 pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227 self.table_name = ::std::option::Option::Some(input.into());
228 self
229 }
230 /// <p>The name of the table.</p>
231 pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232 self.table_name = input;
233 self
234 }
235 /// <p>The name of the table.</p>
236 pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
237 &self.table_name
238 }
239 /// Appends an item to `add_columns`.
240 ///
241 /// To override the contents of this collection use [`set_add_columns`](Self::set_add_columns).
242 ///
243 /// <p>For each column to be added to the specified table:</p>
244 /// <ul>
245 /// <li>
246 /// <p><code>name</code> - The name of the column.</p></li>
247 /// <li>
248 /// <p><code>type</code> - An Amazon Keyspaces data type. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types">Data types</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p></li>
249 /// </ul>
250 pub fn add_columns(mut self, input: crate::types::ColumnDefinition) -> Self {
251 let mut v = self.add_columns.unwrap_or_default();
252 v.push(input);
253 self.add_columns = ::std::option::Option::Some(v);
254 self
255 }
256 /// <p>For each column to be added to the specified table:</p>
257 /// <ul>
258 /// <li>
259 /// <p><code>name</code> - The name of the column.</p></li>
260 /// <li>
261 /// <p><code>type</code> - An Amazon Keyspaces data type. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types">Data types</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p></li>
262 /// </ul>
263 pub fn set_add_columns(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ColumnDefinition>>) -> Self {
264 self.add_columns = input;
265 self
266 }
267 /// <p>For each column to be added to the specified table:</p>
268 /// <ul>
269 /// <li>
270 /// <p><code>name</code> - The name of the column.</p></li>
271 /// <li>
272 /// <p><code>type</code> - An Amazon Keyspaces data type. For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types">Data types</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p></li>
273 /// </ul>
274 pub fn get_add_columns(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ColumnDefinition>> {
275 &self.add_columns
276 }
277 /// <p>Modifies the read/write throughput capacity mode for the table. The options are:</p>
278 /// <ul>
279 /// <li>
280 /// <p><code>throughputMode:PAY_PER_REQUEST</code> and</p></li>
281 /// <li>
282 /// <p><code>throughputMode:PROVISIONED</code> - Provisioned capacity mode requires <code>readCapacityUnits</code> and <code>writeCapacityUnits</code> as input.</p></li>
283 /// </ul>
284 /// <p>The default is <code>throughput_mode:PAY_PER_REQUEST</code>.</p>
285 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html">Read/write capacity modes</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
286 pub fn capacity_specification(mut self, input: crate::types::CapacitySpecification) -> Self {
287 self.capacity_specification = ::std::option::Option::Some(input);
288 self
289 }
290 /// <p>Modifies the read/write throughput capacity mode for the table. The options are:</p>
291 /// <ul>
292 /// <li>
293 /// <p><code>throughputMode:PAY_PER_REQUEST</code> and</p></li>
294 /// <li>
295 /// <p><code>throughputMode:PROVISIONED</code> - Provisioned capacity mode requires <code>readCapacityUnits</code> and <code>writeCapacityUnits</code> as input.</p></li>
296 /// </ul>
297 /// <p>The default is <code>throughput_mode:PAY_PER_REQUEST</code>.</p>
298 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html">Read/write capacity modes</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
299 pub fn set_capacity_specification(mut self, input: ::std::option::Option<crate::types::CapacitySpecification>) -> Self {
300 self.capacity_specification = input;
301 self
302 }
303 /// <p>Modifies the read/write throughput capacity mode for the table. The options are:</p>
304 /// <ul>
305 /// <li>
306 /// <p><code>throughputMode:PAY_PER_REQUEST</code> and</p></li>
307 /// <li>
308 /// <p><code>throughputMode:PROVISIONED</code> - Provisioned capacity mode requires <code>readCapacityUnits</code> and <code>writeCapacityUnits</code> as input.</p></li>
309 /// </ul>
310 /// <p>The default is <code>throughput_mode:PAY_PER_REQUEST</code>.</p>
311 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html">Read/write capacity modes</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
312 pub fn get_capacity_specification(&self) -> &::std::option::Option<crate::types::CapacitySpecification> {
313 &self.capacity_specification
314 }
315 /// <p>Modifies the encryption settings of the table. You can choose one of the following KMS key (KMS key):</p>
316 /// <ul>
317 /// <li>
318 /// <p><code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces.</p></li>
319 /// <li>
320 /// <p><code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input.</p></li>
321 /// </ul>
322 /// <p>The default is <code>AWS_OWNED_KMS_KEY</code>.</p>
323 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
324 pub fn encryption_specification(mut self, input: crate::types::EncryptionSpecification) -> Self {
325 self.encryption_specification = ::std::option::Option::Some(input);
326 self
327 }
328 /// <p>Modifies the encryption settings of the table. You can choose one of the following KMS key (KMS key):</p>
329 /// <ul>
330 /// <li>
331 /// <p><code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces.</p></li>
332 /// <li>
333 /// <p><code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input.</p></li>
334 /// </ul>
335 /// <p>The default is <code>AWS_OWNED_KMS_KEY</code>.</p>
336 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
337 pub fn set_encryption_specification(mut self, input: ::std::option::Option<crate::types::EncryptionSpecification>) -> Self {
338 self.encryption_specification = input;
339 self
340 }
341 /// <p>Modifies the encryption settings of the table. You can choose one of the following KMS key (KMS key):</p>
342 /// <ul>
343 /// <li>
344 /// <p><code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces.</p></li>
345 /// <li>
346 /// <p><code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input.</p></li>
347 /// </ul>
348 /// <p>The default is <code>AWS_OWNED_KMS_KEY</code>.</p>
349 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
350 pub fn get_encryption_specification(&self) -> &::std::option::Option<crate::types::EncryptionSpecification> {
351 &self.encryption_specification
352 }
353 /// <p>Modifies the <code>pointInTimeRecovery</code> settings of the table. The options are:</p>
354 /// <ul>
355 /// <li>
356 /// <p><code>status=ENABLED</code></p></li>
357 /// <li>
358 /// <p><code>status=DISABLED</code></p></li>
359 /// </ul>
360 /// <p>If it's not specified, the default is <code>status=DISABLED</code>.</p>
361 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html">Point-in-time recovery</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
362 pub fn point_in_time_recovery(mut self, input: crate::types::PointInTimeRecovery) -> Self {
363 self.point_in_time_recovery = ::std::option::Option::Some(input);
364 self
365 }
366 /// <p>Modifies the <code>pointInTimeRecovery</code> settings of the table. The options are:</p>
367 /// <ul>
368 /// <li>
369 /// <p><code>status=ENABLED</code></p></li>
370 /// <li>
371 /// <p><code>status=DISABLED</code></p></li>
372 /// </ul>
373 /// <p>If it's not specified, the default is <code>status=DISABLED</code>.</p>
374 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html">Point-in-time recovery</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
375 pub fn set_point_in_time_recovery(mut self, input: ::std::option::Option<crate::types::PointInTimeRecovery>) -> Self {
376 self.point_in_time_recovery = input;
377 self
378 }
379 /// <p>Modifies the <code>pointInTimeRecovery</code> settings of the table. The options are:</p>
380 /// <ul>
381 /// <li>
382 /// <p><code>status=ENABLED</code></p></li>
383 /// <li>
384 /// <p><code>status=DISABLED</code></p></li>
385 /// </ul>
386 /// <p>If it's not specified, the default is <code>status=DISABLED</code>.</p>
387 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html">Point-in-time recovery</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
388 pub fn get_point_in_time_recovery(&self) -> &::std::option::Option<crate::types::PointInTimeRecovery> {
389 &self.point_in_time_recovery
390 }
391 /// <p>Modifies Time to Live custom settings for the table. The options are:</p>
392 /// <ul>
393 /// <li>
394 /// <p><code>status:enabled</code></p></li>
395 /// <li>
396 /// <p><code>status:disabled</code></p></li>
397 /// </ul>
398 /// <p>The default is <code>status:disabled</code>. After <code>ttl</code> is enabled, you can't disable it for the table.</p>
399 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html">Expiring data by using Amazon Keyspaces Time to Live (TTL)</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
400 pub fn ttl(mut self, input: crate::types::TimeToLive) -> Self {
401 self.ttl = ::std::option::Option::Some(input);
402 self
403 }
404 /// <p>Modifies Time to Live custom settings for the table. The options are:</p>
405 /// <ul>
406 /// <li>
407 /// <p><code>status:enabled</code></p></li>
408 /// <li>
409 /// <p><code>status:disabled</code></p></li>
410 /// </ul>
411 /// <p>The default is <code>status:disabled</code>. After <code>ttl</code> is enabled, you can't disable it for the table.</p>
412 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html">Expiring data by using Amazon Keyspaces Time to Live (TTL)</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
413 pub fn set_ttl(mut self, input: ::std::option::Option<crate::types::TimeToLive>) -> Self {
414 self.ttl = input;
415 self
416 }
417 /// <p>Modifies Time to Live custom settings for the table. The options are:</p>
418 /// <ul>
419 /// <li>
420 /// <p><code>status:enabled</code></p></li>
421 /// <li>
422 /// <p><code>status:disabled</code></p></li>
423 /// </ul>
424 /// <p>The default is <code>status:disabled</code>. After <code>ttl</code> is enabled, you can't disable it for the table.</p>
425 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html">Expiring data by using Amazon Keyspaces Time to Live (TTL)</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
426 pub fn get_ttl(&self) -> &::std::option::Option<crate::types::TimeToLive> {
427 &self.ttl
428 }
429 /// <p>The default Time to Live setting in seconds for the table.</p>
430 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl">Setting the default TTL value for a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
431 pub fn default_time_to_live(mut self, input: i32) -> Self {
432 self.default_time_to_live = ::std::option::Option::Some(input);
433 self
434 }
435 /// <p>The default Time to Live setting in seconds for the table.</p>
436 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl">Setting the default TTL value for a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
437 pub fn set_default_time_to_live(mut self, input: ::std::option::Option<i32>) -> Self {
438 self.default_time_to_live = input;
439 self
440 }
441 /// <p>The default Time to Live setting in seconds for the table.</p>
442 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl">Setting the default TTL value for a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
443 pub fn get_default_time_to_live(&self) -> &::std::option::Option<i32> {
444 &self.default_time_to_live
445 }
446 /// <p>Enables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:</p>
447 /// <ul>
448 /// <li>
449 /// <p><code>status: "enabled"</code></p></li>
450 /// </ul>
451 /// <p>Once client-side timestamps are enabled for a table, this setting cannot be disabled.</p>
452 pub fn client_side_timestamps(mut self, input: crate::types::ClientSideTimestamps) -> Self {
453 self.client_side_timestamps = ::std::option::Option::Some(input);
454 self
455 }
456 /// <p>Enables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:</p>
457 /// <ul>
458 /// <li>
459 /// <p><code>status: "enabled"</code></p></li>
460 /// </ul>
461 /// <p>Once client-side timestamps are enabled for a table, this setting cannot be disabled.</p>
462 pub fn set_client_side_timestamps(mut self, input: ::std::option::Option<crate::types::ClientSideTimestamps>) -> Self {
463 self.client_side_timestamps = input;
464 self
465 }
466 /// <p>Enables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:</p>
467 /// <ul>
468 /// <li>
469 /// <p><code>status: "enabled"</code></p></li>
470 /// </ul>
471 /// <p>Once client-side timestamps are enabled for a table, this setting cannot be disabled.</p>
472 pub fn get_client_side_timestamps(&self) -> &::std::option::Option<crate::types::ClientSideTimestamps> {
473 &self.client_side_timestamps
474 }
475 /// <p>The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.</p>
476 /// <p>If auto scaling is already enabled for the table, you can use <code>UpdateTable</code> to update the minimum and maximum values or the auto scaling policy settings independently.</p>
477 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
478 pub fn auto_scaling_specification(mut self, input: crate::types::AutoScalingSpecification) -> Self {
479 self.auto_scaling_specification = ::std::option::Option::Some(input);
480 self
481 }
482 /// <p>The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.</p>
483 /// <p>If auto scaling is already enabled for the table, you can use <code>UpdateTable</code> to update the minimum and maximum values or the auto scaling policy settings independently.</p>
484 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
485 pub fn set_auto_scaling_specification(mut self, input: ::std::option::Option<crate::types::AutoScalingSpecification>) -> Self {
486 self.auto_scaling_specification = input;
487 self
488 }
489 /// <p>The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic.</p>
490 /// <p>If auto scaling is already enabled for the table, you can use <code>UpdateTable</code> to update the minimum and maximum values or the auto scaling policy settings independently.</p>
491 /// <p>For more information, see <a href="https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
492 pub fn get_auto_scaling_specification(&self) -> &::std::option::Option<crate::types::AutoScalingSpecification> {
493 &self.auto_scaling_specification
494 }
495 /// Appends an item to `replica_specifications`.
496 ///
497 /// To override the contents of this collection use [`set_replica_specifications`](Self::set_replica_specifications).
498 ///
499 /// <p>The Region specific settings of a multi-Regional table.</p>
500 pub fn replica_specifications(mut self, input: crate::types::ReplicaSpecification) -> Self {
501 let mut v = self.replica_specifications.unwrap_or_default();
502 v.push(input);
503 self.replica_specifications = ::std::option::Option::Some(v);
504 self
505 }
506 /// <p>The Region specific settings of a multi-Regional table.</p>
507 pub fn set_replica_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaSpecification>>) -> Self {
508 self.replica_specifications = input;
509 self
510 }
511 /// <p>The Region specific settings of a multi-Regional table.</p>
512 pub fn get_replica_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicaSpecification>> {
513 &self.replica_specifications
514 }
515 /// <p>The CDC stream settings of the table.</p>
516 pub fn cdc_specification(mut self, input: crate::types::CdcSpecification) -> Self {
517 self.cdc_specification = ::std::option::Option::Some(input);
518 self
519 }
520 /// <p>The CDC stream settings of the table.</p>
521 pub fn set_cdc_specification(mut self, input: ::std::option::Option<crate::types::CdcSpecification>) -> Self {
522 self.cdc_specification = input;
523 self
524 }
525 /// <p>The CDC stream settings of the table.</p>
526 pub fn get_cdc_specification(&self) -> &::std::option::Option<crate::types::CdcSpecification> {
527 &self.cdc_specification
528 }
529 /// <p>Modifies the warm throughput settings for the table. You can update the read and write capacity units to adjust the pre-provisioned throughput.</p>
530 pub fn warm_throughput_specification(mut self, input: crate::types::WarmThroughputSpecification) -> Self {
531 self.warm_throughput_specification = ::std::option::Option::Some(input);
532 self
533 }
534 /// <p>Modifies the warm throughput settings for the table. You can update the read and write capacity units to adjust the pre-provisioned throughput.</p>
535 pub fn set_warm_throughput_specification(mut self, input: ::std::option::Option<crate::types::WarmThroughputSpecification>) -> Self {
536 self.warm_throughput_specification = input;
537 self
538 }
539 /// <p>Modifies the warm throughput settings for the table. You can update the read and write capacity units to adjust the pre-provisioned throughput.</p>
540 pub fn get_warm_throughput_specification(&self) -> &::std::option::Option<crate::types::WarmThroughputSpecification> {
541 &self.warm_throughput_specification
542 }
543 /// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
544 pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
545 ::std::result::Result::Ok(crate::operation::update_table::UpdateTableInput {
546 keyspace_name: self.keyspace_name,
547 table_name: self.table_name,
548 add_columns: self.add_columns,
549 capacity_specification: self.capacity_specification,
550 encryption_specification: self.encryption_specification,
551 point_in_time_recovery: self.point_in_time_recovery,
552 ttl: self.ttl,
553 default_time_to_live: self.default_time_to_live,
554 client_side_timestamps: self.client_side_timestamps,
555 auto_scaling_specification: self.auto_scaling_specification,
556 replica_specifications: self.replica_specifications,
557 cdc_specification: self.cdc_specification,
558 warm_throughput_specification: self.warm_throughput_specification,
559 })
560 }
561}