Azure Function action
Azure functions can be called when an automation stitch is triggered. This example uses a Security Rating Summary trigger in the automation stitch.
To configure an Azure function automation stitch in the GUI:
-
Go to Security Fabric > Automation, select the Stitch tab, and click Create New.
-
Enter the stitch name.
-
Configure the trigger:
-
Click Add Trigger.
-
Click Create and select Security Rating Summary.
-
Enter the following:
Name
auto-azure
Report
Security Posture
-
Click OK.
-
Select the trigger in the list and click Apply.
-
-
Configure the Azure Function action:
-
Click Add Action.
-
Click Create and select Azure Function.
-
Enter the following:
Name
azure_function
URL
Enter the request API URI
Authorization
Function
API key
Enter the API key
HTTP header
header1 : value1
-
Click OK.
-
Select the action in the list and click Apply.
-
-
Click OK.
To configure an Azure function automation stitch in the CLI:
-
Create an automation trigger:
config system automation-trigger edit "auto-azure" set event-type security-rating-summary next end
-
Create an automation action:
config system automation-action edit "azure_function" set action-type azure-function set azure-function-authorization function set azure-api-key ********** set uri "xxxxx00-no-delete-xxxx.azurewebsites.net/api/headersResponse" config http-headers edit 1 set key "header1" set value "value1" next end next end
-
Create the automation stitch:
config system automation-stitch edit "auto-azure" set trigger "auto-azure" config actions edit 1 set action "azure_function" set required enable next end next end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Azure, the function log shows that the function was called, executed, and finished.