deleteWorkGroup method
Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.
May throw InternalServerException. May throw InvalidRequestException.
Parameter workGroup
:
The unique name of the workgroup to delete.
Parameter recursiveDeleteOption
:
The option to delete the workgroup and its contents even if the workgroup
contains any named queries.
Implementation
Future<void> deleteWorkGroup({
required String workGroup,
bool? recursiveDeleteOption,
}) async {
ArgumentError.checkNotNull(workGroup, 'workGroup');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.DeleteWorkGroup'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'WorkGroup': workGroup,
if (recursiveDeleteOption != null)
'RecursiveDeleteOption': recursiveDeleteOption,
},
);
}