batchGetPreparedStatement method

Future<BatchGetPreparedStatementOutput> batchGetPreparedStatement({
  1. required List<String> preparedStatementNames,
  2. required String workGroup,
})

Returns the details of a single prepared statement or a list of up to 256 prepared statements for the array of prepared statement names that you provide. Requires you to have access to the workgroup to which the prepared statements belong. If a prepared statement cannot be retrieved for the name specified, the statement is listed in UnprocessedPreparedStatementNames.

May throw InternalServerException. May throw InvalidRequestException.

Parameter preparedStatementNames : A list of prepared statement names to return.

Parameter workGroup : The name of the workgroup to which the prepared statements belong.

Implementation

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

  return BatchGetPreparedStatementOutput.fromJson(jsonResponse.body);
}