---
sidebar:
  hidden: true
title: roboto.domain.actions.trigger
---
## Module Contents

### Trigger

```python
class roboto.domain.actions.trigger.Trigger(
    record: roboto.domain.actions.trigger_record.TriggerRecord,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
)
```

`from roboto import Trigger`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L59-L739)

Deprecated. A trigger in the legacy trigger model: a rule that invokes an action when files or metadata change.

Use [`Trigger`](/docs/reference/python-sdk/roboto/domain/triggers/trigger#roboto.domain.triggers.trigger.Trigger) instead, which reads and edits every trigger.

A trigger invokes its action when files are uploaded to or ingested in a dataset, or when a dataset's or file's metadata changes, and the data meets the trigger's condition and required inputs. It invokes the action once per dataset or once per matching file, with the trigger's parameter values and overrides.

This model cannot express every trigger: one with several targets, an agent or Slack target, or a platform event other than those of [`TriggerEvaluationCause`](/docs/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerEvaluationCause). To this class, such a trigger does not exist: `from_name` does not find it, `query` leaves it out, and `delete` leaves it in place.

Get a `Trigger` from `create`, `from_name`, or `query`. Constructing one issues a `DeprecationWarning`. Each instance holds a copy of the trigger's record, which `update` replaces with Roboto's response.

**Parameters**

- **record** (`roboto.domain.actions.trigger_record.TriggerRecord`)
- **roboto_client** (`Optional[roboto.http.RobotoClient]`)

**Properties**

- **Trigger.condition** (`roboto.query.ConditionType | None`): Condition the data must meet for the trigger to invoke its action, or `None` if the trigger has none.

  Return type: `Optional[roboto.query.ConditionType]`

- **Trigger.created** (`datetime.datetime`): Time the trigger was created.

- **Trigger.created_by** (`str`): ID of the user who created the trigger.

- **Trigger.enabled** (`bool`): Whether the trigger is enabled. A disabled trigger never invokes its action.

- **Trigger.for_each** (`roboto.domain.actions.trigger_record.TriggerForEachPrimitive`): Whether the trigger invokes its action once per dataset or once per file.

- **Trigger.modified** (`datetime.datetime`): Time the trigger was last modified.

- **Trigger.modified_by** (`str`): ID of the user who last modified the trigger.

  Roboto's own system user when Roboto made the change.

- **Trigger.name**: Human-readable name of the trigger, unique within its organization.

- **Trigger.org_id**: ID of the organization that owns the trigger.

- **Trigger.record** (`roboto.domain.actions.trigger_record.TriggerRecord`): Record of the trigger that this instance holds.

- **Trigger.service_user_id** (`str | None`): ID of the service user the trigger invokes its action as.

  Return type: `Optional[str]`

- **Trigger.trigger_id** (`str`): Unique ID of the trigger.

#### Trigger.create()

```python
@classmethod
def create(
    name: str,
    action_name: str,
    required_inputs: list[str],
    for_each: roboto.domain.actions.trigger_record.TriggerForEachPrimitive,
    enabled: bool = True,
    action_digest: Optional[str] = None,
    action_owner_id: Optional[str] = None,
    additional_inputs: Optional[list[str]] = None,
    causes: Optional[list[roboto.domain.actions.trigger_record.TriggerEvaluationCause]] = None,
    compute_requirement_overrides: Optional[roboto.domain.actions.invocation_record.ComputeRequirements] = None,
    condition: Optional[roboto.query.ConditionType] = None,
    container_parameter_overrides: Optional[roboto.domain.actions.invocation_record.ContainerParameters] = None,
    parameter_values: Optional[dict[str, Any]] = None,
    service_user_id: Optional[str] = None,
    timeout: Optional[int] = None,
    caller_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> Trigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L134-L268)

Create a trigger that invokes an action when a dataset's files or metadata change.

**Parameters**

- **name** (`str`): Human-readable name of the trigger, unique within its organization. Letters, digits, underscores, and hyphens only, at most 256 characters.
- **action_name** (`str`): Name of the action to invoke, unique within the organization that owns it.
- **required_inputs** (`list[str]`): Gitignore-style patterns, such as `**/*.bag`, for the files the trigger requires and passes to the action as its input data. With `for_each` set to [`Dataset`](/docs/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerForEachPrimitive.Dataset), the trigger invokes its action when each pattern matches at least one file in the dataset. With [`DatasetFile`](/docs/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerForEachPrimitive.DatasetFile), it invokes the action once for each file that matches any pattern. At least one pattern must be neither empty nor only whitespace.
- **for_each** (`roboto.domain.actions.trigger_record.TriggerForEachPrimitive`): Whether the trigger invokes its action once per dataset or once per file.
- **enabled** (`bool`): Whether the trigger is enabled as soon as it is created.
- **action_digest** (`Optional[str]`): Digest of the action version to invoke. `None` invokes the latest version.
- **action_owner_id** (`Optional[str]`): ID of the organization that owns the action. `None` means the organization the trigger is created in.
- **additional_inputs** (`Optional[list[str]]`): Gitignore-style patterns for more files to pass to the action as input data. Unlike `required_inputs`, no file has to match them for the trigger to invoke its action. `None` adds no files; a list must contain at least one pattern that is neither empty nor only whitespace.
- **causes** (`Optional[list[roboto.domain.actions.trigger_record.TriggerEvaluationCause]]`): Platform events that cause Roboto to evaluate the trigger. `None` evaluates it when files are uploaded. [`RecurringSchedule`](/docs/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerEvaluationCause.RecurringSchedule) is rejected.
- **compute_requirement_overrides** (`Optional[roboto.domain.actions.invocation_record.ComputeRequirements]`): Compute requirements that replace the action's own in each invocation. `None` uses the action's own.
- **condition** (`Optional[roboto.query.ConditionType]`): Condition the data must meet for the trigger to invoke its action. `None` sets none.
- **container_parameter_overrides** (`Optional[roboto.domain.actions.invocation_record.ContainerParameters]`): Container parameters that replace the action's own in each invocation. `None` uses the action's own.
- **parameter_values** (`Optional[dict[str, Any]]`): Values for the action's parameters, keyed by parameter name, that each invocation receives. `None` passes none.
- **service_user_id** (`Optional[str]`): Deprecated. Roboto ignores it: a trigger's invocations run as its organization's service user.
- **timeout** (`Optional[int]`): Maximum run time of each invocation, in minutes. `None` uses the action's timeout.
- **caller_org_id** (`Optional[str]`): Organization to create the trigger in. Required when the caller belongs to more than one organization; otherwise the caller's only organization.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Returns**

- `Trigger`: The new trigger.

**Raises**

- `pydantic.ValidationError`: `name` has a character other than a letter, digit, underscore, or hyphen, or is longer than 256 characters, or every pattern in `required_inputs` or `additional_inputs` is empty or only whitespace.
- [`RobotoConflictException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoConflictException): The organization already has a trigger with this name.
- [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): No action has this name in the organization that owns it.
- [`RobotoInvalidRequestException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): Roboto rejects the trigger's settings, such as a `causes` that includes `RecurringSchedule`.

> **Note**
>
> If enabling the trigger would put the organization over its limit of enabled triggers, Roboto creates it disabled.

**Usage**

Invoke an action once for each dataset that contains a ROS bag:

```python
from roboto.domain.actions import Trigger, TriggerForEachPrimitive
trigger = Trigger.create(
    name="auto_process_bags",
    action_name="ros_ingestion",
    required_inputs=["**/*.bag"],
    for_each=TriggerForEachPrimitive.Dataset,
)
```

Invoke an action with parameter values, only on datasets whose metadata meets a condition:

```python
from roboto.query import Comparator, Condition
trigger = Trigger.create(
    name="lidar_processing",
    action_name="lidar_processor",
    required_inputs=["**/*.pcd"],
    for_each=TriggerForEachPrimitive.Dataset,
    condition=Condition(field="metadata.sensor_type", comparator=Comparator.Equals, value="lidar"),
    parameter_values={"resolution": "high", "filter": "statistical"},
)
```

Invoke an action once for each image file, with more CPU and memory than the action asks for:

```python
from roboto.domain.actions import ComputeRequirements
trigger = Trigger.create(
    name="heavy_processing",
    action_name="ml_inference",
    required_inputs=["**/*.jpg", "**/*.png"],
    for_each=TriggerForEachPrimitive.DatasetFile,
    compute_requirement_overrides=ComputeRequirements(vCPU=8192, memory=16384),
)
```

#### Trigger.delete()

```python
def delete()
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L440-L453)

Delete the trigger.

Deleting a trigger that no longer exists succeeds and changes nothing.

**Usage**

```python
from roboto.domain.actions import Trigger
Trigger.from_name("auto_process_bags").delete()
```

#### Trigger.disable()

```python
def disable()
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L455-L464)

Disable the trigger, so that it stops invoking its action, and update this instance's record.

It calls `update`, whose failures also apply.

**Usage**

```python
from roboto.domain.actions import Trigger
Trigger.from_name("auto_process_bags").disable()
```

#### Trigger.enable()

```python
def enable()
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L466-L475)

Enable the trigger, and update this instance's record.

It calls `update`, whose failures also apply.

**Usage**

```python
from roboto.domain.actions import Trigger
Trigger.from_name("auto_process_bags").enable()
```

#### Trigger.from_name()

```python
@classmethod
def from_name(
    name: str,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> Trigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L271-L303)

Fetch a trigger by name.

Trigger names are unique within an organization, so a name and an organization identify one trigger.

**Parameters**

- **name** (`str`): Name of the trigger.
- **owner_org_id** (`Optional[str]`): Organization that owns the trigger. Required when the caller belongs to more than one organization; otherwise the caller's only organization.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Raises**

- [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): The organization has no trigger with this name, or that trigger is one the legacy trigger model cannot express.

**Returns**

- `Trigger`

**Usage**

```python
from roboto.domain.actions import Trigger
trigger = Trigger.from_name("auto_process_bags")
```

#### Trigger.get_action()

```python
def get_action() -> roboto.domain.actions.action.Action
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L477-L493)

Fetch the action the trigger invokes, at the trigger's digest, or the latest version if it has none.

**Raises**

- [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): The action no longer exists, or has no version with the trigger's digest.

**Returns**

- `roboto.domain.actions.action.Action`

**Usage**

```python
from roboto.domain.actions import Trigger
action = Trigger.from_name("auto_process_bags").get_action()
print(action.name)
```

#### Trigger.get_evaluations()

```python
def get_evaluations(
    limit: Optional[int] = None,
    page_token: Optional[str] = None,
) -> collections.abc.Generator[roboto.domain.actions.trigger_record.TriggerEvaluationRecord, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L495-L532)

Yield the trigger's evaluations, newest first, fetching them a page at a time.

**Parameters**

- **limit** (`Optional[int]`): Maximum number of evaluations per request. `None` uses Roboto's default of 100. It does not limit the total: the generator fetches pages until none remain.
- **page_token** (`Optional[str]`): Token from a previous page's response that resumes the listing after it. `None` starts at the first page.

**Returns**

- `collections.abc.Generator[roboto.domain.actions.trigger_record.TriggerEvaluationRecord, None, None]`

**Usage**

```python
from roboto.domain.actions import Trigger
for evaluation in Trigger.from_name("auto_process_bags").get_evaluations():
    print(evaluation.evaluation_start, evaluation.status, evaluation.outcome)
```

#### Trigger.get_evaluations_for_dataset()

```python
@staticmethod
def get_evaluations_for_dataset(
    dataset_id: str,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> collections.abc.Generator[roboto.domain.actions.trigger_record.TriggerEvaluationRecord, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L80-L131)

Yield every trigger's evaluations of a dataset, newest first, fetching them a page at a time.

**Parameters**

- **dataset_id** (`str`): ID of the dataset.
- **owner_org_id** (`Optional[str]`): Organization that owns the dataset. Required when the caller belongs to more than one organization; otherwise the caller's only organization.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Raises**

- [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): No dataset has this ID. It surfaces on the first iteration.

**Returns**

- `collections.abc.Generator[roboto.domain.actions.trigger_record.TriggerEvaluationRecord, None, None]`

**Usage**

Print each evaluation's trigger, status, and outcome:

```python
from roboto.domain.actions import Trigger
for evaluation in Trigger.get_evaluations_for_dataset("ds_12345"):
    print(evaluation.trigger_id, evaluation.status, evaluation.outcome)
```

Collect the evaluations that invoked an action:

```python
from roboto.domain.actions import TriggerEvaluationOutcome
invoked = [
    evaluation
    for evaluation in Trigger.get_evaluations_for_dataset("ds_12345")
    if evaluation.outcome == TriggerEvaluationOutcome.InvokedAction
]
```

#### Trigger.get_invocations()

```python
def get_invocations() -> collections.abc.Generator[roboto.domain.actions.invocation.Invocation, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L534-L555)

Yield the invocations Roboto started for this trigger, fetching them a page at a time.

Invocations made with `invoke` are not included.

**Usage**

```python
from roboto.domain.actions import Trigger
for invocation in Trigger.from_name("auto_process_bags").get_invocations():
    print(invocation.id)
```

**Returns**

- `collections.abc.Generator[roboto.domain.actions.invocation.Invocation, None, None]`

#### Trigger.invoke()

```python
def invoke(
    data_source: roboto.domain.actions.invocation_record.InvocationDataSource,
    idempotency_id: Optional[str] = None,
    input_data_override: Optional[list[str]] = None,
    upload_destination: Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination] = None,
) -> Optional[roboto.domain.actions.invocation.Invocation]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L569-L610)

Invoke the trigger's action on a data source, with the trigger's input data, parameter values, and overrides.

Only Roboto administrators can call this method: Roboto raises `RobotoUnauthorizedException` for any other caller. The invocation records this trigger, by name, as its source.

**Parameters**

- **data_source** (`roboto.domain.actions.invocation_record.InvocationDataSource`): Data source for the action to read from.
- **idempotency_id** (`Optional[str]`): ID that makes the invocation run at most once: another call with the same ID in the same organization creates no second invocation. `None` sets none.
- **input_data_override** (`Optional[list[str]]`): Gitignore-style patterns for the input files, in place of the trigger's `required_inputs`. `None` or an empty list uses `required_inputs`.
- **upload_destination** (`Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination]`): Where Roboto uploads the files the action writes to its output directory. `None` uploads them to the dataset the inputs come from, when they all come from one.

**Returns**

- `Optional[roboto.domain.actions.invocation.Invocation]`: The new invocation, or `None` if an invocation with `idempotency_id` already exists.

#### Trigger.latest_evaluation()

```python
def latest_evaluation() -> Optional[roboto.domain.actions.trigger_record.TriggerEvaluationRecord]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L557-L567)

Fetch the trigger's most recent evaluation, or `None` if it has never been evaluated.

**Usage**

```python
from roboto.domain.actions import Trigger
evaluation = Trigger.from_name("auto_process_bags").latest_evaluation()
if evaluation is not None:
    print(evaluation.status, evaluation.outcome)
```

**Returns**

- `Optional[roboto.domain.actions.trigger_record.TriggerEvaluationRecord]`

#### Trigger.query()

```python
@classmethod
def query(
    spec: Optional[roboto.query.QuerySpecification] = None,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> collections.abc.Generator[Trigger, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L306-L358)

Yield the organization's triggers that match a query, fetching them a page at a time.

Scheduled triggers, and triggers the legacy trigger model cannot express, are left out. A condition can name a field of [`TriggerRecord`](/docs/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerRecord), or `action.name`, `action.owner`, or `action.digest` for the action a trigger invokes.

**Parameters**

- **spec** (`Optional[roboto.query.QuerySpecification]`): Conditions and sort order of the query. `None` matches every trigger in the organization. The method sets `spec.after` on the object passed in as it fetches each page.
- **owner_org_id** (`Optional[str]`): Organization to query triggers in. Required when the caller belongs to more than one organization; otherwise the caller's only organization.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Raises**

- [`RobotoIllegalArgumentException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoIllegalArgumentException): The query names a field triggers cannot be queried by. It surfaces on the first iteration.

**Returns**

- `collections.abc.Generator[Trigger, None, None]`

**Usage**

Print the names of the triggers that invoke one action:

```python
from roboto.domain.actions import Trigger
from roboto.query import Comparator, Condition, QuerySpecification
spec = QuerySpecification(
    condition=Condition(field="action.name", comparator=Comparator.Equals, value="ros_ingestion")
)
for trigger in Trigger.query(spec):
    print(trigger.name)
```

#### Trigger.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L612-L623)

Return the trigger's record as a dictionary of JSON-compatible values.

**Returns**

- `dict[str, Any]`: [`TriggerRecord`](/docs/reference/python-sdk/roboto/domain/actions/trigger_record#roboto.domain.actions.trigger_record.TriggerRecord) of the trigger, as a JSON-compatible dictionary.

**Usage**

```python
from roboto.domain.actions import Trigger
trigger_dict = Trigger.from_name("auto_process_bags").to_dict()
print(trigger_dict["trigger_id"])
```

#### Trigger.update()

```python
def update(
    action_name: Union[str, roboto.sentinels.NotSetType] = NotSet,
    action_owner_id: Union[str, roboto.sentinels.NotSetType] = NotSet,
    action_digest: Optional[Union[str, roboto.sentinels.NotSetType]] = NotSet,
    additional_inputs: Optional[Union[list[str], roboto.sentinels.NotSetType]] = NotSet,
    causes: Union[list[roboto.domain.actions.trigger_record.TriggerEvaluationCause], roboto.sentinels.NotSetType] = NotSet,
    compute_requirement_overrides: Optional[Union[roboto.domain.actions.invocation_record.ComputeRequirements, roboto.sentinels.NotSetType]] = NotSet,
    container_parameter_overrides: Optional[Union[roboto.domain.actions.invocation_record.ContainerParameters, roboto.sentinels.NotSetType]] = NotSet,
    condition: Optional[Union[roboto.query.ConditionType, roboto.sentinels.NotSetType]] = NotSet,
    enabled: Union[bool, roboto.sentinels.NotSetType] = NotSet,
    for_each: Union[roboto.domain.actions.trigger_record.TriggerForEachPrimitive, roboto.sentinels.NotSetType] = NotSet,
    parameter_values: Optional[Union[dict[str, Any], roboto.sentinels.NotSetType]] = NotSet,
    required_inputs: Union[list[str], roboto.sentinels.NotSetType] = NotSet,
    timeout: Optional[Union[int, roboto.sentinels.NotSetType]] = NotSet,
) -> Trigger
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L625-L709)

Update the trigger's settings.

An argument left unset (`NotSet`) leaves that setting unchanged.

**Parameters**

- **action_name** (`Union[str, roboto.sentinels.NotSetType]`): Name of the action to invoke, unique within the organization that owns it.
- **action_owner_id** (`Union[str, roboto.sentinels.NotSetType]`): ID of the organization that owns the action.
- **action_digest** (`Optional[Union[str, roboto.sentinels.NotSetType]]`): Digest of the action version to invoke. `None` invokes the latest version.
- **additional_inputs** (`Optional[Union[list[str], roboto.sentinels.NotSetType]]`): Gitignore-style patterns for more files to pass to the action as input data. `None` clears them.
- **causes** (`Union[list[roboto.domain.actions.trigger_record.TriggerEvaluationCause], roboto.sentinels.NotSetType]`): Platform events that cause Roboto to evaluate the trigger.
- **compute_requirement_overrides** (`Optional[Union[roboto.domain.actions.invocation_record.ComputeRequirements, roboto.sentinels.NotSetType]]`): Compute requirements that replace the action's own in each invocation. `None` clears the override, so invocations use the action's own.
- **container_parameter_overrides** (`Optional[Union[roboto.domain.actions.invocation_record.ContainerParameters, roboto.sentinels.NotSetType]]`): Container parameters that replace the action's own in each invocation. `None` clears the override, so invocations use the action's own.
- **condition** (`Optional[Union[roboto.query.ConditionType, roboto.sentinels.NotSetType]]`): Condition the data must meet for the trigger to invoke its action. `None` clears it.
- **enabled** (`Union[bool, roboto.sentinels.NotSetType]`): Whether the trigger is enabled.
- **for_each** (`Union[roboto.domain.actions.trigger_record.TriggerForEachPrimitive, roboto.sentinels.NotSetType]`): Whether the trigger invokes its action once per dataset or once per file.
- **parameter_values** (`Optional[Union[dict[str, Any], roboto.sentinels.NotSetType]]`): Values for the action's parameters, keyed by parameter name. `None` clears them.
- **required_inputs** (`Union[list[str], roboto.sentinels.NotSetType]`): Gitignore-style patterns for the files the trigger requires, matched as described on `create`.
- **timeout** (`Optional[Union[int, roboto.sentinels.NotSetType]]`): Maximum run time of each invocation, in minutes. `None` clears the override, so invocations use the action's timeout.

**Returns**

- `Trigger`: This instance, with its record updated from Roboto's response.

**Raises**

- [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): The action the trigger would invoke does not exist.
- [`RobotoInvalidRequestException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): Roboto rejects the updated settings.

**Usage**

Point the trigger at a pinned version of its action:

```python
from roboto.domain.actions import Trigger
trigger = Trigger.from_name("auto_process_bags")
trigger.update(action_digest="abc123")
```

Clear the trigger's condition:

```python
trigger.update(condition=None)
```

#### Trigger.wait_for_evaluations_to_complete()

```python
def wait_for_evaluations_to_complete(
    timeout: float = 60 * 5,
    poll_interval: roboto.waiters.Interval = 5,
) -> None
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/trigger.py#L711-L739)

Wait until none of the trigger's evaluations is pending.

Each poll fetches every evaluation the trigger has.

**Parameters**

- **timeout** (`float`): Maximum time to wait, in seconds. Defaults to 300 (five minutes).
- **poll_interval** (`roboto.waiters.Interval`): Time to wait between polls, in seconds, or a function that takes the number of polls made so far and returns the seconds to wait before the next one.

**Raises**

- [`roboto.waiters.TimeoutError`](/docs/reference/python-sdk/roboto/waiters#roboto.waiters.TimeoutError): An evaluation is still pending after `timeout` seconds.

**Returns**

- `None`

**Usage**

```python
from roboto.domain.actions import Trigger
Trigger.from_name("auto_process_bags").wait_for_evaluations_to_complete(timeout=60)
```
