Microsoft Certified: Azure Developer Associate (AZ-204)Connect to and consume Azure services and third-party servicesEasy
A company is developing a new serverless application that uses Azure Functions. They need to ensure that when a new JSON file is uploaded to an Azure Blob Storage container, a specific Azure Function is triggered to process its content. This trigger should be highly reliable and efficient, minimizing latency. Which Azure Function trigger should they configure?
- ABlob trigger
- BTimer trigger
- CQueue trigger
- DHTTP trigger
Show answer & explanationAnswer & explanation
Correct answer: A. Blob trigger
The Azure Blob trigger is specifically designed to run an Azure Function when a new or updated blob is detected in a specified container. This provides the most efficient and direct way to react to blob uploads.
Why the other options are wrong
- B. A Timer trigger runs the function on a schedule, not in response to a blob upload event.
- C. A Queue trigger responds to messages added to an Azure Storage Queue, not directly to blob uploads.
- D. An HTTP trigger requires an external HTTP request to invoke the function, not suitable for automatic blob upload detection.
Azure Function Blob Trigger
An Azure Function Blob trigger automatically executes a function when a new or updated blob is detected in a specified Azure Blob Storage container.
- Reacts directly to blob events (creation, update).
- Automatically binds to the blob content for easy access.
- Efficient for processing file uploads or changes.
Memory trick: Triggers are what 'poke' your function to run.