DynamoDB / Client / delete_table
delete_table#
- DynamoDB.Client.delete_table(**kwargs)#
The
DeleteTable
operation deletes a table and all of its items. After aDeleteTable
request, the specified table is in theDELETING
state until DynamoDB completes the deletion. If the table is in theACTIVE
state, you can delete it. If a table is inCREATING
orUPDATING
states, then DynamoDB returns aResourceInUseException
. If the specified table does not exist, DynamoDB returns aResourceNotFoundException
. If table is already in theDELETING
state, no error is returned.Warning
For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version).
Note
DynamoDB might continue to accept data read and write operations, such as
GetItem
andPutItem
, on a table in theDELETING
state until the table deletion is complete. For the full list of table states, see TableStatus.When you delete a table, any indexes on that table are also deleted.
If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the
DISABLED
state, and the stream is automatically deleted after 24 hours.Use the
DescribeTable
action to check the status of the table.See also: AWS API Documentation
Request Syntax
response = client.delete_table( TableName='string' )
- Parameters:
TableName (string) –
[REQUIRED]
The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.
- Return type:
dict
- Returns:
Response Syntax
{ 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED', 'CreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'TableSizeBytes': 123, 'ItemCount': 123, 'TableArn': 'string', 'TableId': 'string', 'BillingModeSummary': { 'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST', 'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1) }, 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string' }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', 'Backfilling': True|False, 'ProvisionedThroughput': { 'LastIncreaseDateTime': datetime(2015, 1, 1), 'LastDecreaseDateTime': datetime(2015, 1, 1), 'NumberOfDecreasesToday': 123, 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'IndexSizeBytes': 123, 'ItemCount': 123, 'IndexArn': 'string', 'OnDemandThroughput': { 'MaxReadRequestUnits': 123, 'MaxWriteRequestUnits': 123 }, 'WarmThroughput': { 'ReadUnitsPerSecond': 123, 'WriteUnitsPerSecond': 123, 'Status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE' } }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'GlobalTableVersion': 'string', 'Replicas': [ { 'RegionName': 'string', 'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS', 'ReplicaStatusDescription': 'string', 'ReplicaStatusPercentProgress': 'string', 'KMSMasterKeyId': 'string', 'ProvisionedThroughputOverride': { 'ReadCapacityUnits': 123 }, 'OnDemandThroughputOverride': { 'MaxReadRequestUnits': 123 }, 'WarmThroughput': { 'ReadUnitsPerSecond': 123, 'WriteUnitsPerSecond': 123, 'Status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED' }, 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'ProvisionedThroughputOverride': { 'ReadCapacityUnits': 123 }, 'OnDemandThroughputOverride': { 'MaxReadRequestUnits': 123 }, 'WarmThroughput': { 'ReadUnitsPerSecond': 123, 'WriteUnitsPerSecond': 123, 'Status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE' } }, ], 'ReplicaInaccessibleDateTime': datetime(2015, 1, 1), 'ReplicaTableClassSummary': { 'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS', 'LastUpdateDateTime': datetime(2015, 1, 1) } }, ], 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False }, 'SSEDescription': { 'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING', 'SSEType': 'AES256'|'KMS', 'KMSMasterKeyArn': 'string', 'InaccessibleEncryptionDateTime': datetime(2015, 1, 1) }, 'ArchivalSummary': { 'ArchivalDateTime': datetime(2015, 1, 1), 'ArchivalReason': 'string', 'ArchivalBackupArn': 'string' }, 'TableClassSummary': { 'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS', 'LastUpdateDateTime': datetime(2015, 1, 1) }, 'DeletionProtectionEnabled': True|False, 'OnDemandThroughput': { 'MaxReadRequestUnits': 123, 'MaxWriteRequestUnits': 123 }, 'WarmThroughput': { 'ReadUnitsPerSecond': 123, 'WriteUnitsPerSecond': 123, 'Status': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED' }, 'MultiRegionConsistency': 'EVENTUAL'|'STRONG' } }
Response Structure
(dict) –
Represents the output of a
DeleteTable
operation.TableDescription (dict) –
Represents the properties of a table.
AttributeDefinitions (list) –
An array of
AttributeDefinition
objects. Each of these objects describes one attribute in the table and index key schema.Each
AttributeDefinition
object in this array is composed of:AttributeName
- The name of the attribute.AttributeType
- The data type for the attribute.
(dict) –
Represents an attribute for describing the schema for the table and indexes.
AttributeName (string) –
A name for the attribute.
AttributeType (string) –
The data type for the attribute, where:
S
- the attribute is of type StringN
- the attribute is of type NumberB
- the attribute is of type Binary
TableName (string) –
The name of the table.
KeySchema (list) –
The primary key structure for the table. Each
KeySchemaElement
consists of:AttributeName
- The name of the attribute.KeyType
- The role of the attribute:HASH
- partition keyRANGE
- sort key
Note
The partition key of an item is also known as its hash attribute. The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide.
(dict) –
Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.
A
KeySchemaElement
represents exactly one attribute of the primary key. For example, a simple primary key would be represented by oneKeySchemaElement
(for the partition key). A composite primary key would require oneKeySchemaElement
for the partition key, and anotherKeySchemaElement
for the sort key.A
KeySchemaElement
must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.AttributeName (string) –
The name of a key attribute.
KeyType (string) –
The role that this key attribute will assume:
HASH
- partition keyRANGE
- sort key
Note
The partition key of an item is also known as its hash attribute. The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
TableStatus (string) –
The current state of the table:
CREATING
- The table is being created.UPDATING
- The table/index configuration is being updated. The table/index remains available for data operations whenUPDATING
.DELETING
- The table is being deleted.ACTIVE
- The table is ready for use.INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table’s KMS key remains inaccessible for more than seven days.ARCHIVING
- The table is being archived. Operations are not allowed until archival is complete.ARCHIVED
- The table has been archived. See the ArchivalReason for more information.
CreationDateTime (datetime) –
The date and time when the table was created, in UNIX epoch time format.
ProvisionedThroughput (dict) –
The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.
LastIncreaseDateTime (datetime) –
The date and time of the last provisioned throughput increase for this table.
LastDecreaseDateTime (datetime) –
The date and time of the last provisioned throughput decrease for this table.
NumberOfDecreasesToday (integer) –
The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.
ReadCapacityUnits (integer) –
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a
ThrottlingException
. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50ReadCapacityUnits
per second provides 100 eventually consistentReadCapacityUnits
per second.WriteCapacityUnits (integer) –
The maximum number of writes consumed per second before DynamoDB returns a
ThrottlingException
.
TableSizeBytes (integer) –
The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
ItemCount (integer) –
The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
TableArn (string) –
The Amazon Resource Name (ARN) that uniquely identifies the table.
TableId (string) –
Unique identifier for the table for which the backup was created.
BillingModeSummary (dict) –
Contains the details for the read/write capacity mode.
BillingMode (string) –
Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.
PROVISIONED
- Sets the read/write capacity mode toPROVISIONED
. We recommend usingPROVISIONED
for predictable workloads.PAY_PER_REQUEST
- Sets the read/write capacity mode toPAY_PER_REQUEST
. We recommend usingPAY_PER_REQUEST
for unpredictable workloads.
LastUpdateToPayPerRequestDateTime (datetime) –
Represents the time when
PAY_PER_REQUEST
was last set as the read/write capacity mode.
LocalSecondaryIndexes (list) –
Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:
IndexName
- The name of the local secondary index.KeySchema
- Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.Projection
- Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:ProjectionType
- One of the following:KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- Only the specified table attributes are projected into the index. The list of projected attributes is inNonKeyAttributes
.ALL
- All of the table attributes are projected into the index.
NonKeyAttributes
- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes
, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
IndexSizeBytes
- Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.ItemCount
- Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
If the table is in the
DELETING
state, no information about indexes will be returned.(dict) –
Represents the properties of a local secondary index.
IndexName (string) –
Represents the name of the local secondary index.
KeySchema (list) –
The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:
HASH
- partition keyRANGE
- sort key
Note
The partition key of an item is also known as its hash attribute. The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
(dict) –
Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.
A
KeySchemaElement
represents exactly one attribute of the primary key. For example, a simple primary key would be represented by oneKeySchemaElement
(for the partition key). A composite primary key would require oneKeySchemaElement
for the partition key, and anotherKeySchemaElement
for the sort key.A
KeySchemaElement
must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.AttributeName (string) –
The name of a key attribute.
KeyType (string) –
The role that this key attribute will assume:
HASH
- partition keyRANGE
- sort key
Note
The partition key of an item is also known as its hash attribute. The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
Projection (dict) –
Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.
ProjectionType (string) –
The set of attributes that are projected into the index:
KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- In addition to the attributes described inKEYS_ONLY
, the secondary index will include other non-key attributes that you specify.ALL
- All of the table attributes are projected into the index.
When using the DynamoDB console,
ALL
is selected by default.NonKeyAttributes (list) –
Represents the non-key attribute names which will be projected into the index.
For local secondary indexes, the total count of
NonKeyAttributes
summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.(string) –
IndexSizeBytes (integer) –
The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
ItemCount (integer) –
The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
IndexArn (string) –
The Amazon Resource Name (ARN) that uniquely identifies the index.
GlobalSecondaryIndexes (list) –
The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:
Backfilling
- If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during aCreateTable
operation.) You can delete an index that is being created during theBackfilling
phase whenIndexStatus
is set to CREATING andBackfilling
is true. You can’t delete the index that is being created whenIndexStatus
is set to CREATING andBackfilling
is false. (This attribute does not appear for indexes that were created during aCreateTable
operation.)IndexName
- The name of the global secondary index.IndexSizeBytes
- The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.IndexStatus
- The current status of the global secondary index:CREATING
- The index is being created.UPDATING
- The index is being updated.DELETING
- The index is being deleted.ACTIVE
- The index is ready for use.
ItemCount
- The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.KeySchema
- Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.Projection
- Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:ProjectionType
- One of the following:KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- In addition to the attributes described inKEYS_ONLY
, the secondary index will include other non-key attributes that you specify.ALL
- All of the table attributes are projected into the index.
NonKeyAttributes
- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes
, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
ProvisionedThroughput
- The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.
If the table is in the
DELETING
state, no information about indexes will be returned.(dict) –
Represents the properties of a global secondary index.
IndexName (string) –
The name of the global secondary index.
KeySchema (list) –
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:
HASH
- partition keyRANGE
- sort key
Note
The partition key of an item is also known as its hash attribute. The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
(dict) –
Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.
A
KeySchemaElement
represents exactly one attribute of the primary key. For example, a simple primary key would be represented by oneKeySchemaElement
(for the partition key). A composite primary key would require oneKeySchemaElement
for the partition key, and anotherKeySchemaElement
for the sort key.A
KeySchemaElement
must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.AttributeName (string) –
The name of a key attribute.
KeyType (string) –
The role that this key attribute will assume:
HASH
- partition keyRANGE
- sort key
Note
The partition key of an item is also known as its hash attribute. The term “hash attribute” derives from DynamoDB’s usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term “range attribute” derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
Projection (dict) –
Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.
ProjectionType (string) –
The set of attributes that are projected into the index:
KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- In addition to the attributes described inKEYS_ONLY
, the secondary index will include other non-key attributes that you specify.ALL
- All of the table attributes are projected into the index.
When using the DynamoDB console,
ALL
is selected by default.NonKeyAttributes (list) –
Represents the non-key attribute names which will be projected into the index.
For local secondary indexes, the total count of
NonKeyAttributes
summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.(string) –
IndexStatus (string) –
The current state of the global secondary index:
CREATING
- The index is being created.UPDATING
- The index is being updated.DELETING
- The index is being deleted.ACTIVE
- The index is ready for use.
Backfilling (boolean) –
Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and
Backfilling
is false.You can delete an index that is being created during the
Backfilling
phase whenIndexStatus
is set to CREATING andBackfilling
is true. You can’t delete the index that is being created whenIndexStatus
is set to CREATING andBackfilling
is false.Note
For indexes that were created during a
CreateTable
operation, theBackfilling
attribute does not appear in theDescribeTable
output.ProvisionedThroughput (dict) –
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.
LastIncreaseDateTime (datetime) –
The date and time of the last provisioned throughput increase for this table.
LastDecreaseDateTime (datetime) –
The date and time of the last provisioned throughput decrease for this table.
NumberOfDecreasesToday (integer) –
The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide.
ReadCapacityUnits (integer) –
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a
ThrottlingException
. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50ReadCapacityUnits
per second provides 100 eventually consistentReadCapacityUnits
per second.WriteCapacityUnits (integer) –
The maximum number of writes consumed per second before DynamoDB returns a
ThrottlingException
.
IndexSizeBytes (integer) –
The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
ItemCount (integer) –
The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
IndexArn (string) –
The Amazon Resource Name (ARN) that uniquely identifies the index.
OnDemandThroughput (dict) –
The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify
MaxReadRequestUnits
,MaxWriteRequestUnits
, or both.MaxReadRequestUnits (integer) –
Maximum number of read request units for the specified table.
To specify a maximum
OnDemandThroughput
on your table, set the value ofMaxReadRequestUnits
as greater than or equal to 1. To remove the maximumOnDemandThroughput
that is currently set on your table, set the value ofMaxReadRequestUnits
to -1.MaxWriteRequestUnits (integer) –
Maximum number of write request units for the specified table.
To specify a maximum
OnDemandThroughput
on your table, set the value ofMaxWriteRequestUnits
as greater than or equal to 1. To remove the maximumOnDemandThroughput
that is currently set on your table, set the value ofMaxWriteRequestUnits
to -1.
WarmThroughput (dict) –
Represents the warm throughput value (in read units per second and write units per second) for the specified secondary index.
ReadUnitsPerSecond (integer) –
Represents warm throughput read units per second value for a global secondary index.
WriteUnitsPerSecond (integer) –
Represents warm throughput write units per second value for a global secondary index.
Status (string) –
Represents the warm throughput status being created or updated on a global secondary index. The status can only be
UPDATING
orACTIVE
.
StreamSpecification (dict) –
The current DynamoDB Streams configuration for the table.
StreamEnabled (boolean) –
Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.
StreamViewType (string) –
When an item in the table is modified,
StreamViewType
determines what information is written to the stream for this table. Valid values forStreamViewType
are:KEYS_ONLY
- Only the key attributes of the modified item are written to the stream.NEW_IMAGE
- The entire item, as it appears after it was modified, is written to the stream.OLD_IMAGE
- The entire item, as it appeared before it was modified, is written to the stream.NEW_AND_OLD_IMAGES
- Both the new and the old item images of the item are written to the stream.
LatestStreamLabel (string) –
A timestamp, in ISO 8601 format, for this stream.
Note that
LatestStreamLabel
is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:Amazon Web Services customer ID
Table name
StreamLabel
LatestStreamArn (string) –
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
GlobalTableVersion (string) –
Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.
Replicas (list) –
Represents replicas of the table.
(dict) –
Contains the details of the replica.
RegionName (string) –
The name of the Region.
ReplicaStatus (string) –
The current state of the replica:
CREATING
- The replica is being created.UPDATING
- The replica is being updated.DELETING
- The replica is being deleted.ACTIVE
- The replica is ready for use.REGION_DISABLED
- The replica is inaccessible because the Amazon Web Services Region has been disabled.
Note
If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.
INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The KMS key used to encrypt the table is inaccessible.
Note
If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.
ReplicaStatusDescription (string) –
Detailed information about the replica status.
ReplicaStatusPercentProgress (string) –
Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.
KMSMasterKeyId (string) –
The KMS key of the replica that will be used for KMS encryption.
ProvisionedThroughputOverride (dict) –
Replica-specific provisioned throughput. If not described, uses the source table’s provisioned throughput settings.
ReadCapacityUnits (integer) –
Replica-specific read capacity units. If not specified, uses the source table’s read capacity settings.
OnDemandThroughputOverride (dict) –
Overrides the maximum on-demand throughput settings for the specified replica table.
MaxReadRequestUnits (integer) –
Maximum number of read request units for the specified replica table.
WarmThroughput (dict) –
Represents the warm throughput value for this replica.
ReadUnitsPerSecond (integer) –
Represents the base table’s warm throughput value in read units per second.
WriteUnitsPerSecond (integer) –
Represents the base table’s warm throughput value in write units per second.
Status (string) –
Represents warm throughput value of the base table..
GlobalSecondaryIndexes (list) –
Replica-specific global secondary index settings.
(dict) –
Represents the properties of a replica global secondary index.
IndexName (string) –
The name of the global secondary index.
ProvisionedThroughputOverride (dict) –
If not described, uses the source table GSI’s read capacity settings.
ReadCapacityUnits (integer) –
Replica-specific read capacity units. If not specified, uses the source table’s read capacity settings.
OnDemandThroughputOverride (dict) –
Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.
MaxReadRequestUnits (integer) –
Maximum number of read request units for the specified replica table.
WarmThroughput (dict) –
Represents the warm throughput of the global secondary index for this replica.
ReadUnitsPerSecond (integer) –
Represents warm throughput read units per second value for a global secondary index.
WriteUnitsPerSecond (integer) –
Represents warm throughput write units per second value for a global secondary index.
Status (string) –
Represents the warm throughput status being created or updated on a global secondary index. The status can only be
UPDATING
orACTIVE
.
ReplicaInaccessibleDateTime (datetime) –
The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the
ReplicaStatus
property.ReplicaTableClassSummary (dict) –
Contains details of the table class.
TableClass (string) –
The table class of the specified table. Valid values are
STANDARD
andSTANDARD_INFREQUENT_ACCESS
.LastUpdateDateTime (datetime) –
The date and time at which the table class was last updated.
RestoreSummary (dict) –
Contains details for the restore.
SourceBackupArn (string) –
The Amazon Resource Name (ARN) of the backup from which the table was restored.
SourceTableArn (string) –
The ARN of the source table of the backup that is being restored.
RestoreDateTime (datetime) –
Point in time or source backup time.
RestoreInProgress (boolean) –
Indicates if a restore is in progress or not.
SSEDescription (dict) –
The description of the server-side encryption status on the specified table.
Status (string) –
Represents the current state of server-side encryption. The only supported values are:
ENABLED
- Server-side encryption is enabled.UPDATING
- Server-side encryption is being updated.
SSEType (string) –
Server-side encryption type. The only supported value is:
KMS
- Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).
KMSMasterKeyArn (string) –
The KMS key ARN used for the KMS encryption.
InaccessibleEncryptionDateTime (datetime) –
Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table’s KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table’s KMS key is accessible again. DynamoDB will initiate the table archival process when table’s KMS key remains inaccessible for more than seven days from this date.
ArchivalSummary (dict) –
Contains information about the table archive.
ArchivalDateTime (datetime) –
The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.
ArchivalReason (string) –
The reason DynamoDB archived the table. Currently, the only possible value is:
INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The table was archived due to the table’s KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.
ArchivalBackupArn (string) –
The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.
TableClassSummary (dict) –
Contains details of the table class.
TableClass (string) –
The table class of the specified table. Valid values are
STANDARD
andSTANDARD_INFREQUENT_ACCESS
.LastUpdateDateTime (datetime) –
The date and time at which the table class was last updated.
DeletionProtectionEnabled (boolean) –
Indicates whether deletion protection is enabled (true) or disabled (false) on the table.
OnDemandThroughput (dict) –
The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify
MaxReadRequestUnits
,MaxWriteRequestUnits
, or both.MaxReadRequestUnits (integer) –
Maximum number of read request units for the specified table.
To specify a maximum
OnDemandThroughput
on your table, set the value ofMaxReadRequestUnits
as greater than or equal to 1. To remove the maximumOnDemandThroughput
that is currently set on your table, set the value ofMaxReadRequestUnits
to -1.MaxWriteRequestUnits (integer) –
Maximum number of write request units for the specified table.
To specify a maximum
OnDemandThroughput
on your table, set the value ofMaxWriteRequestUnits
as greater than or equal to 1. To remove the maximumOnDemandThroughput
that is currently set on your table, set the value ofMaxWriteRequestUnits
to -1.
WarmThroughput (dict) –
Describes the warm throughput value of the base table.
ReadUnitsPerSecond (integer) –
Represents the base table’s warm throughput value in read units per second.
WriteUnitsPerSecond (integer) –
Represents the base table’s warm throughput value in write units per second.
Status (string) –
Represents warm throughput value of the base table..
MultiRegionConsistency (string) –
Indicates one of the following consistency modes for a global table:
EVENTUAL
: Indicates that the global table is configured for multi-Region eventual consistency.STRONG
: Indicates that the global table is configured for multi-Region strong consistency (preview).
Note
Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview mode. For more information, see Global tables multi-Region strong consistency.
If you don’t specify this field, the global table consistency mode defaults to
EVENTUAL
.
Exceptions
DynamoDB.Client.exceptions.ResourceInUseException
DynamoDB.Client.exceptions.ResourceNotFoundException
DynamoDB.Client.exceptions.LimitExceededException
DynamoDB.Client.exceptions.InternalServerError
Examples
This example deletes the Music table.
response = client.delete_table( TableName='Music', ) print(response)
Expected Output:
{ 'TableDescription': { 'ItemCount': 0, 'ProvisionedThroughput': { 'NumberOfDecreasesToday': 1, 'ReadCapacityUnits': 5, 'WriteCapacityUnits': 5, }, 'TableName': 'Music', 'TableSizeBytes': 0, 'TableStatus': 'DELETING', }, 'ResponseMetadata': { '...': '...', }, }