> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# filters

# `prefect.events.filters`

## Classes

### `AutomationFilterId` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L17](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L17)</sup>

Filter by `Automation.id`.

**Methods:**

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

### `AutomationFilterCreated` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L25](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L25)</sup>

Filter by `Automation.created`.

**Methods:**

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

### `AutomationFilterName` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L34](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L34)</sup>

Filter by `Automation.created`.

**Methods:**

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

### `AutomationFilterTags` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L43](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L43)</sup>

Filter by `Automation.tags`.

**Methods:**

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

### `AutomationFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L62](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L62)</sup>

**Methods:**

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

### `EventDataFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L77](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L77)</sup>

A base class for filtering event data.

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

### `EventOccurredFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L107](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L107)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L120](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L120)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventNameFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L124](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L124)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L140](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L140)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventResourceFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L160](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L160)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L178](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L178)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventRelatedFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L196](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L196)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventAnyResourceFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L217](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L217)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L232](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L232)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventIDFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L254](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L254)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L259](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L259)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventTextFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L267](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L267)</sup>

Filter by text search across event content.

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?

### `EventOrder` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L282](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L282)</sup>

**Methods:**

#### `auto` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/utilities/collections.py#L70](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/utilities/collections.py#L70)</sup>

```python theme={null}
auto() -> str
```

Exposes `enum.auto()` to avoid requiring a second import to use `AutoEnum`

### `EventFilter` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L287](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L287)</sup>

**Methods:**

#### `excludes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L102)</sup>

```python theme={null}
excludes(self, event: Event) -> bool
```

Would the given filter exclude this event?

#### `get_filters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L80)</sup>

```python theme={null}
get_filters(self) -> list['EventDataFilter']
```

#### `includes` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/filters.py#L98)</sup>

```python theme={null}
includes(self, event: Event) -> bool
```

Does the given event match the criteria of this filter?
