This is part of a full day Serverless training I hosted for Microsoft Turkey in Istanbul talking about Azure Function Triggers and Function Filters.
Function Triggers and Bindings
• A trigger defines how a function is invoked.
• Triggers have associated data, which is usually the payload
that triggered the function.
• Input and output bindings provide a declarative way to
connect to data from within your code.
High level look of what’s available
Type Service Trigger Input Output
Timer Azure Functions ✔
HTTP Azure Functions ✔ ✔
Blob Azure Storage ✔ ✔ ✔
Events Azure Event Hubs ✔ ✔
Queues Azure Storage ✔ ✔
Tables Azure Storage ✔ ✔
No-SQL Azure Cosmos DB ✔ ✔ ✔
Push Notifications Azure Notification Hubs ✔
Creating our first “timer trigger” function!
What you can do with timer triggers?
• Run at explicitly specified intervals, like every day at 2:00 am
using CRON expressions, like “0 */5 * * * *“ (every 5 minutes)
• Can send information to other systems, but typically don’t
“return” information, only write to logs
• Great for redundant cleanup and data management
• Great for checking state of services
• Can be combined with other functions
Creating our first input binding.
Creating our first output binding.
Creating an image resizer function
What are Function Filters?
• Encapsulate common logic to be shared across many different
• Validation, logging, error handling
• Similar to ASP.NET Filters https://goo.gl/qzT1bE
• Invocation Filters - have both Executing/Executed methods
that are called immediately before and immediately after the
target job function is invoked.
• Exception Filters - Exception filters will be called for exceptions
occurring at any stage in the execution pipeline.
Creating errorhandling and validation filters.
Links worth sharing
Imperative bindings are available for C#
Using .NET class libraries with Azure Functions
More on Function Filters
http://daron.me | @daronyondem
Download slides here;