Amazon DynamoDB

2019/04/25 - Amazon DynamoDB - 1 updated api methods

Changes  This update allows you to tag Amazon DynamoDB tables when you create them. Tags are labels you can attach to AWS resources to make them easier to manage, search, and filter.

CreateTable (updated) Link ΒΆ
Changes (request)
{'Tags': [{'Key': 'string', 'Value': 'string'}]}

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

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

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

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

See also: AWS API Documentation

Request Syntax

client.create_table(
    AttributeDefinitions=[
        {
            'AttributeName': 'string',
            'AttributeType': 'S'|'N'|'B'
        },
    ],
    TableName='string',
    KeySchema=[
        {
            'AttributeName': 'string',
            'KeyType': 'HASH'|'RANGE'
        },
    ],
    LocalSecondaryIndexes=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            }
        },
    ],
    GlobalSecondaryIndexes=[
        {
            'IndexName': 'string',
            'KeySchema': [
                {
                    'AttributeName': 'string',
                    'KeyType': 'HASH'|'RANGE'
                },
            ],
            'Projection': {
                'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                'NonKeyAttributes': [
                    'string',
                ]
            },
            'ProvisionedThroughput': {
                'ReadCapacityUnits': 123,
                'WriteCapacityUnits': 123
            }
        },
    ],
    BillingMode='PROVISIONED'|'PAY_PER_REQUEST',
    ProvisionedThroughput={
        'ReadCapacityUnits': 123,
        'WriteCapacityUnits': 123
    },
    StreamSpecification={
        'StreamEnabled': True|False,
        'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
    },
    SSESpecification={
        'Enabled': True|False,
        'SSEType': 'AES256'|'KMS',
        'KMSMasterKeyId': 'string'
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
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, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

type TableName

string

param TableName

[REQUIRED]

The name of the table to create.

type KeySchema

list

param KeySchema

[REQUIRED]

Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide .

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - The role that the key attribute will assume:

    • HASH - partition key

    • RANGE - sort key

Note

The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

For a simple primary key (partition key), you must provide exactly one element with a KeyType of HASH .

For a composite primary key (partition key and sort key), you must provide exactly two elements, in this order: The first element must have a KeyType of HASH , and the second element must have a KeyType of RANGE .

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

  • (dict) --

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

    A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

    A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

    • AttributeName (string) -- [REQUIRED]

      The name of a key attribute.

    • KeyType (string) -- [REQUIRED]

      The role that this key attribute will assume:

      • HASH - partition key

      • RANGE - sort key

      Note

      The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

type LocalSecondaryIndexes

list

param LocalSecondaryIndexes

One or more local secondary indexes (the maximum is 5) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

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

  • KeySchema - Specifies the key schema for the local secondary index. The key schema must begin with the same partition key as the table.

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

    • ProjectionType - One of the following:

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

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

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

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

  • (dict) --

    Represents the properties of a local secondary index.

    • IndexName (string) -- [REQUIRED]

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

    • KeySchema (list) -- [REQUIRED]

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

      • HASH - partition key

      • RANGE - sort key

      Note

      The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

      • (dict) --

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

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

        A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

        • AttributeName (string) -- [REQUIRED]

          The name of a key attribute.

        • KeyType (string) -- [REQUIRED]

          The role that this key attribute will assume:

          • HASH - partition key

          • RANGE - sort key

          Note

          The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

    • Projection (dict) -- [REQUIRED]

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

      • ProjectionType (string) --

        The set of attributes that are projected into the index:

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

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

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

      • NonKeyAttributes (list) --

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

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

        • (string) --

type GlobalSecondaryIndexes

list

param GlobalSecondaryIndexes

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

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

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

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

    • ProjectionType - One of the following:

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

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

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

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

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

  • (dict) --

    Represents the properties of a global secondary index.

    • IndexName (string) -- [REQUIRED]

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

    • KeySchema (list) -- [REQUIRED]

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

      • HASH - partition key

      • RANGE - sort key

      Note

      The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

      • (dict) --

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

        A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

        A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

        • AttributeName (string) -- [REQUIRED]

          The name of a key attribute.

        • KeyType (string) -- [REQUIRED]

          The role that this key attribute will assume:

          • HASH - partition key

          • RANGE - sort key

          Note

          The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

    • Projection (dict) -- [REQUIRED]

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

      • ProjectionType (string) --

        The set of attributes that are projected into the index:

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

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

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

      • NonKeyAttributes (list) --

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

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

        • (string) --

    • ProvisionedThroughput (dict) --

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

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

      • ReadCapacityUnits (integer) -- [REQUIRED]

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

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

      • WriteCapacityUnits (integer) -- [REQUIRED]

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

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

type BillingMode

string

param BillingMode

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

  • PROVISIONED - Sets the billing mode to PROVISIONED . We recommend using PROVISIONED for predictable workloads.

  • PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST . We recommend using PAY_PER_REQUEST for unpredictable workloads.

type ProvisionedThroughput

dict

param ProvisionedThroughput

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

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

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

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

  • WriteCapacityUnits (integer) -- [REQUIRED]

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

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

type StreamSpecification

dict

param StreamSpecification

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

  • StreamEnabled - Indicates whether Streams is to be enabled (true) or disabled (false).

  • StreamViewType - When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values for StreamViewType are:

    • KEYS_ONLY - Only the key attributes of the modified item are written to the stream.

    • NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.

    • OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.

    • NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.

  • StreamEnabled (boolean) --

    Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.

  • StreamViewType (string) --

    When an item in the table is modified, StreamViewType determines what information is written to the stream for this table. Valid values for StreamViewType are:

    • KEYS_ONLY - Only the key attributes of the modified item are written to the stream.

    • NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.

    • OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.

    • NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.

type SSESpecification

dict

param SSESpecification

Represents the settings used to enable server-side encryption.

  • Enabled (boolean) --

    Indicates whether server-side encryption is enabled (true) or disabled (false) on the table. If enabled (true), server-side encryption type is set to KMS . If disabled (false) or not specified, server-side encryption is set to AWS owned CMK.

  • SSEType (string) --

    Server-side encryption type:

    • AES256 - Server-side encryption which uses the AES256 algorithm (not applicable).

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

  • KMSMasterKeyId (string) --

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

type Tags

list

param Tags

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

  • (dict) --

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

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

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

    • Key (string) -- [REQUIRED]

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

    • Value (string) -- [REQUIRED]

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

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,
        'TableArn': 'string',
        'TableId': 'string',
        'BillingModeSummary': {
            'BillingMode': 'PROVISIONED'|'PAY_PER_REQUEST',
            'LastUpdateToPayPerRequestDateTime': datetime(2015, 1, 1)
        },
        'LocalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'GlobalSecondaryIndexes': [
            {
                'IndexName': 'string',
                'KeySchema': [
                    {
                        'AttributeName': 'string',
                        'KeyType': 'HASH'|'RANGE'
                    },
                ],
                'Projection': {
                    'ProjectionType': 'ALL'|'KEYS_ONLY'|'INCLUDE',
                    'NonKeyAttributes': [
                        'string',
                    ]
                },
                'IndexStatus': 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE',
                'Backfilling': True|False,
                'ProvisionedThroughput': {
                    'LastIncreaseDateTime': datetime(2015, 1, 1),
                    'LastDecreaseDateTime': datetime(2015, 1, 1),
                    'NumberOfDecreasesToday': 123,
                    'ReadCapacityUnits': 123,
                    'WriteCapacityUnits': 123
                },
                'IndexSizeBytes': 123,
                'ItemCount': 123,
                'IndexArn': 'string'
            },
        ],
        'StreamSpecification': {
            'StreamEnabled': True|False,
            'StreamViewType': 'NEW_IMAGE'|'OLD_IMAGE'|'NEW_AND_OLD_IMAGES'|'KEYS_ONLY'
        },
        'LatestStreamLabel': 'string',
        'LatestStreamArn': 'string',
        'RestoreSummary': {
            'SourceBackupArn': 'string',
            'SourceTableArn': 'string',
            'RestoreDateTime': datetime(2015, 1, 1),
            'RestoreInProgress': True|False
        },
        'SSEDescription': {
            'Status': 'ENABLING'|'ENABLED'|'DISABLING'|'DISABLED'|'UPDATING',
            'SSEType': 'AES256'|'KMS',
            'KMSMasterKeyArn': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Represents the output of a CreateTable operation.

    • TableDescription (dict) --

      Represents the properties of the table.

      • AttributeDefinitions (list) --

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

        Each AttributeDefinition object in this array is composed of:

        • AttributeName - The name of the attribute.

        • AttributeType - The data type for the attribute.

        • (dict) --

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

          • AttributeName (string) --

            A name for the attribute.

          • AttributeType (string) --

            The data type for the attribute, where:

            • S - the attribute is of type String

            • N - the attribute is of type Number

            • B - the attribute is of type Binary

      • TableName (string) --

        The name of the table.

      • KeySchema (list) --

        The primary key structure for the table. Each KeySchemaElement consists of:

        • AttributeName - The name of the attribute.

        • KeyType - The role of the attribute:

          • HASH - partition key

          • RANGE - sort key

        Note

        The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

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

        • (dict) --

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

          A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

          A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

          • AttributeName (string) --

            The name of a key attribute.

          • KeyType (string) --

            The role that this key attribute will assume:

            • HASH - partition key

            • RANGE - sort key

            Note

            The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

      • TableStatus (string) --

        The current state of the table:

        • CREATING - The table is being created.

        • UPDATING - The table is being updated.

        • DELETING - The table is being deleted.

        • ACTIVE - The table is ready for use.

      • CreationDateTime (datetime) --

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

      • ProvisionedThroughput (dict) --

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

        • LastIncreaseDateTime (datetime) --

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

        • LastDecreaseDateTime (datetime) --

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

        • NumberOfDecreasesToday (integer) --

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

        • ReadCapacityUnits (integer) --

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

        • WriteCapacityUnits (integer) --

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

      • TableSizeBytes (integer) --

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

      • ItemCount (integer) --

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

      • TableArn (string) --

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

      • TableId (string) --

        Unique identifier for the table for which the backup was created.

      • BillingModeSummary (dict) --

        Contains the details for the read/write capacity mode.

        • BillingMode (string) --

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

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

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

        • LastUpdateToPayPerRequestDateTime (datetime) --

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

      • LocalSecondaryIndexes (list) --

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

        • IndexName - The name of the local secondary index.

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

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

          • ProjectionType - One of the following:

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

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

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

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

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

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

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

        • (dict) --

          Represents the properties of a local secondary index.

          • IndexName (string) --

            Represents the name of the local secondary index.

          • KeySchema (list) --

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

            • HASH - partition key

            • RANGE - sort key

            Note

            The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

            • (dict) --

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

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

              A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The role that this key attribute will assume:

                • HASH - partition key

                • RANGE - sort key

                Note

                The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

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

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

          • IndexSizeBytes (integer) --

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

          • ItemCount (integer) --

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

          • IndexArn (string) --

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

      • GlobalSecondaryIndexes (list) --

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

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

        • IndexName - The name of the global secondary index.

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

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

          • CREATING - The index is being created.

          • UPDATING - The index is being updated.

          • DELETING - The index is being deleted.

          • ACTIVE - The index is ready for use.

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

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

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

          • ProjectionType - One of the following:

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

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

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

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

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

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

        • (dict) --

          Represents the properties of a global secondary index.

          • IndexName (string) --

            The name of the global secondary index.

          • KeySchema (list) --

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

            • HASH - partition key

            • RANGE - sort key

            Note

            The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

            • (dict) --

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

              A KeySchemaElement represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one KeySchemaElement (for the partition key). A composite primary key would require one KeySchemaElement for the partition key, and another KeySchemaElement for the sort key.

              A KeySchemaElement must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

              • AttributeName (string) --

                The name of a key attribute.

              • KeyType (string) --

                The role that this key attribute will assume:

                • HASH - partition key

                • RANGE - sort key

                Note

                The partition key of an item is also known as its hash attribute . The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.

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

          • Projection (dict) --

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

            • ProjectionType (string) --

              The set of attributes that are projected into the index:

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

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

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

            • NonKeyAttributes (list) --

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

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

              • (string) --

          • IndexStatus (string) --

            The current state of the global secondary index:

            • CREATING - The index is being created.

            • UPDATING - The index is being updated.

            • DELETING - The index is being deleted.

            • ACTIVE - The index is ready for use.

          • Backfilling (boolean) --

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

            Note

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

          • ProvisionedThroughput (dict) --

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

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

            • LastIncreaseDateTime (datetime) --

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

            • LastDecreaseDateTime (datetime) --

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

            • NumberOfDecreasesToday (integer) --

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

            • ReadCapacityUnits (integer) --

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

            • WriteCapacityUnits (integer) --

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

          • IndexSizeBytes (integer) --

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

          • ItemCount (integer) --

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

          • IndexArn (string) --

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

      • StreamSpecification (dict) --

        The current DynamoDB Streams configuration for the table.

        • StreamEnabled (boolean) --

          Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.

        • StreamViewType (string) --

          When an item in the table is modified, StreamViewType determines what information is written to the stream for this table. Valid values for StreamViewType are:

          • KEYS_ONLY - Only the key attributes of the modified item are written to the stream.

          • NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.

          • OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.

          • NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.

      • LatestStreamLabel (string) --

        A timestamp, in ISO 8601 format, for this stream.

        Note that LatestStreamLabel is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:

        • the AWS customer ID.

        • the table name.

        • the StreamLabel .

      • LatestStreamArn (string) --

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

      • RestoreSummary (dict) --

        Contains details for the restore.

        • SourceBackupArn (string) --

          ARN of the backup from which the table was restored.

        • SourceTableArn (string) --

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

        • RestoreDateTime (datetime) --

          Point in time or source backup time.

        • RestoreInProgress (boolean) --

          Indicates if a restore is in progress or not.

      • SSEDescription (dict) --

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

        • Status (string) --

          The current state of server-side encryption:

          • ENABLING - Server-side encryption is being enabled.

          • ENABLED - Server-side encryption is enabled.

          • DISABLING - Server-side encryption is being disabled.

          • DISABLED - Server-side encryption is disabled.

          • UPDATING - Server-side encryption is being updated.

        • SSEType (string) --

          Server-side encryption type:

          • AES256 - Server-side encryption which uses the AES256 algorithm (not applicable).

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

        • KMSMasterKeyArn (string) --

          The KMS master key ARN used for the KMS encryption.