def remove_targets(Rule, Ids, region=None, key=None, keyid=None, profile=None):
 try:
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  if isinstance(Ids, string_types):
   Ids = json.loads(Ids)
  failures = conn.remove_targets(Rule=Rule, Ids=Ids)
  if (failures and (failures.get('FailedEntryCount', 0) > 0)):
   return {'failures': failures.get('FailedEntries', 1)}
  else:
   return {'failures': 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 remove_targets ( Rule , Ids , region = None , key = None , keyid = None , profile = None ) : try : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if isinstance ( Ids , string_types ) : Ids = json . loads ( Ids ) failures = conn . remove_targets ( Rule = Rule , Ids = Ids ) if ( failures and ( failures . get ( 'FailedEntryCount' , 0 ) > 0 ) ) : return { 'failures' : failures . get ( 'FailedEntries' , 1 ) } else : return { 'failures' : 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 remove the named targets from the target list returns a dictionary describing any failures .