listStatements method

Future<ListStatementsResponse> listStatements({
  1. required String sessionId,
  2. String? nextToken,
  3. String? requestOrigin,
})

Lists statements for the session.

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

Parameter sessionId : The Session ID of the statements.

Parameter nextToken : A continuation token, if this is a continuation call.

Parameter requestOrigin : The origin of the request to list statements.

Implementation

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

  return ListStatementsResponse.fromJson(jsonResponse.body);
}