def create_table()

in src/dynamodb_encryption_sdk/material_providers/store/meta.py [0:0]


    def create_table(cls, client, table_name, read_units, write_units):
        # type: (botocore.client.BaseClient, Text, int, int) -> None
        """Create the table for this MetaStore.

        :param table: Pre-configured boto3 DynamoDB client object
        :type table: boto3.resources.base.BaseClient
        :param str table_name: Name of table to create
        :param int read_units: Read capacity units to provision
        :param int write_units: Write capacity units to provision
        """
        _LOGGER.debug("Creating MetaStore table")
        try:
            client.create_table(
                TableName=table_name,
                AttributeDefinitions=[
                    {"AttributeName": MetaStoreAttributeNames.PARTITION.value, "AttributeType": "S"},
                    {"AttributeName": MetaStoreAttributeNames.SORT.value, "AttributeType": "N"},
                ],
                KeySchema=[
                    {"AttributeName": MetaStoreAttributeNames.PARTITION.value, "KeyType": "HASH"},
                    {"AttributeName": MetaStoreAttributeNames.SORT.value, "KeyType": "RANGE"},
                ],
                ProvisionedThroughput={"ReadCapacityUnits": read_units, "WriteCapacityUnits": write_units},
            )
        except botocore.exceptions.ClientError as exc:
            raise Exception("Could not create table", exc)