@@ -6,7 +6,7 @@ author: spelluru
6
6
7
7
ms.service : event-grid
8
8
ms.topic : conceptual
9
- ms.date : 01/21/2019
9
+ ms.date : 04/28/2020
10
10
ms.author : spelluru
11
11
---
12
12
@@ -93,9 +93,9 @@ If you specify multiple different filters, an **AND** operation is performed, so
93
93
]
94
94
```
95
95
96
- ### Operator
96
+ ### Operators
97
97
98
- The available operators for numbers are:
98
+ The available operators for ** numbers** are:
99
99
100
100
* NumberGreaterThan
101
101
* NumberGreaterThanOrEquals
@@ -104,17 +104,18 @@ The available operators for numbers are:
104
104
* NumberIn
105
105
* NumberNotIn
106
106
107
- The available operator for booleans is: BoolEquals
107
+ The available operator for ** booleans** is:
108
+ - BoolEquals
108
109
109
- The available operators for strings are:
110
+ The available operators for ** strings** are:
110
111
111
112
* StringContains
112
113
* StringBeginsWith
113
114
* StringEndsWith
114
115
* StringIn
115
116
* StringNotIn
116
117
117
- All string comparisons are case-insensitve .
118
+ All string comparisons are ** not ** case sensitive .
118
119
119
120
### Key
120
121
@@ -156,6 +157,100 @@ Advanced filtering has the following limitations:
156
157
157
158
The same key can be used in more than one filter.
158
159
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
+
159
254
## Next steps
160
255
161
256
* To learn about filtering events with PowerShell and Azure CLI, see [ Filter events for Event Grid] ( how-to-filter-events.md ) .
0 commit comments