Fortinet FortiManager WaitForTask

Fortinet FortiManager WaitForTask

Certified
Enterprise Edition

Wait for a FortiManager task to finish

Polls /task/task/<id> until it reaches 100 percent or a final state. Fails when the task reports errors unless failOnError is false, and when maxWait is exceeded (the task keeps running on the manager).

yaml
type: io.kestra.plugin.ee.fortinet.fortimanager.WaitForTask

Wait for a long job started elsewhere

yaml
id: fortimanager_wait_for_task
namespace: company.network

inputs:
  - id: task_id
    type: INT

tasks:
  - id: wait
    type: io.kestra.plugin.ee.fortinet.fortimanager.WaitForTask
    host: fmg.example.com
    apiKey: "{{ secret('FORTIMANAGER_API_KEY') }}"
    taskId: "{{ inputs.task_id }}"
    maxWait: PT30M
Installation

This Enterprise plugin requires an Enterprise image and access to the plugin registry. Install it with the following command:

kestractl plugins get io.kestra.plugin.ee:plugin-ee-fortinet --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties

FortiManager host

Host name or IP address of the FortiManager management interface.

Task ID

FortiManager task identifier.

ADOM

Administrative domain to work in. Defaults to root.

API key

REST API key of a FortiManager API user (FortiManager 7.2.2 and later), sent in the Authorization header and never in the URL. Use {{ secret('FORTIMANAGER_API_KEY') }}. Set either apiKey or username and password.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

CA certificate

PEM encoded CA certificate(s) used to validate the FortiManager certificate. When empty, the JVM trust store is used.

Connect timeout

Maximum time to open the connection. Must be greater than zero. Defaults to 10 seconds.

Fail on error

Fail the task when the FortiManager task reports errors. Defaults to true.

Skip TLS verification

Disables certificate and host name validation. Only for labs with self-signed certificates. Defaults to false.

Maximum wait

Give up after this long. Must be greater than zero. Defaults to 30 minutes.

Password

Administrator password. Use {{ secret('FORTIMANAGER_PASSWORD') }}. Never logged nor returned in outputs.

Poll interval

Time between two reads of the task, at least 100 milliseconds. Defaults to 5 seconds.

FortiManager port

HTTPS port. Defaults to 443.

Request timeout

Maximum time to wait for one answer. Must be greater than zero. Defaults to 60 seconds. Long jobs are polled by task ID instead.

Username

Administrator name, used with password when no apiKey is set. The plugin logs in once per task run and always logs out at the end. Accounts with multi-factor authentication cannot log in this way: use an apiKey.

Lines

Per device or per item lines of the task.

Definitions
detailstring

Detail

Message given by FortiManager for this line.

devicestring

Device

Device or item the line is about.

errorsinteger

Error code

Non-zero when this line failed.

percentinteger

Percent

Progress of this line from 0 to 100.

statestring

State

State of this line, for example done or error.

Task

State of the FortiManager task.

Definitions
idinteger

Task ID

FortiManager task identifier.

numDoneinteger

Done count

Number of devices or items processed successfully.

numErrinteger

Error count

Number of devices or items that failed.

numWarninteger

Warning count

Number of devices or items that ended with a warning.

percentinteger

Percent

Progress from 0 to 100.

statestring

State

FortiManager task state, for example running, done, error, cancelled.

titlestring

Title

Task description given by FortiManager.