Beispiel #1
0
        public async Task CreateTableAsync()
        {
            var request = new CreateTableRequest
            {
                TableName = TableName,
                KeySchema = new List <KeySchemaElement>
                {
                    new KeySchemaElement
                    {
                        AttributeName = "Title",
                        KeyType       = "HASH"
                    }
                },
                AttributeDefinitions = new List <AttributeDefinition>
                {
                    new AttributeDefinition
                    {
                        AttributeName = "Title",
                        AttributeType = "S"
                    }
                },
                ProvisionedThroughput = new ProvisionedThroughput
                {
                    ReadCapacityUnits  = 5,
                    WriteCapacityUnits = 5
                },
                StreamSpecification = new StreamSpecification
                {
                    StreamEnabled  = true,
                    StreamViewType = StreamViewType.NEW_AND_OLD_IMAGES
                }
            };

            await _client.CreateTableAsync(request);
        }