Skip to content

stop_job_run async

stop_job_run(
    name: JobName,
    run_id: JobRunId,
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = 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/async_data_brew.py
async def stop_job_run(
    self,
    name: "capo_databrew.types.job_name.JobName",
    run_id: "capo_databrew.types.job_run_id.JobRunId",
    *,
    config_overrides: Optional[AsyncDataBrewClientConfig] = 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.
    """

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

        (
            output,
            http_response,
        ) = await capo_databrew._operations.aws_glue_data_brew.stop_job_run.async_stop_job_run(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output