getScheduledQueryHistory method
Retrieves the execution history of a scheduled query within a specified time range, including query results and destination processing status.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter endTime :
The end time for the history query in Unix epoch format.
Parameter identifier :
The ARN or name of the scheduled query to retrieve history for.
Parameter startTime :
The start time for the history query in Unix epoch format.
Parameter executionStatuses :
An array of execution statuses to filter the history results. Only
executions with the specified statuses are returned.
Parameter maxResults :
The maximum number of history records to return. Valid range is 1 to 1000.
Implementation
Future<GetScheduledQueryHistoryResponse> getScheduledQueryHistory({
required int endTime,
required String identifier,
required int startTime,
List<ExecutionStatus>? executionStatuses,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'endTime',
endTime,
0,
1152921504606846976,
isRequired: true,
);
_s.validateNumRange(
'startTime',
startTime,
0,
1152921504606846976,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Logs_20140328.GetScheduledQueryHistory'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'endTime': endTime,
'identifier': identifier,
'startTime': startTime,
if (executionStatuses != null)
'executionStatuses': executionStatuses.map((e) => e.value).toList(),
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return GetScheduledQueryHistoryResponse.fromJson(jsonResponse.body);
}