-
Notifications
You must be signed in to change notification settings - Fork 256
/
LogsQueryClient.xml
734 lines (706 loc) · 58.9 KB
/
LogsQueryClient.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
<Type Name="LogsQueryClient" FullName="Azure.Monitor.Query.LogsQueryClient">
<TypeSignature Language="C#" Value="public class LogsQueryClient" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit LogsQueryClient extends System.Object" />
<TypeSignature Language="DocId" Value="T:Azure.Monitor.Query.LogsQueryClient" />
<TypeSignature Language="VB.NET" Value="Public Class LogsQueryClient" />
<TypeSignature Language="F#" Value="type LogsQueryClient = class" />
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>1.0.1.0</AssemblyVersion>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<AssemblyVersion>1.2.0.0</AssemblyVersion>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.3.1.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
The <see cref="T:Azure.Monitor.Query.LogsQueryClient" /> allows to query the Azure Monitor Logs service.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected LogsQueryClient ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>
Creates an instance of <see cref="T:Azure.Monitor.Query.LogsQueryClient" /> to support <see href="https://aka.ms/azsdk/net/mocking">mocking</see>.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public LogsQueryClient (Azure.Core.TokenCredential credential);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Azure.Core.TokenCredential credential) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.#ctor(Azure.Core.TokenCredential)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (credential As TokenCredential)" />
<MemberSignature Language="F#" Value="new Azure.Monitor.Query.LogsQueryClient : Azure.Core.TokenCredential -> Azure.Monitor.Query.LogsQueryClient" Usage="new Azure.Monitor.Query.LogsQueryClient credential" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="credential" Type="Azure.Core.TokenCredential" />
</Parameters>
<Docs>
<param name="credential">The <see cref="T:Azure.Core.TokenCredential" /> instance to use for authentication.</param>
<summary>
Creates an instance of <see cref="T:Azure.Monitor.Query.LogsQueryClient" /> for Azure Public Cloud usage. Uses the default 'https://api.loganalytics.io' endpoint.
<code snippet="Snippet:CreateLogsClient" language="csharp">
var client = new LogsQueryClient(new DefaultAzureCredential());
</code></summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public LogsQueryClient (Azure.Core.TokenCredential credential, Azure.Monitor.Query.LogsQueryClientOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Azure.Core.TokenCredential credential, class Azure.Monitor.Query.LogsQueryClientOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.#ctor(Azure.Core.TokenCredential,Azure.Monitor.Query.LogsQueryClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (credential As TokenCredential, options As LogsQueryClientOptions)" />
<MemberSignature Language="F#" Value="new Azure.Monitor.Query.LogsQueryClient : Azure.Core.TokenCredential * Azure.Monitor.Query.LogsQueryClientOptions -> Azure.Monitor.Query.LogsQueryClient" Usage="new Azure.Monitor.Query.LogsQueryClient (credential, options)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="credential" Type="Azure.Core.TokenCredential" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryClientOptions" />
</Parameters>
<Docs>
<param name="credential">The <see cref="T:Azure.Core.TokenCredential" /> instance to use for authentication.</param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryClientOptions" /> instance to use as client configuration.</param>
<summary>
Creates an instance of <see cref="T:Azure.Monitor.Query.LogsQueryClient" /> for Azure Public Cloud usage. Uses the default 'https://api.loganalytics.io' endpoint, unless <see cref="P:Azure.Monitor.Query.LogsQueryClientOptions.Audience" /> is set to an Azure sovereign cloud.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public LogsQueryClient (Uri endpoint, Azure.Core.TokenCredential credential);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.#ctor(System.Uri,Azure.Core.TokenCredential)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential)" />
<MemberSignature Language="F#" Value="new Azure.Monitor.Query.LogsQueryClient : Uri * Azure.Core.TokenCredential -> Azure.Monitor.Query.LogsQueryClient" Usage="new Azure.Monitor.Query.LogsQueryClient (endpoint, credential)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" />
<Parameter Name="credential" Type="Azure.Core.TokenCredential" />
</Parameters>
<Docs>
<param name="endpoint">The service endpoint to use.</param>
<param name="credential">The <see cref="T:Azure.Core.TokenCredential" /> instance to use for authentication.</param>
<summary>
Creates an instance of <see cref="T:Azure.Monitor.Query.LogsQueryClient" /> for the Azure cloud represented by <paramref name="endpoint" />.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public LogsQueryClient (Uri endpoint, Azure.Core.TokenCredential credential, Azure.Monitor.Query.LogsQueryClientOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential, class Azure.Monitor.Query.LogsQueryClientOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.#ctor(System.Uri,Azure.Core.TokenCredential,Azure.Monitor.Query.LogsQueryClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential, options As LogsQueryClientOptions)" />
<MemberSignature Language="F#" Value="new Azure.Monitor.Query.LogsQueryClient : Uri * Azure.Core.TokenCredential * Azure.Monitor.Query.LogsQueryClientOptions -> Azure.Monitor.Query.LogsQueryClient" Usage="new Azure.Monitor.Query.LogsQueryClient (endpoint, credential, options)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" />
<Parameter Name="credential" Type="Azure.Core.TokenCredential" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryClientOptions" />
</Parameters>
<Docs>
<param name="endpoint">The service endpoint to use.</param>
<param name="credential">The <see cref="T:Azure.Core.TokenCredential" /> instance to use for authentication.</param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryClientOptions" /> instance to use as client configuration.</param>
<summary>
Creates an instance of <see cref="T:Azure.Monitor.Query.LogsQueryClient" /> for the Azure cloud represented by <paramref name="endpoint" />.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CreateQuery">
<MemberSignature Language="C#" Value="public static string CreateQuery (FormattableString query);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig string CreateQuery(class System.FormattableString query) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.CreateQuery(System.FormattableString)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function CreateQuery (query As FormattableString) As String" />
<MemberSignature Language="F#" Value="static member CreateQuery : FormattableString -> string" Usage="Azure.Monitor.Query.LogsQueryClient.CreateQuery query" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="query" Type="System.FormattableString" />
</Parameters>
<Docs>
<param name="query">An interpolated query string.</param>
<summary>
Create a Kusto query from an interpolated string. The interpolated values will be quoted and escaped as necessary.
</summary>
<returns>A valid Kusto query.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Endpoint">
<MemberSignature Language="C#" Value="public Uri Endpoint { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri Endpoint" />
<MemberSignature Language="DocId" Value="P:Azure.Monitor.Query.LogsQueryClient.Endpoint" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Endpoint As Uri" />
<MemberSignature Language="F#" Value="member this.Endpoint : Uri" Usage="Azure.Monitor.Query.LogsQueryClient.Endpoint" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the endpoint used by the client.
</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="QueryBatch">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection> QueryBatch (Azure.Monitor.Query.LogsBatchQuery batch, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Monitor.Query.Models.LogsBatchQueryResultCollection> QueryBatch(class Azure.Monitor.Query.LogsBatchQuery batch, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryBatch(Azure.Monitor.Query.LogsBatchQuery,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryBatch (batch As LogsBatchQuery, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LogsBatchQueryResultCollection)" />
<MemberSignature Language="F#" Value="abstract member QueryBatch : Azure.Monitor.Query.LogsBatchQuery * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>
override this.QueryBatch : Azure.Monitor.Query.LogsBatchQuery * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>" Usage="logsQueryClient.QueryBatch (batch, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="batch" Type="Azure.Monitor.Query.LogsBatchQuery" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="batch">The batch of queries to send.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Submits the batch query. Use the <see cref="T:Azure.Monitor.Query.LogsBatchQuery" /> to compose a batch query.
<example snippet="Snippet:BatchQuery"><code language="csharp">
string workspaceId = "<workspace_id>";
var client = new LogsQueryClient(new DefaultAzureCredential());
// Query TOP 10 resource groups by event count
// And total event count
var batch = new LogsBatchQuery();
string countQueryId = batch.AddWorkspaceQuery(
workspaceId,
"AzureActivity | count",
new QueryTimeRange(TimeSpan.FromDays(1)));
string topQueryId = batch.AddWorkspaceQuery(
workspaceId,
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count",
new QueryTimeRange(TimeSpan.FromDays(1)));
Response<LogsBatchQueryResultCollection> response = await client.QueryBatchAsync(batch);
var count = response.Value.GetResult<int>(countQueryId).Single();
var topEntries = response.Value.GetResult<MyLogEntryModel>(topQueryId);
Console.WriteLine($"AzureActivity has total {count} events");
foreach (var logEntryModel in topEntries)
{
Console.WriteLine($"{logEntryModel.ResourceGroup} had {logEntryModel.Count} events");
}
</code></example></summary>
<returns>The <see cref="T:Azure.Monitor.Query.Models.LogsBatchQueryResultCollection" /> containing the query identifier that has to be passed into <see cref="M:Azure.Monitor.Query.Models.LogsBatchQueryResultCollection.GetResult(System.String)" /> to get the result.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="QueryBatchAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>> QueryBatchAsync (Azure.Monitor.Query.LogsBatchQuery batch, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>> QueryBatchAsync(class Azure.Monitor.Query.LogsBatchQuery batch, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryBatchAsync(Azure.Monitor.Query.LogsBatchQuery,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryBatchAsync (batch As LogsBatchQuery, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of LogsBatchQueryResultCollection))" />
<MemberSignature Language="F#" Value="abstract member QueryBatchAsync : Azure.Monitor.Query.LogsBatchQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>>
override this.QueryBatchAsync : Azure.Monitor.Query.LogsBatchQuery * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>>" Usage="logsQueryClient.QueryBatchAsync (batch, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsBatchQueryResultCollection>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="batch" Type="Azure.Monitor.Query.LogsBatchQuery" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="batch">The batch of Kusto queries to send.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Submits the batch query. Use the <see cref="T:Azure.Monitor.Query.LogsBatchQuery" /> to compose a batch query.
<example snippet="Snippet:BatchQuery"><code language="csharp">
string workspaceId = "<workspace_id>";
var client = new LogsQueryClient(new DefaultAzureCredential());
// Query TOP 10 resource groups by event count
// And total event count
var batch = new LogsBatchQuery();
string countQueryId = batch.AddWorkspaceQuery(
workspaceId,
"AzureActivity | count",
new QueryTimeRange(TimeSpan.FromDays(1)));
string topQueryId = batch.AddWorkspaceQuery(
workspaceId,
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count",
new QueryTimeRange(TimeSpan.FromDays(1)));
Response<LogsBatchQueryResultCollection> response = await client.QueryBatchAsync(batch);
var count = response.Value.GetResult<int>(countQueryId).Single();
var topEntries = response.Value.GetResult<MyLogEntryModel>(topQueryId);
Console.WriteLine($"AzureActivity has total {count} events");
foreach (var logEntryModel in topEntries)
{
Console.WriteLine($"{logEntryModel.ResourceGroup} had {logEntryModel.Count} events");
}
</code></example></summary>
<returns>The <see cref="T:Azure.Monitor.Query.Models.LogsBatchQueryResultCollection" /> that allows retrieving query results.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="QueryResource">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult> QueryResource (Azure.Core.ResourceIdentifier resourceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Monitor.Query.Models.LogsQueryResult> QueryResource(class Azure.Core.ResourceIdentifier resourceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryResource(Azure.Core.ResourceIdentifier,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryResource (resourceId As ResourceIdentifier, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LogsQueryResult)" />
<MemberSignature Language="F#" Value="abstract member QueryResource : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>
override this.QueryResource : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>" Usage="logsQueryClient.QueryResource (resourceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resourceId" Type="Azure.Core.ResourceIdentifier" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="resourceId"> The Azure resource ID where the query should be executed. </param>
<param name="query"> The Kusto query to fetch the logs. </param>
<param name="timeRange"> The time period for which the logs should be looked up. </param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Returns all the Azure Monitor logs matching the given query for an Azure resource.
<example snippet="Snippet:QueryResource"><code language="csharp">
var client = new LogsQueryClient(new DefaultAzureCredential());
string resourceId = "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource>";
string tableName = "<table_name>";
Response<LogsQueryResult> results = await client.QueryResourceAsync(
new ResourceIdentifier(resourceId),
$"{tableName} | distinct * | project TimeGenerated",
new QueryTimeRange(TimeSpan.FromDays(7)));
LogsTable resultTable = results.Value.Table;
foreach (LogsTableRow row in resultTable.Rows)
{
Console.WriteLine($"{row["OperationName"]} {row["ResourceGroup"]}");
}
foreach (LogsTableColumn columns in resultTable.Columns)
{
Console.WriteLine("Name: " + columns.Name + " Type: " + columns.Type);
}
</code></example></summary>
<returns>The logs matching the query.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
<Member MemberName="QueryResource<T>">
<MemberSignature Language="C#" Value="public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<T>> QueryResource<T> (Azure.Core.ResourceIdentifier resourceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class System.Collections.Generic.IReadOnlyList`1<!!T>> QueryResource<T>(class Azure.Core.ResourceIdentifier resourceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryResource``1(Azure.Core.ResourceIdentifier,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryResource(Of T) (resourceId As ResourceIdentifier, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of IReadOnlyList(Of T))" />
<MemberSignature Language="F#" Value="abstract member QueryResource : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>
override this.QueryResource : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>" Usage="logsQueryClient.QueryResource (resourceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<System.Collections.Generic.IReadOnlyList<T>></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="resourceId" Type="Azure.Core.ResourceIdentifier" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="resourceId"> The Azure resource ID where the query should be executed. </param>
<param name="query"> The Kusto query to fetch the logs. </param>
<param name="timeRange"> The time period for which the logs should be looked up. </param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Returns all the Azure Monitor logs matching the given query for an Azure resource.
<example snippet="Snippet:QueryResource"><code language="csharp">
var client = new LogsQueryClient(new DefaultAzureCredential());
string resourceId = "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource>";
string tableName = "<table_name>";
Response<LogsQueryResult> results = await client.QueryResourceAsync(
new ResourceIdentifier(resourceId),
$"{tableName} | distinct * | project TimeGenerated",
new QueryTimeRange(TimeSpan.FromDays(7)));
LogsTable resultTable = results.Value.Table;
foreach (LogsTableRow row in resultTable.Rows)
{
Console.WriteLine($"{row["OperationName"]} {row["ResourceGroup"]}");
}
foreach (LogsTableColumn columns in resultTable.Columns)
{
Console.WriteLine("Name: " + columns.Name + " Type: " + columns.Type);
}
</code></example></summary>
<returns>The logs matching the query.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="QueryResourceAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>> QueryResourceAsync (Azure.Core.ResourceIdentifier resourceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Monitor.Query.Models.LogsQueryResult>> QueryResourceAsync(class Azure.Core.ResourceIdentifier resourceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryResourceAsync(Azure.Core.ResourceIdentifier,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryResourceAsync (resourceId As ResourceIdentifier, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of LogsQueryResult))" />
<MemberSignature Language="F#" Value="abstract member QueryResourceAsync : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>>
override this.QueryResourceAsync : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>>" Usage="logsQueryClient.QueryResourceAsync (resourceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resourceId" Type="Azure.Core.ResourceIdentifier" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="resourceId"> The Azure resource ID where the query should be executed. </param>
<param name="query"> The Kusto query to fetch the logs. </param>
<param name="timeRange"> The time period for which the logs should be looked up. </param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Returns all the Azure Monitor logs matching the given query for an Azure resource.
<example snippet="Snippet:QueryResource"><code language="csharp">
var client = new LogsQueryClient(new DefaultAzureCredential());
string resourceId = "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource>";
string tableName = "<table_name>";
Response<LogsQueryResult> results = await client.QueryResourceAsync(
new ResourceIdentifier(resourceId),
$"{tableName} | distinct * | project TimeGenerated",
new QueryTimeRange(TimeSpan.FromDays(7)));
LogsTable resultTable = results.Value.Table;
foreach (LogsTableRow row in resultTable.Rows)
{
Console.WriteLine($"{row["OperationName"]} {row["ResourceGroup"]}");
}
foreach (LogsTableColumn columns in resultTable.Columns)
{
Console.WriteLine("Name: " + columns.Name + " Type: " + columns.Type);
}
</code></example></summary>
<returns>The logs matching the query.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
<Member MemberName="QueryResourceAsync<T>">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<T>>> QueryResourceAsync<T> (Azure.Core.ResourceIdentifier resourceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class System.Collections.Generic.IReadOnlyList`1<!!T>>> QueryResourceAsync<T>(class Azure.Core.ResourceIdentifier resourceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryResourceAsync``1(Azure.Core.ResourceIdentifier,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryResourceAsync(Of T) (resourceId As ResourceIdentifier, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of T)))" />
<MemberSignature Language="F#" Value="abstract member QueryResourceAsync : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>>
override this.QueryResourceAsync : Azure.Core.ResourceIdentifier * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>>" Usage="logsQueryClient.QueryResourceAsync (resourceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<T>>></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="resourceId" Type="Azure.Core.ResourceIdentifier" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="resourceId"> The Azure resource ID where the query should be executed. </param>
<param name="query"> The Kusto query to fetch the logs. </param>
<param name="timeRange"> The time period for which the logs should be looked up. </param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Returns all the Azure Monitor logs matching the given query for an Azure resource.
<example snippet="Snippet:QueryResource"><code language="csharp">
var client = new LogsQueryClient(new DefaultAzureCredential());
string resourceId = "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource>";
string tableName = "<table_name>";
Response<LogsQueryResult> results = await client.QueryResourceAsync(
new ResourceIdentifier(resourceId),
$"{tableName} | distinct * | project TimeGenerated",
new QueryTimeRange(TimeSpan.FromDays(7)));
LogsTable resultTable = results.Value.Table;
foreach (LogsTableRow row in resultTable.Rows)
{
Console.WriteLine($"{row["OperationName"]} {row["ResourceGroup"]}");
}
foreach (LogsTableColumn columns in resultTable.Columns)
{
Console.WriteLine("Name: " + columns.Name + " Type: " + columns.Type);
}
</code></example></summary>
<returns>The logs matching the query.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
<Member MemberName="QueryWorkspace">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult> QueryWorkspace (string workspaceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Monitor.Query.Models.LogsQueryResult> QueryWorkspace(string workspaceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryWorkspace(System.String,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryWorkspace (workspaceId As String, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LogsQueryResult)" />
<MemberSignature Language="F#" Value="abstract member QueryWorkspace : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>
override this.QueryWorkspace : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>" Usage="logsQueryClient.QueryWorkspace (workspaceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="workspaceId" Type="System.String" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="workspaceId">The workspace ID to include in the query (<c>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</c>).</param>
<param name="query">The Kusto query to fetch the logs.</param>
<param name="timeRange">The time period for which the logs should be looked up.</param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Executes the logs query.
</summary>
<returns>The <see cref="T:Azure.Monitor.Query.Models.LogsQueryResult" /> containing the query results.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
<Member MemberName="QueryWorkspace<T>">
<MemberSignature Language="C#" Value="public virtual Azure.Response<System.Collections.Generic.IReadOnlyList<T>> QueryWorkspace<T> (string workspaceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class System.Collections.Generic.IReadOnlyList`1<!!T>> QueryWorkspace<T>(string workspaceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryWorkspace``1(System.String,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryWorkspace(Of T) (workspaceId As String, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of IReadOnlyList(Of T))" />
<MemberSignature Language="F#" Value="abstract member QueryWorkspace : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>
override this.QueryWorkspace : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>" Usage="logsQueryClient.QueryWorkspace (workspaceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<System.Collections.Generic.IReadOnlyList<T>></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="workspaceId" Type="System.String" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="workspaceId">The workspace ID to include in the query (<c>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</c>).</param>
<param name="query">The Kusto query to fetch the logs.</param>
<param name="timeRange">The time period for which the logs should be looked up.</param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Executes the logs query. Deserializes the result into a strongly typed model class or a primitive type if the query returns a single column.
Example of querying a model:
<example snippet="Snippet:QueryLogsAsModelCall"><code language="csharp">
Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryWorkspaceAsync<MyLogEntryModel>(
workspaceId,
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count",
new QueryTimeRange(TimeSpan.FromDays(1)));
</code></example>
Example of querying a primitive:
<example snippet="Snippet:QueryLogsAsPrimitiveCall"><code language="csharp">
Response<IReadOnlyList<string>> response = await client.QueryWorkspaceAsync<string>(
workspaceId,
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup",
new QueryTimeRange(TimeSpan.FromDays(1)));
</code></example></summary>
<returns>Query results mapped to a type <typeparamref name="T" />.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
<Member MemberName="QueryWorkspaceAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>> QueryWorkspaceAsync (string workspaceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class Azure.Monitor.Query.Models.LogsQueryResult>> QueryWorkspaceAsync(string workspaceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryWorkspaceAsync(System.String,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryWorkspaceAsync (workspaceId As String, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of LogsQueryResult))" />
<MemberSignature Language="F#" Value="abstract member QueryWorkspaceAsync : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>>
override this.QueryWorkspaceAsync : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>>" Usage="logsQueryClient.QueryWorkspaceAsync (workspaceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Monitor.Query.Models.LogsQueryResult>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="workspaceId" Type="System.String" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="workspaceId">The workspace ID to include in the query (<c>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</c>).</param>
<param name="query">The Kusto query to fetch the logs.</param>
<param name="timeRange">The time period for which the logs should be looked up.</param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Executes the logs query.
</summary>
<returns>The <see cref="T:Azure.Monitor.Query.Models.LogsQueryResult" /> with the query results.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
<Member MemberName="QueryWorkspaceAsync<T>">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<T>>> QueryWorkspaceAsync<T> (string workspaceId, string query, Azure.Monitor.Query.QueryTimeRange timeRange, Azure.Monitor.Query.LogsQueryOptions options = default, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response`1<class System.Collections.Generic.IReadOnlyList`1<!!T>>> QueryWorkspaceAsync<T>(string workspaceId, string query, valuetype Azure.Monitor.Query.QueryTimeRange timeRange, class Azure.Monitor.Query.LogsQueryOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Monitor.Query.LogsQueryClient.QueryWorkspaceAsync``1(System.String,System.String,Azure.Monitor.Query.QueryTimeRange,Azure.Monitor.Query.LogsQueryOptions,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function QueryWorkspaceAsync(Of T) (workspaceId As String, query As String, timeRange As QueryTimeRange, Optional options As LogsQueryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of T)))" />
<MemberSignature Language="F#" Value="abstract member QueryWorkspaceAsync : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>>
override this.QueryWorkspaceAsync : string * string * Azure.Monitor.Query.QueryTimeRange * Azure.Monitor.Query.LogsQueryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<'T>>>" Usage="logsQueryClient.QueryWorkspaceAsync (workspaceId, query, timeRange, options, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Monitor.Query</AssemblyName>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
<AssemblyVersion>1.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<T>>></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="T" />
</TypeParameters>
<Parameters>
<Parameter Name="workspaceId" Type="System.String" />
<Parameter Name="query" Type="System.String" />
<Parameter Name="timeRange" Type="Azure.Monitor.Query.QueryTimeRange" />
<Parameter Name="options" Type="Azure.Monitor.Query.LogsQueryOptions" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="workspaceId">The workspace ID to include in the query (<c>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</c>).</param>
<param name="query">The Kusto query to fetch the logs.</param>
<param name="timeRange">The time period for which the logs should be looked up.</param>
<param name="options">The <see cref="T:Azure.Monitor.Query.LogsQueryOptions" /> to configure the query.</param>
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken" /> to use.</param>
<summary>
Executes the logs query. Deserializes the result into a strongly typed model class or a primitive type if the query returns a single column.
Example of querying a model:
<example snippet="Snippet:QueryLogsAsModelCall"><code language="csharp">
Response<IReadOnlyList<MyLogEntryModel>> response = await client.QueryWorkspaceAsync<MyLogEntryModel>(
workspaceId,
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count",
new QueryTimeRange(TimeSpan.FromDays(1)));
</code></example>
Example of querying a primitive:
<example snippet="Snippet:QueryLogsAsPrimitiveCall"><code language="csharp">
Response<IReadOnlyList<string>> response = await client.QueryWorkspaceAsync<string>(
workspaceId,
"AzureActivity | summarize Count = count() by ResourceGroup | top 10 by Count | project ResourceGroup",
new QueryTimeRange(TimeSpan.FromDays(1)));
</code></example></summary>
<returns>Query results mapped to a type <typeparamref name="T" />.</returns>
<remarks>
When the <paramref name="timeRange" /> argument is <see cref="P:Azure.Monitor.Query.QueryTimeRange.All" /> and the <paramref name="query" /> argument contains a time range filter, the underlying service uses the time range specified in <paramref name="query" />.
</remarks>
</Docs>
</Member>
</Members>
</Type>