Deleting a table using the AWS SDK for .Net

Now, let's understand how to delete a DynamoDB table using the AWS SDK for .Net.

Getting ready

You can use the IDE of your choice to code these recipes.

How to do it…

In this recipe, we will learn how to delete the table that we created earlier using the AWS SDK for .Net:

  1. Create a delete table request specifying the name of the table to be deleted:
    string tableName = "productTableNet";
    var request = new DeleteTableRequest
                {
                    TableName = tableName
                };
  2. Invoke the DeleteTable method to delete the table:
       var response = client.DeleteTable(request);
  3. Like create and update, delete also takes some time before the changes are effective.

Tip

Downloading the example code

You can download the example code files from your account ...

Get DynamoDB Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.