Skip to content

Commit c151991

Browse files
committed
Advanced filtering examples
1 parent 896b97c commit c151991

File tree

1 file changed

+101
-6
lines changed

1 file changed

+101
-6
lines changed

articles/event-grid/event-filtering.md

Lines changed: 101 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: spelluru
66

77
ms.service: event-grid
88
ms.topic: conceptual
9-
ms.date: 01/21/2019
9+
ms.date: 04/28/2020
1010
ms.author: spelluru
1111
---
1212

@@ -93,9 +93,9 @@ If you specify multiple different filters, an **AND** operation is performed, so
9393
]
9494
```
9595

96-
### Operator
96+
### Operators
9797

98-
The available operators for numbers are:
98+
The available operators for **numbers** are:
9999

100100
* NumberGreaterThan
101101
* NumberGreaterThanOrEquals
@@ -104,17 +104,18 @@ The available operators for numbers are:
104104
* NumberIn
105105
* NumberNotIn
106106

107-
The available operator for booleans is: BoolEquals
107+
The available operator for **booleans** is:
108+
- BoolEquals
108109

109-
The available operators for strings are:
110+
The available operators for **strings** are:
110111

111112
* StringContains
112113
* StringBeginsWith
113114
* StringEndsWith
114115
* StringIn
115116
* StringNotIn
116117

117-
All string comparisons are case-insensitve.
118+
All string comparisons are **not** case sensitive.
118119

119120
### Key
120121

@@ -156,6 +157,100 @@ Advanced filtering has the following limitations:
156157

157158
The same key can be used in more than one filter.
158159

160+
### Examples
161+
162+
### StringContains
163+
164+
```json
165+
"advancedFilters": [{
166+
"operatorType": "StringContains",
167+
"key": "Subject",
168+
"values": [
169+
"/providers/microsoft.devtestlab/"
170+
]
171+
}]
172+
```
173+
174+
### NumberIn
175+
176+
```json
177+
178+
"advancedFilters": [{
179+
"operatorType": "NumberIn",
180+
"key": "data.counter",
181+
"values": [
182+
5,
183+
1
184+
]
185+
}]
186+
187+
```
188+
189+
### NumberNotIn
190+
191+
```json
192+
"advancedFilters": [{
193+
"operatorType": "NumberNotIn",
194+
"key": "data.counter",
195+
"values": [
196+
41,
197+
0,
198+
0
199+
]
200+
}]
201+
```
202+
203+
### NumberLessThan
204+
205+
```json
206+
"advancedFilters": [{
207+
"operatorType": "NumberLessThan",
208+
"key": "data.counter",
209+
"value": 100
210+
}]
211+
```
212+
213+
### NumberGreaterThan
214+
215+
```json
216+
"advancedFilters": [{
217+
"operatorType": "NumberGreaterThan",
218+
"key": "data.counter",
219+
"value": 20
220+
}]
221+
```
222+
223+
### NumberLessThanOrEquals
224+
225+
```json
226+
"advancedFilters": [{
227+
"operatorType": "NumberLessThanOrEquals",
228+
"key": "data.counter",
229+
"value": 100
230+
}]
231+
```
232+
233+
### NumberGreaterThanOrEquals
234+
235+
```json
236+
"advancedFilters": [{
237+
"operatorType": "NumberGreaterThanOrEquals",
238+
"key": "data.counter",
239+
"value": 30
240+
}]
241+
```
242+
243+
### BoolEquals
244+
245+
```json
246+
"advancedFilters": [{
247+
"operatorType": "BoolEquals",
248+
"key": "data.isEnabled",
249+
"value": true
250+
}]
251+
```
252+
253+
159254
## Next steps
160255

161256
* To learn about filtering events with PowerShell and Azure CLI, see [Filter events for Event Grid](how-to-filter-events.md).

0 commit comments

Comments
 (0)