updatePreparedStatement method

Future<void> updatePreparedStatement({
  1. required String queryStatement,
  2. required String statementName,
  3. required String workGroup,
  4. String? description,
})

Updates a prepared statement.

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

Parameter queryStatement : The query string for the prepared statement.

Parameter statementName : The name of the prepared statement.

Parameter workGroup : The workgroup for the prepared statement.

Parameter description : The description of the prepared statement.

Implementation

Future<void> updatePreparedStatement({
  required String queryStatement,
  required String statementName,
  required String workGroup,
  String? description,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonAthena.UpdatePreparedStatement'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'QueryStatement': queryStatement,
      'StatementName': statementName,
      'WorkGroup': workGroup,
      if (description != null) 'Description': description,
    },
  );
}