def key_exists(key_id, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 r = {}
 try:
  key = conn.describe_key(key_id)
  r['result'] = True
 except boto.exception.BotoServerError as e:
  if isinstance(e, boto.kms.exceptions.NotFoundException):
   r['result'] = False
   return r
  r['error'] = __utils__['boto.get_error'](e)
 return r

def key_exists ( key_id , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = { } try : key = conn . describe_key ( key_id ) r [ 'result' ] = True except boto . exception . BotoServerError as e : if isinstance ( e , boto . kms . exceptions . NotFoundException ) : r [ 'result' ] = False return r r [ 'error' ] = __utils__ [ 'boto.get_error' ] ( e ) return r
check for the existence of a key .