Skip to content

stop_job_run

stop_job_run(
    name: JobName,
    run_id: JobRunId,
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
) -> StopJobRunResponse

Stops a particular run of a job.

Parameters:

  • name (JobName) –

    The name of the job to be stopped.

  • run_id (JobRunId) –

    The ID of the job run to be stopped.

Raises:

Source code in docs_src/capo_databrew/_services/data_brew.py
def stop_job_run(
    self,
    name: "capo_databrew.types.job_name.JobName",
    run_id: "capo_databrew.types.job_run_id.JobRunId",
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
) -> "capo_databrew.types.stop_job_run_response.StopJobRunResponse":
    """<p>Stops a particular run of a job.</p>

    Args:
        name: <p>The name of the job to be stopped.</p>
        run_id: <p>The ID of the job run to be stopped.</p>

    Raises:
        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.
    """

    def _handler(
        req: "OperationRequest[capo_databrew.types.stop_job_run_request.StopJobRunRequest]",
    ) -> OperationResponse[
        "capo_databrew.types.stop_job_run_response.StopJobRunResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.stop_job_run

        output, http_response = (
            capo_databrew._operations.aws_glue_data_brew.stop_job_run.stop_job_run(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopJobRun")
    )
    input_: capo_databrew.types.stop_job_run_request.StopJobRunRequest = {
        "name": name,
        "run_id": run_id,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output