2017/11/29 - Amazon DynamoDB - 10 new 4 updated api methods
Changes Amazon DynamoDB now supports the following features: Global Table and On-Demand Backup. Global Table is a fully-managed, multi-region, multi-master database. DynamoDB customers can now write anywhere and read anywhere with single-digit millisecond latency by performing database operations closest to where end users reside. Global Table also enables customers to disaster-proof their applications, keeping them running and data accessible even in the face of natural disasters or region disruptions. Customers can set up Global Table with just a few clicks in the AWS Management Console-no application rewrites required. On-Demand Backup capability is to protect data from loss due to application errors, and meet customers' archival needs for compliance and regulatory reasons. Customers can backup and restore their DynamoDB table data anytime, with a single-click in the AWS management console or a single API call. Backup and restore actions execute with zero impact on table performance or availability. For more information, see the Amazon DynamoDB Developer Guide.
Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided regions.
Tables can only be added as the replicas of a global table group under the following conditions:
The tables must have the same name.
The tables must contain no items.
The tables must have the same hash key and sort key (if present).
The tables must have DynamoDB Streams enabled (NEW_AND_OLD_IMAGES).
See also: AWS API Documentation
Request Syntax
client.create_global_table( GlobalTableName='string', ReplicationGroup=[ { 'RegionName': 'string' }, ] )
string
[REQUIRED]
The global table name.
list
[REQUIRED]
The regions where the global table needs to be created.
(dict) --
Represents the properties of a replica.
RegionName (string) --
The region where the replica needs to be created.
dict
Response Syntax
{ 'GlobalTableDescription': { 'ReplicationGroup': [ { 'RegionName': 'string' }, ], 'GlobalTableArn': 'string', 'CreationDateTime': datetime(2015, 1, 1), 'GlobalTableStatus': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING', 'GlobalTableName': 'string' } }
Response Structure
(dict) --
GlobalTableDescription (dict) --
Contains the details of the global table.
ReplicationGroup (list) --
The regions where the global table has replicas.
(dict) --
Contains the details of the replica.
RegionName (string) --
The name of the region.
GlobalTableArn (string) --
The unique identifier of the global table.
CreationDateTime (datetime) --
The creation time of the global table.
GlobalTableStatus (string) --
The current state of the global table:
CREATING - The global table is being created.
UPDATING - The global table is being updated.
DELETING - The global table is being deleted.
ACTIVE - The global table is ready for use.
GlobalTableName (string) --
The global table name.
Checks the status of the backup restore settings on the specified table. If backups are enabled, ContinuousBackupsStatus will bet set to ENABLED.
You can call DescribeContinuousBackups at a maximum rate of 10 times per second.
See also: AWS API Documentation
Request Syntax
client.describe_continuous_backups( TableName='string' )
string
[REQUIRED]
Name of the table for which the customer wants to check the backup and restore settings.
dict
Response Syntax
{ 'ContinuousBackupsDescription': { 'ContinuousBackupsStatus': 'ENABLED'|'DISABLED' } }
Response Structure
(dict) --
ContinuousBackupsDescription (dict) --
ContinuousBackupsDescription can be one of the following : ENABLED, DISABLED.
ContinuousBackupsStatus (string) --
ContinuousBackupsStatus can be one of the following states : ENABLED, DISABLED
Returns information about the global table.
See also: AWS API Documentation
Request Syntax
client.describe_global_table( GlobalTableName='string' )
string
[REQUIRED]
The name of the global table.
dict
Response Syntax
{ 'GlobalTableDescription': { 'ReplicationGroup': [ { 'RegionName': 'string' }, ], 'GlobalTableArn': 'string', 'CreationDateTime': datetime(2015, 1, 1), 'GlobalTableStatus': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING', 'GlobalTableName': 'string' } }
Response Structure
(dict) --
GlobalTableDescription (dict) --
Contains the details of the global table.
ReplicationGroup (list) --
The regions where the global table has replicas.
(dict) --
Contains the details of the replica.
RegionName (string) --
The name of the region.
GlobalTableArn (string) --
The unique identifier of the global table.
CreationDateTime (datetime) --
The creation time of the global table.
GlobalTableStatus (string) --
The current state of the global table:
CREATING - The global table is being created.
UPDATING - The global table is being updated.
DELETING - The global table is being deleted.
ACTIVE - The global table is ready for use.
GlobalTableName (string) --
The global table name.
Creates a backup for an existing table.
Each time you create an On-Demand Backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken.
You can call CreateBackup at a maximum rate of 50 times per second.
All backups in DynamoDB work without consuming any provisioned throughput on the table. This results in a fast, low-cost, and scalable backup process. In general, the larger the table, the more time it takes to back up. The backup is stored in an S3 data store that is maintained and managed by DynamoDB.
Backups incorporate all writes (delete, put, update) that were completed within the last minute before the backup request was initiated. Backups might include some writes (delete, put, update) that were completed before the backup request was finished.
For example, if you submit the backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup may or may not contain data modifications made between 14:24:00 and 14:26:00. On-Demand Backup does not support causal consistency.
Along with data, the following are also included on the backups:
Global secondary indexes (GSIs)
Local secondary indexes (LSIs)
Streams
Provisioned read and write capacity
See also: AWS API Documentation
Request Syntax
client.create_backup( TableName='string', BackupName='string' )
string
[REQUIRED]
The name of the table.
string
[REQUIRED]
Specified name for the backup.
dict
Response Syntax
{ 'BackupDetails': { 'BackupArn': 'string', 'BackupName': 'string', 'BackupSizeBytes': 123, 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupCreationDateTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
BackupDetails (dict) --
Contains the details of the backup created for the table.
BackupArn (string) --
ARN associated with the backup.
BackupName (string) --
Name of the requested backup.
BackupSizeBytes (integer) --
Size of the backup in bytes.
BackupStatus (string) --
Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
BackupCreationDateTime (datetime) --
Time at which the backup was created. This is the request time of the backup.
List backups associated with an AWS account. To list backups for a given table, specify TableName . ListBackups returns a paginated list of results with at most 1MB worth of items in a page. You can also specify a limit for the maximum number of entries to be returned in a page.
In the request, start time is inclusive but end time is exclusive. Note that these limits are for the time at which the original backup was requested.
You can call ListBackups a maximum of 5 times per second.
See also: AWS API Documentation
Request Syntax
client.list_backups( TableName='string', Limit=123, TimeRangeLowerBound=datetime(2015, 1, 1), TimeRangeUpperBound=datetime(2015, 1, 1), ExclusiveStartBackupArn='string' )
string
The backups from the table specified by TableName are listed.
integer
Maximum number of backups to return at once.
datetime
Only backups created after this time are listed. TimeRangeLowerBound is inclusive.
datetime
Only backups created before this time are listed. TimeRangeUpperBound is exclusive.
string
LastEvaluatedBackupARN returned by the previous ListBackups call.
dict
Response Syntax
{ 'BackupSummaries': [ { 'TableName': 'string', 'TableId': 'string', 'TableArn': 'string', 'BackupArn': 'string', 'BackupName': 'string', 'BackupCreationDateTime': datetime(2015, 1, 1), 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupSizeBytes': 123 }, ], 'LastEvaluatedBackupArn': 'string' }
Response Structure
(dict) --
BackupSummaries (list) --
List of BackupSummary objects.
(dict) --
Contains details for the backup.
TableName (string) --
Name of the table.
TableId (string) --
Unique identifier for the table.
TableArn (string) --
ARN associated with the table.
BackupArn (string) --
ARN associated with the backup.
BackupName (string) --
Name of the specified backup.
BackupCreationDateTime (datetime) --
Time at which the backup was created.
BackupStatus (string) --
Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
BackupSizeBytes (integer) --
Size of the backup in bytes.
LastEvaluatedBackupArn (string) --
Last evaluated BackupARN.
Describes an existing backup of a table.
You can call DescribeBackup at a maximum rate of 10 times per second.
See also: AWS API Documentation
Request Syntax
client.describe_backup( BackupArn='string' )
string
[REQUIRED]
The ARN associated with the backup.
dict
Response Syntax
{ 'BackupDescription': { 'BackupDetails': { 'BackupArn': 'string', 'BackupName': 'string', 'BackupSizeBytes': 123, 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupCreationDateTime': datetime(2015, 1, 1) }, 'SourceTableDetails': { 'TableName': 'string', 'TableId': 'string', 'TableArn': 'string', 'TableSizeBytes': 123, 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableCreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'ItemCount': 123 }, 'SourceTableFeatureDetails': { 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] } }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, ], 'StreamDescription': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'TimeToLiveDescription': { 'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED', 'AttributeName': 'string' } } } }
Response Structure
(dict) --
BackupDescription (dict) --
Contains the description of the backup created for the table.
BackupDetails (dict) --
Contains the details of the backup created for the table.
BackupArn (string) --
ARN associated with the backup.
BackupName (string) --
Name of the requested backup.
BackupSizeBytes (integer) --
Size of the backup in bytes.
BackupStatus (string) --
Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
BackupCreationDateTime (datetime) --
Time at which the backup was created. This is the request time of the backup.
SourceTableDetails (dict) --
Contains the details of the table when the backup was created.
TableName (string) --
The name of the table for which the backup was created.
TableId (string) --
Unique identifier for the table for which the backup was created.
TableArn (string) --
ARN of the table for which backup was created.
TableSizeBytes (integer) --
Size of the table in bytes. Please note this is an approximate value.
KeySchema (list) --
Schema of the table.
(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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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.
TableCreationDateTime (datetime) --
Time when the source table was created.
ProvisionedThroughput (dict) --
Read IOPs and Write IOPS on the table when the backup was created.
ReadCapacityUnits (integer) --
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) --
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
ItemCount (integer) --
Number of items in the table. Please note this is an approximate value.
SourceTableFeatureDetails (dict) --
Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL.
LocalSecondaryIndexes (list) --
Represents the LSI properties for the table when the backup was created. It includes the IndexName, KeySchema and Projection for the LSIs on the table at the time of backup.
(dict) --
Represents the properties of a local secondary index for the table when the backup was created.
IndexName (string) --
Represents the name of the local secondary index.
KeySchema (list) --
The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
GlobalSecondaryIndexes (list) --
Represents the GSI properties for the table when the backup was created. It includes the IndexName, KeySchema, Projection and ProvisionedThroughput for the GSIs on the table at the time of backup.
(dict) --
Represents the properties of a global secondary index for the table when the backup was created.
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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
ReadCapacityUnits (integer) --
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) --
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
StreamDescription (dict) --
Stream settings on the table when the backup was created.
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 for StreamViewType 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.
TimeToLiveDescription (dict) --
Time to Live settings on the table when the backup was created.
TimeToLiveStatus (string) --
The Time to Live status for the table.
AttributeName (string) --
The name of the Time to Live attribute for items in the table.
Lists all the global tables. Only those global tables that have replicas in the region specified as input are returned.
See also: AWS API Documentation
Request Syntax
client.list_global_tables( ExclusiveStartGlobalTableName='string', Limit=123, RegionName='string' )
string
The first global table name that this operation will evaluate.
integer
The maximum number of table names to return.
string
Lists the global tables in a specific region.
dict
Response Syntax
{ 'GlobalTables': [ { 'GlobalTableName': 'string', 'ReplicationGroup': [ { 'RegionName': 'string' }, ] }, ], 'LastEvaluatedGlobalTableName': 'string' }
Response Structure
(dict) --
GlobalTables (list) --
List of global table names.
(dict) --
Represents the properties of a global table.
GlobalTableName (string) --
The global table name.
ReplicationGroup (list) --
The regions where the global table has replicas.
(dict) --
Represents the properties of a replica.
RegionName (string) --
The region where the replica needs to be created.
LastEvaluatedGlobalTableName (string) --
Last evaluated global table name.
Deletes an existing backup of a table.
You can call DeleteBackup at a maximum rate of 10 times per second.
See also: AWS API Documentation
Request Syntax
client.delete_backup( BackupArn='string' )
string
[REQUIRED]
The ARN associated with the backup.
dict
Response Syntax
{ 'BackupDescription': { 'BackupDetails': { 'BackupArn': 'string', 'BackupName': 'string', 'BackupSizeBytes': 123, 'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE', 'BackupCreationDateTime': datetime(2015, 1, 1) }, 'SourceTableDetails': { 'TableName': 'string', 'TableId': 'string', 'TableArn': 'string', 'TableSizeBytes': 123, 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableCreationDateTime': datetime(2015, 1, 1), 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, 'ItemCount': 123 }, 'SourceTableFeatureDetails': { 'LocalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] } }, ], 'GlobalSecondaryIndexes': [ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, ], 'StreamDescription': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'TimeToLiveDescription': { 'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED', 'AttributeName': 'string' } } } }
Response Structure
(dict) --
BackupDescription (dict) --
Contains the description of the backup created for the table.
BackupDetails (dict) --
Contains the details of the backup created for the table.
BackupArn (string) --
ARN associated with the backup.
BackupName (string) --
Name of the requested backup.
BackupSizeBytes (integer) --
Size of the backup in bytes.
BackupStatus (string) --
Backup can be in one of the following states: CREATING, ACTIVE, DELETED.
BackupCreationDateTime (datetime) --
Time at which the backup was created. This is the request time of the backup.
SourceTableDetails (dict) --
Contains the details of the table when the backup was created.
TableName (string) --
The name of the table for which the backup was created.
TableId (string) --
Unique identifier for the table for which the backup was created.
TableArn (string) --
ARN of the table for which backup was created.
TableSizeBytes (integer) --
Size of the table in bytes. Please note this is an approximate value.
KeySchema (list) --
Schema of the table.
(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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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.
TableCreationDateTime (datetime) --
Time when the source table was created.
ProvisionedThroughput (dict) --
Read IOPs and Write IOPS on the table when the backup was created.
ReadCapacityUnits (integer) --
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) --
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
ItemCount (integer) --
Number of items in the table. Please note this is an approximate value.
SourceTableFeatureDetails (dict) --
Contains the details of the features enabled on the table when the backup was created. For example, LSIs, GSIs, streams, TTL.
LocalSecondaryIndexes (list) --
Represents the LSI properties for the table when the backup was created. It includes the IndexName, KeySchema and Projection for the LSIs on the table at the time of backup.
(dict) --
Represents the properties of a local secondary index for the table when the backup was created.
IndexName (string) --
Represents the name of the local secondary index.
KeySchema (list) --
The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
GlobalSecondaryIndexes (list) --
Represents the GSI properties for the table when the backup was created. It includes the IndexName, KeySchema, Projection and ProvisionedThroughput for the GSIs on the table at the time of backup.
(dict) --
Represents the properties of a global secondary index for the table when the backup was created.
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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
ReadCapacityUnits (integer) --
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) --
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
StreamDescription (dict) --
Stream settings on the table when the backup was created.
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 for StreamViewType 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.
TimeToLiveDescription (dict) --
Time to Live settings on the table when the backup was created.
TimeToLiveStatus (string) --
The Time to Live status for the table.
AttributeName (string) --
The name of the Time to Live attribute for items in the table.
Adds or removes replicas to the specified global table. The global table should already exist to be able to use this operation. Currently, the replica to be added should be empty.
See also: AWS API Documentation
Request Syntax
client.update_global_table( GlobalTableName='string', ReplicaUpdates=[ { 'Create': { 'RegionName': 'string' }, 'Delete': { 'RegionName': 'string' } }, ] )
string
[REQUIRED]
The global table name.
list
[REQUIRED]
A list of regions that should be added or removed from the global table.
(dict) --
Represents one of the following:
A new replica to be added to an existing global table.
New parameters for an existing replica.
An existing replica to be removed from an existing global table.
Create (dict) --
The parameters required for creating a replica on an existing global table.
RegionName (string) -- [REQUIRED]
The region of the replica to be added.
Delete (dict) --
The name of the existing replica to be removed.
RegionName (string) -- [REQUIRED]
The region of the replica to be removed.
dict
Response Syntax
{ 'GlobalTableDescription': { 'ReplicationGroup': [ { 'RegionName': 'string' }, ], 'GlobalTableArn': 'string', 'CreationDateTime': datetime(2015, 1, 1), 'GlobalTableStatus': 'CREATING'|'ACTIVE'|'DELETING'|'UPDATING', 'GlobalTableName': 'string' } }
Response Structure
(dict) --
GlobalTableDescription (dict) --
Contains the details of the global table.
ReplicationGroup (list) --
The regions where the global table has replicas.
(dict) --
Contains the details of the replica.
RegionName (string) --
The name of the region.
GlobalTableArn (string) --
The unique identifier of the global table.
CreationDateTime (datetime) --
The creation time of the global table.
GlobalTableStatus (string) --
The current state of the global table:
CREATING - The global table is being created.
UPDATING - The global table is being updated.
DELETING - The global table is being deleted.
ACTIVE - The global table is ready for use.
GlobalTableName (string) --
The global table name.
Creates a new table from an existing backup. Any number of users can execute up to 10 concurrent restores in a given account.
You can call RestoreTableFromBackup at a maximum rate of 10 times per second.
You must manually set up the following on the restored table:
Auto scaling policies
IAM policies
Cloudwatch metrics and alarms
Tags
Time to Live (TTL) settings
See also: AWS API Documentation
Request Syntax
client.restore_table_from_backup( TargetTableName='string', BackupArn='string' )
string
[REQUIRED]
The name of the new table to which the backup must be restored.
string
[REQUIRED]
The ARN associated with the backup.
dict
Response Syntax
{ 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', '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', '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' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False } } }
Response Structure
(dict) --
TableDescription (dict) --
The description of the table created from an existing backup.
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 key 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 String
N - the attribute is of type Number
B - 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 is being updated.
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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 a CreateTable 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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.
Note
For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits 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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 for StreamViewType 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:
the AWS customer ID.
the table name.
the StreamLabel .
LatestStreamArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
RestoreSummary (dict) --
Contains details for the restore.
SourceBackupArn (string) --
ARN of the backup from which the table was restored.
SourceTableArn (string) --
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.
{'TableDescription': {'RestoreSummary': {'RestoreDateTime': 'timestamp', 'RestoreInProgress': 'boolean', 'SourceBackupArn': 'string', 'SourceTableArn': 'string'}, 'TableId': 'string'}}
The CreateTable operation adds a new table to your account. In an AWS account, table names must be unique within each region. That is, you can have two tables with same name if you create the tables in different regions.
CreateTable is an asynchronous operation. Upon receiving a CreateTable request, DynamoDB immediately returns a response with a TableStatus of CREATING . After the table is created, DynamoDB sets the TableStatus to ACTIVE . You can perform read and write operations only on an ACTIVE table.
You can optionally define secondary indexes on the new table, as part of the CreateTable operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the CREATING state at any given time.
You can use the DescribeTable action to check the table status.
See also: AWS API Documentation
Request Syntax
client.create_table( AttributeDefinitions=[ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], TableName='string', KeySchema=[ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], LocalSecondaryIndexes=[ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] } }, ], GlobalSecondaryIndexes=[ { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, ], ProvisionedThroughput={ 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, StreamSpecification={ 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' } )
list
[REQUIRED]
An array of attributes that describe the key schema for the table and indexes.
(dict) --
Represents an attribute for describing the key schema for the table and indexes.
AttributeName (string) -- [REQUIRED]
A name for the attribute.
AttributeType (string) -- [REQUIRED]
The data type for the attribute, where:
S - the attribute is of type String
N - the attribute is of type Number
B - the attribute is of type Binary
string
[REQUIRED]
The name of the table to create.
list
[REQUIRED]
Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide .
Each KeySchemaElement in the array is composed of:
AttributeName - The name of this key attribute.
KeyType - The role that the key attribute will assume:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 a simple primary key (partition key), you must provide exactly one element with a KeyType of HASH .
For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a KeyType of HASH , and the second element must have a KeyType of RANGE .
For more information, see Specifying the 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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) -- [REQUIRED]
The name of a key attribute.
KeyType (string) -- [REQUIRED]
The role that this key attribute will assume:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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.
list
One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.
Each local secondary index in the array includes the following:
IndexName - The name of the local secondary index. Must be unique only for this table.
KeySchema - Specifies the key schema for the local secondary index. 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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(dict) --
Represents the properties of a local secondary index.
IndexName (string) -- [REQUIRED]
The name of the local secondary index. The name must be unique among all other indexes on this table.
KeySchema (list) -- [REQUIRED]
The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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) -- [REQUIRED]
The name of a key attribute.
KeyType (string) -- [REQUIRED]
The role that this key attribute will assume:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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) -- [REQUIRED]
Represents attributes that are copied (projected) from the table into the local 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
list
One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:
IndexName - The name of the global secondary index. Must be unique only for this table.
KeySchema - Specifies the key schema for the global secondary index.
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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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.
(dict) --
Represents the properties of a global secondary index.
IndexName (string) -- [REQUIRED]
The name of the global secondary index. The name must be unique among all other indexes on this table.
KeySchema (list) -- [REQUIRED]
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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) -- [REQUIRED]
The name of a key attribute.
KeyType (string) -- [REQUIRED]
The role that this key attribute will assume:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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) -- [REQUIRED]
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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
ProvisionedThroughput (dict) -- [REQUIRED]
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .
ReadCapacityUnits (integer) -- [REQUIRED]
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) -- [REQUIRED]
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
dict
[REQUIRED]
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.
For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .
ReadCapacityUnits (integer) -- [REQUIRED]
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) -- [REQUIRED]
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
dict
The settings for DynamoDB Streams on the table. These settings consist of:
StreamEnabled - Indicates whether Streams is to be enabled (true) or disabled (false).
StreamViewType - When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values for StreamViewType 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.
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 for StreamViewType 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.
dict
Response Syntax
{ 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', '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', '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' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False } } }
Response Structure
(dict) --
Represents the output of a CreateTable operation.
TableDescription (dict) --
Represents the properties of the 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 key 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 String
N - the attribute is of type Number
B - 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 is being updated.
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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 a CreateTable 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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.
Note
For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits 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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 for StreamViewType 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:
the AWS customer ID.
the table name.
the StreamLabel .
LatestStreamArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
RestoreSummary (dict) --
Contains details for the restore.
SourceBackupArn (string) --
ARN of the backup from which the table was restored.
SourceTableArn (string) --
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.
{'TableDescription': {'RestoreSummary': {'RestoreDateTime': 'timestamp', 'RestoreInProgress': 'boolean', 'SourceBackupArn': 'string', 'SourceTableArn': 'string'}, 'TableId': 'string'}}
The DeleteTable operation deletes a table and all of its items. After a DeleteTable request, the specified table is in the DELETING state until DynamoDB completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException . If the specified table does not exist, DynamoDB returns a ResourceNotFoundException . If table is already in the DELETING state, no error is returned.
Note
DynamoDB might continue to accept data read and write operations, such as GetItem and PutItem , on a table in the DELETING state until the table deletion is complete.
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
client.delete_table( TableName='string' )
string
[REQUIRED]
The name of the table to delete.
dict
Response Syntax
{ 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', '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', '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' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False } } }
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 key 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 String
N - the attribute is of type Number
B - 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 is being updated.
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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 a CreateTable 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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.
Note
For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits 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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 for StreamViewType 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:
the AWS customer ID.
the table name.
the StreamLabel .
LatestStreamArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
RestoreSummary (dict) --
Contains details for the restore.
SourceBackupArn (string) --
ARN of the backup from which the table was restored.
SourceTableArn (string) --
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.
{'Table': {'RestoreSummary': {'RestoreDateTime': 'timestamp', 'RestoreInProgress': 'boolean', 'SourceBackupArn': 'string', 'SourceTableArn': 'string'}, 'TableId': 'string'}}
Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.
Note
If you issue a DescribeTable request immediately after a CreateTable request, DynamoDB might return a ResourceNotFoundException . This is because DescribeTable uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the DescribeTable request again.
See also: AWS API Documentation
Request Syntax
client.describe_table( TableName='string' )
string
[REQUIRED]
The name of the table to describe.
dict
Response Syntax
{ 'Table': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', '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', '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' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False } } }
Response Structure
(dict) --
Represents the output of a DescribeTable operation.
Table (dict) --
The properties of the 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 key 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 String
N - the attribute is of type Number
B - 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 is being updated.
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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 a CreateTable 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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.
Note
For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits 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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 for StreamViewType 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:
the AWS customer ID.
the table name.
the StreamLabel .
LatestStreamArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
RestoreSummary (dict) --
Contains details for the restore.
SourceBackupArn (string) --
ARN of the backup from which the table was restored.
SourceTableArn (string) --
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.
{'TableDescription': {'RestoreSummary': {'RestoreDateTime': 'timestamp', 'RestoreInProgress': 'boolean', 'SourceBackupArn': 'string', 'SourceTableArn': 'string'}, 'TableId': 'string'}}
Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.
You can only perform one of the following operations at once:
Modify the provisioned throughput settings of the table.
Enable or disable Streams on the table.
Remove a global secondary index from the table.
Create a new global secondary index on the table. Once the index begins backfilling, you can use UpdateTable to perform other operations.
UpdateTable is an asynchronous operation; while it is executing, the table status changes from ACTIVE to UPDATING . While it is UPDATING , you cannot issue another UpdateTable request. When the table returns to the ACTIVE state, the UpdateTable operation is complete.
See also: AWS API Documentation
Request Syntax
client.update_table( AttributeDefinitions=[ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], TableName='string', ProvisionedThroughput={ 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 }, GlobalSecondaryIndexUpdates=[ { 'Update': { 'IndexName': 'string', 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, 'Create': { 'IndexName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'Projection': { 'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE', 'NonKeyAttributes': [ 'string', ] }, 'ProvisionedThroughput': { 'ReadCapacityUnits': 123, 'WriteCapacityUnits': 123 } }, 'Delete': { 'IndexName': 'string' } }, ], StreamSpecification={ 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' } )
list
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.
(dict) --
Represents an attribute for describing the key schema for the table and indexes.
AttributeName (string) -- [REQUIRED]
A name for the attribute.
AttributeType (string) -- [REQUIRED]
The data type for the attribute, where:
S - the attribute is of type String
N - the attribute is of type Number
B - the attribute is of type Binary
string
[REQUIRED]
The name of the table to be updated.
dict
The new provisioned throughput settings for the specified table or index.
ReadCapacityUnits (integer) -- [REQUIRED]
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) -- [REQUIRED]
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
list
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.
For more information, see Managing Global Secondary Indexes in the Amazon DynamoDB Developer Guide .
(dict) --
Represents one of the following:
A new global secondary index to be added to an existing table.
New provisioned throughput parameters for an existing global secondary index.
An existing global secondary index to be removed from an existing table.
Update (dict) --
The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.
IndexName (string) -- [REQUIRED]
The name of the global secondary index to be updated.
ProvisionedThroughput (dict) -- [REQUIRED]
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .
ReadCapacityUnits (integer) -- [REQUIRED]
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) -- [REQUIRED]
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
Create (dict) --
The parameters required for creating a global secondary index on an existing table:
IndexName
KeySchema
AttributeDefinitions
Projection
ProvisionedThroughput
IndexName (string) -- [REQUIRED]
The name of the global secondary index to be created.
KeySchema (list) -- [REQUIRED]
The key schema for the global secondary index.
(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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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) -- [REQUIRED]
The name of a key attribute.
KeyType (string) -- [REQUIRED]
The role that this key attribute will assume:
HASH - partition key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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) -- [REQUIRED]
Represents attributes that are copied (projected) from the table into an 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
(string) --
ProvisionedThroughput (dict) -- [REQUIRED]
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .
ReadCapacityUnits (integer) -- [REQUIRED]
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
WriteCapacityUnits (integer) -- [REQUIRED]
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .
Delete (dict) --
The name of an existing global secondary index to be removed.
IndexName (string) -- [REQUIRED]
The name of the global secondary index to be deleted.
dict
Represents the DynamoDB Streams configuration for the table.
Note
You will receive a ResourceInUseException if you attempt to enable a stream on a table that already has a stream, or if you attempt to disable a stream on a table which does not have a stream.
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 for StreamViewType 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.
dict
Response Syntax
{ 'TableDescription': { 'AttributeDefinitions': [ { 'AttributeName': 'string', 'AttributeType': 'S'|'N'|'B' }, ], 'TableName': 'string', 'KeySchema': [ { 'AttributeName': 'string', 'KeyType': 'HASH'|'RANGE' }, ], 'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE', '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', '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' }, ], 'StreamSpecification': { 'StreamEnabled': True|False, 'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY' }, 'LatestStreamLabel': 'string', 'LatestStreamArn': 'string', 'RestoreSummary': { 'SourceBackupArn': 'string', 'SourceTableArn': 'string', 'RestoreDateTime': datetime(2015, 1, 1), 'RestoreInProgress': True|False } } }
Response Structure
(dict) --
Represents the output of an UpdateTable operation.
TableDescription (dict) --
Represents the properties of the 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 key 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 String
N - the attribute is of type Number
B - 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 is being updated.
DELETING - The table is being deleted.
ACTIVE - The table is ready for use.
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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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 a CreateTable 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
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 in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 20. 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement 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 key
RANGE - sort key
Note
The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' 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 - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .
ALL - All of the table attributes are projected into the index.
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 20. 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.
Note
For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.
ProvisionedThroughput (dict) --
Represents the provisioned throughput settings for the specified global secondary index.
For current minimum and maximum provisioned throughput values, see Limits 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 Limits 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 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits 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.
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 for StreamViewType 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:
the AWS customer ID.
the table name.
the StreamLabel .
LatestStreamArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
RestoreSummary (dict) --
Contains details for the restore.
SourceBackupArn (string) --
ARN of the backup from which the table was restored.
SourceTableArn (string) --
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.