deleteTable method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ValidationException.
Parameter keyspaceName :
The name of the keyspace of the to be deleted table.
Parameter tableName :
The name of the table to be deleted.
Implementation
Future<void> deleteTable({
required String keyspaceName,
required String tableName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'KeyspacesService.DeleteTable'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'keyspaceName': keyspaceName,
'tableName': tableName,
},
);
}