Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.triggers.record

Module Contents

ManagedBy

class roboto.domain.triggers.record.ManagedBy(/, **data)#View Source

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 Any

Attributes

ManagedBy.id

id str #

Which one: for ManagedByKind.System, the platform feature’s key (e.g. "session_metrics"); for ManagedByKind.IngestionRule, the rule’s id.

ManagedBy.kind

What kind of thing manages the trigger.

ManagedBy.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ManagedByKind

class roboto.domain.triggers.record.ManagedByKind#View Source

Bases: roboto.compat.StrEnum

What kind of thing in Roboto manages a trigger.

Attributes

ManagedByKind.IngestionRule

IngestionRule = 'ingestion_rule' #

An ingestion rule owns the trigger and is its only edit surface.

ManagedByKind.System

System = 'system' #

Roboto installed the trigger to run a platform feature.

TriggerRecord

class roboto.domain.triggers.record.TriggerRecord(/, **data)#View Source

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 Any

Attributes

TriggerRecord.condition

condition roboto.query.ConditionType | None = None #

Optional predicate over the firing’s namespace; the trigger fires only when it holds. Same Condition wire format the query system uses.

TriggerRecord.created

created datetime.datetime #

Timestamp when the trigger was created.

TriggerRecord.created_by

created_by str #

User ID who created the trigger.

TriggerRecord.enabled

enabled bool = True #

Whether the trigger is active.

TriggerRecord.engine

engine str = 'v1' #

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

managed_by ManagedBy | None = None #

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.modified

modified datetime.datetime #

Timestamp when the trigger was last modified.

TriggerRecord.modified_by

modified_by str #

User ID who last modified the trigger.

TriggerRecord.name

name str #

Human-readable name. Unique within org_id.

TriggerRecord.org_id

org_id str #

Organization that owns the trigger and whose events it sees.

TriggerRecord.targets

What the trigger dispatches when it fires, in order. At least one; each target_id is unique within the trigger.

TriggerRecord.trigger_id

trigger_id str #

Unique identifier for the trigger.

Was this page helpful?