listTopicRules method

Future<ListTopicRulesResponse> listTopicRules({
  1. int? maxResults,
  2. String? nextToken,
  3. bool? ruleDisabled,
  4. String? topic,
})

Lists the rules for the specific topic.

May throw InternalException. May throw InvalidRequestException. May throw ServiceUnavailableException.

Parameter maxResults : The maximum number of results to return.

Parameter nextToken : To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

Parameter ruleDisabled : Specifies whether the rule is disabled.

Parameter topic : The topic.

Implementation

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