roboto.domain.triggers.record
Module Contents
ManagedBy
Bases: pydantic.BaseModel
The owner of a trigger whose definition is managed by something other than the org’s members.
No managed trigger can be deleted, or have its definition changed, through the triggers API. Org members may enable or disable a system-managed trigger. A trigger owned by an ingestion rule may not be enabled, disabled, edited or deleted directly: change the rule instead, e.g. turn its auto-ingest off. An org has at most one trigger per owner.
Parameters
data AnyAttributes
ManagedBy.id
Which one: for ManagedByKind.System, the platform feature’s key (e.g. "session_metrics"); for ManagedByKind.IngestionRule, the rule’s id.
ManagedBy.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
ManagedByKind
Bases: roboto.compat.StrEnum
What kind of thing in Roboto manages a trigger.
TriggerRecord
Bases: pydantic.BaseModel
Wire-transmissible representation of a trigger.
A firing source (a platform event subscription or a schedule), an optional condition over the firing’s namespace, and the targets to dispatch on a match. Cross-field rules — exposed roots, once_per legality, template placeholders — are enforced when the trigger is saved, by TriggerValidator.
Triggered work runs as the organization’s actions service user; a trigger cannot run its targets as anyone else.
Parameters
data AnyAttributes
TriggerRecord.condition
Optional predicate over the firing’s namespace; the trigger fires only when it holds. Same Condition wire format the query system uses.
TriggerRecord.engine
Which engine evaluates this trigger: "v2" for the events/once_per/targets engine this module models (every trigger, once a deployment has cut over), "v1" for a trigger the older causes/for_each engine still evaluates, projected onto this shape. Server-assigned and read-only; no request model carries it. Defaults to "v1" for a response that omits it, which is what a Roboto deployment older than the field sends.
TriggerRecord.fires_on
What makes the trigger fire: an EventSubscription (which also carries once_per) or a Schedule.
TriggerRecord.managed_by
The owner of the trigger’s definition when it is not the org’s members, e.g. the ingestion rule the trigger ingests files for; None for a trigger a user created. Server-assigned and read-only; no request model carries it.
TriggerRecord.targets
What the trigger dispatches when it fires, in order. At least one; each target_id is unique within the trigger.