aws_sdk_dynamodb/client/update_table.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`UpdateTable`](crate::operation::update_table::builders::UpdateTableFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`attribute_definitions(AttributeDefinition)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::attribute_definitions) / [`set_attribute_definitions(Option<Vec::<AttributeDefinition>>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_attribute_definitions):<br>required: **false**<br><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><br>
7 /// - [`table_name(impl Into<String>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::table_name) / [`set_table_name(Option<String>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_table_name):<br>required: **true**<br><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><br>
8 /// - [`billing_mode(BillingMode)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::billing_mode) / [`set_billing_mode(Option<BillingMode>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_billing_mode):<br>required: **false**<br><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> <ul> <li> <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> <li> <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> </ul><br>
9 /// - [`provisioned_throughput(ProvisionedThroughput)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::provisioned_throughput) / [`set_provisioned_throughput(Option<ProvisionedThroughput>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_provisioned_throughput):<br>required: **false**<br><p>The new provisioned throughput settings for the specified table or index.</p><br>
10 /// - [`global_secondary_index_updates(GlobalSecondaryIndexUpdate)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::global_secondary_index_updates) / [`set_global_secondary_index_updates(Option<Vec::<GlobalSecondaryIndexUpdate>>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_global_secondary_index_updates):<br>required: **false**<br><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> <ul> <li> <p><code>Create</code> - add a new global secondary index to the table.</p></li> <li> <p><code>Update</code> - modify the provisioned throughput settings of an existing global secondary index.</p></li> <li> <p><code>Delete</code> - remove a global secondary index from the table.</p></li> </ul> <p>You can create or delete only one global secondary index per <code>UpdateTable</code> operation.</p> <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><br>
11 /// - [`stream_specification(StreamSpecification)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::stream_specification) / [`set_stream_specification(Option<StreamSpecification>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_stream_specification):<br>required: **false**<br><p>Represents the DynamoDB Streams configuration for the table.</p><note> <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> </note><br>
12 /// - [`sse_specification(SseSpecification)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::sse_specification) / [`set_sse_specification(Option<SseSpecification>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_sse_specification):<br>required: **false**<br><p>The new server-side encryption settings for the specified table.</p><br>
13 /// - [`replica_updates(ReplicationGroupUpdate)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::replica_updates) / [`set_replica_updates(Option<Vec::<ReplicationGroupUpdate>>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_replica_updates):<br>required: **false**<br><p>A list of replica update actions (create, delete, or update) for the table.</p><br>
14 /// - [`table_class(TableClass)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::table_class) / [`set_table_class(Option<TableClass>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_table_class):<br>required: **false**<br><p>The table class of the table to be updated. Valid values are <code>STANDARD</code> and <code>STANDARD_INFREQUENT_ACCESS</code>.</p><br>
15 /// - [`deletion_protection_enabled(bool)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::deletion_protection_enabled) / [`set_deletion_protection_enabled(Option<bool>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_deletion_protection_enabled):<br>required: **false**<br><p>Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.</p><br>
16 /// - [`multi_region_consistency(MultiRegionConsistency)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::multi_region_consistency) / [`set_multi_region_consistency(Option<MultiRegionConsistency>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_multi_region_consistency):<br>required: **false**<br><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> <p>You can specify one of the following consistency modes:</p> <ul> <li> <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> <li> <p><code>STRONG</code>: Configures a new global table for multi-Region strong consistency (MRSC).</p></li> </ul> <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><br>
17 /// - [`global_table_witness_updates(GlobalTableWitnessGroupUpdate)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::global_table_witness_updates) / [`set_global_table_witness_updates(Option<Vec::<GlobalTableWitnessGroupUpdate>>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_global_table_witness_updates):<br>required: **false**<br><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> <ul> <li> <p><code>Create</code> - add a new witness to the global table.</p></li> <li> <p><code>Delete</code> - remove a witness from the global table.</p></li> </ul> <p>You can create or delete only one witness per <code>UpdateTable</code> operation.</p> <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><br>
18 /// - [`on_demand_throughput(OnDemandThroughput)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::on_demand_throughput) / [`set_on_demand_throughput(Option<OnDemandThroughput>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_on_demand_throughput):<br>required: **false**<br><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><br>
19 /// - [`warm_throughput(WarmThroughput)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::warm_throughput) / [`set_warm_throughput(Option<WarmThroughput>)`](crate::operation::update_table::builders::UpdateTableFluentBuilder::set_warm_throughput):<br>required: **false**<br><p>Represents the warm throughput (in read units per second and write units per second) for updating a table.</p><br>
20 /// - On success, responds with [`UpdateTableOutput`](crate::operation::update_table::UpdateTableOutput) with field(s):
21 /// - [`table_description(Option<TableDescription>)`](crate::operation::update_table::UpdateTableOutput::table_description): <p>Represents the properties of the table.</p>
22 /// - On failure, responds with [`SdkError<UpdateTableError>`](crate::operation::update_table::UpdateTableError)
23 pub fn update_table(&self) -> crate::operation::update_table::builders::UpdateTableFluentBuilder {
24 crate::operation::update_table::builders::UpdateTableFluentBuilder::new(self.handle.clone())
25 }
26}