How to do it...

Perform the following steps:

  1. Navigate to the Cosmos DB Account and click on the Add Azure Function menu in the All settings blade of the Cosmos DB account.
  1. You will be taken to the Add Azure Function blade, where you will choose the Azure function app in which you would like to create a new function (Cosmos DB trigger). This will be triggered whenever a change in the collection happens. Here is what it looks like:

  1. Once you have reviewed the details, click on the Save button (shown in the previous screenshot) to create the new function, which will be triggered for every change that is made in the collection. Let's quickly ...

Get Azure Serverless Computing Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.