Azure Function action
Azure functions can be called when an automation stitch is triggered.
To configure an Azure function automation stitch in the GUI:
- Go to Security Fabric > Automation.
- Click Create New.
- Enter a name for the stitch, and select the FortiGate devices that it will be applied to.
- Select a trigger, such as Security Rating Summary.
- Select Azure Function and configure its settings.
The action name.
The amount of time after the previous action before this action executes, in seconds (0 - 3600, default = 0).
The API gateway URL, in the format:
The CLI must be used to manually enter the individual parameters.
The authorization level: Anonymous, Function, or Admin.
The API key configured in your API gateway.
This options is only available when Authorization is not Anonymous.
The HTTP request header name and value. Multiple headers can be added.
Click to add another action.
Actions can be reorganized as needed by dragging and dropping.
- Click OK.
To configure an Azure function automation stitch in the CLI:
- Create an automation action:
config system automation-action edit "azure_function" set action-type azure-function set azure-app "xxxxx00-no-delete-xxxx" set azure-function "headersResponse" set azure-function-authorization function set azure-api-key ********** set headers "header1:value1" "header2:value2" next end
- Create an automation trigger:
config system automation-trigger edit "auto-azure" set event-type security-rating-summary next end
- Create the automation stitch:
config system automation-stitch edit "auto-azure" set trigger "auto-azure" set action "azure_function" next end
When the automation stitch is triggered, the FortiGate shows the stitch trigger time:
In Azure, the function log shows that the function was called, executed, and finished: