- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteTableCommand
The DeleteTable
operation deletes a table and all of its data. After a DeleteTable
request is received, the specified table is in the DELETING
state until Amazon Keyspaces completes the deletion. If the table is in the ACTIVE
state, you can delete it. If a table is either in the CREATING
or UPDATING
states, then Amazon Keyspaces returns a ResourceInUseException
. If the specified table does not exist, Amazon Keyspaces returns a ResourceNotFoundException
. If the table is already in the DELETING
state, no error is returned.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { KeyspacesClient, DeleteTableCommand } from "@aws-sdk/client-keyspaces"; // ES Modules import
// const { KeyspacesClient, DeleteTableCommand } = require("@aws-sdk/client-keyspaces"); // CommonJS import
const client = new KeyspacesClient(config);
const input = { // DeleteTableRequest
keyspaceName: "STRING_VALUE", // required
tableName: "STRING_VALUE", // required
};
const command = new DeleteTableCommand(input);
const response = await client.send(command);
// {};
DeleteTableCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
keyspaceName Required | string | undefined | The name of the keyspace of the to be deleted table. |
tableName Required | string | undefined | The name of the table to be deleted. |
DeleteTableCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have sufficient access permissions to perform this action. |
ConflictException | client | Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. |
InternalServerException | server | Amazon Keyspaces was unable to fully process this request because of an internal server error. |
ResourceNotFoundException | client | The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be |
ServiceQuotaExceededException | client | The operation exceeded the service quota for this resource. For more information on service quotas, see Quotas in the Amazon Keyspaces Developer Guide. |
ValidationException | client | The operation failed due to an invalid or malformed request. |
KeyspacesServiceException | Base exception class for all service exceptions from Keyspaces service. |