Skip to main content

prefect.events.schemas.automations

Functions

trigger_discriminator

Discriminator for triggers that defaults to ‘event’ if no type is specified.

Classes

Posture

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:

actions

as_automation

describe_for_cli

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

model_validate_list

owner_resource

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.

set_deployment_id

ResourceTrigger

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

actions

as_automation

coerce_match

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:

coerce_match

describe_for_cli

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

enforce_minimum_within_for_proactive_triggers

MetricTriggerOperator

PrefectMetric

MetricTriggerQuery

Defines a subset of the Trigger subclass, which is specific to Metric automations, that specify the query configurations and breaching conditions for the Automation Methods:

enforce_minimum_range

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.

MetricTrigger

A trigger that fires based on the results of a metric query. Methods:

coerce_match

describe_for_cli

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

CompositeTrigger

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

actions

as_automation

describe_for_cli

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

owner_resource

set_deployment_id

CompoundTrigger

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

describe_for_cli

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

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:

describe_for_cli

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

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

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.

Automation