def topic_rule_exists(ruleName, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  rule = conn.get_topic_rule(ruleName=ruleName)
  return {'exists': True}
 except ClientError as e:
  err = salt.utils.boto3.get_error(e)
  if (e.response.get('Error', {}).get('Code') == 'UnauthorizedException'):
   return {'exists': False}
  return {'error': salt.utils.boto3.get_error(e)}

def topic_rule_exists ( ruleName , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) rule = conn . get_topic_rule ( ruleName = ruleName ) return { 'exists' : True } except ClientError as e : err = salt . utils . boto3 . get_error ( e ) if ( e . response . get ( 'Error' , { } ) . get ( 'Code' ) == 'UnauthorizedException' ) : return { 'exists' : False } return { 'error' : salt . utils . boto3 . get_error ( e ) }
given a rule name .