
Toggle
Toggle a trigger: enable or disable it.
Toggle a trigger: enable or disable it.
Toggle a trigger: enable or disable it.
type: "io.kestra.plugin.kestra.triggers.Toggle"Examples
Toggle a trigger on flow input.
id: trigger_toggle
namespace: company.team
inputs:
- id: toggle
type: BOOL
defaults: true
tasks:
- id: if
type: io.kestra.plugin.core.flow.If
condition: "{{inputs.toggle}}"
then:
- id: enable
type: io.kestra.plugin.kestra.triggers.Toggle
trigger: schedule
enabled: true
else:
- id: disable
type: io.kestra.plugin.kestra.triggers.Toggle
trigger: schedule
enabled: false
- id: log
type: io.kestra.plugin.core.log.Log
message: Hello World
triggers:
- id: schedule
type: io.kestra.plugin.core.trigger.Schedule
cron: "* * * * *"
Properties
authNon-dynamic
Authentication information.
Authentication used to call the Kestra API. Uses the same credentials as Kestra login: either an API token or HTTP Basic (username/password).
io.kestra.plugin.kestra.AbstractKestraTask-Auth
API token
Password for HTTP basic authentication
Username for HTTP basic authentication
enabledbooleanstring
falseWhether to enable or disable the trigger
flowIdstring
The flow identifier of the trigger to toggle
If not set, the current flow identifier will be used.
kestraUrlstring
Kestra API URL. If null, uses 'kestra.url' from configuration. If that is also null, defaults to 'http://localhost: 8080'.
namespacestring
The namespace to list flows from, if null, defaults to the namespace of the current flow.
tenantIdstring
The tenant ID to use for the request, defaults to current tenant.
triggerstring
The identifier of the trigger to toggle