def list_topic_rules(topic=None, ruleDisabled=None, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  kwargs = {}
  if (topic is not None):
   kwargs['topic'] = topic
  if (ruleDisabled is not None):
   kwargs['ruleDisabled'] = ruleDisabled
  rules = []
  for ret in salt.utils.boto3.paged_call(conn.list_topic_rules, marker_flag='nextToken', marker_arg='nextToken', **kwargs):
   rules.extend(ret['rules'])
  if (not bool(rules)):
   log.warning('No rules found')
  return {'rules': rules}
 except ClientError as e:
  return {'error': salt.utils.boto3.get_error(e)}

def list_topic_rules ( topic = None , ruleDisabled = None , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) kwargs = { } if ( topic is not None ) : kwargs [ 'topic' ] = topic if ( ruleDisabled is not None ) : kwargs [ 'ruleDisabled' ] = ruleDisabled rules = [ ] for ret in salt . utils . boto3 . paged_call ( conn . list_topic_rules , marker_flag = 'nextToken' , marker_arg = 'nextToken' , ** kwargs ) : rules . extend ( ret [ 'rules' ] ) if ( not bool ( rules ) ) : log . warning ( 'No rules found' ) return { 'rules' : rules } except ClientError as e : return { 'error' : salt . utils . boto3 . get_error ( e ) }
list all rules returns list of rules cli example: .