VsCode Extension required for Azure Functions

 

Azure functions?

  • are small, focused functions running usually as a result of an event. 
  • are useful for event-driven systems 
  • helps you when you must do something as a response to something else that has happened in your system. These functions are automatically managed by Azure.
  • are automatically managed by Azure. Which means that Azure can start, stop, and autoscale them, which frees you, the developer, from handling all this stuff.
  • have flexible pricing plans,
  • are serverless. serverless means a cloud resource that is completely managed by the cloud. That mean that the users do not need to think about virtual machines, CPU, memory, etc.
  • All the aspects of handling underlying infrastructure as in virtual machines as well as app services or even with AKS, virtual machine instances etc will does not exist with Azure functions.
  • Eventhougn serverless, still runs on actual servers

 

Triggers

  • The event that makes the function run. An Azure function runs as a response to some kind of event. So the tri gger is this event definition.
  • there are quite a few triggers. The full list of triggers hat Azure function can subscribe to.
  • these triggers are deeply integratedinto other Azure services.
  • triggers are not mandatory,and you can create an Azure function which does not have any trigger. but there should be reason for that
  • List of event types that can trigger a function

 

Bindings.

  • Bindings are declarative connection to other resources. So using binding, you can set up a connection between the Azure function and another resource in the cloud. so that you can read or write value to these resources, whether as input, output or both.
  • These bindings are provided as parameter to the function and they make connecting to other resources extremely easy. Now, bindings as triggers are also not mandatory, but usually you would want to use them.
  • Many times functions read and write data from and into Azure resources, then the bindings concept is extremely convenient and really helps us develop functions much faster.
  • List of the Binding Types (input/Output))  for Azure functions

 

 

Some Type of functions (Events and Bindings)

  • Run every 5 minutes (Timer Trigger) and calculate the sum of a column in DB. If its above 125, send an event in EventGrid (output binding)
  • Whenever a message arrives in the orders queue (Order Trigger) save the massage in Cosmos DB (output Binding) for future handling. 
  • Receive HTTP Request (HTTP Trigger) with 4 numbers and return the smallest one of them (no binding). The function is activated by the HTTP trigger but it does not connect with any other Azure resource for the output of the  unction. It simply returns a result

 

List down languages support by Azure functions

Cold & Warm Start Functionality in Azure Functions

Function Plans in Azure

 

 

Example of Azure Functions

 

 

Create and Run Azure Function Locally in VS Code

Deploy your local Azure function at Azure Function App


Related Question