You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<sup>1</sup> Support for SDK type bindings does not presently extend to output bindings.
228
+
229
+
<sup>2</sup> The Cosmos DB trigger uses the [Azure Cosmos DB change feed](../cosmos-db/change-feed.md) and exposes change feed items as JSON-serializable types. The absence of SDK types is by-design for this scenario.
224
230
225
231
The [SDK type binding samples](https://github.com/Azure/azure-functions-dotnet-worker/tree/main/samples/WorkerBindingSamples) show examples of working with the various supported types.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-bindings-cosmosdb-v2-input.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1754,7 +1754,8 @@ See the [Example section](#example) for complete examples.
1754
1754
## Usage
1755
1755
1756
1756
::: zone pivot="programming-language-csharp"
1757
-
The parameter type supported by the Event Grid trigger depends on the Functions runtime version, the extension package version, and the C# modality used.
1757
+
1758
+
The parameter type supported by the Cosmos DB input binding depends on the Functions runtime version, the extension package version, and the C# modality used.
1758
1759
1759
1760
1760
1761
# [Functions 2.x+](#tab/functionsv2/in-process)
@@ -1771,7 +1772,7 @@ The parameter type supported by the Event Grid trigger depends on the Functions
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-bindings-cosmosdb-v2.md
+96Lines changed: 96 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,102 @@ To learn more, see [Update your extensions].
135
135
136
136
::: zone-end
137
137
138
+
::: zone pivot="programming-language-csharp"
139
+
140
+
## Binding types
141
+
142
+
The binding types supported for .NET depend on both the extension version and C# execution mode, which can be one of the following:
143
+
144
+
# [In-process class library](#tab/in-process)
145
+
146
+
An in-process class library is a compiled C# function runs in the same process as the Functions runtime.
147
+
148
+
# [Isolated process](#tab/isolated-process)
149
+
150
+
An isolated worker process class library compiled C# function runs in a process isolated from the runtime.
151
+
152
+
# [C# script](#tab/csharp-script)
153
+
154
+
C# script is used primarily when creating C# functions in the Azure portal.
155
+
156
+
---
157
+
158
+
Choose a version to see binding type details for the mode and version.
159
+
160
+
# [Extension 4.x and higher](#tab/extensionv4/in-process)
161
+
162
+
The Azure Cosmos DB extension supports parameter types according to the table below.
163
+
164
+
| Binding | Parameter types |
165
+
|-|-|-|
166
+
| Cosmos DB trigger | JSON serializable types<sup>1</sup><br/>`IEnumerable<T>`<sup>2</sup> |
167
+
| Cosmos DB input | JSON serializable types<sup>1</sup><br/>`IEnumerable<T>`<sup>2</sup><br/>[CosmosClient]|
168
+
| Cosmos DB output | JSON serializable types<sup>1</sup> |
169
+
170
+
<sup>1</sup> Documents containing JSON data can be deserialized into known plain-old CLR object (POCO) types.
171
+
172
+
<sup>2</sup> `IEnumerable<T>` provides a collection of documents. Here, `T` is a JSON serializable type. When specified for a trigger, it allows a single invocation to process a batch of documents. When used for an input binding, this allows multiple documents to be returned by the query.
173
+
174
+
# [Functions 2.x and higher](#tab/functionsv2/in-process)
175
+
176
+
Earlier versions of the extension exposed types from the now deprecated [Microsoft.Azure.Documents] namespace. Newer types from [Microsoft.Azure.Cosmos] are exclusive to **extension 4.x and higher**.
177
+
178
+
# [Extension 4.x and higher](#tab/extensionv4/isolated-process)
179
+
180
+
The isolated worker process supports parameter types according to the table below. Binding to JSON serializeable types is currently the only option that is generally available. Support for binding to types from [Microsoft.Azure.Cosmos] is in preview.
<sup>1</sup> Preview types require use of [Microsoft.Azure.Functions.Worker.Extensions.CosmosDB 4.1.0-preview1 or later][sdk-types-extension-version], [Microsoft.Azure.Functions.Worker 1.12.1-preview1 or later][sdk-types-worker-version], and [Microsoft.Azure.Functions.Worker.Sdk 1.9.0-preview1 or later][sdk-types-worker-sdk-version]. When developing on your local machine, you will need [Azure Functions Core Tools version 4.0.5000 or later](./functions-run-local.md). When using a preview type, [binding expressions](./functions-bindings-expressions-patterns.md) that rely on trigger data are not supported.
<sup>2</sup> Documents containing JSON data can be deserialized into known plain-old CLR object (POCO) types.
195
+
196
+
<sup>3</sup> `IEnumerable<T>` provides a collection of documents. Here, `T` is a JSON serializable type. When specified for a trigger, it allows a single invocation to process a batch of documents. When used for an input binding, this allows multiple documents to be returned by the query.
197
+
198
+
<sup>4</sup> Support for SDK type bindings does not presently extend to output bindings.
199
+
200
+
# [Functions 2.x and higher](#tab/functionsv2/isolated-process)
201
+
202
+
Earlier versions of extensions in the isolated worker process only support binding to JSON serializable types. Additional options are available to **extension 4.x and higher**.
203
+
204
+
# [Extension 4.x and higher](#tab/extensionv4/csharp-script)
205
+
206
+
The Azure Cosmos DB extension supports parameter types according to the table below.
207
+
208
+
| Binding | Parameter types |
209
+
|-|-|-|
210
+
| Cosmos DB trigger | JSON serializable types<sup>1</sup><br/>`IEnumerable<T>`<sup>2</sup> |
211
+
| Cosmos DB input | JSON serializable types<sup>1</sup><br/>`IEnumerable<T>`<sup>2</sup><br/>[CosmosClient]|
212
+
| Cosmos DB output | JSON serializable types<sup>1</sup> |
213
+
214
+
<sup>1</sup> Documents containing JSON data can be deserialized into known plain-old CLR object (POCO) types.
215
+
216
+
<sup>2</sup> `IEnumerable<T>` provides a collection of documents. Here, `T` is a JSON serializable type. When specified for a trigger, it allows a single invocation to process a batch of documents. When used for an input binding, this allows multiple documents to be returned by the query.
217
+
218
+
# [Functions 2.x and higher](#tab/functionsv2/csharp-script)
219
+
220
+
Earlier versions of the extension exposed types from the now deprecated [Microsoft.Azure.Documents] namespace. Newer types from [Microsoft.Azure.Cosmos] are exclusive to **extension 4.x and higher**.
0 commit comments