Skip to content

update_recipe_job async

update_recipe_job(
    name: JobName,
    role_arn: Arn,
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = None,
    encryption_key_arn: Optional[EncryptionKeyArn] = None,
    encryption_mode: Optional[EncryptionMode] = None,
    log_subscription: Optional[LogSubscription] = None,
    max_capacity: Optional[MaxCapacity] = None,
    max_retries: Optional[MaxRetries] = None,
    outputs: Optional[OutputList] = None,
    data_catalog_outputs: Optional[DataCatalogOutputList] = None,
    database_outputs: Optional[DatabaseOutputList] = None,
    timeout: Optional[Timeout] = None,
) -> UpdateRecipeJobResponse

Modifies the definition of an existing DataBrew recipe job.

Parameters:

  • encryption_key_arn (Optional[EncryptionKeyArn], default: None ) –

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

  • encryption_mode (Optional[EncryptionMode], default: None ) –

    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.

  • name (JobName) –

    The name of the job to update.

  • log_subscription (Optional[LogSubscription], default: None ) –

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

  • max_capacity (Optional[MaxCapacity], default: None ) –

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

  • max_retries (Optional[MaxRetries], default: None ) –

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

  • outputs (Optional[OutputList], default: None ) –

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

  • data_catalog_outputs (Optional[DataCatalogOutputList], default: None ) –

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

  • database_outputs (Optional[DatabaseOutputList], default: None ) –

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

  • role_arn (Arn) –

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

  • timeout (Optional[Timeout], default: None ) –

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

Raises:

Source code in docs_src/capo_databrew/_services/async_data_brew.py
async def update_recipe_job(
    self,
    name: "capo_databrew.types.job_name.JobName",
    role_arn: "capo_databrew.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = None,
    encryption_key_arn: Optional[
        "capo_databrew.types.encryption_key_arn.EncryptionKeyArn"
    ] = None,
    encryption_mode: Optional[
        "capo_databrew.types.encryption_mode.EncryptionMode"
    ] = None,
    log_subscription: Optional[
        "capo_databrew.types.log_subscription.LogSubscription"
    ] = None,
    max_capacity: Optional["capo_databrew.types.max_capacity.MaxCapacity"] = None,
    max_retries: Optional["capo_databrew.types.max_retries.MaxRetries"] = None,
    outputs: Optional["capo_databrew.types.output_list.OutputList"] = None,
    data_catalog_outputs: Optional[
        "capo_databrew.types.data_catalog_output_list.DataCatalogOutputList"
    ] = None,
    database_outputs: Optional[
        "capo_databrew.types.database_output_list.DatabaseOutputList"
    ] = None,
    timeout: Optional["capo_databrew.types.timeout.Timeout"] = None,
) -> "capo_databrew.types.update_recipe_job_response.UpdateRecipeJobResponse":
    """<p>Modifies the definition of an existing DataBrew recipe job.</p>

    Args:
        encryption_key_arn: <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job.</p>
        encryption_mode: <p>The encryption mode for the job, which can be one of the following:</p> <ul> <li> <p> <code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p> </li> <li> <p> <code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p> </li> </ul>
        name: <p>The name of the job to update.</p>
        log_subscription: <p>Enables or disables Amazon CloudWatch logging for the job. If logging is enabled, CloudWatch writes one log stream for each job run.</p>
        max_capacity: <p>The maximum number of nodes that DataBrew can consume when the job processes data.</p>
        max_retries: <p>The maximum number of times to retry the job after a job run fails.</p>
        outputs: <p>One or more artifacts that represent the output from running the job. </p>
        data_catalog_outputs: <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
        database_outputs: <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role to be assumed when DataBrew runs the job.</p>
        timeout: <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>

    Raises:
        capo_databrew.errors.access_denied_exception.AccessDeniedException: <p>Access to the specified resource was denied.</p>
        capo_databrew.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_databrew.errors.validation_exception.ValidationException: <p>The input parameters for this request failed validation.</p>
        capo_databrew.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_databrew.types.update_recipe_job_request.UpdateRecipeJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_databrew.types.update_recipe_job_response.UpdateRecipeJobResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.update_recipe_job

        (
            output,
            http_response,
        ) = await capo_databrew._operations.aws_glue_data_brew.update_recipe_job.async_update_recipe_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRecipeJob")
    )
    input_: capo_databrew.types.update_recipe_job_request.UpdateRecipeJobRequest = {
        "name": name,
        "role_arn": role_arn,
    }
    if encryption_key_arn is not None:
        input_["encryption_key_arn"] = encryption_key_arn
    if encryption_mode is not None:
        input_["encryption_mode"] = encryption_mode
    if log_subscription is not None:
        input_["log_subscription"] = log_subscription
    if max_capacity is not None:
        input_["max_capacity"] = max_capacity
    if max_retries is not None:
        input_["max_retries"] = max_retries
    if outputs is not None:
        input_["outputs"] = outputs
    if data_catalog_outputs is not None:
        input_["data_catalog_outputs"] = data_catalog_outputs
    if database_outputs is not None:
        input_["database_outputs"] = database_outputs
    if timeout is not None:
        input_["timeout"] = timeout

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output