- Azure Serverless Computing Cookbook
- Praveen Kumar Sreeram
- 115字
- 2021-06-10 18:56:06
How it works...
To integrate Azure Functions with Cosmos DB, we first created a Cosmos DB account and created a database and a new collection within it. Once the collection was created, we integrated it from within the Azure portal by clicking on the Add Azure Function button, which is available at the Cosmos DB account level. We chose the required function app in which we wanted to create a Cosmos DB trigger. Once the integration was complete, we created a sample document in the Cosmos DB collection and then verified that the function was triggered automatically for all the changes (all reads and writes, but not deletes) that we make on the collection.