listCrawls method
Returns all the crawls of a specified crawler. Returns only the crawls that have occurred since the launch date of the crawler history feature, and only retains up to 12 months of crawls. Older crawls will not be returned.
You may use this API to:
- Retrive all the crawls of a specified crawler.
- Retrieve all the crawls of a specified crawler within a limited count.
- Retrieve all the crawls of a specified crawler in a specific time range.
- Retrieve all the crawls of a specified crawler with a particular state, crawl ID, or DPU hour value.
May throw EntityNotFoundException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter crawlerName :
The name of the crawler whose runs you want to retrieve.
Parameter filters :
Filters the crawls by the criteria you specify in a list of
CrawlsFilter objects.
Parameter maxResults :
The maximum number of results to return. The default is 20, and maximum is
100.
Parameter nextToken :
A continuation token, if this is a continuation call.
Implementation
Future<ListCrawlsResponse> listCrawls({
required String crawlerName,
List<CrawlsFilter>? filters,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.ListCrawls'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CrawlerName': crawlerName,
if (filters != null) 'Filters': filters,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListCrawlsResponse.fromJson(jsonResponse.body);
}