def generate_data_key(key_id, encryption_context=None, number_of_bytes=None, key_spec=None, grant_tokens=None, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 r = {}
 try:
  data_key = conn.generate_data_key(key_id, encryption_context=encryption_context, number_of_bytes=number_of_bytes, key_spec=key_spec, grant_tokens=grant_tokens)
  r['data_key'] = data_key
 except boto.exception.BotoServerError as e:
  r['error'] = __utils__['boto.get_error'](e)
 return r

def generate_data_key ( key_id , encryption_context = None , number_of_bytes = None , key_spec = None , grant_tokens = None , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = { } try : data_key = conn . generate_data_key ( key_id , encryption_context = encryption_context , number_of_bytes = number_of_bytes , key_spec = key_spec , grant_tokens = grant_tokens ) r [ 'data_key' ] = data_key except boto . exception . BotoServerError as e : r [ 'error' ] = __utils__ [ 'boto.get_error' ] ( e ) return r
generate a secure data key .