listCoverage method

Future<ListCoverageResponse> listCoverage({
  1. CoverageFilterCriteria? filterCriteria,
  2. int? maxResults,
  3. String? nextToken,
})

Lists coverage details for your environment.

May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter filterCriteria : An object that contains details on the filters to apply to the coverage data for your environment.

Parameter maxResults : The maximum number of results the response can return. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

Parameter nextToken : A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the maxResults maximum value it will also return a nextToken value. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.

Implementation

Future<ListCoverageResponse> listCoverage({
  CoverageFilterCriteria? filterCriteria,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    200,
  );
  final $payload = <String, dynamic>{
    if (filterCriteria != null) 'filterCriteria': filterCriteria,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/coverage/list',
    exceptionFnMap: _exceptionFns,
  );
  return ListCoverageResponse.fromJson(response);
}