pause_dag
Temporarily halt a specific directed acyclic graph (DAG) in Apache Airflow by specifying its ID, enabling control over workflow execution without deletion.
Instructions
Pause a DAG by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dag_id | Yes |
Implementation Reference
- src/airflow/dag.py:108-111 (handler)The main handler function for the 'pause_dag' tool. It pauses the specified DAG by creating a DAG object with is_paused=True and patching it via the Airflow DAG API, returning the response.async def pause_dag(dag_id: str) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: dag = DAG(is_paused=True) response = dag_api.patch_dag(dag_id=dag_id, dag=dag, update_mask=["is_paused"]) return [types.TextContent(type="text", text=str(response.to_dict()))]
- src/airflow/dag.py:22-22 (registration)Registration entry for the 'pause_dag' tool within the get_all_functions() list, which provides (function, name, description, read_only) tuples for tool registration.(pause_dag, "pause_dag", "Pause a DAG by ID", False),