Files that compose an Azure Function:
- a Readme file
- function.json -> this is an important file. it defines each Azure function in a function App. It specifies things like what event triggers this function, HTTP methods, auth, etc.
- run.csx
How to create an Azure Function
Create a resource -> Compute -> Function App.
The function name has to be unique.
Create new resource group.
You can choose the OS.
Storage:
Create a new recommended storage.
It offers to create an application insight instance for us. This stores logs and diagnostic information. This is really recommended.
On Configuration > Application settings you can create sys envs which will appear in your code.
There’s a storage explorer where you may see the contents for your function in real time.
Understanding Triggers and Bindings
There’re a lot of trigger types
- Timers, HTTP requests
- Queue messages, blobs, Comsos DB
Input / Output Bindings
- Connect to external resources
- Reduce amount of code
To work with Azure Functions, you may work with Visual Studio. There’s an option to enable “Azure Development” with which you’ll be able to project and run your functions locally.