listRules method

Future<ListRulesResponse> listRules({
  1. int? maxResults,
  2. String? nextToken,
  3. String? resourceType,
})

Lists all readiness rules, or lists the readiness rules for a specific resource type.

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

Parameter maxResults : The number of objects that you want to return with this call.

Parameter nextToken : The token that identifies which batch of results you want to see.

Parameter resourceType : The resource type that a readiness rule applies to.

Implementation

Future<ListRulesResponse> listRules({
  int? maxResults,
  String? nextToken,
  String? resourceType,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (resourceType != null) 'resourceType': [resourceType],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/rules',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRulesResponse.fromJson(response);
}