Amazon DynamoDB

2024/05/02 - Amazon DynamoDB - 13 updated api methods

Changes  This release adds support to specify an optional, maximum OnDemandThroughput for DynamoDB tables and global secondary indexes in the CreateTable or UpdateTable APIs. You can also override the OnDemandThroughput settings by calling the ImportTable, RestoreFromPointInTime, or RestoreFromBackup APIs.

CreateGlobalTable (updated) Link ¶
Changes (response)
{'GlobalTableDescription': {'ReplicationGroup': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                                 'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

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.

Warning

This operation only applies to Version 2017.11.29 (Legacy) of global tables. We recommend using Version 2019.11.21 (Current) when creating new global tables, as it provides greater flexibility, higher efficiency and consumes less write capacity than 2017.11.29 (Legacy). To determine which version you are using, see Determining the version. To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see Updating global tables.

If you want to add a new replica table to a global table, each of the following conditions must be true:

  • The table must have the same primary key as all of the other replicas.

  • The table must have the same name as all of the other replicas.

  • The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.

  • None of the replica tables in the global table can contain any data.

If global secondary indexes are specified, then the following conditions must also be met:

  • The global secondary indexes must have the same name.

  • The global secondary indexes must have the same hash key and sort key (if present).

If local secondary indexes are specified, then the following conditions must also be met:

  • The local secondary indexes must have the same name.

  • The local secondary indexes must have the same hash key and sort key (if present).

Warning

Write capacity settings should be set consistently across your replica tables and secondary indexes. DynamoDB strongly recommends enabling auto scaling to manage the write capacity settings for all of your global tables replicas and indexes.

If you prefer to manage write capacity settings manually, you should provision equal replicated write capacity units to your replica tables. You should also provision equal replicated write capacity units to matching secondary indexes across your global table.

See also: AWS API Documentation

Request Syntax

client.create_global_table(
    GlobalTableName='string',
    ReplicationGroup=[
        {
            'RegionName': 'string'
        },
    ]
)
type GlobalTableName

string

param GlobalTableName

[REQUIRED]

The global table name.

type ReplicationGroup

list

param ReplicationGroup

[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.

rtype

dict

returns

Response Syntax

{
    'GlobalTableDescription': {
        'ReplicationGroup': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        '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.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • 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.

CreateTable (updated) Link ¶
Changes (request, response)
Request
{'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                   'MaxWriteRequestUnits': 'long'}},
 'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                        'MaxWriteRequestUnits': 'long'}}
Response
{'TableDescription': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                        'MaxWriteRequestUnits': 'long'}},
                      'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                             'MaxWriteRequestUnits': 'long'},
                      'Replicas': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                   'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

The CreateTable operation adds a new table to your account. In an Amazon Web Services 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
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            }
        },
    ],
    BillingMode='PROVISIONED'|'PAY_PER_REQUEST',
    ProvisionedThroughput={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    },
    StreamSpecification={
        'StreamEnabled': True|False,
        'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
    },
    SSESpecification={
        'Enabled': True|False,
        'SSEType': 'AES256'|'KMS',
        'KMSMasterKeyId': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    TableClass='STANDARD'|'STANDARD_INFREQUENT_ACCESS',
    DeletionProtectionEnabled=True|False,
    ResourcePolicy='string',
    OnDemandThroughput={
        'MaxReadRequestUnits': 123,
        'MaxWriteRequestUnits': 123
    }
)
type AttributeDefinitions

list

param AttributeDefinitions

[REQUIRED]

An array of attributes that describe the key schema for the table and indexes.

  • (dict) --

    Represents an attribute for describing the 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

type TableName

string

param TableName

[REQUIRED]

The name of the table to create. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

type KeySchema

list

param KeySchema

[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 the 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 Working with Tables 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

type LocalSecondaryIndexes

list

param LocalSecondaryIndexes

One or more local secondary indexes (the maximum is 5) 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 is 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 100. 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • (dict) --

        Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

          The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

    • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

        • ALL - All of the table attributes are projected into the index.

        When using the DynamoDB console, ALL is selected by default.

      • NonKeyAttributes (list) --

        Represents the non-key attribute names which will be projected into the index.

        For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • (string) --

type GlobalSecondaryIndexes

list

param GlobalSecondaryIndexes

One or more global secondary indexes (the maximum is 20) 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 is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

  • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.

  • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • (dict) --

        Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

          The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

    • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

        • ALL - All of the table attributes are projected into the index.

        When using the DynamoDB console, ALL is selected by default.

      • NonKeyAttributes (list) --

        Represents the non-key attribute names which will be projected into the index.

        For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • (string) --

    • ProvisionedThroughput (dict) --

      Represents the provisioned throughput settings for the specified global secondary index.

      For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

      • 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 .

        If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

      • 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 .

        If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

    • OnDemandThroughput (dict) --

      The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

      • MaxReadRequestUnits (integer) --

        Maximum number of read request units for the specified table.

        To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

      • MaxWriteRequestUnits (integer) --

        Maximum number of write request units for the specified table.

        To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

type BillingMode

string

param BillingMode

Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

  • PROVISIONED - We recommend using PROVISIONED for predictable workloads. PROVISIONED sets the billing mode to Provisioned Mode.

  • PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode.

type ProvisionedThroughput

dict

param ProvisionedThroughput

Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

If you set BillingMode as PROVISIONED , you must specify this property. If you set BillingMode as PAY_PER_REQUEST , you cannot specify this property.

For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

  • 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

type StreamSpecification

dict

param StreamSpecification

The settings for DynamoDB Streams on the table. These settings consist of:

  • StreamEnabled - Indicates whether DynamoDB 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) -- [REQUIRED]

    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.

type SSESpecification

dict

param SSESpecification

Represents the settings used to enable server-side encryption.

  • Enabled (boolean) --

    Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

  • SSEType (string) --

    Server-side encryption type. The only supported value is:

    • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

  • KMSMasterKeyId (string) --

    The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

type Tags

list

param Tags

A list of key-value pairs to label the table. For more information, see Tagging for DynamoDB.

  • (dict) --

    Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table.

    Amazon Web Services-assigned tag names and values are automatically assigned the aws: prefix, which the user cannot assign. Amazon Web Services-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix user: in the Cost Allocation Report. You cannot backdate the application of a tag.

    For an overview on tagging DynamoDB resources, see Tagging for DynamoDB in the Amazon DynamoDB Developer Guide .

    • Key (string) -- [REQUIRED]

      The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.

    • Value (string) -- [REQUIRED]

      The value of the tag. Tag values are case-sensitive and can be null.

type TableClass

string

param TableClass

The table class of the new table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

type DeletionProtectionEnabled

boolean

param DeletionProtectionEnabled

Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.

type ResourcePolicy

string

param ResourcePolicy

An Amazon Web Services resource-based policy document in JSON format that will be attached to the table.

When you attach a resource-based policy while creating a table, the policy application is strongly consistent .

The maximum size supported for a resource-based policy document is 20 KB. DynamoDB counts whitespaces when calculating the size of a policy against this limit. For a full list of all considerations that apply for resource-based policies, see Resource-based policy considerations.

type OnDemandThroughput

dict

param OnDemandThroughput

Sets the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

  • MaxReadRequestUnits (integer) --

    Maximum number of read request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

  • MaxWriteRequestUnits (integer) --

    Maximum number of write request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

rtype

dict

returns

Response Syntax

{
    'TableDescription': {
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'TableName': 'string',
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'CreationDateTime': datetime(2015, 1, 1),
        'ProvisionedThroughput': {
            'LastIncreaseDateTime': datetime(2015, 1, 1),
            'LastDecreaseDateTime': datetime(2015, 1, 1),
            'NumberOfDecreasesToday': 123,
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'TableSizeBytes': 123,
        'ItemCount': 123,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string',
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'GlobalTableVersion': 'string',
        'Replicas': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string',
            'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
        },
        'ArchivalSummary': {
            'ArchivalDateTime': datetime(2015, 1, 1),
            'ArchivalReason': 'string',
            'ArchivalBackupArn': 'string'
        },
        'TableClassSummary': {
            'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
            'LastUpdateDateTime': datetime(2015, 1, 1)
        },
        'DeletionProtectionEnabled': True|False,
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        }
    }
}

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 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide .

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING .

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

        • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

        • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

        • ARCHIVED - The table has been archived. See the ArchivalReason for more information.

      • CreationDateTime (datetime) --

        The date and time when the table was created, in UNIX epoch time format.

      • ProvisionedThroughput (dict) --

        The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

        • LastIncreaseDateTime (datetime) --

          The date and time of the last provisioned throughput increase for this table.

        • LastDecreaseDateTime (datetime) --

          The date and time of the last provisioned throughput decrease for this table.

        • NumberOfDecreasesToday (integer) --

          The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

        • LastUpdateToPayPerRequestDateTime (datetime) --

          Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:

        • IndexName - The name of the local secondary index.

        • KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.

        • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

          • ProjectionType - One of the following:

            • KEYS_ONLY - Only the index and primary keys are projected into the index.

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexSizeBytes (integer) --

            The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • ItemCount (integer) --

            The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • IndexArn (string) --

            The Amazon Resource Name (ARN) that uniquely identifies the index.

      • GlobalSecondaryIndexes (list) --

        The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.) You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

            • ALL - All of the table attributes are projected into the index.

          • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

            Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING 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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • LastIncreaseDateTime (datetime) --

              The date and time of the last provisioned throughput increase for this table.

            • LastDecreaseDateTime (datetime) --

              The date and time of the last provisioned throughput decrease for this table.

            • NumberOfDecreasesToday (integer) --

              The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

          • OnDemandThroughput (dict) --

            The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

            • MaxWriteRequestUnits (integer) --

              Maximum number of write request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • 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:

        • Amazon Web Services customer ID

        • Table name

        • StreamLabel

      • LatestStreamArn (string) --

        The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

      • GlobalTableVersion (string) --

        Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

      • Replicas (list) --

        Represents replicas of the table.

        • (dict) --

          Contains the details of the replica.

          • RegionName (string) --

            The name of the Region.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup from which the table was restored.

        • SourceTableArn (string) --

          The ARN of the source table of the backup that is being restored.

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

        The description of the server-side encryption status on the specified table.

        • Status (string) --

          Represents the current state of server-side encryption. The only supported values are:

          • ENABLED - Server-side encryption is enabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type. The only supported value is:

          • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

        • KMSMasterKeyArn (string) --

          The KMS key ARN used for the KMS encryption.

        • InaccessibleEncryptionDateTime (datetime) --

          Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

      • ArchivalSummary (dict) --

        Contains information about the table archive.

        • ArchivalDateTime (datetime) --

          The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

        • ArchivalReason (string) --

          The reason DynamoDB archived the table. Currently, the only possible value is:

          • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

        • ArchivalBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

      • TableClassSummary (dict) --

        Contains details of the table class.

        • TableClass (string) --

          The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

        • LastUpdateDateTime (datetime) --

          The date and time at which the table class was last updated.

      • DeletionProtectionEnabled (boolean) --

        Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

DeleteBackup (updated) Link ¶
Changes (response)
{'BackupDescription': {'SourceTableDetails': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                     'MaxWriteRequestUnits': 'long'}},
                       'SourceTableFeatureDetails': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                                                       'MaxWriteRequestUnits': 'long'}}}}}

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'
)
type BackupArn

string

param BackupArn

[REQUIRED]

The ARN associated with the backup.

rtype

dict

returns

Response Syntax

{
    'BackupDescription': {
        'BackupDetails': {
            'BackupArn': 'string',
            'BackupName': 'string',
            'BackupSizeBytes': 123,
            'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE',
            'BackupType': 'USER'|'SYSTEM'|'AWS_BACKUP',
            'BackupCreationDateTime': datetime(2015, 1, 1),
            'BackupExpiryDateTime': 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
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            },
            'ItemCount': 123,
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST'
        },
        '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
                    },
                    'OnDemandThroughput': {
                        'MaxReadRequestUnits': 123,
                        'MaxWriteRequestUnits': 123
                    }
                },
            ],
            'StreamDescription': {
                'StreamEnabled': True|False,
                'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
            },
            'TimeToLiveDescription': {
                'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED',
                'AttributeName': 'string'
            },
            'SSEDescription': {
                'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
                'SSEType': 'AES256'|'KMS',
                'KMSMasterKeyArn': 'string',
                'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
            }
        }
    }
}

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. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • BackupStatus (string) --

          Backup can be in one of the following states: CREATING, ACTIVE, DELETED.

        • BackupType (string) --

          BackupType:

          • USER - You create and manage these using the on-demand backup feature.

          • SYSTEM - If you delete a table with point-in-time recovery enabled, a SYSTEM backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion.

          • AWS_BACKUP - On-demand backup created by you from Backup service.

        • BackupCreationDateTime (datetime) --

          Time at which the backup was created. This is the request time of the backup.

        • BackupExpiryDateTime (datetime) --

          Time at which the automatic on-demand backup created by DynamoDB will expire. This SYSTEM on-demand backup expires automatically 35 days after its creation.

      • 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. Note that 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        • 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 .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

          • 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 .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • OnDemandThroughput (dict) --

          Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

          • MaxReadRequestUnits (integer) --

            Maximum number of read request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

          • MaxWriteRequestUnits (integer) --

            Maximum number of write request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

        • ItemCount (integer) --

          Number of items in the table. Note that this is an approximate value.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

      • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

              • (dict) --

                Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

                A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                  The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • Projection (dict) --

              Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

              • ProjectionType (string) --

                The set of attributes that are projected into the index:

                • KEYS_ONLY - Only the index and primary keys are projected into the index.

                • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

                • ALL - All of the table attributes are projected into the index.

                When using the DynamoDB console, ALL is selected by default.

              • NonKeyAttributes (list) --

                Represents the non-key attribute names which will be projected into the index.

                For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

                • (string) --

        • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

              • (dict) --

                Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

                A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                  The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • Projection (dict) --

              Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

              • ProjectionType (string) --

                The set of attributes that are projected into the index:

                • KEYS_ONLY - Only the index and primary keys are projected into the index.

                • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

                • ALL - All of the table attributes are projected into the index.

                When using the DynamoDB console, ALL is selected by default.

              • NonKeyAttributes (list) --

                Represents the non-key attribute names which will be projected into the index.

                For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

                • (string) --

            • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

              • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

            • OnDemandThroughput (dict) --

              Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

              • MaxReadRequestUnits (integer) --

                Maximum number of read request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

              • MaxWriteRequestUnits (integer) --

                Maximum number of write request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

        • 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 TTL status for the table.

          • AttributeName (string) --

            The name of the TTL attribute for items in the table.

        • SSEDescription (dict) --

          The description of the server-side encryption status on the table when the backup was created.

          • Status (string) --

            Represents the current state of server-side encryption. The only supported values are:

            • ENABLED - Server-side encryption is enabled.

            • UPDATING - Server-side encryption is being updated.

          • SSEType (string) --

            Server-side encryption type. The only supported value is:

            • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

          • KMSMasterKeyArn (string) --

            The KMS key ARN used for the KMS encryption.

          • InaccessibleEncryptionDateTime (datetime) --

            Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

DeleteTable (updated) Link ¶
Changes (response)
{'TableDescription': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                        'MaxWriteRequestUnits': 'long'}},
                      'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                             'MaxWriteRequestUnits': 'long'},
                      'Replicas': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                   'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

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.

Warning

This operation only applies to Version 2019.11.21 (Current) of global tables.

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'
)
type TableName

string

param TableName

[REQUIRED]

The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

rtype

dict

returns

Response Syntax

{
    'TableDescription': {
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'TableName': 'string',
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'CreationDateTime': datetime(2015, 1, 1),
        'ProvisionedThroughput': {
            'LastIncreaseDateTime': datetime(2015, 1, 1),
            'LastDecreaseDateTime': datetime(2015, 1, 1),
            'NumberOfDecreasesToday': 123,
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'TableSizeBytes': 123,
        'ItemCount': 123,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string',
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'GlobalTableVersion': 'string',
        'Replicas': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string',
            'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
        },
        'ArchivalSummary': {
            'ArchivalDateTime': datetime(2015, 1, 1),
            'ArchivalReason': 'string',
            'ArchivalBackupArn': 'string'
        },
        'TableClassSummary': {
            'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
            'LastUpdateDateTime': datetime(2015, 1, 1)
        },
        'DeletionProtectionEnabled': True|False,
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        }
    }
}

Response Structure

  • (dict) --

    Represents the output of a DeleteTable operation.

    • TableDescription (dict) --

      Represents the properties of a table.

      • AttributeDefinitions (list) --

        An array of AttributeDefinition objects. Each of these objects describes one attribute in the table and index key schema.

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

          Represents an attribute for describing the schema for the table and indexes.

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute, where:

            • S - the attribute is of type 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide .

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING .

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

        • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

        • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

        • ARCHIVED - The table has been archived. See the ArchivalReason for more information.

      • CreationDateTime (datetime) --

        The date and time when the table was created, in UNIX epoch time format.

      • ProvisionedThroughput (dict) --

        The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

        • LastIncreaseDateTime (datetime) --

          The date and time of the last provisioned throughput increase for this table.

        • LastDecreaseDateTime (datetime) --

          The date and time of the last provisioned throughput decrease for this table.

        • NumberOfDecreasesToday (integer) --

          The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

        • LastUpdateToPayPerRequestDateTime (datetime) --

          Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:

        • IndexName - The name of the local secondary index.

        • KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.

        • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

          • ProjectionType - One of the following:

            • KEYS_ONLY - Only the index and primary keys are projected into the index.

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexSizeBytes (integer) --

            The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • ItemCount (integer) --

            The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • IndexArn (string) --

            The Amazon Resource Name (ARN) that uniquely identifies the index.

      • GlobalSecondaryIndexes (list) --

        The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.) You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

            • ALL - All of the table attributes are projected into the index.

          • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

            Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING 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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • LastIncreaseDateTime (datetime) --

              The date and time of the last provisioned throughput increase for this table.

            • LastDecreaseDateTime (datetime) --

              The date and time of the last provisioned throughput decrease for this table.

            • NumberOfDecreasesToday (integer) --

              The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

          • OnDemandThroughput (dict) --

            The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

            • MaxWriteRequestUnits (integer) --

              Maximum number of write request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • 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:

        • Amazon Web Services customer ID

        • Table name

        • StreamLabel

      • LatestStreamArn (string) --

        The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

      • GlobalTableVersion (string) --

        Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

      • Replicas (list) --

        Represents replicas of the table.

        • (dict) --

          Contains the details of the replica.

          • RegionName (string) --

            The name of the Region.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup from which the table was restored.

        • SourceTableArn (string) --

          The ARN of the source table of the backup that is being restored.

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

        The description of the server-side encryption status on the specified table.

        • Status (string) --

          Represents the current state of server-side encryption. The only supported values are:

          • ENABLED - Server-side encryption is enabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type. The only supported value is:

          • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

        • KMSMasterKeyArn (string) --

          The KMS key ARN used for the KMS encryption.

        • InaccessibleEncryptionDateTime (datetime) --

          Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

      • ArchivalSummary (dict) --

        Contains information about the table archive.

        • ArchivalDateTime (datetime) --

          The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

        • ArchivalReason (string) --

          The reason DynamoDB archived the table. Currently, the only possible value is:

          • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

        • ArchivalBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

      • TableClassSummary (dict) --

        Contains details of the table class.

        • TableClass (string) --

          The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

        • LastUpdateDateTime (datetime) --

          The date and time at which the table class was last updated.

      • DeletionProtectionEnabled (boolean) --

        Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

DescribeBackup (updated) Link ¶
Changes (response)
{'BackupDescription': {'SourceTableDetails': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                     'MaxWriteRequestUnits': 'long'}},
                       'SourceTableFeatureDetails': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                                                       'MaxWriteRequestUnits': 'long'}}}}}

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'
)
type BackupArn

string

param BackupArn

[REQUIRED]

The Amazon Resource Name (ARN) associated with the backup.

rtype

dict

returns

Response Syntax

{
    'BackupDescription': {
        'BackupDetails': {
            'BackupArn': 'string',
            'BackupName': 'string',
            'BackupSizeBytes': 123,
            'BackupStatus': 'CREATING'|'DELETED'|'AVAILABLE',
            'BackupType': 'USER'|'SYSTEM'|'AWS_BACKUP',
            'BackupCreationDateTime': datetime(2015, 1, 1),
            'BackupExpiryDateTime': 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
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            },
            'ItemCount': 123,
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST'
        },
        '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
                    },
                    'OnDemandThroughput': {
                        'MaxReadRequestUnits': 123,
                        'MaxWriteRequestUnits': 123
                    }
                },
            ],
            'StreamDescription': {
                'StreamEnabled': True|False,
                'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
            },
            'TimeToLiveDescription': {
                'TimeToLiveStatus': 'ENABLING'|'DISABLING'|'ENABLED'|'DISABLED',
                'AttributeName': 'string'
            },
            'SSEDescription': {
                'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
                'SSEType': 'AES256'|'KMS',
                'KMSMasterKeyArn': 'string',
                'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
            }
        }
    }
}

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. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • BackupStatus (string) --

          Backup can be in one of the following states: CREATING, ACTIVE, DELETED.

        • BackupType (string) --

          BackupType:

          • USER - You create and manage these using the on-demand backup feature.

          • SYSTEM - If you delete a table with point-in-time recovery enabled, a SYSTEM backup is automatically created and is retained for 35 days (at no additional cost). System backups allow you to restore the deleted table to the state it was in just before the point of deletion.

          • AWS_BACKUP - On-demand backup created by you from Backup service.

        • BackupCreationDateTime (datetime) --

          Time at which the backup was created. This is the request time of the backup.

        • BackupExpiryDateTime (datetime) --

          Time at which the automatic on-demand backup created by DynamoDB will expire. This SYSTEM on-demand backup expires automatically 35 days after its creation.

      • 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. Note that 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        • 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 .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

          • 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 .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • OnDemandThroughput (dict) --

          Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

          • MaxReadRequestUnits (integer) --

            Maximum number of read request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

          • MaxWriteRequestUnits (integer) --

            Maximum number of write request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

        • ItemCount (integer) --

          Number of items in the table. Note that this is an approximate value.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

      • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

              • (dict) --

                Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

                A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                  The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • Projection (dict) --

              Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

              • ProjectionType (string) --

                The set of attributes that are projected into the index:

                • KEYS_ONLY - Only the index and primary keys are projected into the index.

                • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

                • ALL - All of the table attributes are projected into the index.

                When using the DynamoDB console, ALL is selected by default.

              • NonKeyAttributes (list) --

                Represents the non-key attribute names which will be projected into the index.

                For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

                • (string) --

        • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

              • (dict) --

                Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

                A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                  The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • Projection (dict) --

              Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

              • ProjectionType (string) --

                The set of attributes that are projected into the index:

                • KEYS_ONLY - Only the index and primary keys are projected into the index.

                • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

                • ALL - All of the table attributes are projected into the index.

                When using the DynamoDB console, ALL is selected by default.

              • NonKeyAttributes (list) --

                Represents the non-key attribute names which will be projected into the index.

                For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

                • (string) --

            • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

              • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

            • OnDemandThroughput (dict) --

              Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

              • MaxReadRequestUnits (integer) --

                Maximum number of read request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

              • MaxWriteRequestUnits (integer) --

                Maximum number of write request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

        • 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 TTL status for the table.

          • AttributeName (string) --

            The name of the TTL attribute for items in the table.

        • SSEDescription (dict) --

          The description of the server-side encryption status on the table when the backup was created.

          • Status (string) --

            Represents the current state of server-side encryption. The only supported values are:

            • ENABLED - Server-side encryption is enabled.

            • UPDATING - Server-side encryption is being updated.

          • SSEType (string) --

            Server-side encryption type. The only supported value is:

            • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

          • KMSMasterKeyArn (string) --

            The KMS key ARN used for the KMS encryption.

          • InaccessibleEncryptionDateTime (datetime) --

            Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

DescribeGlobalTable (updated) Link ¶
Changes (response)
{'GlobalTableDescription': {'ReplicationGroup': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                                 'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

Returns information about the specified global table.

Warning

This operation only applies to Version 2017.11.29 (Legacy) of global tables. We recommend using Version 2019.11.21 (Current) when creating new global tables, as it provides greater flexibility, higher efficiency and consumes less write capacity than 2017.11.29 (Legacy). To determine which version you are using, see Determining the version. To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see Updating global tables.

See also: AWS API Documentation

Request Syntax

client.describe_global_table(
    GlobalTableName='string'
)
type GlobalTableName

string

param GlobalTableName

[REQUIRED]

The name of the global table.

rtype

dict

returns

Response Syntax

{
    'GlobalTableDescription': {
        'ReplicationGroup': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        '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.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • 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.

DescribeImport (updated) Link ¶
Changes (response)
{'ImportTableDescription': {'TableCreationParameters': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                                                          'MaxWriteRequestUnits': 'long'}},
                                                        'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                               'MaxWriteRequestUnits': 'long'}}}}

Represents the properties of the import.

See also: AWS API Documentation

Request Syntax

client.describe_import(
    ImportArn='string'
)
type ImportArn

string

param ImportArn

[REQUIRED]

The Amazon Resource Name (ARN) associated with the table you're importing to.

rtype

dict

returns

Response Syntax

{
    'ImportTableDescription': {
        'ImportArn': 'string',
        'ImportStatus': 'IN_PROGRESS'|'COMPLETED'|'CANCELLING'|'CANCELLED'|'FAILED',
        'TableArn': 'string',
        'TableId': 'string',
        'ClientToken': 'string',
        'S3BucketSource': {
            'S3BucketOwner': 'string',
            'S3Bucket': 'string',
            'S3KeyPrefix': 'string'
        },
        'ErrorCount': 123,
        'CloudWatchLogGroupArn': 'string',
        'InputFormat': 'DYNAMODB_JSON'|'ION'|'CSV',
        'InputFormatOptions': {
            'Csv': {
                'Delimiter': 'string',
                'HeaderList': [
                    'string',
                ]
            }
        },
        'InputCompressionType': 'GZIP'|'ZSTD'|'NONE',
        'TableCreationParameters': {
            'TableName': 'string',
            'AttributeDefinitions': [
                {
                    'AttributeName': 'string',
                    'AttributeType': 'S'|'N'|'B'
                },
            ],
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'ProvisionedThroughput': {
                'ReadCapacityUnits': 123,
                'WriteCapacityUnits': 123
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            },
            'SSESpecification': {
                'Enabled': True|False,
                'SSEType': 'AES256'|'KMS',
                'KMSMasterKeyId': 'string'
            },
            'GlobalSecondaryIndexes': [
                {
                    'IndexName': 'string',
                    'KeySchema': [
                        {
                            'AttributeName': 'string',
                            'KeyType': 'HASH'|'RANGE'
                        },
                    ],
                    'Projection': {
                        'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                        'NonKeyAttributes': [
                            'string',
                        ]
                    },
                    'ProvisionedThroughput': {
                        'ReadCapacityUnits': 123,
                        'WriteCapacityUnits': 123
                    },
                    'OnDemandThroughput': {
                        'MaxReadRequestUnits': 123,
                        'MaxWriteRequestUnits': 123
                    }
                },
            ]
        },
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ProcessedSizeBytes': 123,
        'ProcessedItemCount': 123,
        'ImportedItemCount': 123,
        'FailureCode': 'string',
        'FailureMessage': 'string'
    }
}

Response Structure

  • (dict) --

    • ImportTableDescription (dict) --

      Represents the properties of the table created for the import, and parameters of the import. The import parameters include import status, how many items were processed, and how many errors were encountered.

      • ImportArn (string) --

        The Amazon Resource Number (ARN) corresponding to the import request.

      • ImportStatus (string) --

        The status of the import.

      • TableArn (string) --

        The Amazon Resource Number (ARN) of the table being imported into.

      • TableId (string) --

        The table id corresponding to the table created by import table process.

      • ClientToken (string) --

        The client token that was provided for the import task. Reusing the client token on retry makes a call to ImportTable idempotent.

      • S3BucketSource (dict) --

        Values for the S3 bucket the source file is imported from. Includes bucket name (required), key prefix (optional) and bucket account owner ID (optional).

        • S3BucketOwner (string) --

          The account number of the S3 bucket that is being imported from. If the bucket is owned by the requester this is optional.

        • S3Bucket (string) --

          The S3 bucket that is being imported from.

        • S3KeyPrefix (string) --

          The key prefix shared by all S3 Objects that are being imported.

      • ErrorCount (integer) --

        The number of errors occurred on importing the source file into the target table.

      • CloudWatchLogGroupArn (string) --

        The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated with the target table.

      • InputFormat (string) --

        The format of the source data going into the target table.

      • InputFormatOptions (dict) --

        The format options for the data that was imported into the target table. There is one value, CsvOption.

        • Csv (dict) --

          The options for imported source files in CSV format. The values are Delimiter and HeaderList.

          • Delimiter (string) --

            The delimiter used for separating items in the CSV file being imported.

          • HeaderList (list) --

            List of the headers used to specify a common header for all source CSV files being imported. If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.

            • (string) --

      • InputCompressionType (string) --

        The compression options for the data that has been imported into the target table. The values are NONE, GZIP, or ZSTD.

      • TableCreationParameters (dict) --

        The parameters for the new table that is being imported into.

        • TableName (string) --

          The name of the table created as part of the import operation.

        • AttributeDefinitions (list) --

          The attributes of the table created as part of the import operation.

          • (dict) --

            Represents an attribute for describing the schema for the table and indexes.

            • AttributeName (string) --

              A name for the attribute.

            • AttributeType (string) --

              The data type for the attribute, where:

              • S - the attribute is of type String

              • N - the attribute is of type Number

              • B - the attribute is of type Binary

        • KeySchema (list) --

          The primary key and option sort key of the table created as part of the import operation.

          • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        • BillingMode (string) --

          The billing mode for provisioning the table created as part of the import operation.

        • ProvisionedThroughput (dict) --

          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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

          • ReadCapacityUnits (integer) --

            The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

          • 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 .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • OnDemandThroughput (dict) --

          Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

          • MaxReadRequestUnits (integer) --

            Maximum number of read request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

          • MaxWriteRequestUnits (integer) --

            Maximum number of write request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

        • SSESpecification (dict) --

          Represents the settings used to enable server-side encryption.

          • Enabled (boolean) --

            Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

          • SSEType (string) --

            Server-side encryption type. The only supported value is:

            • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

          • KMSMasterKeyId (string) --

            The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

        • GlobalSecondaryIndexes (list) --

          The Global Secondary Indexes (GSI) of the table to be created as part of the import operation.

          • (dict) --

            Represents the properties of a global secondary index.

            • IndexName (string) --

              The name of the global secondary index. The name must be unique among all other indexes on this table.

            • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

              • (dict) --

                Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

                A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                  The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • Projection (dict) --

              Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

              • ProjectionType (string) --

                The set of attributes that are projected into the index:

                • KEYS_ONLY - Only the index and primary keys are projected into the index.

                • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

                • ALL - All of the table attributes are projected into the index.

                When using the DynamoDB console, ALL is selected by default.

              • NonKeyAttributes (list) --

                Represents the non-key attribute names which will be projected into the index.

                For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

                • (string) --

            • ProvisionedThroughput (dict) --

              Represents the provisioned throughput settings for the specified global secondary index.

              For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

              • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

              • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

            • OnDemandThroughput (dict) --

              The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

              • MaxReadRequestUnits (integer) --

                Maximum number of read request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

              • MaxWriteRequestUnits (integer) --

                Maximum number of write request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • StartTime (datetime) --

        The time when this import task started.

      • EndTime (datetime) --

        The time at which the creation of the table associated with this import task completed.

      • ProcessedSizeBytes (integer) --

        The total size of data processed from the source file, in Bytes.

      • ProcessedItemCount (integer) --

        The total number of items processed from the source file.

      • ImportedItemCount (integer) --

        The number of items successfully imported into the new table.

      • FailureCode (string) --

        The error code corresponding to the failure that the import job ran into during execution.

      • FailureMessage (string) --

        The error message corresponding to the failure that the import job ran into during execution.

DescribeTable (updated) Link ¶
Changes (response)
{'Table': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                             'MaxWriteRequestUnits': 'long'}},
           'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                  'MaxWriteRequestUnits': 'long'},
           'Replicas': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                        'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

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.

Warning

This operation only applies to Version 2019.11.21 (Current) of global tables.

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'
)
type TableName

string

param TableName

[REQUIRED]

The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

rtype

dict

returns

Response Syntax

{
    'Table': {
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'TableName': 'string',
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'CreationDateTime': datetime(2015, 1, 1),
        'ProvisionedThroughput': {
            'LastIncreaseDateTime': datetime(2015, 1, 1),
            'LastDecreaseDateTime': datetime(2015, 1, 1),
            'NumberOfDecreasesToday': 123,
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'TableSizeBytes': 123,
        'ItemCount': 123,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string',
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'GlobalTableVersion': 'string',
        'Replicas': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string',
            'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
        },
        'ArchivalSummary': {
            'ArchivalDateTime': datetime(2015, 1, 1),
            'ArchivalReason': 'string',
            'ArchivalBackupArn': 'string'
        },
        'TableClassSummary': {
            'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
            'LastUpdateDateTime': datetime(2015, 1, 1)
        },
        'DeletionProtectionEnabled': True|False,
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        }
    }
}

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 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide .

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING .

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

        • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

        • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

        • ARCHIVED - The table has been archived. See the ArchivalReason for more information.

      • CreationDateTime (datetime) --

        The date and time when the table was created, in UNIX epoch time format.

      • ProvisionedThroughput (dict) --

        The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

        • LastIncreaseDateTime (datetime) --

          The date and time of the last provisioned throughput increase for this table.

        • LastDecreaseDateTime (datetime) --

          The date and time of the last provisioned throughput decrease for this table.

        • NumberOfDecreasesToday (integer) --

          The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

        • LastUpdateToPayPerRequestDateTime (datetime) --

          Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:

        • IndexName - The name of the local secondary index.

        • KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.

        • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

          • ProjectionType - One of the following:

            • KEYS_ONLY - Only the index and primary keys are projected into the index.

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexSizeBytes (integer) --

            The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • ItemCount (integer) --

            The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • IndexArn (string) --

            The Amazon Resource Name (ARN) that uniquely identifies the index.

      • GlobalSecondaryIndexes (list) --

        The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.) You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

            • ALL - All of the table attributes are projected into the index.

          • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

            Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING 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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • LastIncreaseDateTime (datetime) --

              The date and time of the last provisioned throughput increase for this table.

            • LastDecreaseDateTime (datetime) --

              The date and time of the last provisioned throughput decrease for this table.

            • NumberOfDecreasesToday (integer) --

              The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

          • OnDemandThroughput (dict) --

            The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

            • MaxWriteRequestUnits (integer) --

              Maximum number of write request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • 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:

        • Amazon Web Services customer ID

        • Table name

        • StreamLabel

      • LatestStreamArn (string) --

        The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

      • GlobalTableVersion (string) --

        Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

      • Replicas (list) --

        Represents replicas of the table.

        • (dict) --

          Contains the details of the replica.

          • RegionName (string) --

            The name of the Region.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup from which the table was restored.

        • SourceTableArn (string) --

          The ARN of the source table of the backup that is being restored.

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

        The description of the server-side encryption status on the specified table.

        • Status (string) --

          Represents the current state of server-side encryption. The only supported values are:

          • ENABLED - Server-side encryption is enabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type. The only supported value is:

          • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

        • KMSMasterKeyArn (string) --

          The KMS key ARN used for the KMS encryption.

        • InaccessibleEncryptionDateTime (datetime) --

          Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

      • ArchivalSummary (dict) --

        Contains information about the table archive.

        • ArchivalDateTime (datetime) --

          The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

        • ArchivalReason (string) --

          The reason DynamoDB archived the table. Currently, the only possible value is:

          • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

        • ArchivalBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

      • TableClassSummary (dict) --

        Contains details of the table class.

        • TableClass (string) --

          The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

        • LastUpdateDateTime (datetime) --

          The date and time at which the table class was last updated.

      • DeletionProtectionEnabled (boolean) --

        Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

ImportTable (updated) Link ¶
Changes (request, response)
Request
{'TableCreationParameters': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                               'MaxWriteRequestUnits': 'long'}},
                             'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                    'MaxWriteRequestUnits': 'long'}}}
Response
{'ImportTableDescription': {'TableCreationParameters': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                                                          'MaxWriteRequestUnits': 'long'}},
                                                        'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                               'MaxWriteRequestUnits': 'long'}}}}

Imports table data from an S3 bucket.

See also: AWS API Documentation

Request Syntax

client.import_table(
    ClientToken='string',
    S3BucketSource={
        'S3BucketOwner': 'string',
        'S3Bucket': 'string',
        'S3KeyPrefix': 'string'
    },
    InputFormat='DYNAMODB_JSON'|'ION'|'CSV',
    InputFormatOptions={
        'Csv': {
            'Delimiter': 'string',
            'HeaderList': [
                'string',
            ]
        }
    },
    InputCompressionType='GZIP'|'ZSTD'|'NONE',
    TableCreationParameters={
        'TableName': 'string',
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
        'ProvisionedThroughput': {
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        },
        'SSESpecification': {
            'Enabled': True|False,
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyId': 'string'
        },
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'ProvisionedThroughput': {
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ]
    }
)
type ClientToken

string

param ClientToken

Providing a ClientToken makes the call to ImportTableInput idempotent, meaning that multiple identical calls have the same effect as one single call.

A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent.

If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, DynamoDB returns an IdempotentParameterMismatch exception.

This field is autopopulated if not provided.

type S3BucketSource

dict

param S3BucketSource

[REQUIRED]

The S3 bucket that provides the source for the import.

  • S3BucketOwner (string) --

    The account number of the S3 bucket that is being imported from. If the bucket is owned by the requester this is optional.

  • S3Bucket (string) -- [REQUIRED]

    The S3 bucket that is being imported from.

  • S3KeyPrefix (string) --

    The key prefix shared by all S3 Objects that are being imported.

type InputFormat

string

param InputFormat

[REQUIRED]

The format of the source data. Valid values for ImportFormat are CSV , DYNAMODB_JSON or ION .

type InputFormatOptions

dict

param InputFormatOptions

Additional properties that specify how the input is formatted,

  • Csv (dict) --

    The options for imported source files in CSV format. The values are Delimiter and HeaderList.

    • Delimiter (string) --

      The delimiter used for separating items in the CSV file being imported.

    • HeaderList (list) --

      List of the headers used to specify a common header for all source CSV files being imported. If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.

      • (string) --

type InputCompressionType

string

param InputCompressionType

Type of compression to be used on the input coming from the imported table.

type TableCreationParameters

dict

param TableCreationParameters

[REQUIRED]

Parameters for the table to import the data into.

  • TableName (string) -- [REQUIRED]

    The name of the table created as part of the import operation.

  • AttributeDefinitions (list) -- [REQUIRED]

    The attributes of the table created as part of the import operation.

    • (dict) --

      Represents an attribute for describing the 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

  • KeySchema (list) -- [REQUIRED]

    The primary key and option sort key of the table created as part of the import operation.

    • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

  • BillingMode (string) --

    The billing mode for provisioning the table created as part of the import operation.

  • ProvisionedThroughput (dict) --

    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 Service, Account, and Table Quotas 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 .

      If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

    • 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 .

      If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

  • OnDemandThroughput (dict) --

    Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

    • MaxReadRequestUnits (integer) --

      Maximum number of read request units for the specified table.

      To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

    • MaxWriteRequestUnits (integer) --

      Maximum number of write request units for the specified table.

      To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

  • SSESpecification (dict) --

    Represents the settings used to enable server-side encryption.

    • Enabled (boolean) --

      Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

    • SSEType (string) --

      Server-side encryption type. The only supported value is:

      • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

    • KMSMasterKeyId (string) --

      The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

  • GlobalSecondaryIndexes (list) --

    The Global Secondary Indexes (GSI) of the table to be created as part of the import operation.

    • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

          • ALL - All of the table attributes are projected into the index.

          When using the DynamoDB console, ALL is selected by default.

        • NonKeyAttributes (list) --

          Represents the non-key attribute names which will be projected into the index.

          For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

          • (string) --

      • ProvisionedThroughput (dict) --

        Represents the provisioned throughput settings for the specified global secondary index.

        For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • 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 .

          If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • 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 .

          If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

rtype

dict

returns

Response Syntax

{
    'ImportTableDescription': {
        'ImportArn': 'string',
        'ImportStatus': 'IN_PROGRESS'|'COMPLETED'|'CANCELLING'|'CANCELLED'|'FAILED',
        'TableArn': 'string',
        'TableId': 'string',
        'ClientToken': 'string',
        'S3BucketSource': {
            'S3BucketOwner': 'string',
            'S3Bucket': 'string',
            'S3KeyPrefix': 'string'
        },
        'ErrorCount': 123,
        'CloudWatchLogGroupArn': 'string',
        'InputFormat': 'DYNAMODB_JSON'|'ION'|'CSV',
        'InputFormatOptions': {
            'Csv': {
                'Delimiter': 'string',
                'HeaderList': [
                    'string',
                ]
            }
        },
        'InputCompressionType': 'GZIP'|'ZSTD'|'NONE',
        'TableCreationParameters': {
            'TableName': 'string',
            'AttributeDefinitions': [
                {
                    'AttributeName': 'string',
                    'AttributeType': 'S'|'N'|'B'
                },
            ],
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'ProvisionedThroughput': {
                'ReadCapacityUnits': 123,
                'WriteCapacityUnits': 123
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            },
            'SSESpecification': {
                'Enabled': True|False,
                'SSEType': 'AES256'|'KMS',
                'KMSMasterKeyId': 'string'
            },
            'GlobalSecondaryIndexes': [
                {
                    'IndexName': 'string',
                    'KeySchema': [
                        {
                            'AttributeName': 'string',
                            'KeyType': 'HASH'|'RANGE'
                        },
                    ],
                    'Projection': {
                        'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                        'NonKeyAttributes': [
                            'string',
                        ]
                    },
                    'ProvisionedThroughput': {
                        'ReadCapacityUnits': 123,
                        'WriteCapacityUnits': 123
                    },
                    'OnDemandThroughput': {
                        'MaxReadRequestUnits': 123,
                        'MaxWriteRequestUnits': 123
                    }
                },
            ]
        },
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'ProcessedSizeBytes': 123,
        'ProcessedItemCount': 123,
        'ImportedItemCount': 123,
        'FailureCode': 'string',
        'FailureMessage': 'string'
    }
}

Response Structure

  • (dict) --

    • ImportTableDescription (dict) --

      Represents the properties of the table created for the import, and parameters of the import. The import parameters include import status, how many items were processed, and how many errors were encountered.

      • ImportArn (string) --

        The Amazon Resource Number (ARN) corresponding to the import request.

      • ImportStatus (string) --

        The status of the import.

      • TableArn (string) --

        The Amazon Resource Number (ARN) of the table being imported into.

      • TableId (string) --

        The table id corresponding to the table created by import table process.

      • ClientToken (string) --

        The client token that was provided for the import task. Reusing the client token on retry makes a call to ImportTable idempotent.

      • S3BucketSource (dict) --

        Values for the S3 bucket the source file is imported from. Includes bucket name (required), key prefix (optional) and bucket account owner ID (optional).

        • S3BucketOwner (string) --

          The account number of the S3 bucket that is being imported from. If the bucket is owned by the requester this is optional.

        • S3Bucket (string) --

          The S3 bucket that is being imported from.

        • S3KeyPrefix (string) --

          The key prefix shared by all S3 Objects that are being imported.

      • ErrorCount (integer) --

        The number of errors occurred on importing the source file into the target table.

      • CloudWatchLogGroupArn (string) --

        The Amazon Resource Number (ARN) of the Cloudwatch Log Group associated with the target table.

      • InputFormat (string) --

        The format of the source data going into the target table.

      • InputFormatOptions (dict) --

        The format options for the data that was imported into the target table. There is one value, CsvOption.

        • Csv (dict) --

          The options for imported source files in CSV format. The values are Delimiter and HeaderList.

          • Delimiter (string) --

            The delimiter used for separating items in the CSV file being imported.

          • HeaderList (list) --

            List of the headers used to specify a common header for all source CSV files being imported. If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.

            • (string) --

      • InputCompressionType (string) --

        The compression options for the data that has been imported into the target table. The values are NONE, GZIP, or ZSTD.

      • TableCreationParameters (dict) --

        The parameters for the new table that is being imported into.

        • TableName (string) --

          The name of the table created as part of the import operation.

        • AttributeDefinitions (list) --

          The attributes of the table created as part of the import operation.

          • (dict) --

            Represents an attribute for describing the schema for the table and indexes.

            • AttributeName (string) --

              A name for the attribute.

            • AttributeType (string) --

              The data type for the attribute, where:

              • S - the attribute is of type String

              • N - the attribute is of type Number

              • B - the attribute is of type Binary

        • KeySchema (list) --

          The primary key and option sort key of the table created as part of the import operation.

          • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        • BillingMode (string) --

          The billing mode for provisioning the table created as part of the import operation.

        • ProvisionedThroughput (dict) --

          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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

          • ReadCapacityUnits (integer) --

            The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

          • 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 .

            If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • OnDemandThroughput (dict) --

          Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

          • MaxReadRequestUnits (integer) --

            Maximum number of read request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

          • MaxWriteRequestUnits (integer) --

            Maximum number of write request units for the specified table.

            To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

        • SSESpecification (dict) --

          Represents the settings used to enable server-side encryption.

          • Enabled (boolean) --

            Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

          • SSEType (string) --

            Server-side encryption type. The only supported value is:

            • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

          • KMSMasterKeyId (string) --

            The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

        • GlobalSecondaryIndexes (list) --

          The Global Secondary Indexes (GSI) of the table to be created as part of the import operation.

          • (dict) --

            Represents the properties of a global secondary index.

            • IndexName (string) --

              The name of the global secondary index. The name must be unique among all other indexes on this table.

            • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

              The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

              • (dict) --

                Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

                A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                  The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • Projection (dict) --

              Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

              • ProjectionType (string) --

                The set of attributes that are projected into the index:

                • KEYS_ONLY - Only the index and primary keys are projected into the index.

                • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

                • ALL - All of the table attributes are projected into the index.

                When using the DynamoDB console, ALL is selected by default.

              • NonKeyAttributes (list) --

                Represents the non-key attribute names which will be projected into the index.

                For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

                • (string) --

            • ProvisionedThroughput (dict) --

              Represents the provisioned throughput settings for the specified global secondary index.

              For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

              • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

              • 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 .

                If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

            • OnDemandThroughput (dict) --

              The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

              • MaxReadRequestUnits (integer) --

                Maximum number of read request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

              • MaxWriteRequestUnits (integer) --

                Maximum number of write request units for the specified table.

                To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • StartTime (datetime) --

        The time when this import task started.

      • EndTime (datetime) --

        The time at which the creation of the table associated with this import task completed.

      • ProcessedSizeBytes (integer) --

        The total size of data processed from the source file, in Bytes.

      • ProcessedItemCount (integer) --

        The total number of items processed from the source file.

      • ImportedItemCount (integer) --

        The number of items successfully imported into the new table.

      • FailureCode (string) --

        The error code corresponding to the failure that the import job ran into during execution.

      • FailureMessage (string) --

        The error message corresponding to the failure that the import job ran into during execution.

RestoreTableFromBackup (updated) Link ¶
Changes (request, response)
Request
{'GlobalSecondaryIndexOverride': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                         'MaxWriteRequestUnits': 'long'}},
 'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long',
                                'MaxWriteRequestUnits': 'long'}}
Response
{'TableDescription': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                        'MaxWriteRequestUnits': 'long'}},
                      'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                             'MaxWriteRequestUnits': 'long'},
                      'Replicas': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                   'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

Creates a new table from an existing backup. Any number of users can execute up to 50 concurrent restores (any type of restore) 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

  • Amazon CloudWatch metrics and alarms

  • Tags

  • Stream settings

  • Time to Live (TTL) settings

See also: AWS API Documentation

Request Syntax

client.restore_table_from_backup(
    TargetTableName='string',
    BackupArn='string',
    BillingModeOverride='PROVISIONED'|'PAY_PER_REQUEST',
    GlobalSecondaryIndexOverride=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            },
            'ProvisionedThroughput': {
                'ReadCapacityUnits': 123,
                'WriteCapacityUnits': 123
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            }
        },
    ],
    LocalSecondaryIndexOverride=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            }
        },
    ],
    ProvisionedThroughputOverride={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    },
    OnDemandThroughputOverride={
        'MaxReadRequestUnits': 123,
        'MaxWriteRequestUnits': 123
    },
    SSESpecificationOverride={
        'Enabled': True|False,
        'SSEType': 'AES256'|'KMS',
        'KMSMasterKeyId': 'string'
    }
)
type TargetTableName

string

param TargetTableName

[REQUIRED]

The name of the new table to which the backup must be restored.

type BackupArn

string

param BackupArn

[REQUIRED]

The Amazon Resource Name (ARN) associated with the backup.

type BillingModeOverride

string

param BillingModeOverride

The billing mode of the restored table.

type GlobalSecondaryIndexOverride

list

param GlobalSecondaryIndexOverride

List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.

  • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • (dict) --

        Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

          The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

    • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

        • ALL - All of the table attributes are projected into the index.

        When using the DynamoDB console, ALL is selected by default.

      • NonKeyAttributes (list) --

        Represents the non-key attribute names which will be projected into the index.

        For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • (string) --

    • ProvisionedThroughput (dict) --

      Represents the provisioned throughput settings for the specified global secondary index.

      For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

      • 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 .

        If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

      • 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 .

        If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

    • OnDemandThroughput (dict) --

      The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

      • MaxReadRequestUnits (integer) --

        Maximum number of read request units for the specified table.

        To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

      • MaxWriteRequestUnits (integer) --

        Maximum number of write request units for the specified table.

        To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

type LocalSecondaryIndexOverride

list

param LocalSecondaryIndexOverride

List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.

  • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • (dict) --

        Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

          The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

    • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

        • ALL - All of the table attributes are projected into the index.

        When using the DynamoDB console, ALL is selected by default.

      • NonKeyAttributes (list) --

        Represents the non-key attribute names which will be projected into the index.

        For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • (string) --

type ProvisionedThroughputOverride

dict

param ProvisionedThroughputOverride

Provisioned throughput settings for the restored table.

  • 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

  • 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

type OnDemandThroughputOverride

dict

param OnDemandThroughputOverride

Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

  • MaxReadRequestUnits (integer) --

    Maximum number of read request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

  • MaxWriteRequestUnits (integer) --

    Maximum number of write request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

type SSESpecificationOverride

dict

param SSESpecificationOverride

The new server-side encryption settings for the restored table.

  • Enabled (boolean) --

    Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

  • SSEType (string) --

    Server-side encryption type. The only supported value is:

    • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

  • KMSMasterKeyId (string) --

    The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

rtype

dict

returns

Response Syntax

{
    'TableDescription': {
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'TableName': 'string',
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'CreationDateTime': datetime(2015, 1, 1),
        'ProvisionedThroughput': {
            'LastIncreaseDateTime': datetime(2015, 1, 1),
            'LastDecreaseDateTime': datetime(2015, 1, 1),
            'NumberOfDecreasesToday': 123,
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'TableSizeBytes': 123,
        'ItemCount': 123,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string',
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'GlobalTableVersion': 'string',
        'Replicas': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string',
            'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
        },
        'ArchivalSummary': {
            'ArchivalDateTime': datetime(2015, 1, 1),
            'ArchivalReason': 'string',
            'ArchivalBackupArn': 'string'
        },
        'TableClassSummary': {
            'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
            'LastUpdateDateTime': datetime(2015, 1, 1)
        },
        'DeletionProtectionEnabled': True|False,
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        }
    }
}

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 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide .

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING .

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

        • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

        • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

        • ARCHIVED - The table has been archived. See the ArchivalReason for more information.

      • CreationDateTime (datetime) --

        The date and time when the table was created, in UNIX epoch time format.

      • ProvisionedThroughput (dict) --

        The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

        • LastIncreaseDateTime (datetime) --

          The date and time of the last provisioned throughput increase for this table.

        • LastDecreaseDateTime (datetime) --

          The date and time of the last provisioned throughput decrease for this table.

        • NumberOfDecreasesToday (integer) --

          The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

        • LastUpdateToPayPerRequestDateTime (datetime) --

          Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:

        • IndexName - The name of the local secondary index.

        • KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.

        • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

          • ProjectionType - One of the following:

            • KEYS_ONLY - Only the index and primary keys are projected into the index.

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexSizeBytes (integer) --

            The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • ItemCount (integer) --

            The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • IndexArn (string) --

            The Amazon Resource Name (ARN) that uniquely identifies the index.

      • GlobalSecondaryIndexes (list) --

        The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.) You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

            • ALL - All of the table attributes are projected into the index.

          • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

            Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING 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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • LastIncreaseDateTime (datetime) --

              The date and time of the last provisioned throughput increase for this table.

            • LastDecreaseDateTime (datetime) --

              The date and time of the last provisioned throughput decrease for this table.

            • NumberOfDecreasesToday (integer) --

              The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

          • OnDemandThroughput (dict) --

            The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

            • MaxWriteRequestUnits (integer) --

              Maximum number of write request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • 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:

        • Amazon Web Services customer ID

        • Table name

        • StreamLabel

      • LatestStreamArn (string) --

        The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

      • GlobalTableVersion (string) --

        Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

      • Replicas (list) --

        Represents replicas of the table.

        • (dict) --

          Contains the details of the replica.

          • RegionName (string) --

            The name of the Region.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup from which the table was restored.

        • SourceTableArn (string) --

          The ARN of the source table of the backup that is being restored.

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

        The description of the server-side encryption status on the specified table.

        • Status (string) --

          Represents the current state of server-side encryption. The only supported values are:

          • ENABLED - Server-side encryption is enabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type. The only supported value is:

          • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

        • KMSMasterKeyArn (string) --

          The KMS key ARN used for the KMS encryption.

        • InaccessibleEncryptionDateTime (datetime) --

          Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

      • ArchivalSummary (dict) --

        Contains information about the table archive.

        • ArchivalDateTime (datetime) --

          The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

        • ArchivalReason (string) --

          The reason DynamoDB archived the table. Currently, the only possible value is:

          • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

        • ArchivalBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

      • TableClassSummary (dict) --

        Contains details of the table class.

        • TableClass (string) --

          The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

        • LastUpdateDateTime (datetime) --

          The date and time at which the table class was last updated.

      • DeletionProtectionEnabled (boolean) --

        Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

RestoreTableToPointInTime (updated) Link ¶
Changes (request, response)
Request
{'GlobalSecondaryIndexOverride': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                         'MaxWriteRequestUnits': 'long'}},
 'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long',
                                'MaxWriteRequestUnits': 'long'}}
Response
{'TableDescription': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                        'MaxWriteRequestUnits': 'long'}},
                      'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                             'MaxWriteRequestUnits': 'long'},
                      'Replicas': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                   'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

Restores the specified table to the specified point in time within EarliestRestorableDateTime and LatestRestorableDateTime . You can restore your table to any point in time during the last 35 days. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table.

Along with data, the following are also included on the new restored table using point in time recovery:

  • Global secondary indexes (GSIs)

  • Local secondary indexes (LSIs)

  • Provisioned read and write capacity

  • Encryption settings

Warning

All these settings come from the current settings of the source table at the time of restore.

You must manually set up the following on the restored table:

  • Auto scaling policies

  • IAM policies

  • Amazon CloudWatch metrics and alarms

  • Tags

  • Stream settings

  • Time to Live (TTL) settings

  • Point in time recovery settings

See also: AWS API Documentation

Request Syntax

client.restore_table_to_point_in_time(
    SourceTableArn='string',
    SourceTableName='string',
    TargetTableName='string',
    UseLatestRestorableTime=True|False,
    RestoreDateTime=datetime(2015, 1, 1),
    BillingModeOverride='PROVISIONED'|'PAY_PER_REQUEST',
    GlobalSecondaryIndexOverride=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            },
            'ProvisionedThroughput': {
                'ReadCapacityUnits': 123,
                'WriteCapacityUnits': 123
            },
            'OnDemandThroughput': {
                'MaxReadRequestUnits': 123,
                'MaxWriteRequestUnits': 123
            }
        },
    ],
    LocalSecondaryIndexOverride=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            }
        },
    ],
    ProvisionedThroughputOverride={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    },
    OnDemandThroughputOverride={
        'MaxReadRequestUnits': 123,
        'MaxWriteRequestUnits': 123
    },
    SSESpecificationOverride={
        'Enabled': True|False,
        'SSEType': 'AES256'|'KMS',
        'KMSMasterKeyId': 'string'
    }
)
type SourceTableArn

string

param SourceTableArn

The DynamoDB table that will be restored. This value is an Amazon Resource Name (ARN).

type SourceTableName

string

param SourceTableName

Name of the source table that is being restored.

type TargetTableName

string

param TargetTableName

[REQUIRED]

The name of the new table to which it must be restored to.

type UseLatestRestorableTime

boolean

param UseLatestRestorableTime

Restore the table to the latest possible time. LatestRestorableDateTime is typically 5 minutes before the current time.

type RestoreDateTime

datetime

param RestoreDateTime

Time in the past to restore the table to.

type BillingModeOverride

string

param BillingModeOverride

The billing mode of the restored table.

type GlobalSecondaryIndexOverride

list

param GlobalSecondaryIndexOverride

List of global secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.

  • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • (dict) --

        Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

          The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

    • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

        • ALL - All of the table attributes are projected into the index.

        When using the DynamoDB console, ALL is selected by default.

      • NonKeyAttributes (list) --

        Represents the non-key attribute names which will be projected into the index.

        For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • (string) --

    • ProvisionedThroughput (dict) --

      Represents the provisioned throughput settings for the specified global secondary index.

      For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

      • 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 .

        If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

      • 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 .

        If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

    • OnDemandThroughput (dict) --

      The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

      • MaxReadRequestUnits (integer) --

        Maximum number of read request units for the specified table.

        To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

      • MaxWriteRequestUnits (integer) --

        Maximum number of write request units for the specified table.

        To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

type LocalSecondaryIndexOverride

list

param LocalSecondaryIndexOverride

List of local secondary indexes for the restored table. The indexes provided should match existing secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.

  • (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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

      The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • (dict) --

        Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

          The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

    • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

        • ALL - All of the table attributes are projected into the index.

        When using the DynamoDB console, ALL is selected by default.

      • NonKeyAttributes (list) --

        Represents the non-key attribute names which will be projected into the index.

        For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • (string) --

type ProvisionedThroughputOverride

dict

param ProvisionedThroughputOverride

Provisioned throughput settings for the restored table.

  • 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

  • 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

type OnDemandThroughputOverride

dict

param OnDemandThroughputOverride

Sets the maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

  • MaxReadRequestUnits (integer) --

    Maximum number of read request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

  • MaxWriteRequestUnits (integer) --

    Maximum number of write request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

type SSESpecificationOverride

dict

param SSESpecificationOverride

The new server-side encryption settings for the restored table.

  • Enabled (boolean) --

    Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

  • SSEType (string) --

    Server-side encryption type. The only supported value is:

    • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

  • KMSMasterKeyId (string) --

    The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

rtype

dict

returns

Response Syntax

{
    'TableDescription': {
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'TableName': 'string',
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'CreationDateTime': datetime(2015, 1, 1),
        'ProvisionedThroughput': {
            'LastIncreaseDateTime': datetime(2015, 1, 1),
            'LastDecreaseDateTime': datetime(2015, 1, 1),
            'NumberOfDecreasesToday': 123,
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'TableSizeBytes': 123,
        'ItemCount': 123,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string',
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'GlobalTableVersion': 'string',
        'Replicas': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string',
            'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
        },
        'ArchivalSummary': {
            'ArchivalDateTime': datetime(2015, 1, 1),
            'ArchivalReason': 'string',
            'ArchivalBackupArn': 'string'
        },
        'TableClassSummary': {
            'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
            'LastUpdateDateTime': datetime(2015, 1, 1)
        },
        'DeletionProtectionEnabled': True|False,
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        }
    }
}

Response Structure

  • (dict) --

    • TableDescription (dict) --

      Represents the properties of a table.

      • AttributeDefinitions (list) --

        An array of AttributeDefinition objects. Each of these objects describes one attribute in the table and index key schema.

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

          Represents an attribute for describing the schema for the table and indexes.

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute, where:

            • S - the attribute is of type 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide .

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING .

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

        • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

        • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

        • ARCHIVED - The table has been archived. See the ArchivalReason for more information.

      • CreationDateTime (datetime) --

        The date and time when the table was created, in UNIX epoch time format.

      • ProvisionedThroughput (dict) --

        The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

        • LastIncreaseDateTime (datetime) --

          The date and time of the last provisioned throughput increase for this table.

        • LastDecreaseDateTime (datetime) --

          The date and time of the last provisioned throughput decrease for this table.

        • NumberOfDecreasesToday (integer) --

          The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

        • LastUpdateToPayPerRequestDateTime (datetime) --

          Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:

        • IndexName - The name of the local secondary index.

        • KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.

        • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

          • ProjectionType - One of the following:

            • KEYS_ONLY - Only the index and primary keys are projected into the index.

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexSizeBytes (integer) --

            The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • ItemCount (integer) --

            The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • IndexArn (string) --

            The Amazon Resource Name (ARN) that uniquely identifies the index.

      • GlobalSecondaryIndexes (list) --

        The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.) You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

            • ALL - All of the table attributes are projected into the index.

          • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

            Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING 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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • LastIncreaseDateTime (datetime) --

              The date and time of the last provisioned throughput increase for this table.

            • LastDecreaseDateTime (datetime) --

              The date and time of the last provisioned throughput decrease for this table.

            • NumberOfDecreasesToday (integer) --

              The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

          • OnDemandThroughput (dict) --

            The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

            • MaxWriteRequestUnits (integer) --

              Maximum number of write request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • 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:

        • Amazon Web Services customer ID

        • Table name

        • StreamLabel

      • LatestStreamArn (string) --

        The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

      • GlobalTableVersion (string) --

        Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

      • Replicas (list) --

        Represents replicas of the table.

        • (dict) --

          Contains the details of the replica.

          • RegionName (string) --

            The name of the Region.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup from which the table was restored.

        • SourceTableArn (string) --

          The ARN of the source table of the backup that is being restored.

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

        The description of the server-side encryption status on the specified table.

        • Status (string) --

          Represents the current state of server-side encryption. The only supported values are:

          • ENABLED - Server-side encryption is enabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type. The only supported value is:

          • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

        • KMSMasterKeyArn (string) --

          The KMS key ARN used for the KMS encryption.

        • InaccessibleEncryptionDateTime (datetime) --

          Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

      • ArchivalSummary (dict) --

        Contains information about the table archive.

        • ArchivalDateTime (datetime) --

          The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

        • ArchivalReason (string) --

          The reason DynamoDB archived the table. Currently, the only possible value is:

          • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

        • ArchivalBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

      • TableClassSummary (dict) --

        Contains details of the table class.

        • TableClass (string) --

          The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

        • LastUpdateDateTime (datetime) --

          The date and time at which the table class was last updated.

      • DeletionProtectionEnabled (boolean) --

        Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

UpdateGlobalTable (updated) Link ¶
Changes (response)
{'GlobalTableDescription': {'ReplicationGroup': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                                 'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

Adds or removes replicas in the specified global table. The global table must already exist to be able to use this operation. Any replica to be added must be empty, have the same name as the global table, have the same key schema, have DynamoDB Streams enabled, and have the same provisioned and maximum write capacity units.

Warning

This operation only applies to Version 2017.11.29 (Legacy) of global tables. We recommend using Version 2019.11.21 (Current) when creating new global tables, as it provides greater flexibility, higher efficiency and consumes less write capacity than 2017.11.29 (Legacy). To determine which version you are using, see Determining the version. To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see Updating global tables.

Note

This operation only applies to Version 2017.11.29 of global tables. If you are using global tables Version 2019.11.21 you can use UpdateTable instead.

Although you can use UpdateGlobalTable to add replicas and remove replicas in a single request, for simplicity we recommend that you issue separate requests for adding or removing replicas.

If global secondary indexes are specified, then the following conditions must also be met:

  • The global secondary indexes must have the same name.

  • The global secondary indexes must have the same hash key and sort key (if present).

  • The global secondary indexes must have the same provisioned and maximum write capacity units.

See also: AWS API Documentation

Request Syntax

client.update_global_table(
    GlobalTableName='string',
    ReplicaUpdates=[
        {
            'Create': {
                'RegionName': 'string'
            },
            'Delete': {
                'RegionName': 'string'
            }
        },
    ]
)
type GlobalTableName

string

param GlobalTableName

[REQUIRED]

The global table name.

type ReplicaUpdates

list

param ReplicaUpdates

[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.

rtype

dict

returns

Response Syntax

{
    'GlobalTableDescription': {
        'ReplicationGroup': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        '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.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • 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.

UpdateTable (updated) Link ¶
Changes (request, response)
Request
{'GlobalSecondaryIndexUpdates': {'Create': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                   'MaxWriteRequestUnits': 'long'}},
                                 'Update': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                   'MaxWriteRequestUnits': 'long'}}},
 'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                        'MaxWriteRequestUnits': 'long'},
 'ReplicaUpdates': {'Create': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                               'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                    'Update': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                               'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}
Response
{'TableDescription': {'GlobalSecondaryIndexes': {'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                                                        'MaxWriteRequestUnits': 'long'}},
                      'OnDemandThroughput': {'MaxReadRequestUnits': 'long',
                                             'MaxWriteRequestUnits': 'long'},
                      'Replicas': {'GlobalSecondaryIndexes': {'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}},
                                   'OnDemandThroughputOverride': {'MaxReadRequestUnits': 'long'}}}}

Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.

Warning

This operation only applies to Version 2019.11.21 (Current) of global tables.

You can only perform one of the following operations at once:

  • Modify the provisioned throughput settings of the table.

  • Remove a global secondary index from the table.

  • Create a new global secondary index on the table. After the index begins backfilling, you can use UpdateTable to perform other operations.

UpdateTable is an asynchronous operation; while it's executing, the table status changes from ACTIVE to UPDATING . While it's UPDATING , you can't 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',
    BillingMode='PROVISIONED'|'PAY_PER_REQUEST',
    ProvisionedThroughput={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    },
    GlobalSecondaryIndexUpdates=[
        {
            'Update': {
                'IndexName': 'string',
                'ProvisionedThroughput': {
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
            'Create': {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'ProvisionedThroughput': {
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
            'Delete': {
                'IndexName': 'string'
            }
        },
    ],
    StreamSpecification={
        'StreamEnabled': True|False,
        'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
    },
    SSESpecification={
        'Enabled': True|False,
        'SSEType': 'AES256'|'KMS',
        'KMSMasterKeyId': 'string'
    },
    ReplicaUpdates=[
        {
            'Create': {
                'RegionName': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'TableClassOverride': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS'
            },
            'Update': {
                'RegionName': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'TableClassOverride': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS'
            },
            'Delete': {
                'RegionName': 'string'
            }
        },
    ],
    TableClass='STANDARD'|'STANDARD_INFREQUENT_ACCESS',
    DeletionProtectionEnabled=True|False,
    OnDemandThroughput={
        'MaxReadRequestUnits': 123,
        'MaxWriteRequestUnits': 123
    }
)
type AttributeDefinitions

list

param AttributeDefinitions

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 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

type TableName

string

param TableName

[REQUIRED]

The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

type BillingMode

string

param BillingMode

Controls how you are charged for read and write throughput and how you manage capacity. When switching from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned capacity values are estimated based on the consumed read and write capacity of your table and global secondary indexes over the past 30 minutes.

  • PROVISIONED - We recommend using PROVISIONED for predictable workloads. PROVISIONED sets the billing mode to Provisioned Mode.

  • PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. PAY_PER_REQUEST sets the billing mode to On-Demand Mode.

type ProvisionedThroughput

dict

param ProvisionedThroughput

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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

  • 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 .

    If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

type GlobalSecondaryIndexUpdates

list

param GlobalSecondaryIndexUpdates

An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:

  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

You can create or delete only one global secondary index per UpdateTable operation.

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) --

        Represents the provisioned throughput settings for the specified global secondary index.

        For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • 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 .

          If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • 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 .

          If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

      • OnDemandThroughput (dict) --

        Updates the maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

    • 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • Projection (dict) -- [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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

          • ALL - All of the table attributes are projected into the index.

          When using the DynamoDB console, ALL is selected by default.

        • NonKeyAttributes (list) --

          Represents the non-key attribute names which will be projected into the index.

          For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

          • (string) --

      • ProvisionedThroughput (dict) --

        Represents the provisioned throughput settings for the specified global secondary index.

        For current minimum and maximum provisioned throughput values, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • 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 .

          If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

        • 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 .

          If read/write capacity mode is PAY_PER_REQUEST the value is set to 0.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the global secondary index being created. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

    • 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.

type StreamSpecification

dict

param StreamSpecification

Represents the DynamoDB Streams configuration for the table.

Note

You receive a ValidationException if you try to enable a stream on a table that already has a stream, or if you try to disable a stream on a table that doesn't have a stream.

  • StreamEnabled (boolean) -- [REQUIRED]

    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.

type SSESpecification

dict

param SSESpecification

The new server-side encryption settings for the specified table.

  • Enabled (boolean) --

    Indicates whether server-side encryption is done using an Amazon Web Services managed key or an Amazon Web Services owned key. If enabled (true), server-side encryption type is set to KMS and an Amazon Web Services managed key is used (KMS charges apply). If disabled (false) or not specified, server-side encryption is set to Amazon Web Services owned key.

  • SSEType (string) --

    Server-side encryption type. The only supported value is:

    • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

  • KMSMasterKeyId (string) --

    The KMS key that should be used for the KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key alias/aws/dynamodb .

type ReplicaUpdates

list

param ReplicaUpdates

A list of replica update actions (create, delete, or update) for the table.

Note

This property only applies to Version 2019.11.21 (Current) of global tables.

  • (dict) --

    Represents one of the following:

    • A new replica to be added to an existing regional table or global table. This request invokes the CreateTableReplica action in the destination Region.

    • New parameters for an existing replica. This request invokes the UpdateTable action in the destination Region.

    • An existing replica to be deleted. The request invokes the DeleteTableReplica action in the destination Region, deleting the replica and all if its items in the destination Region.

    Note

    When you manually remove a table or global table replica, you do not automatically remove any associated scalable targets, scaling policies, or CloudWatch alarms.

    • Create (dict) --

      The parameters required for creating a replica for the table.

      • RegionName (string) -- [REQUIRED]

        The Region where the new replica will be created.

      • KMSMasterKeyId (string) --

        The KMS key that should be used for KMS encryption in the new replica. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS key alias/aws/dynamodb .

      • ProvisionedThroughputOverride (dict) --

        Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.

        • ReadCapacityUnits (integer) --

          Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

      • OnDemandThroughputOverride (dict) --

        The maximum on-demand throughput settings for the specified replica table being created. You can only modify MaxReadRequestUnits , because you can't modify MaxWriteRequestUnits for individual replica tables.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified replica table.

      • GlobalSecondaryIndexes (list) --

        Replica-specific global secondary index settings.

        • (dict) --

          Represents the properties of a replica global secondary index.

          • IndexName (string) -- [REQUIRED]

            The name of the global secondary index.

          • ProvisionedThroughputOverride (dict) --

            Replica table GSI-specific provisioned throughput. If not specified, uses the source table GSI's read capacity settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified global secondary index in the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

      • TableClassOverride (string) --

        Replica-specific table class. If not specified, uses the source table's table class.

    • Update (dict) --

      The parameters required for updating a replica for the table.

      • RegionName (string) -- [REQUIRED]

        The Region where the replica exists.

      • KMSMasterKeyId (string) --

        The KMS key of the replica that should be used for KMS encryption. To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS key alias/aws/dynamodb .

      • ProvisionedThroughputOverride (dict) --

        Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.

        • ReadCapacityUnits (integer) --

          Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

      • OnDemandThroughputOverride (dict) --

        Overrides the maximum on-demand throughput for the replica table.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified replica table.

      • GlobalSecondaryIndexes (list) --

        Replica-specific global secondary index settings.

        • (dict) --

          Represents the properties of a replica global secondary index.

          • IndexName (string) -- [REQUIRED]

            The name of the global secondary index.

          • ProvisionedThroughputOverride (dict) --

            Replica table GSI-specific provisioned throughput. If not specified, uses the source table GSI's read capacity settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified global secondary index in the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

      • TableClassOverride (string) --

        Replica-specific table class. If not specified, uses the source table's table class.

    • Delete (dict) --

      The parameters required for deleting a replica for the table.

      • RegionName (string) -- [REQUIRED]

        The Region where the replica exists.

type TableClass

string

param TableClass

The table class of the table to be updated. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

type DeletionProtectionEnabled

boolean

param DeletionProtectionEnabled

Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table.

type OnDemandThroughput

dict

param OnDemandThroughput

Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

  • MaxReadRequestUnits (integer) --

    Maximum number of read request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

  • MaxWriteRequestUnits (integer) --

    Maximum number of write request units for the specified table.

    To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

rtype

dict

returns

Response Syntax

{
    'TableDescription': {
        'AttributeDefinitions': [
            {
                'AttributeName': 'string',
                'AttributeType': 'S'|'N'|'B'
            },
        ],
        'TableName': 'string',
        'KeySchema': [
            {
                'AttributeName': 'string',
                'KeyType': 'HASH'|'RANGE'
            },
        ],
        'TableStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS'|'ARCHIVING'|'ARCHIVED',
        'CreationDateTime': datetime(2015, 1, 1),
        'ProvisionedThroughput': {
            'LastIncreaseDateTime': datetime(2015, 1, 1),
            'LastDecreaseDateTime': datetime(2015, 1, 1),
            'NumberOfDecreasesToday': 123,
            'ReadCapacityUnits': 123,
            'WriteCapacityUnits': 123
        },
        'TableSizeBytes': 123,
        'ItemCount': 123,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string',
                'OnDemandThroughput': {
                    'MaxReadRequestUnits': 123,
                    'MaxWriteRequestUnits': 123
                }
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'GlobalTableVersion': 'string',
        'Replicas': [
            {
                'RegionName': 'string',
                'ReplicaStatus': 'CREATING'|'CREATION_FAILED'|'UPDATING'|'DELETING'|'ACTIVE'|'REGION_DISABLED'|'INACCESSIBLE_ENCRYPTION_CREDENTIALS',
                'ReplicaStatusDescription': 'string',
                'ReplicaStatusPercentProgress': 'string',
                'KMSMasterKeyId': 'string',
                'ProvisionedThroughputOverride': {
                    'ReadCapacityUnits': 123
                },
                'OnDemandThroughputOverride': {
                    'MaxReadRequestUnits': 123
                },
                'GlobalSecondaryIndexes': [
                    {
                        'IndexName': 'string',
                        'ProvisionedThroughputOverride': {
                            'ReadCapacityUnits': 123
                        },
                        'OnDemandThroughputOverride': {
                            'MaxReadRequestUnits': 123
                        }
                    },
                ],
                'ReplicaInaccessibleDateTime': datetime(2015, 1, 1),
                'ReplicaTableClassSummary': {
                    'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
                    'LastUpdateDateTime': datetime(2015, 1, 1)
                }
            },
        ],
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string',
            'InaccessibleEncryptionDateTime': datetime(2015, 1, 1)
        },
        'ArchivalSummary': {
            'ArchivalDateTime': datetime(2015, 1, 1),
            'ArchivalReason': 'string',
            'ArchivalBackupArn': 'string'
        },
        'TableClassSummary': {
            'TableClass': 'STANDARD'|'STANDARD_INFREQUENT_ACCESS',
            'LastUpdateDateTime': datetime(2015, 1, 1)
        },
        'DeletionProtectionEnabled': True|False,
        'OnDemandThroughput': {
            'MaxReadRequestUnits': 123,
            'MaxWriteRequestUnits': 123
        }
    }
}

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 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

        The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

        For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide .

        • (dict) --

          Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table/index configuration is being updated. The table/index remains available for data operations when UPDATING .

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

        • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days.

        • ARCHIVING - The table is being archived. Operations are not allowed until archival is complete.

        • ARCHIVED - The table has been archived. See the ArchivalReason for more information.

      • CreationDateTime (datetime) --

        The date and time when the table was created, in UNIX epoch time format.

      • ProvisionedThroughput (dict) --

        The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

        • LastIncreaseDateTime (datetime) --

          The date and time of the last provisioned throughput increase for this table.

        • LastDecreaseDateTime (datetime) --

          The date and time of the last provisioned throughput decrease for this table.

        • NumberOfDecreasesToday (integer) --

          The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

          Controls how you are charged for read and write throughput and how you manage capacity. This setting can be changed later.

          • PROVISIONED - Sets the read/write capacity mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

          • PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

        • LastUpdateToPayPerRequestDateTime (datetime) --

          Represents the time when PAY_PER_REQUEST was last set as the read/write capacity mode.

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:

        • IndexName - The name of the local secondary index.

        • KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table.

        • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

          • ProjectionType - One of the following:

            • KEYS_ONLY - Only the index and primary keys are projected into the index.

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes is 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 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        • ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexSizeBytes (integer) --

            The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • ItemCount (integer) --

            The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

          • IndexArn (string) --

            The Amazon Resource Name (ARN) that uniquely identifies the index.

      • GlobalSecondaryIndexes (list) --

        The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.) You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (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 - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

            • ALL - All of the table attributes are projected into the index.

          • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes , summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

        • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.

        If the table is in the DELETING state, no information about indexes will be returned.

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:

            • HASH - partition 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

            The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

            • (dict) --

              Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by 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's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

                The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.

          • Projection (dict) --

            Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

              • KEYS_ONLY - Only the index and primary keys are projected into the index.

              • INCLUDE - In addition to the attributes described in KEYS_ONLY , the secondary index will include other non-key attributes that you specify.

              • ALL - All of the table attributes are projected into the index.

              When using the DynamoDB console, ALL is selected by default.

            • NonKeyAttributes (list) --

              Represents the non-key attribute names which will be projected into the index.

              For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

            Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a partition key cannot have any duplicate values.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING 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 Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • LastIncreaseDateTime (datetime) --

              The date and time of the last provisioned throughput increase for this table.

            • LastDecreaseDateTime (datetime) --

              The date and time of the last provisioned throughput decrease for this table.

            • NumberOfDecreasesToday (integer) --

              The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Service, Account, and Table Quotas in the Amazon DynamoDB Developer Guide .

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 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.

          • OnDemandThroughput (dict) --

            The maximum number of read and write units for the specified global secondary index. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

            • MaxWriteRequestUnits (integer) --

              Maximum number of write request units for the specified table.

              To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.

      • 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:

        • Amazon Web Services customer ID

        • Table name

        • StreamLabel

      • LatestStreamArn (string) --

        The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.

      • GlobalTableVersion (string) --

        Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.

      • Replicas (list) --

        Represents replicas of the table.

        • (dict) --

          Contains the details of the replica.

          • RegionName (string) --

            The name of the Region.

          • ReplicaStatus (string) --

            The current state of the replica:

            • CREATING - The replica is being created.

            • UPDATING - The replica is being updated.

            • DELETING - The replica is being deleted.

            • ACTIVE - The replica is ready for use.

            • REGION_DISABLED - The replica is inaccessible because the Amazon Web Services Region has been disabled.

            Note

            If the Amazon Web Services Region remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

            • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The KMS key used to encrypt the table is inaccessible.

            Note

            If the KMS key remains inaccessible for more than 20 hours, DynamoDB will remove this replica from the replication group. The replica will not be deleted and replication will stop from and to this region.

          • ReplicaStatusDescription (string) --

            Detailed information about the replica status.

          • ReplicaStatusPercentProgress (string) --

            Specifies the progress of a Create, Update, or Delete action on the replica as a percentage.

          • KMSMasterKeyId (string) --

            The KMS key of the replica that will be used for KMS encryption.

          • ProvisionedThroughputOverride (dict) --

            Replica-specific provisioned throughput. If not described, uses the source table's provisioned throughput settings.

            • ReadCapacityUnits (integer) --

              Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

          • OnDemandThroughputOverride (dict) --

            Overrides the maximum on-demand throughput settings for the specified replica table.

            • MaxReadRequestUnits (integer) --

              Maximum number of read request units for the specified replica table.

          • GlobalSecondaryIndexes (list) --

            Replica-specific global secondary index settings.

            • (dict) --

              Represents the properties of a replica global secondary index.

              • IndexName (string) --

                The name of the global secondary index.

              • ProvisionedThroughputOverride (dict) --

                If not described, uses the source table GSI's read capacity settings.

                • ReadCapacityUnits (integer) --

                  Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.

              • OnDemandThroughputOverride (dict) --

                Overrides the maximum on-demand throughput for the specified global secondary index in the specified replica table.

                • MaxReadRequestUnits (integer) --

                  Maximum number of read request units for the specified replica table.

          • ReplicaInaccessibleDateTime (datetime) --

            The time at which the replica was first detected as inaccessible. To determine cause of inaccessibility check the ReplicaStatus property.

          • ReplicaTableClassSummary (dict) --

            Contains details of the table class.

            • TableClass (string) --

              The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

            • LastUpdateDateTime (datetime) --

              The date and time at which the table class was last updated.

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup from which the table was restored.

        • SourceTableArn (string) --

          The ARN of the source table of the backup that is being restored.

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

        The description of the server-side encryption status on the specified table.

        • Status (string) --

          Represents the current state of server-side encryption. The only supported values are:

          • ENABLED - Server-side encryption is enabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type. The only supported value is:

          • KMS - Server-side encryption that uses Key Management Service. The key is stored in your account and is managed by KMS (KMS charges apply).

        • KMSMasterKeyArn (string) --

          The KMS key ARN used for the KMS encryption.

        • InaccessibleEncryptionDateTime (datetime) --

          Indicates the time, in UNIX epoch date format, when DynamoDB detected that the table's KMS key was inaccessible. This attribute will automatically be cleared when DynamoDB detects that the table's KMS key is accessible again. DynamoDB will initiate the table archival process when table's KMS key remains inaccessible for more than seven days from this date.

      • ArchivalSummary (dict) --

        Contains information about the table archive.

        • ArchivalDateTime (datetime) --

          The date and time when table archival was initiated by DynamoDB, in UNIX epoch time format.

        • ArchivalReason (string) --

          The reason DynamoDB archived the table. Currently, the only possible value is:

          • INACCESSIBLE_ENCRYPTION_CREDENTIALS - The table was archived due to the table's KMS key being inaccessible for more than seven days. An On-Demand backup was created at the archival time.

        • ArchivalBackupArn (string) --

          The Amazon Resource Name (ARN) of the backup the table was archived to, when applicable in the archival reason. If you wish to restore this backup to the same table name, you will need to delete the original table.

      • TableClassSummary (dict) --

        Contains details of the table class.

        • TableClass (string) --

          The table class of the specified table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .

        • LastUpdateDateTime (datetime) --

          The date and time at which the table class was last updated.

      • DeletionProtectionEnabled (boolean) --

        Indicates whether deletion protection is enabled (true) or disabled (false) on the table.

      • OnDemandThroughput (dict) --

        The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits , MaxWriteRequestUnits , or both.

        • MaxReadRequestUnits (integer) --

          Maximum number of read request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxReadRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxReadRequestUnits to -1.

        • MaxWriteRequestUnits (integer) --

          Maximum number of write request units for the specified table.

          To specify a maximum OnDemandThroughput on your table, set the value of MaxWriteRequestUnits as greater than or equal to 1. To remove the maximum OnDemandThroughput that is currently set on your table, set the value of MaxWriteRequestUnits to -1.