Invoke Azure Functions

Joel Spira | Tue July 21 2020

Blog Feature Graphic

As part of our focus on improving our support for the Azure platform in GorillaStack, we are proud to announce our Invoke Azure Functions Action in our Rules Engine.

GorillaStack users managing AWS infrastructure have been leveraging our Invoke Named Lambda Functions and Invoke Tagged Lambda Functions actions to run custom serverless code assisting in the startup and shutdown of full application environments.

Which Functions are Invokable?

The Invoke Azure Functions action can invoke any Azure Functions that satisfy all of these qualities:

  • Function is bound with an HTTP Trigger
  • Function has function scoped access keys
  • Function has been configured with an authLevel setting of function or anonymous

Action Execution

GorillaStack invokes an Azure Function by making a POST request to it's invokeUrlTemplate endpoint.

Payload

When we make a POST request to the invokeUrlTemplate endpoint we provide a payload in the request body.

This Payload contains two properties:

  • azureFunctionActionPayload - Any JSON Payload specified by the user as part of the Action configuration
  • ruleExecution - Rule Execution meta data

Notice this example Azure Function in JavaScript

module.exports = async function (context, req) {
  const { azureFunctionActionPayload, ruleExecution } = req.body;

  // your code here

  context.res = {
    status: 200,
    body: 'Great Success',
  };
};

By having access to rule execution metadata users can craft intelligent functionality parameterized by an invoking Rule's configuration.

We are very pleased to be able to offer this capability to our customers managing infrastructure in Azure.

Tags AzureFunctionsServerlessGorillaStackBack To All Posts