Google Cloud Function action
Google Cloud functions can be called when an automation stitch is triggered. This example uses the default Any Security Rating Notification trigger in the automation stitch.
To configure a Google Cloud function automation stitch in the GUI:
-
Go to Security Fabric > Automation and click Create New.
-
Enter the stitch name.
-
Configure the trigger:
-
Click Add Trigger.
-
Select Any Security Rating Notification.
-
Click Apply.
-
-
Configure the Google Cloud Function action:
-
Click Add Action.
-
Click Create and select Google Cloud Function.
-
Enter the following:
Name
google-echo
URL
Enter the request API URI
HTTP header
echo-header : echo-value
-
Click OK.
-
Select the action in the list and click Apply.
-
-
Click OK.
To configure a Google Cloud function automation stitch in the CLI:
-
Create an automation trigger:
config system automation-trigger edit "Any Security Rating Notification" set event-type security-rating-summary set report-type any next end
-
Create an automation action:
config system automation-action edit "google-echo" set action-type google-cloud-function set uri "us-central1-xxx-xxxxxxx-000-000000.cloudfunctions.net/xxxx-echo" config http-headers edit 1 set key "echo-header" set value "echo-value" next end next end
-
Create the automation stitch:
config system automation-stitch edit "auto-google1" set trigger "Any Security Rating Notification" config actions edit 1 set action "google-echo" set required enable next end next end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In Google Cloud, go to Logs to see the function log showing that the configured function was called, executed, and finished: