prefect.events.schemas.automations

Classes

Posture

Methods:

auto

auto() -> str
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

actions(self) -> List[ActionTypes]

as_automation

as_automation(self) -> 'AutomationCore'

describe_for_cli

describe_for_cli(self, indent: int = 0) -> str
Return a human-readable description of this trigger for the CLI

model_validate_list

model_validate_list(cls, obj: Any) -> list[Self]

owner_resource

owner_resource(self) -> Optional[str]

reset_fields

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.

set_deployment_id

set_deployment_id(self, deployment_id: UUID) -> None

ResourceTrigger

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

actions

actions(self) -> List[ActionTypes]

as_automation

as_automation(self) -> 'AutomationCore'

describe_for_cli

describe_for_cli(self, indent: int = 0) -> str
Return a human-readable description of this trigger for the CLI

owner_resource

owner_resource(self) -> Optional[str]

set_deployment_id

set_deployment_id(self, deployment_id: UUID) -> None

EventTrigger

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

describe_for_cli

describe_for_cli(self, indent: int = 0) -> str
Return a human-readable description of this trigger for the CLI

enforce_minimum_within_for_proactive_triggers

enforce_minimum_within_for_proactive_triggers(cls, data: Dict[str, Any]) -> Dict[str, Any]

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

enforce_minimum_range(cls, value: timedelta) -> timedelta

model_validate_list

model_validate_list(cls, obj: Any) -> list[Self]

reset_fields

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.

MetricTrigger

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

describe_for_cli

describe_for_cli(self, indent: int = 0) -> str
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

actions(self) -> List[ActionTypes]

as_automation

as_automation(self) -> 'AutomationCore'

describe_for_cli

describe_for_cli(self, indent: int = 0) -> str
Return a human-readable description of this trigger for the CLI

owner_resource

owner_resource(self) -> Optional[str]

set_deployment_id

set_deployment_id(self, deployment_id: UUID) -> None

CompoundTrigger

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

describe_for_cli

describe_for_cli(self, indent: int = 0) -> str
Return a human-readable description of this trigger for the CLI

validate_require

validate_require(self) -> Self

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

describe_for_cli(self, indent: int = 0) -> str
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

model_validate_list(cls, obj: Any) -> list[Self]

reset_fields

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.

Automation