DynamoDBClient.update_table
rboto-dynamodb==0.4.0 · Service index · Types
Model summary (excerpt): Modifies the provisioned throughput settings, global secondary indexes, DynamoDB Streams settings, or global table replica settings for a given table. You can only perform one of the following operations at once: Modify the provisioned throughput settings of the table. Remove a global secondary index from the table. Create a new global secondary index on the table. After the index begins...
Install and imports
from rboto import DynamoDBClient
from collections.abc import Sequence
from rboto_dynamodb.types import (
AttributeDefinition,
BillingMode,
GlobalSecondaryIndexUpdate,
GlobalTableSettingsReplicationMode,
GlobalTableWitnessGroupUpdate,
MultiRegionConsistency,
OnDemandThroughput,
ProvisionedThroughput,
ReplicationGroupUpdate,
SSESpecification,
StreamSpecification,
TableClass,
UpdateTableOutput,
VectorIndexUpdate,
WarmThroughput,
)
Signature
async def update_table(
*,
table_name: str,
attribute_definitions: Sequence[AttributeDefinition] | None = None,
billing_mode: BillingMode | None = None,
provisioned_throughput: ProvisionedThroughput | None = None,
global_secondary_index_updates: Sequence[GlobalSecondaryIndexUpdate] | None = None,
stream_specification: StreamSpecification | None = None,
sse_specification: SSESpecification | None = None,
replica_updates: Sequence[ReplicationGroupUpdate] | None = None,
table_class: TableClass | None = None,
deletion_protection_enabled: bool | None = None,
multi_region_consistency: MultiRegionConsistency | None = None,
global_table_witness_updates: Sequence[GlobalTableWitnessGroupUpdate] | None = None,
on_demand_throughput: OnDemandThroughput | None = None,
warm_throughput: WarmThroughput | None = None,
global_table_settings_replication_mode: GlobalTableSettingsReplicationMode | None = None,
disassociation_protection_enabled: bool | None = None,
vector_index_updates: Sequence[VectorIndexUpdate] | None = None,
) -> UpdateTableOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
table_name |
Yes | The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter. |
attribute_definitions |
No | 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, AttributeDefinitions must include the key element(s) of the new index. |
billing_mode |
No | 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. PAY_PER_REQUEST - We... |
provisioned_throughput |
No | The new provisioned throughput settings for the specified table or index. |
global_secondary_index_updates |
No | An array of one or more global secondary indexes for the table. For each index in the array, you can request one action: Create - add a new global secondary index to the table. Update - modify the provisioned throughput settings of an existing global secondary index. Delete - remove a global secondary index from the table. You can create or delete only one global secondary index per... |
stream_specification |
No | Represents the DynamoDB Streams configuration for the table. You receive a ValidationException 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. |
sse_specification |
No | The new server-side encryption settings for the specified table. |
replica_updates |
No | A list of replica update actions (create, delete, update, or disassociate) for the table. |
table_class |
No | The table class of the table to be updated. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS . |
deletion_protection_enabled |
No | Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. |
multi_region_consistency |
No | 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 Create actions in the ReplicaUpdates action list. You can specify one of the following consistency modes: EVENTUAL : Configures a new global table for multi-Region eventual consistency (MREC). This is the default consistency mode for global tables. STRONG... |
global_table_witness_updates |
No | 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: Create - add a new witness to the global table. Delete - remove a witness from... |
on_demand_throughput |
No | 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 MaxReadRequestUnits , MaxWriteRequestUnits , or both. |
warm_throughput |
No | Represents the warm throughput (in read units per second and write units per second) for updating a table. |
global_table_settings_replication_mode |
No | Controls the settings replication mode for a global table replica. This attribute can be defined using UpdateTable operation only on a regional table with values: ENABLED : Defines settings replication on a regional table to be used as a source table for creating Multi-Account Global Table. DISABLED : Remove settings replication on a regional table. Settings replication needs to be defined to... |
disassociation_protection_enabled |
No | Specifies whether disassociation protection is enabled ( true ) or disabled ( false ) for the local replica of a multi-Region eventual consistency (MREC) global table using Version 2019.11.21. Disassociation protection is enabled by default. If you omit this parameter, the existing setting is unchanged. This setting is independent of DeletionProtectionEnabled . You can't combine this change... |
vector_index_updates |
No | A list of vector indexes to be added to or removed from the table. You can add or remove one vector index for each UpdateTable operation. To add a vector index, specify IndexName , VectorAttribute , Dimensions , DistanceFunction , and Projection . To remove a vector index, specify only the IndexName . |
Output
UpdateTableOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
table_description |
TableDescriptionOutput | None |
Always present | TableDescriptionOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
AttributeDefinition, BillingMode, GlobalSecondaryIndexUpdate, GlobalTableSettingsReplicationMode, GlobalTableWitnessGroupUpdate, MultiRegionConsistency, OnDemandThroughput, ProvisionedThroughput, ReplicationGroupUpdate, SSESpecification, StreamSpecification, TableClass, UpdateTableOutput, VectorIndexUpdate, WarmThroughput
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_dynamodb.exceptions:
InternalServerError, InvalidEndpointError, LimitExceededError, ResourceInUseError, ResourceNotFoundError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.