# Built-in conditions

Condition classes implement specific logic for query check conditions.

Example usage:

```python
checks = [    
    ExecuteDurationCondition(
        name="AnalystDurationCheck",
        notice_duration=60 * 10,  # 10 minutes for notice
        warning_duration=60 * 20,  # 20 minutes for warning
        kill_duration=60 * 30,  # 30 minutes for kill
        query_filter=QueryFilter(
            include_user_name=["ANALYST_*"],
        ),
        enable_kill=True,
        enable_kill_query_filter=QueryFilter(
            exclude_warehouse_name=["ANALYST_SPECIAL_WH"],
        ),
    ),
]
```

### Common arguments

* **name** (str) - name, used to distinguish multiple checks of the same type (default: name of condition class)
* **notice\_duration** (int) - how long query should run to produce result with level `NOTICE` if it matches other condition, in seconds
* **warning\_duration** (int) - how long query should run to produce result with level `WARNING` if it matches conditions, in seconds
* **kill\_duration** (int) - how long query should run to produce result with level `KILL` if it matches other condition, in seconds
* **query\_filter** ([QueryFilter](https://docs.snowkill.net/condition/query-filters)) - narrow down scope of condition using filter
* **enable\_kill** (bool) - should be set to `True` for queries matching condition and exceeding `kill_duration` to be actually killed
* **enable\_kill\_query\_filter** ([QueryFilter](https://docs.snowkill.net/condition/query-filters)) - narrow down scope of query killer using filter

Most condition classes also have specific arguments, which are described on corresponding sub-pages.
