AliCloud Function action
AliCloud 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 an AliCloud 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 AliCloud Function action:
- Click Add Action.
- Click Create and select AliCloud Function.
- Enter the following:
Name
Ali-Action-1
URL
Enter the request API URI
Authorization
Function
AccessKey ID
Enter the access key ID
AccessKey Secret
Enter the access key secret
- Click OK.
- Select the action in the list and click Apply.
- Click OK.
To configure an AliCloud 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 "Ali-Action-1" set action-type alicloud-function set alicloud-function-authorization function set alicloud-access-key-id "XXXXXxXXXXxxxxxx" set alicloud-access-key-secret xxxxxx set uri "0000000000000000.us-east-1.fc.aliyuncs.com/2099-99-99/proxy/test-function/echoBodyAuth/" next end
- Create the automation stitch:
config system automation-stitch edit "auto-ali" set trigger "Any Security Rating Notification" config actions edit 1 set action "Ali-Action-1" set required enable next end next end
When the automation stitch is triggered, the Security Fabric > Automation page shows the stitch trigger time. In AliCloud, the function log shows that the function was called, executed, and finished: