MWAAServerless / Client / stop_workflow_run

stop_workflow_run

MWAAServerless.Client.stop_workflow_run(**kwargs)

Stops a running workflow execution. This operation terminates all running tasks and prevents new tasks from starting. Amazon Managed Workflows for Apache Airflow Serverless gracefully shuts down the workflow execution by stopping task scheduling and terminating active ECS worker containers. The operation transitions the workflow run to a STOPPING state and then to STOPPED once all cleanup is complete. In-flight tasks may complete or be terminated depending on their current execution state.

See also: AWS API Documentation

Request Syntax

response = client.stop_workflow_run(
    WorkflowArn='string',
    RunId='string'
)
Parameters:
  • WorkflowArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the workflow that contains the run you want to stop.

  • RunId (string) –

    [REQUIRED]

    The unique identifier of the workflow run to stop.

Return type:

dict

Returns:

Response Syntax

{
    'WorkflowArn': 'string',
    'WorkflowVersion': 'string',
    'RunId': 'string',
    'Status': 'STARTING'|'QUEUED'|'RUNNING'|'SUCCESS'|'FAILED'|'TIMEOUT'|'STOPPING'|'STOPPED'
}

Response Structure

  • (dict) –

    • WorkflowArn (string) –

      The Amazon Resource Name (ARN) of the workflow that contains the stopped run.

    • WorkflowVersion (string) –

      The version of the workflow that was stopped.

    • RunId (string) –

      The unique identifier of the stopped workflow run.

    • Status (string) –

      The status of the workflow run after the stop operation. This is typically STOPPING or STOPPED.

Exceptions

  • MWAAServerless.Client.exceptions.ThrottlingException

  • MWAAServerless.Client.exceptions.ValidationException

  • MWAAServerless.Client.exceptions.ResourceNotFoundException

  • MWAAServerless.Client.exceptions.AccessDeniedException

  • MWAAServerless.Client.exceptions.InternalServerException

  • MWAAServerless.Client.exceptions.OperationTimeoutException