def set_tags(tags, name=None, group_id=None, vpc_name=None, vpc_id=None, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 secgrp = _get_group(conn, name=name, vpc_id=vpc_id, vpc_name=vpc_name, group_id=group_id, region=region, key=key, keyid=keyid, profile=profile)
 if secgrp:
  if isinstance(tags, dict):
   secgrp.add_tags(tags)
  else:
   msg = 'Tags must be a dict of tagname:tagvalue'
   raise SaltInvocationError(msg)
 else:
  msg = 'The security group could not be found'
  raise SaltInvocationError(msg)
 return True

def set_tags ( tags , name = None , group_id = None , vpc_name = None , vpc_id = None , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) secgrp = _get_group ( conn , name = name , vpc_id = vpc_id , vpc_name = vpc_name , group_id = group_id , region = region , key = key , keyid = keyid , profile = profile ) if secgrp : if isinstance ( tags , dict ) : secgrp . add_tags ( tags ) else : msg = 'Tags must be a dict of tagname:tagvalue' raise SaltInvocationError ( msg ) else : msg = 'The security group could not be found' raise SaltInvocationError ( msg ) return True
sets tags on a security group .