Amazon DynamoDB

2015/01/27 - Amazon DynamoDB - 4 updated api methods

CreateTable (updated) Link ¶
Changes (response)
{'TableDescription': {'GlobalSecondaryIndexes': {'Backfilling': 'boolean'}}}

The CreateTable operation adds a new table to your account. In an AWS account, table names must be unique within each region. That is, you can have two tables with same name if you create the tables in different regions.

CreateTable is an asynchronous operation. Upon receiving a CreateTable request, DynamoDB immediately returns a response with a TableStatus of CREATING . After the table is created, DynamoDB sets the TableStatus to ACTIVE . You can perform read and write operations only on an ACTIVE table.

You can optionally define secondary indexes on the new table, as part of the CreateTable operation. If you want to create multiple tables with secondary indexes on them, you must create the tables sequentially. Only one table with secondary indexes can be in the CREATING state at any given time.

You can use the DescribeTable API to check the table status.

Request Syntax

client.create_table(
    AttributeDefinitions=[
        {
            'AttributeName': 'string',
            'AttributeType': 'S'|'N'|'B'
        },
    ],
    TableName='string',
    KeySchema=[
        {
            'AttributeName': 'string',
            'KeyType': 'HASH'|'RANGE'
        },
    ],
    LocalSecondaryIndexes=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            }
        },
    ],
    GlobalSecondaryIndexes=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            },
            'ProvisionedThroughput': {
                'ReadCapacityUnits': 123,
                'WriteCapacityUnits': 123
            }
        },
    ],
    ProvisionedThroughput={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    }
)
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 key schema for the table and indexes.

    • AttributeName (string) -- [REQUIRED]

      A name for the attribute.

    • AttributeType (string) -- [REQUIRED]

      The data type for the attribute.

type TableName

string

param TableName

[REQUIRED]

The name of the table to create.

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 - Determines whether the key attribute is HASH or RANGE .

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH .

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH , and the second element must have a KeyType of RANGE .

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide .

  • (dict) --

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

    A KeySchemaElement represents exactly one attribute of the primary key. For example, a hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

    • AttributeName (string) -- [REQUIRED]

      The name of a key attribute.

    • KeyType (string) -- [REQUIRED]

      The attribute data, consisting of the data type and the attribute value itself.

type LocalSecondaryIndexes

list

param LocalSecondaryIndexes

One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; 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 hash key attribute as the table.

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

    • ProjectionType - One of the following:

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

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

  • (dict) --

    Represents the properties of a local secondary index.

    • IndexName (string) -- [REQUIRED]

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

    • KeySchema (list) -- [REQUIRED]

      The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types ( HASH or RANGE ).

      • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

        • AttributeName (string) -- [REQUIRED]

          The name of a key attribute.

        • KeyType (string) -- [REQUIRED]

          The attribute data, consisting of the data type and the attribute value itself.

    • Projection (dict) -- [REQUIRED]

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

      • ProjectionType (string) --

        The set of attributes that are projected into the index:

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

        • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

      • NonKeyAttributes (list) --

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

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

        • (string) --

type GlobalSecondaryIndexes

list

param GlobalSecondaryIndexes

One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:

  • IndexName - The name of the global secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the global secondary index.

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

    • ProjectionType - One of the following:

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

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

  • (dict) --

    Represents the properties of a global secondary index.

    • IndexName (string) -- [REQUIRED]

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

    • KeySchema (list) -- [REQUIRED]

      The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types ( HASH or RANGE ).

      • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

        • AttributeName (string) -- [REQUIRED]

          The name of a key attribute.

        • KeyType (string) -- [REQUIRED]

          The attribute data, consisting of the data type and the attribute value itself.

    • Projection (dict) -- [REQUIRED]

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

      • ProjectionType (string) --

        The set of attributes that are projected into the index:

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

        • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

      • NonKeyAttributes (list) --

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

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

        • (string) --

    • ProvisionedThroughput (dict) -- [REQUIRED]

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

      For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .

      • ReadCapacityUnits (integer) -- [REQUIRED]

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

      • WriteCapacityUnits (integer) -- [REQUIRED]

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

type ProvisionedThroughput

dict

param ProvisionedThroughput

[REQUIRED]

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

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .

  • ReadCapacityUnits (integer) -- [REQUIRED]

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

  • WriteCapacityUnits (integer) -- [REQUIRED]

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

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',
        '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,
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123
            },
        ],
        '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
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the output of a CreateTable operation.

    • TableDescription (dict) --

      Represents the properties of a table.

      • AttributeDefinitions (list) --

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

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

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

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute.

      • 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 key type for the attribute. Can be either HASH or RANGE .

        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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

          • AttributeName (string) --

            The name of a key attribute.

          • KeyType (string) --

            The attribute data, consisting of the data type and the attribute value itself.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created, as the result of a CreateTable operation.

        • UPDATING - The table is being updated, as the result of an UpdateTable operation.

        • DELETING - The table is being deleted, as the result of a DeleteTable operation.

        • ACTIVE - The table is ready for use.

      • CreationDateTime (datetime) --

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

      • ProvisionedThroughput (dict) --

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

        • LastIncreaseDateTime (datetime) --

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

        • LastDecreaseDateTime (datetime) --

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

        • NumberOfDecreasesToday (integer) --

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

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

        • WriteCapacityUnits (integer) --

          The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

      • TableSizeBytes (integer) --

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

      • ItemCount (integer) --

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

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given hash 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 hash key attribute as the table.

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

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

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete index key schema, which consists of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

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

      • GlobalSecondaryIndexes (list) --

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

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.)

        • IndexName - The name of the global secondary index.

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

        • IndexStatus - The current status of the global secondary index:

          • CREATING - The index is being created.

          • UPDATING - The index is being updated.

          • DELETING - The index is being deleted.

          • ACTIVE - The index is ready for use.

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

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

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for the global secondary index, consisting of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created, as the result of a CreateTable or UpdateTable operation.

            • UPDATING - The index is being updated, as the result of a CreateTable or UpdateTable operation.

            • DELETING - The index is being deleted, as the result of an UpdateTable or DeleteTable operation.

            • 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 hash key attribute cannot have any duplicates.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            Note

            For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.

          • ProvisionedThroughput (dict) --

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

            • LastIncreaseDateTime (datetime) --

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

            • LastDecreaseDateTime (datetime) --

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

            • NumberOfDecreasesToday (integer) --

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

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

            • WriteCapacityUnits (integer) --

              The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

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

DeleteTable (updated) Link ¶
Changes (response)
{'TableDescription': {'GlobalSecondaryIndexes': {'Backfilling': 'boolean'}}}

The DeleteTable operation deletes a table and all of its items. After a DeleteTable request, the specified table is in the DELETING state until DynamoDB completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException . If the specified table does not exist, DynamoDB returns a ResourceNotFoundException . If table is already in the DELETING state, no error is returned.

Note

DynamoDB might continue to accept data read and write operations, such as GetItem and PutItem , on a table in the DELETING state until the table deletion is complete.

When you delete a table, any indexes on that table are also deleted.

Use the DescribeTable API to check the status of the table.

Request Syntax

client.delete_table(
    TableName='string'
)
type TableName

string

param TableName

[REQUIRED]

The name of the table to delete.

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',
        '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,
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123
            },
        ],
        '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
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the output of a DeleteTable operation.

    • TableDescription (dict) --

      Represents the properties of a table.

      • AttributeDefinitions (list) --

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

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

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

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute.

      • 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 key type for the attribute. Can be either HASH or RANGE .

        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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

          • AttributeName (string) --

            The name of a key attribute.

          • KeyType (string) --

            The attribute data, consisting of the data type and the attribute value itself.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created, as the result of a CreateTable operation.

        • UPDATING - The table is being updated, as the result of an UpdateTable operation.

        • DELETING - The table is being deleted, as the result of a DeleteTable operation.

        • ACTIVE - The table is ready for use.

      • CreationDateTime (datetime) --

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

      • ProvisionedThroughput (dict) --

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

        • LastIncreaseDateTime (datetime) --

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

        • LastDecreaseDateTime (datetime) --

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

        • NumberOfDecreasesToday (integer) --

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

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

        • WriteCapacityUnits (integer) --

          The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

      • TableSizeBytes (integer) --

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

      • ItemCount (integer) --

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

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given hash 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 hash key attribute as the table.

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

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

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete index key schema, which consists of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

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

      • GlobalSecondaryIndexes (list) --

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

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.)

        • IndexName - The name of the global secondary index.

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

        • IndexStatus - The current status of the global secondary index:

          • CREATING - The index is being created.

          • UPDATING - The index is being updated.

          • DELETING - The index is being deleted.

          • ACTIVE - The index is ready for use.

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

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

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for the global secondary index, consisting of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created, as the result of a CreateTable or UpdateTable operation.

            • UPDATING - The index is being updated, as the result of a CreateTable or UpdateTable operation.

            • DELETING - The index is being deleted, as the result of an UpdateTable or DeleteTable operation.

            • 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 hash key attribute cannot have any duplicates.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            Note

            For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.

          • ProvisionedThroughput (dict) --

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

            • LastIncreaseDateTime (datetime) --

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

            • LastDecreaseDateTime (datetime) --

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

            • NumberOfDecreasesToday (integer) --

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

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

            • WriteCapacityUnits (integer) --

              The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

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

DescribeTable (updated) Link ¶
Changes (response)
{'Table': {'GlobalSecondaryIndexes': {'Backfilling': 'boolean'}}}

Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.

Note

If you issue a DescribeTable request immediately after a CreateTable request, DynamoDB might return a ResourceNotFoundException. This is because DescribeTable uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the DescribeTable request again.

Request Syntax

client.describe_table(
    TableName='string'
)
type TableName

string

param TableName

[REQUIRED]

The name of the table to describe.

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',
        '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,
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123
            },
        ],
        '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
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the output of a DescribeTable operation.

    • Table (dict) --

      Represents the properties of a table.

      • AttributeDefinitions (list) --

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

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

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

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute.

      • 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 key type for the attribute. Can be either HASH or RANGE .

        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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

          • AttributeName (string) --

            The name of a key attribute.

          • KeyType (string) --

            The attribute data, consisting of the data type and the attribute value itself.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created, as the result of a CreateTable operation.

        • UPDATING - The table is being updated, as the result of an UpdateTable operation.

        • DELETING - The table is being deleted, as the result of a DeleteTable operation.

        • ACTIVE - The table is ready for use.

      • CreationDateTime (datetime) --

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

      • ProvisionedThroughput (dict) --

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

        • LastIncreaseDateTime (datetime) --

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

        • LastDecreaseDateTime (datetime) --

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

        • NumberOfDecreasesToday (integer) --

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

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

        • WriteCapacityUnits (integer) --

          The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

      • TableSizeBytes (integer) --

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

      • ItemCount (integer) --

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

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given hash 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 hash key attribute as the table.

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

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

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete index key schema, which consists of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

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

      • GlobalSecondaryIndexes (list) --

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

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.)

        • IndexName - The name of the global secondary index.

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

        • IndexStatus - The current status of the global secondary index:

          • CREATING - The index is being created.

          • UPDATING - The index is being updated.

          • DELETING - The index is being deleted.

          • ACTIVE - The index is ready for use.

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

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

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for the global secondary index, consisting of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created, as the result of a CreateTable or UpdateTable operation.

            • UPDATING - The index is being updated, as the result of a CreateTable or UpdateTable operation.

            • DELETING - The index is being deleted, as the result of an UpdateTable or DeleteTable operation.

            • 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 hash key attribute cannot have any duplicates.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            Note

            For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.

          • ProvisionedThroughput (dict) --

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

            • LastIncreaseDateTime (datetime) --

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

            • LastDecreaseDateTime (datetime) --

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

            • NumberOfDecreasesToday (integer) --

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

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

            • WriteCapacityUnits (integer) --

              The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

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

UpdateTable (updated) Link ¶
Changes (request, response)
Request
{'AttributeDefinitions': [{'AttributeName': 'string',
                           'AttributeType': 'S | N | B'}],
 'GlobalSecondaryIndexUpdates': {'Create': {'IndexName': 'string',
                                            'KeySchema': [{'AttributeName': 'string',
                                                           'KeyType': 'HASH | '
                                                                      'RANGE'}],
                                            'Projection': {'NonKeyAttributes': ['string'],
                                                           'ProjectionType': 'ALL '
                                                                             '| '
                                                                             'KEYS_ONLY '
                                                                             '| '
                                                                             'INCLUDE'},
                                            'ProvisionedThroughput': {'ReadCapacityUnits': 'long',
                                                                      'WriteCapacityUnits': 'long'}},
                                 'Delete': {'IndexName': 'string'}}}
Response
{'TableDescription': {'GlobalSecondaryIndexes': {'Backfilling': 'boolean'}}}

Updates the provisioned throughput for the given table, or manages the global secondary indexes on the table.

You can increase or decrease the table's provisioned throughput values within the maximums and minimums listed in the Limits section in the Amazon DynamoDB Developer Guide .

In addition, you can use UpdateTable to add, modify or delete global secondary indexes on the table. For more information, see Managing Global Secondary Indexes in the Amazon DynamoDB Developer Guide .

The table must be in the ACTIVE state for UpdateTable to succeed. UpdateTable is an asynchronous operation; while executing the operation, the table is in the UPDATING state. While the table is in the UPDATING state, the table still has the provisioned throughput from before the call. The table's new provisioned throughput settings go into effect when the table returns to the ACTIVE state; at that point, the UpdateTable operation is complete.

Request Syntax

client.update_table(
    AttributeDefinitions=[
        {
            'AttributeName': 'string',
            'AttributeType': 'S'|'N'|'B'
        },
    ],
    TableName='string',
    ProvisionedThroughput={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    },
    GlobalSecondaryIndexUpdates=[
        {
            'Update': {
                'IndexName': 'string',
                'ProvisionedThroughput': {
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                }
            },
            'Create': {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'ProvisionedThroughput': {
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                }
            },
            'Delete': {
                'IndexName': 'string'
            }
        },
    ]
)
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 key schema for the table and indexes.

    • AttributeName (string) -- [REQUIRED]

      A name for the attribute.

    • AttributeType (string) -- [REQUIRED]

      The data type for the attribute.

type TableName

string

param TableName

[REQUIRED]

The name of the table to be updated.

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.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .

  • ReadCapacityUnits (integer) -- [REQUIRED]

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

  • WriteCapacityUnits (integer) -- [REQUIRED]

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

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

  • (dict) --

    Represents one of the following:

    • A new global secondary index to be added to an existing table.

    • New provisioned throughput parameters for an existing global secondary index.

    • An existing global secondary index to be removed from an existing table.

    • Update (dict) --

      The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.

      • IndexName (string) -- [REQUIRED]

        The name of the global secondary index to be updated.

      • ProvisionedThroughput (dict) -- [REQUIRED]

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

        For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) -- [REQUIRED]

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

        • WriteCapacityUnits (integer) -- [REQUIRED]

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

    • 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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

          • AttributeName (string) -- [REQUIRED]

            The name of a key attribute.

          • KeyType (string) -- [REQUIRED]

            The attribute data, consisting of the data type and the attribute value itself.

      • Projection (dict) -- [REQUIRED]

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

        • ProjectionType (string) --

          The set of attributes that are projected into the index:

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

          • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

        • NonKeyAttributes (list) --

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

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

          • (string) --

      • ProvisionedThroughput (dict) -- [REQUIRED]

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

        For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide .

        • ReadCapacityUnits (integer) -- [REQUIRED]

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

        • WriteCapacityUnits (integer) -- [REQUIRED]

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

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

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',
        '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,
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123
            },
        ],
        '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
            },
        ]
    }
}

Response Structure

  • (dict) --

    Represents the output of an UpdateTable operation.

    • TableDescription (dict) --

      Represents the properties of a table.

      • AttributeDefinitions (list) --

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

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

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

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute.

      • 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 key type for the attribute. Can be either HASH or RANGE .

        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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

          • AttributeName (string) --

            The name of a key attribute.

          • KeyType (string) --

            The attribute data, consisting of the data type and the attribute value itself.

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created, as the result of a CreateTable operation.

        • UPDATING - The table is being updated, as the result of an UpdateTable operation.

        • DELETING - The table is being deleted, as the result of a DeleteTable operation.

        • ACTIVE - The table is ready for use.

      • CreationDateTime (datetime) --

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

      • ProvisionedThroughput (dict) --

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

        • LastIncreaseDateTime (datetime) --

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

        • LastDecreaseDateTime (datetime) --

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

        • NumberOfDecreasesToday (integer) --

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

        • ReadCapacityUnits (integer) --

          The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

        • WriteCapacityUnits (integer) --

          The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

      • TableSizeBytes (integer) --

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

      • ItemCount (integer) --

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

      • LocalSecondaryIndexes (list) --

        Represents one or more local secondary indexes on the table. Each index is scoped to a given hash 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 hash key attribute as the table.

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

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

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

            The complete index key schema, which consists of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

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

      • GlobalSecondaryIndexes (list) --

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

        • Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.)

        • IndexName - The name of the global secondary index.

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

        • IndexStatus - The current status of the global secondary index:

          • CREATING - The index is being created.

          • UPDATING - The index is being updated.

          • DELETING - The index is being deleted.

          • ACTIVE - The index is ready for use.

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

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

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

          • ProjectionType - One of the following:

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

            • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

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

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

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

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

            The complete key schema for the global secondary index, consisting of one or more pairs of attribute names and key types ( HASH or RANGE ).

            • (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 hash type primary key would be represented by one KeySchemaElement . A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The attribute data, consisting of the data type and the attribute value itself.

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

              • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes .

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created, as the result of a CreateTable or UpdateTable operation.

            • UPDATING - The index is being updated, as the result of a CreateTable or UpdateTable operation.

            • DELETING - The index is being deleted, as the result of an UpdateTable or DeleteTable operation.

            • 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 hash key attribute cannot have any duplicates.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.

            Note

            For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.

          • ProvisionedThroughput (dict) --

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

            • LastIncreaseDateTime (datetime) --

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

            • LastDecreaseDateTime (datetime) --

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

            • NumberOfDecreasesToday (integer) --

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

            • ReadCapacityUnits (integer) --

              The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException . Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.

            • WriteCapacityUnits (integer) --

              The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException .

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