getPreparedStatement method

Future<GetPreparedStatementOutput> getPreparedStatement({
  1. required String statementName,
  2. required String workGroup,
})

Retrieves the prepared statement with the specified name from the specified workgroup.

May throw InternalServerException. May throw InvalidRequestException. May throw ResourceNotFoundException.

Parameter statementName : The name of the prepared statement to retrieve.

Parameter workGroup : The workgroup to which the statement to be retrieved belongs.

Implementation

Future<GetPreparedStatementOutput> getPreparedStatement({
  required String statementName,
  required String workGroup,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonAthena.GetPreparedStatement'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'StatementName': statementName,
      'WorkGroup': workGroup,
    },
  );

  return GetPreparedStatementOutput.fromJson(jsonResponse.body);
}