Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 2.04 KB

File metadata and controls

21 lines (14 loc) · 2.04 KB

Serverless recipes with the Azure Cosmos DB Input Binding

<- Back to the root

The following project contains samples using Azure Function's Cosmos DB Input Binding.

It contains 3 different samples:

  1. HttpInputBindingByIdInBody: Use an HTTP POST to query for a particular document in a container by matching part of the POST's body to the Id of the document.
  2. HttpInputBindingByIdInRoute: Use an HTTP GET to query for a particular document in a container by matching part of the GET's route to the Id of the document.
  3. HttpInputBindingWithQuery: Use an HTTP POST to query for a list of documents matching a custom query using the POST's body attributes as filters.
  4. HttpInputBindingMultiMaster: Use an HTTP POST to query for a list of documents matching a custom query using the POST's body attributes as filters, defining preferred connection regions, and enabling Multi Master support.

How to run this sample

You can use Visual Studio Code, Visual Studio or even the Azure Functions' CLI. You only need to customize the local.settings.json file to match the Cosmos DB Connection String, Database name, and Collection name on which you want the queries to run.

Useful links