def get_key_policy(key_id, policy_name, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 r = {}
 try:
  key_policy = conn.get_key_policy(key_id, policy_name)
  r['key_policy'] = json.deserialize(key_policy['Policy'], object_pairs_hook=odict.OrderedDict)
 except boto.exception.BotoServerError as e:
  r['error'] = __utils__['boto.get_error'](e)
 return r

def get_key_policy ( key_id , policy_name , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = { } try : key_policy = conn . get_key_policy ( key_id , policy_name ) r [ 'key_policy' ] = json . deserialize ( key_policy [ 'Policy' ] , object_pairs_hook = odict . OrderedDict ) except boto . exception . BotoServerError as e : r [ 'error' ] = __utils__ [ 'boto.get_error' ] ( e ) return r
get the policy for the specified key .