You need to create an Azure Function that runs automatically on a schedule every hour to check for inactive user accounts and update their status in an Azure Cosmos DB database. Which two configurations should you use for this function? (Select two.)
- A Timer trigger to execute the function on the hourly scheduleAnswer
- An Azure Cosmos DB output binding to update the user account documentsAnswer
- CAn Azure Cosmos DB trigger to run the function when accounts become inactive
- DAn HTTP trigger to initiate the function execution from an external scheduler
Answer
A Timer trigger to execute the function on the hourly schedule, and an Azure Cosmos DB output binding to update the user account documents.
To execute the function on an hourly schedule, a Timer trigger is required. To write the status changes back to Azure Cosmos DB, an output binding is the correct configuration as it enables writing data without manually instantiating database client connections.
Step-by-Step Solution
Key Concept
Azure Functions use triggers to define how a function is invoked, and bindings to connect to data sources. A Timer trigger executes code on a schedule, while an output binding writes data to a service like Azure Cosmos DB.
Estimated Time:45s