Skip to main content

prefect.server.events.schemas.automations

Classes

Posture

Methods:

auto

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

TriggerState

Methods:

auto

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

Trigger

Base class describing a set of criteria that must be satisfied in order to trigger an automation. Methods:

all_triggers

Returns all triggers within this trigger

automation

create_automation_state_change_event

model_validate_list

parent

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.

reset_ids

Resets the ID of this trigger and all of its children

CompositeTrigger

Requires some number of triggers to have fired within the given time period. Methods:

actions

all_triggers

as_automation

child_trigger_ids

create_automation_state_change_event

Returns a ReceivedEvent for an automation state change into a triggered or resolved state.

describe_for_cli

Return a human-readable description of this trigger for the CLI

num_expected_firings

owner_resource

ready_to_fire

set_deployment_id

CompoundTrigger

A composite trigger that requires some number of triggers to have fired within the given time period Methods:

num_expected_firings

ready_to_fire

validate_require

SequenceTrigger

A composite trigger that requires some number of triggers to have fired within the given time period in a specific order Methods:

expected_firing_order

ready_to_fire

ResourceTrigger

Base class for triggers that may filter by the labels of resources. Methods:

actions

as_automation

coerce_match

covers_resources

describe_for_cli

Return a human-readable description of this trigger for the CLI

owner_resource

set_deployment_id

EventTrigger

A trigger that fires based on the presence or absence of events within a given period of time. Methods:

bucketing_key

coerce_match

covers

create_automation_state_change_event

Returns a ReceivedEvent for an automation state change into a triggered or resolved state.

enforce_minimum_within_for_proactive_triggers

event_pattern

A regular expression which may be evaluated against any event string to determine if this trigger would be interested in the event

expects

immediate

Does this reactive trigger fire immediately for all events?

meets_threshold

starts_after

AutomationCore

Defines an action a user wants to take when a certain number of events do or don’t happen to the matching resources Methods:

model_validate_list

prevent_run_deployment_loops

Detects potential infinite loops in automations with RunDeployment actions

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.

trigger_by_id

Returns the trigger with the given ID, or None if no such trigger exists

triggers

Returns all triggers within this automation

triggers_of_type

Returns all triggers of the specified type within this automation

Automation

Methods:

model_validate

AutomationCreate

AutomationUpdate

AutomationPartialUpdate

AutomationSort

Defines automations sorting options. Methods:

auto

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

Firing

Represents one instance of a trigger firing Methods:

all_events

all_firings

model_validate_list

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.

validate_trigger_states

TriggeredAction

An action caused as the result of an automation Methods:

all_events

all_firings

idempotency_key

Produce a human-friendly idempotency key for this action

model_validate_list

reset_fields

Reset the fields of the model that are in the _reset_fields set. Returns:
  • A new instance of the model with the reset fields.