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
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-bindings-event-grid.md
+19-32Lines changed: 19 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,14 +34,8 @@ If you prefer, you can use an HTTP trigger to handle Event Grid Events; see [Use
34
34
35
35
The Event Grid trigger is provided in the [Microsoft.Azure.WebJobs.Extensions.EventGrid](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.EventGrid) NuGet package. Source code for the package is in the [azure-functions-eventgrid-extension](https://github.com/Azure/azure-functions-eventgrid-extension) GitHub repository.
36
36
37
-
<!--
38
-
If you want to bind to the `Microsoft.Azure.EventGrid.Models.EventGridEvent` type instead of `JObject`, install the [Microsoft.Azure.EventGrid](https://www.nuget.org/packages/Microsoft.Azure.EventGrid) package.
For more information, see [Packages](#packages), [Attributes](#attributes), [Configuration](#configuration), and [Usage](#usage).
161
142
@@ -218,11 +199,17 @@ The following table explains the binding configuration properties that you set i
218
199
219
200
## Usage
220
201
221
-
For C# and F# functions, you can use the following parameter types for the Event Grid trigger:
202
+
For C# and F# functions in Azure Functions 1.x, you can use the following parameter types for the Event Grid trigger:
222
203
223
204
*`JObject`
224
205
*`string`
225
-
*`Microsoft.Azure.WebJobs.Extensions.EventGrid.EventGridEvent`- Defines properties for the fields common to all event types. **This type is deprecated**, but its replacement is not published to NuGet yet.
206
+
207
+
For C# and F# functions in Azure Functions 2.x, you also have the option to use the following parameter type for the Event Grid trigger:
208
+
209
+
*`Microsoft.Azure.EventGrid.Models.EventGridEvent`- Defines properties for the fields common to all event types.
210
+
211
+
> [!NOTE]
212
+
> In Functions v1 if you try to bind to `Microsoft.Azure.WebJobs.Extensions.EventGrid.EventGridEvent`, the compiler will display a "deprecated" message and advise you to use `Microsoft.Azure.EventGrid.Models.EventGridEvent` instead. To use the newer type, reference the [Microsoft.Azure.EventGrid](https://www.nuget.org/packages/Microsoft.Azure.EventGrid) NuGet package and fully qualify the `EventGridEvent` type name by prefixing it with `Microsoft.Azure.EventGrid.Models`. For information about how to reference NuGet packages in a C# script function, see [Using NuGet packages](functions-reference-csharp.md#using-nuget-packages)
226
213
227
214
For JavaScript functions, the parameter named by the *function.json*`name` property has a reference to the event object.
0 commit comments