def create_api_key(name, description, enabled=True, stageKeys=None, region=None, key=None, keyid=None, profile=None):
 try:
  stageKeys = (list() if (stageKeys is None) else stageKeys)
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  response = conn.create_api_key(name=name, description=description, enabled=enabled, stageKeys=stageKeys)
  if (not response):
   return {'created': False}
  return {'created': True, 'apiKey': _convert_datetime_str(response)}
 except ClientError as e:
  return {'created': False, 'error': salt.utils.boto3.get_error(e)}

def create_api_key ( name , description , enabled = True , stageKeys = None , region = None , key = None , keyid = None , profile = None ) : try : stageKeys = ( list ( ) if ( stageKeys is None ) else stageKeys ) conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) response = conn . create_api_key ( name = name , description = description , enabled = enabled , stageKeys = stageKeys ) if ( not response ) : return { 'created' : False } return { 'created' : True , 'apiKey' : _convert_datetime_str ( response ) } except ClientError as e : return { 'created' : False , 'error' : salt . utils . boto3 . get_error ( e ) }
create an api key given name and description .