Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.15 KB

functions-bindings-cosmosdb-v2-output-dotnet-isolated-types.md

File metadata and controls

24 lines (18 loc) · 1.15 KB
author ms.service ms.topic ms.date ms.author
mattchenderson
azure-functions
include
07/10/2023
mahender

When you want the function to write to a single document, the Cosmos DB output binding can bind to the following types:

Type Description
JSON serializable types An object representing the JSON content of a document. Functions attempts to serialize a plain-old CLR object (POCO) type into JSON data.

When you want the function to write to multiple documents, the Cosmos DB output binding can bind to the following types:

Type Description
T[] where T is JSON serializable type An array containing multiple documents. Each entry represents one document.

For other output scenarios, create and use a CosmosClient with other types from Microsoft.Azure.Cosmos directly. See Register Azure clients for an example of using dependency injection to create a client type from the Azure SDK.