Microsoft Certified: Azure Developer Associate (AZ-204)Connect to and consume Azure services and third-party servicesMedium
A developer is designing an Azure Function App that needs to be triggered whenever a new file is uploaded to a specific Azure Blob Storage container. The function should process the file contents without significant delay. Which trigger binding should the developer use?
- ABlob trigger
- BQueue trigger
- CHTTP trigger
- DTimer trigger
Show answer & explanationAnswer & explanation
Correct answer: A. Blob trigger
The Azure Blob trigger is specifically designed to run a function when a new or updated blob is detected in a specified container, making it perfect for reacting to file uploads in Blob Storage.
Why the other options are wrong
- B. A Queue trigger activates a function when a new message is added to an Azure Storage Queue, not a Blob container.
- C. An HTTP trigger activates a function via an HTTP request, not an event from Blob Storage.
- D. A Timer trigger executes a function on a specified schedule, not in response to a storage event.
Azure Function Blob Trigger
An Azure Functions trigger that allows a function to execute automatically when a new or updated blob is detected in Azure Blob Storage.
- Monitors a specified container for changes.
- Provides the blob's content or metadata to the function.
- Ideal for processing newly uploaded files.
Memory trick: Triggers are the 'start button' for your function, each button for a different event.