prefect.events.schemas.events

Functions

matches

matches(expected: str, value: Optional[str]) -> bool

Returns true if the given value matches the expected string, which may include a a negation prefix (“!this-value”) or a wildcard suffix (“any-value-starting-with*“)

Classes

Resource

An observable business object of interest to the user

Methods:

enforce_maximum_labels

enforce_maximum_labels(self) -> Self

requires_resource_id

requires_resource_id(self) -> Self

id

id(self) -> str

name

name(self) -> Optional[str]

prefect_object_id

prefect_object_id(self, kind: str) -> UUID

Extracts the UUID from an event’s resource ID if it’s the expected kind of prefect resource

RelatedResource

A Resource with a specific role in an Event

Methods:

requires_resource_role

requires_resource_role(self) -> Self

role

role(self) -> str

Event

The client-side view of an event that has happened to a Resource

Methods:

involved_resources

involved_resources(self) -> Sequence[Resource]

resource_in_role

resource_in_role(self) -> Mapping[str, RelatedResource]

Returns a mapping of roles to the first related resource in that role

resources_in_role

resources_in_role(self) -> Mapping[str, Sequence[RelatedResource]]

Returns a mapping of roles to related resources in that role

find_resource_label

find_resource_label(self, label: str) -> Optional[str]

Finds the value of the given label in this event’s resource or one of its related resources. If the label starts with related:<role>:, search for the first matching label in a related resource with that role.

ReceivedEvent

The server-side view of an event that has happened to a Resource after it has been received by the server

ResourceSpecification

Methods:

matches_every_resource

matches_every_resource(self) -> bool

matches_every_resource_of_kind

matches_every_resource_of_kind(self, prefix: str) -> bool

includes

includes(self, candidates: Iterable[Resource]) -> bool

matches

matches(self, resource: Resource) -> bool

items

items(self) -> Iterable[Tuple[str, List[str]]]

pop

pop(self, key: str, default: Optional[Union[str, List[str]]] = None) -> Optional[List[str]]

get

get(self, key: str, default: Optional[Union[str, List[str]]] = None) -> Optional[List[str]]

deepcopy

deepcopy(self) -> 'ResourceSpecification'