createRecipeJob method

Future<CreateRecipeJobResponse> createRecipeJob({
  1. required String name,
  2. required String roleArn,
  3. List<DataCatalogOutput>? dataCatalogOutputs,
  4. List<DatabaseOutput>? databaseOutputs,
  5. String? datasetName,
  6. String? encryptionKeyArn,
  7. EncryptionMode? encryptionMode,
  8. LogSubscription? logSubscription,
  9. int? maxCapacity,
  10. int? maxRetries,
  11. List<Output>? outputs,
  12. String? projectName,
  13. RecipeReference? recipeReference,
  14. Map<String, String>? tags,
  15. int? timeout,
})

Creates a new job to transform input data, using steps defined in an existing Glue DataBrew recipe

May throw AccessDeniedException. May throw ConflictException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException.

Parameter name : A unique name for the job. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and space.

Parameter roleArn : The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.

Parameter dataCatalogOutputs : One or more artifacts that represent the Glue Data Catalog output from running the job.

Parameter databaseOutputs : Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write to.

Parameter datasetName : The name of the dataset that this job processes.

Parameter encryptionKeyArn : The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.

Parameter encryptionMode : The encryption mode for the job, which can be one of the following:

  • SSE-KMS - Server-side encryption with keys managed by KMS.
  • SSE-S3 - Server-side encryption with keys managed by Amazon S3.

Parameter logSubscription : Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.

Parameter maxCapacity : The maximum number of nodes that DataBrew can consume when the job processes data.

Parameter maxRetries : The maximum number of times to retry the job after a job run fails.

Parameter outputs : One or more artifacts that represent the output from running the job.

Parameter projectName : Either the name of an existing project, or a combination of a recipe and a dataset to associate with the recipe.

Parameter tags : Metadata tags to apply to this job.

Parameter timeout : The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of TIMEOUT.

Implementation

Future<CreateRecipeJobResponse> createRecipeJob({
  required String name,
  required String roleArn,
  List<DataCatalogOutput>? dataCatalogOutputs,
  List<DatabaseOutput>? databaseOutputs,
  String? datasetName,
  String? encryptionKeyArn,
  EncryptionMode? encryptionMode,
  LogSubscription? logSubscription,
  int? maxCapacity,
  int? maxRetries,
  List<Output>? outputs,
  String? projectName,
  RecipeReference? recipeReference,
  Map<String, String>? tags,
  int? timeout,
}) async {
  _s.validateNumRange(
    'maxRetries',
    maxRetries,
    0,
    1152921504606846976,
  );
  _s.validateNumRange(
    'timeout',
    timeout,
    0,
    1152921504606846976,
  );
  final $payload = <String, dynamic>{
    'Name': name,
    'RoleArn': roleArn,
    if (dataCatalogOutputs != null) 'DataCatalogOutputs': dataCatalogOutputs,
    if (databaseOutputs != null) 'DatabaseOutputs': databaseOutputs,
    if (datasetName != null) 'DatasetName': datasetName,
    if (encryptionKeyArn != null) 'EncryptionKeyArn': encryptionKeyArn,
    if (encryptionMode != null) 'EncryptionMode': encryptionMode.value,
    if (logSubscription != null) 'LogSubscription': logSubscription.value,
    if (maxCapacity != null) 'MaxCapacity': maxCapacity,
    if (maxRetries != null) 'MaxRetries': maxRetries,
    if (outputs != null) 'Outputs': outputs,
    if (projectName != null) 'ProjectName': projectName,
    if (recipeReference != null) 'RecipeReference': recipeReference,
    if (tags != null) 'Tags': tags,
    if (timeout != null) 'Timeout': timeout,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/recipeJobs',
    exceptionFnMap: _exceptionFns,
  );
  return CreateRecipeJobResponse.fromJson(response);
}