deleteDataCatalog method
Deletes a data catalog.
May throw InternalServerException.
May throw InvalidRequestException.
Parameter name :
The name of the data catalog to delete.
Parameter deleteCatalogOnly :
Deletes the Athena Data Catalog. You can only use this with the
FEDERATED catalogs. You usually perform this before
registering the connector with Glue Data Catalog. After deletion, you will
have to manage the Glue Connection and Lambda function.
Implementation
Future<DeleteDataCatalogOutput> deleteDataCatalog({
required String name,
bool? deleteCatalogOnly,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.DeleteDataCatalog'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (deleteCatalogOnly != null) 'DeleteCatalogOnly': deleteCatalogOnly,
},
);
return DeleteDataCatalogOutput.fromJson(jsonResponse.body);
}