cancelQuery method

Future<CancelQueryResponse> cancelQuery({
  1. required String queryId,
  2. required String workspaceName,
})

Cancels a running query.

May throw AccessDeniedException. May throw ConflictingOperationException. May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter queryId : The unique identifier for the query execution to cancel.

Parameter workspaceName : The name of the workspace associated with the query.

Implementation

Future<CancelQueryResponse> cancelQuery({
  required String queryId,
  required String workspaceName,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri:
        '/workspaces/${Uri.encodeComponent(workspaceName)}/queries/${Uri.encodeComponent(queryId)}/cancel',
    hostPrefix: 'data.',
    exceptionFnMap: _exceptionFns,
  );
  return CancelQueryResponse.fromJson(response);
}