#NEWLINE# def create( name , description , vpc_id = None , vpc_name = None , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# "\n    Create a security group.\n\n    CLI example::\n\n        salt myminion boto_secgroup.create mysecgroup 'My Security Group'\n    " #NEWLINE# conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# if ( ( not vpc_id ) and vpc_name ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# vpc_id = _check_vpc ( vpc_id = vpc_id , vpc_name = vpc_name , region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# #UNINDENT# except boto . exception . BotoServerError as e : #NEWLINE# #INDENT# log . debug ( e ) #NEWLINE# return False #NEWLINE# #UNINDENT# #UNINDENT# created = conn . create_security_group ( name , description , vpc_id ) #NEWLINE# if created : #NEWLINE# #INDENT# log . info ( 'Created security group {0}.' . format ( name ) ) #NEWLINE# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = 'Failed to create security group {0}.' . format ( name ) #NEWLINE# log . error ( msg ) #NEWLINE# return False