- DynamoDB Cookbook
- Tanmay Deshpande
- 204字
- 2025-02-27 18:05:23
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:
- Create a
delete
table request specifying the name of the table to be deleted:string tableName = "productTableNet"; var request = new DeleteTableRequest { TableName = tableName };
- Invoke the
DeleteTable
method to delete the table:var response = client.DeleteTable(request);
- 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 at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.