# Trigger

> > This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

# Trigger

> This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

Binds a starter (manual, webhook, schedule, or event) to an executable target (orchestration, agent, tool, or eval). Firings run under the confined run-as identity of the caller who deployed the formation, so a firing never exceeds what that caller could do directly.

## Syntax

```yaml
type: trigger
properties:
  name: String
  description: String
  type: String
  target_type: String
  target_id: String
  action: String
  input: Object
  cron: String
  event_pattern: String
  active: Boolean
  policy_id: String
```

## Output

The physical resource ID is the **public ID** of the created resource. Reference it from other resources with a `ref` expression:

```yaml
      some_field:
        ref: MyTrigger
```

## Properties

**`name`**

Trigger display name (unique within the project)

_Required_: Yes
_Type_: String

---

**`description`**

Optional description

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`type`**

Starter type. Immutable after creation

_Required_: Yes
_Type_: String
_Allowed values_: `manual`, `webhook`, `schedule`, `event`

---

**`target_type`**

The kind of resource this trigger activates

_Required_: Yes
_Type_: String
_Allowed values_: `orchestration`, `agent`, `tool`, `eval`

---

**`target_id`**

Public ID of the target resource. Use \{ "ref": "LogicalId" \} to reference an orchestration, agent, tool, or eval defined in the template.

_Required_: Yes
_Type_: String

---

**`action`**

Tool targets only — the action for builtin/mcp tools

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`input`**

Static input shallow-merged under each firing's runtime input

_Required_: No
_Type_: Object
_Nullable_: Yes

---

**`cron`**

5-field cron expression (UTC). Required when type is schedule

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`event_pattern`**

Internal-event subscription pattern (`*`, `prefix.*`, or an exact event name). Required when type is event, rejected otherwise

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`active`**

Whether the trigger fires (default true)

_Required_: No
_Type_: Boolean

---

**`policy_id`**

Optional boundary policy that further confines the run-as identity

_Required_: No
_Type_: String
_Nullable_: Yes

---
