
Azure Trigger
CertifiedTrigger a flow when a pg_durable instance reaches a target status
Azure Trigger
Trigger a flow when a pg_durable instance reaches a target status
Polls df.list_instances() on an interval and starts an execution the first time one or more instances are newly seen in, or newly transition to, targetStatus. Already-seen instances that remain in targetStatus do not refire; state is persisted in the flow's namespace KV store. Each poll opens and closes its own JDBC connection, so interval should not be set unreasonably low.
type: io.kestra.plugin.azure.horizondb.durable.TriggerExamples
Trigger a flow when a durable function instance completes
id: horizondb_durable_on_completion
namespace: company.team
triggers:
- id: on_durable_complete
type: io.kestra.plugin.azure.horizondb.durable.Trigger
host: "{{ secret('HORIZONDB_HOST') }}"
port: 5432
database: mydb
username: "{{ secret('HORIZONDB_USERNAME') }}"
password: "{{ secret('HORIZONDB_PASSWORD') }}"
targetStatus: Completed
interval: PT30S
tasks:
- id: log_completion
type: io.kestra.plugin.core.log.Log
message: "Durable instance {{ trigger.instances[0].instance_id }} completed"
Properties
database *Requiredstring
Database name
host *Requiredstring
HorizonDB server host
Hostname of the Azure HorizonDB server, without protocol or port.
targetStatus *Requiredstring
Target status
Instance status to watch for (e.g. Completed, Failed, Cancelled).
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
clientId string
Azure client id
Used with tenantId/clientSecret for service principal authentication when useEntraId is true. Ignored otherwise.
clientSecret string
Azure client secret
Used with tenantId/clientId for service principal authentication when useEntraId is true. Ignored otherwise.
interval Non-dynamicstring
PT1MdurationPolling interval
How often to poll df.list_instances(). Defaults to 60 seconds.
on string
CREATE_OR_UPDATECREATEUPDATECREATE_OR_UPDATEState transition to fire on
CREATE_OR_UPDATE (the default) fires when an instance id is newly seen in targetStatus, or newly transitions into it; other StatefulTriggerInterface.On values follow the same semantics as file-based stateful triggers.
password string
Password
Required unless useEntraId is true.
port integerstring
5432HorizonDB server port
Defaults to the standard PostgreSQL port.
ssl booleanstring
trueRequire TLS
When true (the default), each poll's connection is rejected unless it is encrypted (sslmode=require).
stateKey string
State store key
Namespace KV key used to persist which instance ids/statuses have already fired. Defaults to a key derived from the trigger's namespace, flow id, and trigger id.
stateTtl string
State entry time-to-live
How long a seen instance id is remembered in the state store. Unset means entries are kept indefinitely.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
tenantId string
Azure tenant id
Used with clientId/clientSecret for service principal authentication when useEntraId is true. Ignored otherwise.
useEntraId booleanstring
falseAuthenticate with Azure Entra ID
When true, authenticates using Azure Entra ID instead of a static password. With no further properties set, this falls back to whatever DefaultAzureCredential resolves on the worker; set tenantId/clientId/clientSecret below to authenticate as a specific service principal instead.
username string
Username
Required unless useEntraId is true and the Entra ID token carries the identity.
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
instances array
Matching instances
Only populated when fetchType is FETCH.
size integer
Number of matching instances
uri string
uriURI of stored results in internal storage
Only populated when fetchType is STORE; stored using ION format.