deleteCluster method
Deletes the MSK cluster specified by the Amazon Resource Name (ARN) in the request.
May throw NotFoundException. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException.
Parameter clusterArn
:
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
Parameter currentVersion
:
The current version of the MSK cluster.
Implementation
Future<DeleteClusterResponse> deleteCluster({
required String clusterArn,
String? currentVersion,
}) async {
ArgumentError.checkNotNull(clusterArn, 'clusterArn');
final $query = <String, List<String>>{
if (currentVersion != null) 'currentVersion': [currentVersion],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/v1/clusters/${Uri.encodeComponent(clusterArn)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteClusterResponse.fromJson(response);
}