|
1 | 1 | <!-- include ../../readme.md#tool -->
|
2 |
| -<!-- #tool --> |
3 |
| -## Usage |
4 | 2 |
|
5 |
| -``` |
6 |
| -Usage: eventgrid [url] -[property]* +[property[=minimatch]]* |
7 |
| - +all Render all properties |
8 |
| - -property Exclude a property |
9 |
| - +property[=minimatch] Include a property, optionally filtering |
10 |
| - with the given the minimatch expression. |
11 |
| - jq=expression When rendering event data containing JSON, |
12 |
| - apply the given JQ expression. Learn more at |
13 |
| - https://stedolan.github.io/jq/ |
14 |
| -
|
15 |
| -Examples: |
16 |
| -- Include all event properties, for topic ending in 'System' |
17 |
| - eventgrid https://mygrid.com +all +topic=**/System |
18 |
| -
|
19 |
| -- Exclude data property and filter for specific event types |
20 |
| - eventgrid https://mygrid.com -data +eventType=Login |
21 |
| -
|
22 |
| -- Filter using synthetized path property '{domain}/{topic}/{subject}/{eventType}' |
23 |
| - eventgrid https://mygrid.com +path=MyApp/**/Login |
24 |
| -
|
25 |
| -- Filter using synthetized path property for a specific event and user (subject) |
26 |
| - eventgrid https://mygrid.com +path=MyApp/*/1bQUI/Login |
27 |
| -
|
28 |
| -- Render sponsorship action, sponsorable login and sponsor login from GH webhook JSON event data: |
29 |
| - eventgrid https://mygrid.com jq="{ action: .action, sponsorable: .sponsorship.sponsorable.login, sponsor: .sponsorship.sponsor.login }" |
30 |
| -``` |
31 |
| - |
32 |
| -*eventgrid* also supports [.netconfig](https://dotnetconfig.org) for configuring |
33 |
| -arguments: |
34 |
| - |
35 |
| -```gitconfig |
36 |
| -[eventgrid] |
37 |
| - url = https://events.mygrid.com |
38 |
| - |
39 |
| - # filters that events must pass to be rendered |
40 |
| - filter = path=MyApp/**/Login |
41 |
| - filter = eventType=*System* |
42 |
| - |
43 |
| - # properties to include in the event rendering |
44 |
| - include = EventType |
45 |
| - include = Subject |
46 |
| - |
47 |
| - # properties to exclude from event rendering |
48 |
| - exclude = data |
49 |
| - |
50 |
| - # apply jq when rendering JSON data payloads |
51 |
| - jq = "{ action: .action, sponsor: .sponsorship.sponsor.login }" |
52 |
| -``` |
53 |
| - |
54 |
| -The `url` is the address of your deployed function app, which can optionally |
55 |
| -have an `?key=[access-key]` query string with the same value specified in the |
56 |
| -Function App configuration settings with the name `AccessKey`. If present, it |
57 |
| -will be used as a shared secret to authorize the SignalR stream connection. |
58 |
| -It's passed as the `X-Authorization` custom header and checked by the function |
59 |
| -during SignalR connection negotiation. |
60 |
| - |
61 |
| -Keep in mind that the built-in EventGrid format for `topic` is rather unwieldy: |
62 |
| -`/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}`. |
63 |
| -For this reason, we also provide a synthetized `path` property with the much |
64 |
| -simpler format `{domain}/{topic}/{subject}/{eventType}`, which makes filtering |
65 |
| -with the [minimatch](https://github.com/isaacs/minimatch) format much more |
66 |
| -convenient. |
67 |
| - |
68 |
| -<!-- #tool --> |
69 |
| -<!-- ../../readme.md#tool --> |
70 | 3 | <!-- exclude -->`
|
0 commit comments