def allocate_eip_address(domain=None, region=None, key=None, keyid=None, profile=None):
 if (domain and (domain != 'vpc')):
  raise SaltInvocationError("The only permitted value for the 'domain' param is 'vpc'.")
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 try:
  address = conn.allocate_address(domain=domain)
 except boto.exception.BotoServerError as e:
  log.error(e)
  return False
 interesting = ['allocation_id', 'association_id', 'domain', 'instance_id', 'network_interface_id', 'network_interface_owner_id', 'public_ip', 'private_ip_address']
 return dict([(x, getattr(address, x)) for x in interesting])

def allocate_eip_address ( domain = None , region = None , key = None , keyid = None , profile = None ) : if ( domain and ( domain != 'vpc' ) ) : raise SaltInvocationError ( "The only permitted value for the 'domain' param is 'vpc'." ) conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) try : address = conn . allocate_address ( domain = domain ) except boto . exception . BotoServerError as e : log . error ( e ) return False interesting = [ 'allocation_id' , 'association_id' , 'domain' , 'instance_id' , 'network_interface_id' , 'network_interface_owner_id' , 'public_ip' , 'private_ip_address' ] return dict ( [ ( x , getattr ( address , x ) ) for x in interesting ] )
release an eip from your eip pool args: client : boto3 client kwargs: check_mode : if set to true .