AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DeleteTable operation.
The
DynamoDB might continue to accept data read and write operations, such as DeleteTable operation deletes a table and all of its items. After a DeleteTable
request, the specified table is in the DELETING state until DynamoDB completes
the deletion. If the table is in the ACTIVE state, you can delete it. If a
table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException.
If the specified table does not exist, DynamoDB returns a ResourceNotFoundException.
If table is already in the DELETING state, no error is returned.
GetItem
and PutItem, on a table in the DELETING state until the table deletion
is complete. For the full list of table states, see TableStatus.
When you delete a table, any indexes on that table are also deleted.
If you have DynamoDB Streams enabled on the table, then the corresponding stream on
that table goes into the DISABLED state, and the stream is automatically deleted
after 24 hours.
Use the DescribeTable action to check the status of the table.
Namespace: Amazon.DynamoDBv2.Model
Assembly: AWSSDK.DynamoDBv2.dll
Version: 3.x.y.z
public class DeleteTableRequest : AmazonDynamoDBRequest IAmazonWebServiceRequest
The DeleteTableRequest type exposes the following members
| Name | Description | |
|---|---|---|
|
DeleteTableRequest() |
Empty constructor used to set properties independently even when a simple constructor is available |
|
DeleteTableRequest(string) |
Instantiates DeleteTableRequest with the parameterized properties |
| Name | Type | Description | |
|---|---|---|---|
|
TableName | System.String |
Gets and sets the property TableName. The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter. |
This example shows how to delete a table.
// Create a client
AmazonDynamoDBClient client = new AmazonDynamoDBClient();
// Configure the DeleteTable request
DeleteTableRequest request = new DeleteTableRequest
{
TableName = "SampleTable"
};
// Issue DeleteTable request and retrieve the table description
TableDescription tableDescription = client.DeleteTable(request).TableDescription;
Console.WriteLine("Table name: {0}", tableDescription.TableName);
Console.WriteLine("Table status: {0}", tableDescription.TableStatus);
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5