stop_workflow_run
¶
stop_workflow_run(
workflow_arn: WorkflowArn,
run_id: IdString,
*,
config_overrides: Optional[MWAAServerlessClientConfig] = None,
) -> StopWorkflowRunResponse
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.
Parameters:
-
workflow_arn(WorkflowArn) –The Amazon Resource Name (ARN) of the workflow that contains the run you want to stop.
-
run_id(IdString) –The unique identifier of the workflow run to stop.
Raises:
-
AccessDeniedException–You do not have sufficient permission to perform this action.
-
InternalServerException–An unexpected server-side error occurred during request processing.
-
OperationTimeoutException–The operation timed out.
-
ResourceNotFoundException–The specified resource was not found. You can only access or modify a resource that already exists.
-
ThrottlingException–The request was denied because too many requests were made in a short period, exceeding the service rate limits. Amazon Managed Workflows for Apache Airflow Serverless implements throttling controls to ensure fair resource allocation across all customers in the multi-tenant environment. This helps maintain service stability and performance. If you encounter throttling, implement exponential backoff and retry logic in your applications, or consider distributing your API calls over a longer time period.
-
ValidationException–The specified request parameters are invalid, missing, or inconsistent with Amazon Managed Workflows for Apache Airflow Serverless service requirements. This can occur when workflow definitions contain unsupported operators, when required IAM permissions are missing, when S3 locations are inaccessible, or when network configurations are invalid. The service validates workflow definitions, execution roles, and resource configurations to ensure compatibility with the managed Airflow environment and security requirements.
-
UnknownServiceError–The service returned an error code this client does not model.