Skip to content

Commit b54c988

Browse files
authored
Merge pull request #111594 from anthonychu/20200415-update-durable-eventgrid
Update event grid configuration to Functions v2 schema
2 parents 82ec18d + 93ab3bb commit b54c988

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

articles/azure-functions/durable/durable-functions-event-publishing.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,36 @@ Now you can send events to the topic.
6363

6464
In your Durable Functions project, find the `host.json` file.
6565

66+
### Durable Functions 1.x
67+
6668
Add `eventGridTopicEndpoint` and `eventGridKeySettingName` in a `durableTask` property.
6769

6870
```json
6971
{
72+
"durableTask": {
73+
"eventGridTopicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
74+
"eventGridKeySettingName": "EventGridKey"
75+
}
76+
}
77+
```
78+
79+
### Durable Functions 2.x
80+
81+
Add a `notifications` section to the `durableTask` property of the file, replacing `<topic_name>` with the name you chose. If the `durableTask` or `extensions` properties do not exist, create them like this example:
82+
83+
```json
84+
{
85+
"version": "2.0",
86+
"extensions": {
7087
"durableTask": {
71-
"eventGridTopicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
72-
"eventGridKeySettingName": "EventGridKey"
88+
"notifications": {
89+
"eventGrid": {
90+
"topicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
91+
"keySettingName": "EventGridKey"
92+
}
93+
}
7394
}
95+
}
7496
}
7597
```
7698

0 commit comments

Comments
 (0)