getStatement method

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

Retrieves 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.

Parameter sessionId : The Session ID of the statement.

Parameter requestOrigin : The origin of the request.

Implementation

Future<GetStatementResponse> getStatement({
  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.GetStatement'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      'SessionId': sessionId,
      if (requestOrigin != null) 'RequestOrigin': requestOrigin,
    },
  );

  return GetStatementResponse.fromJson(jsonResponse.body);
}