def list_targets(Rule, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  targets = conn.list_targets_by_rule(Rule=Rule)
  ret = []
  if (targets and ('Targets' in targets)):
   keys = ('Id', 'Arn', 'Input', 'InputPath')
   for target in targets.get('Targets'):
    ret.append(dict([(k, target.get(k)) for k in keys if (k in target)]))
   return {'targets': ret}
  else:
   return {'targets': None}
 except ClientError as e:
  err = __utils__['boto3.get_error'](e)
  if (e.response.get('Error', {}).get('Code') == 'RuleNotFoundException'):
   return {'error': 'Rule {0} not found'.format(Rule)}
  return {'error': __utils__['boto3.get_error'](e)}

def list_targets ( Rule , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) targets = conn . list_targets_by_rule ( Rule = Rule ) ret = [ ] if ( targets and ( 'Targets' in targets ) ) : keys = ( 'Id' , 'Arn' , 'Input' , 'InputPath' ) for target in targets . get ( 'Targets' ) : ret . append ( dict ( [ ( k , target . get ( k ) ) for k in keys if ( k in target ) ] ) ) return { 'targets' : ret } else : return { 'targets' : None } except ClientError as e : err = __utils__ [ 'boto3.get_error' ] ( e ) if ( e . response . get ( 'Error' , { } ) . get ( 'Code' ) == 'RuleNotFoundException' ) : return { 'error' : 'Rule {0} not found' . format ( Rule ) } return { 'error' : __utils__ [ 'boto3.get_error' ] ( e ) }
given a rule name list the targets of that rule .