cancelStatement method

Future<void> cancelStatement({
  1. required int id,
  2. required String sessionId,
  3. String? requestOrigin,
})

Cancels the statement.

May throw AccessDeniedException. May throw EntityNotFoundException. May throw IllegalSessionStateException. May throw InternalServiceException. May throw InvalidInputException. May throw OperationTimeoutException.

Parameter id : The ID of the statement to be cancelled.

Parameter sessionId : The Session ID of the statement to be cancelled.

Parameter requestOrigin : The origin of the request to cancel the statement.

Implementation

Future<void> cancelStatement({
  required int id,
  required String sessionId,
  String? requestOrigin,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.CancelStatement'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      'SessionId': sessionId,
      if (requestOrigin != null) 'RequestOrigin': requestOrigin,
    },
  );
}