Creating a new Cosmos DB collection

Perform the following steps:

  1. Once the account has been created, you need to create a new database and a collection. We can create both of them in a single step, right from the portal.
  2. Navigate to the Overview tab and click on the Add Collection button to create a new collection:

  1. You will be navigated to the Data Explorer tab automatically, where you will be prompted to provide the following details:
  1. Next, click on the OK button to create the collection. If everything went well, you will see something like the following in the Data Explorer tab of the Cosmos DB account:

We have successfully created a Cosmos DB account and a collection. Now let's learn how to integrate the collection with a new Azure Function and see how to trigger it whenever there is a change in the Cosmos DB collection.