Skip to Main Content
Beginning Serverless Architectures with Microsoft Azure
book

Beginning Serverless Architectures with Microsoft Azure

by Daniel Bass
July 2018
Beginner to intermediate content levelBeginner to intermediate
100 pages
2h 11m
English
Packt Publishing
Content preview from Beginning Serverless Architectures with Microsoft Azure

Retrieving Data from Cosmos DB

In this section, we'll retrieve documents from the Cosmos DB for display or manipulation. We have deployed Cosmos DB with transactions in the collection:

Let's begin by implementing the following steps:

  1. Create an Azure Function called GetTransactions and use the HttpTrigger template without parameters and Anonymous access rights.
  2. Add the line shown in the following screenshot to the method signature. You are adding a DocumentDB client as an input to the function, below the trigger. This allows you to execute more complex queries against DocumentDB:
  1. Next, you need to set some options for your query, setting ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Serverless Architectures with Microsoft Azure

Advanced Serverless Architectures with Microsoft Azure

Daniel Bass

Publisher Resources

ISBN: 9781789537048Supplemental Content