Introduction
What is Azure Functions
Azure Functions == Events + Code
Azure functions Process events with serverless code.
Event is nothing but state change notification. In simple terms it is indicator of something happened.
Like change in data in a database table, file getting created or modified, hike in CPU utilization, change in time etc.
Events can be user generated or it can be system generated - like a user creating a file is user generated event whereas CPU utilization hiking is system generated event.
So Azure function is - A single function with an event to start it and code to respond to the event. Code is run on some Servers in the Microsoft datacenter.
Azure Functions are stateless, if state is to be maintained then it can be done using some storage options.
It is based on Event based Programming i.e., writing a piece of code which will be executed whenever any particular event occurs on infrastructure managed by Microsoft.
Building Blocks of Azure Function
Triggers
- Azure Schedule
- HTTP (REST or webhook)
- Azure Blob Storage
- Event from Azure Event Hubs/Grid
- Azure Storage Queues
- Azure Service Bus Queues and Topics
- Azure Event Grid
Bindings
Functions.json
Functions.json files contains bindings info along with triggers
Local.settings.json
Local.settings.json file is actually container of application level configuration which is used while running functions locally.
It(configurations) has to be added in function Apps Application settings after function is deployed on Azure.
What is Azure Function App
Host.json
Hosting Models of Function App
Consumption plan(Default)
Premium plan
Dedicated (App Service) plan
Development options
Developing functions in Azure Portal
Developing functions in Visual Studio/VS Code/Any editor + core tools
Creating Function using Azure Portal
When you create a function app, it must be linked to a storage account. You can select an existing account or create a new one.
Create Function App
Valid characters are a-z, 0-9 and - for function App name
Create HttpTriggered Function
Click on function-->Create button --> select Development env as Develop in Portal --> from templates select Http Trigger
anonymous | No API key is required. |
function | A function-specific API key is required. This is the default value when a level isn't specifically set. |
admin | The master key is required. |
Note: Always refrain from sharing master key with client, only share function key specific to particular functions needed by client.
Project templates often create a method named Run, but the method name can be any valid C# method name.
Integration View
Testing
We can either pass the data in body or as an Query Parameter. (As our function looks at both places).
Conclusion
- the need of Azure Function
- how Azure Function can be developed
- how Azure Function can be hosted
- the languages Azure Function supports and
- Azure Function hosting plans etc.
Knowledge Sharing is Caring !!!!!!
Learn More about Logic App
- BizTalk Developer getting started with Logic App
- Getting Started with Logic Apps - Fundamentals
- Getting Started with Logic Apps - Enterprise Application Integration
- Getting Started with Logic Apps - AS2
- Getting Started with Logic Apps - EDI X12 Fundamentals
- Getting Started with Logic Apps - XML to EDI X12
- Getting Started with Logic Apps - EDI X12 to XML
- Getting Started with Logic Apps - What happened to the Request?
- Inserting Multiple Records In On Prem SQL Using Logic App
- Inserting data in On Premises SQL Database using Logic Apps
- Installing and Configuring On Premises Data Gateway - By adding user to Active Directory
- XML Batching(Aggregation) in Logic App
- Batching(Aggregating) messages in Logic App
- Debatching(Splitting) JSON Message in Logic Apps - ForEach and SplitOn
- Debatching(Splitting) XML Message in Logic Apps - ForEach and SplitOn
- Securing Logic App with Azure Active Directory authentication
- Removing ns0: prefix from xml output from BizTalk/Logic app XSLT map
- Using Managed Identity in Logic Apps for Calling Active Directory Secured Function App
- Logic Apps : Fetching ISA and GS Segment Values From Interchange Envelope and Mapping
- Logic Apps : For Each Inside a For Each - Fetching values from field in an array inside an array
Very helpful if anyone is starting with Azure Function Apps
ReplyDelete