getCrawlerMetrics method

Future<GetCrawlerMetricsResponse> getCrawlerMetrics({
  1. List<String>? crawlerNameList,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves metrics about specified crawlers.

May throw OperationTimeoutException.

Parameter crawlerNameList : A list of the names of crawlers about which to retrieve metrics.

Parameter maxResults : The maximum size of a list to return.

Parameter nextToken : A continuation token, if this is a continuation call.

Implementation

Future<GetCrawlerMetricsResponse> getCrawlerMetrics({
  List<String>? crawlerNameList,
  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.GetCrawlerMetrics'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (crawlerNameList != null) 'CrawlerNameList': crawlerNameList,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return GetCrawlerMetricsResponse.fromJson(jsonResponse.body);
}