listAutomationRules method

Future<ListAutomationRulesResponse> listAutomationRules({
  1. int? maxResults,
  2. String? nextToken,
})

A list of automation rules and their metadata for the calling account.

May throw AccessDeniedException. May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException.

Parameter maxResults : The maximum number of rules to return in the response. This currently ranges from 1 to 100.

Parameter nextToken : A token to specify where to start paginating the response. This is the NextToken from a previously truncated response. On your first call to the ListAutomationRules API, set the value of this parameter to NULL.

Implementation

Future<ListAutomationRulesResponse> listAutomationRules({
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  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: '/automationrules/list',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAutomationRulesResponse.fromJson(response);
}