deleteDatabase method

Future<void> deleteDatabase({
  1. required String databaseName,
})

Deletes a given Timestream database. This is an irreversible operation. After a database is deleted, the time-series data from its tables cannot be recovered.

Due to the nature of distributed retries, the operation can return either success or a ResourceNotFoundException. Clients should consider them equivalent. See code sample for details.

May throw AccessDeniedException. May throw InternalServerException. May throw InvalidEndpointException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter databaseName : The name of the Timestream database to be deleted.

Implementation

Future<void> deleteDatabase({
  required String databaseName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Timestream_20181101.DeleteDatabase'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DatabaseName': databaseName,
    },
  );
}