listQueryExecutions method
Provides a list of available query execution IDs for the queries in the specified workgroup. Athena keeps a query history for 45 days. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran.
May throw InternalServerException.
May throw InvalidRequestException.
Parameter maxResults :
The maximum number of query executions to return in this request.
Parameter nextToken :
A token generated by the Athena service that specifies where to continue
pagination if a previous request was truncated. To obtain the next set of
pages, pass in the NextToken from the response object of the
previous page call.
Parameter workGroup :
The name of the workgroup from which queries are being returned. If a
workgroup is not specified, a list of available query execution IDs for
the queries in the primary workgroup is returned.
Implementation
Future<ListQueryExecutionsOutput> listQueryExecutions({
int? maxResults,
String? nextToken,
String? workGroup,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
50,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.ListQueryExecutions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (workGroup != null) 'WorkGroup': workGroup,
},
);
return ListQueryExecutionsOutput.fromJson(jsonResponse.body);
}