def revoke_cache_security_group_ingress(name, ec2_security_group_name, ec2_security_group_owner_id, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 try:
  removed = conn.revoke_cache_security_group_ingress(name, ec2_security_group_name, ec2_security_group_owner_id)
  if removed:
   msg = 'Removed {0} from cache security group {1}.'
   msg = msg.format(name, ec2_security_group_name)
   log.info(msg)
   return True
  else:
   msg = 'Failed to remove {0} from cache security group {1}.'
   msg = msg.format(name, ec2_security_group_name)
   log.error(msg)
   return False
 except boto.exception.EC2ResponseError as e:
  log.debug(e)
  msg = 'Failed to remove {0} from cache security group {1}.'
  msg = msg.format(name, ec2_security_group_name)
  log.error(msg)
  return False

def revoke_cache_security_group_ingress ( name , ec2_security_group_name , ec2_security_group_owner_id , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) try : removed = conn . revoke_cache_security_group_ingress ( name , ec2_security_group_name , ec2_security_group_owner_id ) if removed : msg = 'Removed {0} from cache security group {1}.' msg = msg . format ( name , ec2_security_group_name ) log . info ( msg ) return True else : msg = 'Failed to remove {0} from cache security group {1}.' msg = msg . format ( name , ec2_security_group_name ) log . error ( msg ) return False except boto . exception . EC2ResponseError as e : log . debug ( e ) msg = 'Failed to remove {0} from cache security group {1}.' msg = msg . format ( name , ec2_security_group_name ) log . error ( msg ) return False
revoke network ingress from an ec2 security group to a cache security group .