Skip to content

stop_workflow_run async

stop_workflow_run(
    name: NameString,
    run_id: IdString,
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> StopWorkflowRunResponse

Stops the execution of the specified workflow run.

Parameters:

  • name (NameString) –

    The name of the workflow to stop.

  • run_id (IdString) –

    The ID of the workflow run to stop.

Raises:

Source code in docs_src/capo_glue/_services/async_glue.py
async def stop_workflow_run(
    self,
    name: "capo_glue.types.name_string.NameString",
    run_id: "capo_glue.types.id_string.IdString",
    *,
    config_overrides: Optional[AsyncGlueClientConfig] = None,
) -> "capo_glue.types.stop_workflow_run_response.StopWorkflowRunResponse":
    """<p>Stops the execution of the specified workflow run.</p>

    Args:
        name: <p>The name of the workflow to stop.</p>
        run_id: <p>The ID of the workflow run to stop.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.illegal_workflow_state_exception.IllegalWorkflowStateException: <p>The workflow is in an invalid state to perform a requested operation.</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_glue.types.stop_workflow_run_request.StopWorkflowRunRequest]",
    ) -> AsyncOperationResponse[
        "capo_glue.types.stop_workflow_run_response.StopWorkflowRunResponse"
    ]:
        import capo_glue._operations.aws_glue.stop_workflow_run

        (
            output,
            http_response,
        ) = await capo_glue._operations.aws_glue.stop_workflow_run.async_stop_workflow_run(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopWorkflowRun")
    )
    input_: capo_glue.types.stop_workflow_run_request.StopWorkflowRunRequest = {
        "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