def create_api_deployment(restApiId, stageName, stageDescription='', description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None):
 try:
  variables = (dict() if (variables is None) else variables)
  conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
  deployment = conn.create_deployment(restApiId=restApiId, stageName=stageName, stageDescription=stageDescription, description=description, cacheClusterEnabled=cacheClusterEnabled, cacheClusterSize=cacheClusterSize, variables=variables)
  return {'created': True, 'deployment': _convert_datetime_str(deployment)}
 except ClientError as e:
  return {'created': False, 'error': salt.utils.boto3.get_error(e)}

def create_api_deployment ( restApiId , stageName , stageDescription = '' , description = '' , cacheClusterEnabled = False , cacheClusterSize = '0.5' , variables = None , region = None , key = None , keyid = None , profile = None ) : try : variables = ( dict ( ) if ( variables is None ) else variables ) conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) deployment = conn . create_deployment ( restApiId = restApiId , stageName = stageName , stageDescription = stageDescription , description = description , cacheClusterEnabled = cacheClusterEnabled , cacheClusterSize = cacheClusterSize , variables = variables ) return { 'created' : True , 'deployment' : _convert_datetime_str ( deployment ) } except ClientError as e : return { 'created' : False , 'error' : salt . utils . boto3 . get_error ( e ) }
creates a new api deployment .