def get_network_interface_id(name, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 r = {}
 try:
  enis = conn.get_all_network_interfaces(filters={'tag:Name': name})
  if (not enis):
   r['error'] = {'message': 'No ENIs found.'}
  elif (len(enis) > 1):
   r['error'] = {'message': 'Name specified is tagged on multiple ENIs.'}
  else:
   eni = enis[0]
   r['result'] = eni.id
 except boto.exception.EC2ResponseError as e:
  r['error'] = __utils__['boto.get_error'](e)
 return r

def get_network_interface_id ( name , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = { } try : enis = conn . get_all_network_interfaces ( filters = { 'tag:Name' : name } ) if ( not enis ) : r [ 'error' ] = { 'message' : 'No ENIs found.' } elif ( len ( enis ) > 1 ) : r [ 'error' ] = { 'message' : 'Name specified is tagged on multiple ENIs.' } else : eni = enis [ 0 ] r [ 'result' ] = eni . id except boto . exception . EC2ResponseError as e : r [ 'error' ] = __utils__ [ 'boto.get_error' ] ( e ) return r
get an elastic network interface id from its name tag .