AZ-204 · Question #352
How many triggers must a function have?
The correct answer is B. One. An Azure Function must always have exactly one trigger to define how it starts executing.
Question
Options
- AZero
- BOne
- CTwo
How the community answered
(46 responses)- A9% (4)
- B76% (35)
- C15% (7)
Why each option
An Azure Function must always have exactly one trigger to define how it starts executing.
Without a trigger, an Azure Function would never know when to execute, making it non-functional in the serverless, event-driven model.
An Azure Function is fundamentally an event-driven piece of code, and a trigger is the mechanism that defines the event that causes the function to execute; therefore, every function must have exactly one trigger. This trigger acts as the entry point, defining how the function is invoked.
While a function can have multiple input and output bindings, it can only have one trigger to initiate its execution.
Concept tested: Azure Function triggers concept
Source: https://learn.microsoft.com/en-us/azure/azure-functions/functions-triggers-bindings
Topics
Community Discussion
No community discussion yet for this question.