def associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None):
 try:
  vpc_id = check_vpc(vpc_id, vpc_name, region, key, keyid, profile)
  if (not vpc_id):
   return {'associated': False, 'error': {'message': 'VPC {0} does not exist.'.format((vpc_name or vpc_id))}}
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  if conn.associate_dhcp_options(dhcp_options_id, vpc_id):
   log.info('DHCP options with id {0} were associated with VPC {1}'.format(dhcp_options_id, vpc_id))
   return {'associated': True}
  else:
   log.warning('DHCP options with id {0} were not associated with VPC {1}'.format(dhcp_options_id, vpc_id))
   return {'associated': False, 'error': {'message': 'DHCP options could not be associated.'}}
 except BotoServerError as e:
  return {'associated': False, 'error': salt.utils.boto.get_error(e)}

def associate_dhcp_options_to_vpc ( dhcp_options_id , vpc_id = None , vpc_name = None , region = None , key = None , keyid = None , profile = None ) : try : vpc_id = check_vpc ( vpc_id , vpc_name , region , key , keyid , profile ) if ( not vpc_id ) : return { 'associated' : False , 'error' : { 'message' : 'VPC {0} does not exist.' . format ( ( vpc_name or vpc_id ) ) } } conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) if conn . associate_dhcp_options ( dhcp_options_id , vpc_id ) : log . info ( 'DHCP options with id {0} were associated with VPC {1}' . format ( dhcp_options_id , vpc_id ) ) return { 'associated' : True } else : log . warning ( 'DHCP options with id {0} were not associated with VPC {1}' . format ( dhcp_options_id , vpc_id ) ) return { 'associated' : False , 'error' : { 'message' : 'DHCP options could not be associated.' } } except BotoServerError as e : return { 'associated' : False , 'error' : salt . utils . boto . get_error ( e ) }
given valid dhcp options id and a valid vpc id .