Developing Azure Functions

Azure App Services

Florin Angelescu

Azure Cloud Architect

What are triggers?

$$

Function App Triggers

  • Defines how a function is invoked
  • Functions can respond to:
    • HTTP requests
    • Messages in a queue
    • File upload
  • Functions must have one trigger
Azure App Services

Common trigger types

Function HTTP Trigger

Function Timer Trigger

Function Queue Trigger

Function File Trigger

Azure App Services

What are bindings?

 

 

Function Bindings

  • Simplify connections to external data and services
  • Integration is handled behind the scenes
  • Keeps code lean with no extra infrastructure management
Azure App Services

Input vs. output bindings

 

Function Input Binding

  • Automatically receive a blob file or a database record

 

Function Output Binding

  • Cosmos DB, Event Hubs, or email providers
Azure App Services

Input vs. output bindings

 

Function Bindings

Azure App Services

Multiple bindings

Function Multiple Bindings

Function Multiple Bindings

Azure App Services

Real-world example

 

Function Bindings

  • User uploads an image:
    • A blob trigger starts the function
  • Input binding supplies the image to the function
  • The function might:
    • Resize the picture
    • Add tags
  • Output bindings can then:
    • Store the updated image
    • Record metadata in Cosmos DB
    • Send a notification
Azure App Services

Let's practice!

Azure App Services

Preparing Video For Download...