docs/v3/api-ref/python/prefect-server-events-models-automations.mdx
prefect.server.events.models.automationsautomations_session <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L34" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>automations_session(db: PrefectDBInterface, begin_transaction: bool = False) -> AsyncGenerator[AsyncSession, None]
read_automations_for_workspace <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L42" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>read_automations_for_workspace(db: PrefectDBInterface, session: AsyncSession, sort: AutomationSort = AutomationSort.NAME_ASC, limit: Optional[int] = None, offset: Optional[int] = None, automation_filter: Optional[filters.AutomationFilter] = None) -> Sequence[Automation]
count_automations_for_workspace <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>count_automations_for_workspace(db: PrefectDBInterface, session: AsyncSession) -> int
read_automation <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L82" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>read_automation(db: PrefectDBInterface, session: AsyncSession, automation_id: UUID) -> Optional[Automation]
read_automation_by_id <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L96" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>read_automation_by_id(db: PrefectDBInterface, session: AsyncSession, automation_id: UUID) -> Optional[Automation]
create_automation <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L168" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>create_automation(db: PrefectDBInterface, session: AsyncSession, automation: Automation) -> Automation
update_automation <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L183" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>update_automation(db: PrefectDBInterface, session: AsyncSession, automation_update: Union[AutomationUpdate, AutomationPartialUpdate], automation_id: UUID) -> bool
delete_automation <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L227" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>delete_automation(db: PrefectDBInterface, session: AsyncSession, automation_id: UUID) -> bool
delete_automations_for_workspace <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L267" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>delete_automations_for_workspace(db: PrefectDBInterface, session: AsyncSession) -> bool
disable_automations_for_workspace <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L289" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>disable_automations_for_workspace(db: PrefectDBInterface, session: AsyncSession) -> bool
disable_automation <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L301" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>disable_automation(db: PrefectDBInterface, session: AsyncSession, automation_id: UUID) -> bool
relate_automation_to_resource <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L354" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>relate_automation_to_resource(db: PrefectDBInterface, session: AsyncSession, automation_id: UUID, resource_id: str, owned_by_resource: bool) -> None
read_automations_related_to_resource <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L385" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>read_automations_related_to_resource(db: PrefectDBInterface, session: AsyncSession, resource_id: str, owned_by_resource: Optional[bool] = None, automation_filter: Optional[filters.AutomationFilter] = None) -> Sequence[Automation]
delete_automations_owned_by_resource <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/models/automations.py#L416" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>delete_automations_owned_by_resource(db: PrefectDBInterface, session: AsyncSession, resource_id: str, automation_filter: Optional[filters.AutomationFilter] = None) -> Sequence[UUID]