listArchiveRules method

Future<ListArchiveRulesResponse> listArchiveRules({
  1. required String analyzerName,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves a list of archive rules created for the specified analyzer.

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

Parameter analyzerName : The name of the analyzer to retrieve rules from.

Parameter maxResults : The maximum number of results to return in the request.

Parameter nextToken : A token used for pagination of results returned.

Implementation

Future<ListArchiveRulesResponse> listArchiveRules({
  required String analyzerName,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(analyzerName, 'analyzerName');
  _s.validateStringLength(
    'analyzerName',
    analyzerName,
    1,
    255,
    isRequired: true,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/analyzer/${Uri.encodeComponent(analyzerName)}/archive-rule',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListArchiveRulesResponse.fromJson(response);
}