startJobsQuery method
Start an asynchronous jobs query using the provided filters. To receive the list of jobs that match your query, call the GetJobsQueryResults API using the query ID returned by this API.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceQuotaExceededException.
May throw TooManyRequestsException.
Parameter filterList :
Optional. Provide an array of JobsQueryFilters for your StartJobsQuery
request.
Parameter maxResults :
Optional. Number of jobs, up to twenty, that will be included in the jobs
query.
Parameter nextToken :
Use this string to request the next batch of jobs matched by a jobs query.
Parameter order :
Optional. When you request lists of resources, you can specify whether
they are sorted in ASCENDING or DESCENDING order. Default varies by
resource.
Implementation
Future<StartJobsQueryResponse> startJobsQuery({
List<JobsQueryFilter>? filterList,
int? maxResults,
String? nextToken,
Order? order,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
20,
);
final $payload = <String, dynamic>{
if (filterList != null) 'filterList': filterList,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (order != null) 'order': order.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2017-08-29/jobsQueries',
exceptionFnMap: _exceptionFns,
);
return StartJobsQueryResponse.fromJson(response);
}