-
Notifications
You must be signed in to change notification settings - Fork 255
/
EasmClient.xml
6409 lines (6137 loc) · 443 KB
/
EasmClient.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
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="EasmClient" FullName="Azure.Analytics.Defender.Easm.EasmClient">
<TypeSignature Language="C#" Value="public class EasmClient" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EasmClient extends System.Object" />
<TypeSignature Language="DocId" Value="T:Azure.Analytics.Defender.Easm.EasmClient" />
<TypeSignature Language="VB.NET" Value="Public Class EasmClient" />
<TypeSignature Language="F#" Value="type EasmClient = class" />
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary> The Easm service client. </summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected EasmClient ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary> Initializes a new instance of EasmClient for mocking. </summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EasmClient (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.Analytics.Defender.Easm.EasmClient.#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.Analytics.Defender.Easm.EasmClient : Uri * Azure.Core.TokenCredential -> Azure.Analytics.Defender.Easm.EasmClient" Usage="new Azure.Analytics.Defender.Easm.EasmClient (endpoint, credential)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" />
<Parameter Name="credential" Type="Azure.Core.TokenCredential" />
</Parameters>
<Docs>
<param name="endpoint"> The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. </param>
<param name="credential"> A credential used to authenticate to an Azure Service. </param>
<summary> Initializes a new instance of EasmClient. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EasmClient (Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.Defender.Easm.EasmClientOptions options);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential, class Azure.Analytics.Defender.Easm.EasmClientOptions options) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.#ctor(System.Uri,Azure.Core.TokenCredential,Azure.Analytics.Defender.Easm.EasmClientOptions)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential, options As EasmClientOptions)" />
<MemberSignature Language="F#" Value="new Azure.Analytics.Defender.Easm.EasmClient : Uri * Azure.Core.TokenCredential * Azure.Analytics.Defender.Easm.EasmClientOptions -> Azure.Analytics.Defender.Easm.EasmClient" Usage="new Azure.Analytics.Defender.Easm.EasmClient (endpoint, credential, options)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="endpoint" Type="System.Uri" />
<Parameter Name="credential" Type="Azure.Core.TokenCredential" />
<Parameter Name="options" Type="Azure.Analytics.Defender.Easm.EasmClientOptions" />
</Parameters>
<Docs>
<param name="endpoint"> The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}. </param>
<param name="credential"> A credential used to authenticate to an Azure Service. </param>
<param name="options"> The options for configuring the client. </param>
<summary> Initializes a new instance of EasmClient. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception>
</Docs>
</Member>
<Member MemberName="CancelTask">
<MemberSignature Language="C#" Value="public virtual Azure.Response CancelTask (string taskId, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response CancelTask(string taskId, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CancelTask(System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CancelTask (taskId As String, context As RequestContext) As Response" />
<MemberSignature Language="F#" Value="abstract member CancelTask : string * Azure.RequestContext -> Azure.Response
override this.CancelTask : string * Azure.RequestContext -> Azure.Response" Usage="easmClient.CancelTask (taskId, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="taskId" Type="System.String" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="taskId"> The unique identifier of the task. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Cancel a task by taskId.
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.Analytics.Defender.Easm.EasmClient.CancelTask(System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="taskId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="taskId" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CancelTask and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response response = client.CancelTask("<taskId>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
]]></code>
This sample shows how to call CancelTask with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response response = client.CancelTask("<taskId>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("startedAt").ToString());
Console.WriteLine(result.GetProperty("completedAt").ToString());
Console.WriteLine(result.GetProperty("lastPolledAt").ToString());
Console.WriteLine(result.GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("phase").ToString());
Console.WriteLine(result.GetProperty("reason").ToString());
Console.WriteLine(result.GetProperty("metadata").GetProperty("<key>").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CancelTask">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Analytics.Defender.Easm.TaskResource> CancelTask (string taskId, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Analytics.Defender.Easm.TaskResource> CancelTask(string taskId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CancelTask(System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CancelTask (taskId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of TaskResource)" />
<MemberSignature Language="F#" Value="abstract member CancelTask : string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.TaskResource>
override this.CancelTask : string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.TaskResource>" Usage="easmClient.CancelTask (taskId, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Analytics.Defender.Easm.TaskResource></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="taskId" Type="System.String" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="taskId"> The unique identifier of the task. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Cancel a task by taskId. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="taskId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="taskId" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call CancelTask.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response<TaskResource> response = client.CancelTask("<taskId>");
]]></code>
This sample shows how to call CancelTask with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response<TaskResource> response = client.CancelTask("<taskId>");
]]></code></example>
</Docs>
</Member>
<Member MemberName="CancelTaskAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> CancelTaskAsync (string taskId, Azure.RequestContext context);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> CancelTaskAsync(string taskId, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CancelTaskAsync(System.String,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CancelTaskAsync (taskId As String, context As RequestContext) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member CancelTaskAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CancelTaskAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="easmClient.CancelTaskAsync (taskId, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="taskId" Type="System.String" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="taskId"> The unique identifier of the task. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Cancel a task by taskId.
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.Analytics.Defender.Easm.EasmClient.CancelTaskAsync(System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="taskId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="taskId" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CancelTaskAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response response = await client.CancelTaskAsync("<taskId>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
]]></code>
This sample shows how to call CancelTaskAsync with all parameters and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response response = await client.CancelTaskAsync("<taskId>", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("startedAt").ToString());
Console.WriteLine(result.GetProperty("completedAt").ToString());
Console.WriteLine(result.GetProperty("lastPolledAt").ToString());
Console.WriteLine(result.GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("phase").ToString());
Console.WriteLine(result.GetProperty("reason").ToString());
Console.WriteLine(result.GetProperty("metadata").GetProperty("<key>").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CancelTaskAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.TaskResource>> CancelTaskAsync (string taskId, 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.Analytics.Defender.Easm.TaskResource>> CancelTaskAsync(string taskId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CancelTaskAsync(System.String,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CancelTaskAsync (taskId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of TaskResource))" />
<MemberSignature Language="F#" Value="abstract member CancelTaskAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.TaskResource>>
override this.CancelTaskAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.TaskResource>>" Usage="easmClient.CancelTaskAsync (taskId, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.TaskResource>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="taskId" Type="System.String" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="taskId"> The unique identifier of the task. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Cancel a task by taskId. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="taskId" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="taskId" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call CancelTaskAsync.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response<TaskResource> response = await client.CancelTaskAsync("<taskId>");
]]></code>
This sample shows how to call CancelTaskAsync with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
Response<TaskResource> response = await client.CancelTaskAsync("<taskId>");
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDataConnection">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Analytics.Defender.Easm.DataConnection> CreateOrReplaceDataConnection (string dataConnectionName, Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Analytics.Defender.Easm.DataConnection> CreateOrReplaceDataConnection(string dataConnectionName, class Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDataConnection(System.String,Azure.Analytics.Defender.Easm.DataConnectionPayload,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDataConnection (dataConnectionName As String, dataConnectionPayload As DataConnectionPayload, Optional cancellationToken As CancellationToken = Nothing) As Response(Of DataConnection)" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDataConnection : string * Azure.Analytics.Defender.Easm.DataConnectionPayload * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.DataConnection>
override this.CreateOrReplaceDataConnection : string * Azure.Analytics.Defender.Easm.DataConnectionPayload * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.DataConnection>" Usage="easmClient.CreateOrReplaceDataConnection (dataConnectionName, dataConnectionPayload, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Analytics.Defender.Easm.DataConnection></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataConnectionName" Type="System.String" />
<Parameter Name="dataConnectionPayload" Type="Azure.Analytics.Defender.Easm.DataConnectionPayload" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="dataConnectionName"> The caller provided unique name for the resource. </param>
<param name="dataConnectionPayload"> The <see cref="T:Azure.Analytics.Defender.Easm.DataConnectionPayload" /> to use. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Create or replace a data connection with a given dataConnectionName. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dataConnectionName" /> or <paramref name="dataConnectionPayload" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="dataConnectionName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call CreateOrReplaceDataConnection.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties());
Response<DataConnection> response = client.CreateOrReplaceDataConnection("<dataConnectionName>", dataConnectionPayload);
]]></code>
This sample shows how to call CreateOrReplaceDataConnection with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties
{
ApiKey = "<apiKey>",
WorkspaceId = "<workspaceId>",
})
{
Name = "<name>",
Content = DataConnectionContent.Assets,
Frequency = DataConnectionFrequency.Daily,
FrequencyOffset = 1234,
};
Response<DataConnection> response = client.CreateOrReplaceDataConnection("<dataConnectionName>", dataConnectionPayload);
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDataConnection">
<MemberSignature Language="C#" Value="public virtual Azure.Response CreateOrReplaceDataConnection (string dataConnectionName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response CreateOrReplaceDataConnection(string dataConnectionName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDataConnection(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDataConnection (dataConnectionName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDataConnection : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.CreateOrReplaceDataConnection : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="easmClient.CreateOrReplaceDataConnection (dataConnectionName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataConnectionName" Type="System.String" />
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="dataConnectionName"> The caller provided unique name for the resource. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Create or replace a data connection with a given dataConnectionName.
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDataConnection(System.String,Azure.Analytics.Defender.Easm.DataConnectionPayload,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dataConnectionName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="dataConnectionName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CreateOrReplaceDataConnection and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
properties = new object(),
kind = "logAnalytics",
});
Response response = client.CreateOrReplaceDataConnection("<dataConnectionName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
]]></code>
This sample shows how to call CreateOrReplaceDataConnection with all parameters and request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
properties = new
{
apiKey = "<apiKey>",
workspaceId = "<workspaceId>",
},
kind = "logAnalytics",
name = "<name>",
content = "assets",
frequency = "daily",
frequencyOffset = 1234,
});
Response response = client.CreateOrReplaceDataConnection("<dataConnectionName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("createdDate").ToString());
Console.WriteLine(result.GetProperty("frequency").ToString());
Console.WriteLine(result.GetProperty("frequencyOffset").ToString());
Console.WriteLine(result.GetProperty("updatedDate").ToString());
Console.WriteLine(result.GetProperty("userUpdatedAt").ToString());
Console.WriteLine(result.GetProperty("active").ToString());
Console.WriteLine(result.GetProperty("inactiveMessage").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDataConnectionAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DataConnection>> CreateOrReplaceDataConnectionAsync (string dataConnectionName, Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, 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.Analytics.Defender.Easm.DataConnection>> CreateOrReplaceDataConnectionAsync(string dataConnectionName, class Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDataConnectionAsync(System.String,Azure.Analytics.Defender.Easm.DataConnectionPayload,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDataConnectionAsync (dataConnectionName As String, dataConnectionPayload As DataConnectionPayload, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DataConnection))" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDataConnectionAsync : string * Azure.Analytics.Defender.Easm.DataConnectionPayload * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DataConnection>>
override this.CreateOrReplaceDataConnectionAsync : string * Azure.Analytics.Defender.Easm.DataConnectionPayload * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DataConnection>>" Usage="easmClient.CreateOrReplaceDataConnectionAsync (dataConnectionName, dataConnectionPayload, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DataConnection>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataConnectionName" Type="System.String" />
<Parameter Name="dataConnectionPayload" Type="Azure.Analytics.Defender.Easm.DataConnectionPayload" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="dataConnectionName"> The caller provided unique name for the resource. </param>
<param name="dataConnectionPayload"> The <see cref="T:Azure.Analytics.Defender.Easm.DataConnectionPayload" /> to use. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Create or replace a data connection with a given dataConnectionName. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dataConnectionName" /> or <paramref name="dataConnectionPayload" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="dataConnectionName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call CreateOrReplaceDataConnectionAsync.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties());
Response<DataConnection> response = await client.CreateOrReplaceDataConnectionAsync("<dataConnectionName>", dataConnectionPayload);
]]></code>
This sample shows how to call CreateOrReplaceDataConnectionAsync with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties
{
ApiKey = "<apiKey>",
WorkspaceId = "<workspaceId>",
})
{
Name = "<name>",
Content = DataConnectionContent.Assets,
Frequency = DataConnectionFrequency.Daily,
FrequencyOffset = 1234,
};
Response<DataConnection> response = await client.CreateOrReplaceDataConnectionAsync("<dataConnectionName>", dataConnectionPayload);
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDataConnectionAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrReplaceDataConnectionAsync (string dataConnectionName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> CreateOrReplaceDataConnectionAsync(string dataConnectionName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDataConnectionAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDataConnectionAsync (dataConnectionName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDataConnectionAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CreateOrReplaceDataConnectionAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="easmClient.CreateOrReplaceDataConnectionAsync (dataConnectionName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dataConnectionName" Type="System.String" />
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="dataConnectionName"> The caller provided unique name for the resource. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Create or replace a data connection with a given dataConnectionName.
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDataConnectionAsync(System.String,Azure.Analytics.Defender.Easm.DataConnectionPayload,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="dataConnectionName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="dataConnectionName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CreateOrReplaceDataConnectionAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
properties = new object(),
kind = "logAnalytics",
});
Response response = await client.CreateOrReplaceDataConnectionAsync("<dataConnectionName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
]]></code>
This sample shows how to call CreateOrReplaceDataConnectionAsync with all parameters and request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
properties = new
{
apiKey = "<apiKey>",
workspaceId = "<workspaceId>",
},
kind = "logAnalytics",
name = "<name>",
content = "assets",
frequency = "daily",
frequencyOffset = 1234,
});
Response response = await client.CreateOrReplaceDataConnectionAsync("<dataConnectionName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("content").ToString());
Console.WriteLine(result.GetProperty("createdDate").ToString());
Console.WriteLine(result.GetProperty("frequency").ToString());
Console.WriteLine(result.GetProperty("frequencyOffset").ToString());
Console.WriteLine(result.GetProperty("updatedDate").ToString());
Console.WriteLine(result.GetProperty("userUpdatedAt").ToString());
Console.WriteLine(result.GetProperty("active").ToString());
Console.WriteLine(result.GetProperty("inactiveMessage").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDiscoveryGroup">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup> CreateOrReplaceDiscoveryGroup (string groupName, Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Analytics.Defender.Easm.DiscoveryGroup> CreateOrReplaceDiscoveryGroup(string groupName, class Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDiscoveryGroup(System.String,Azure.Analytics.Defender.Easm.DiscoveryGroupPayload,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDiscoveryGroup (groupName As String, discoveryGroupPayload As DiscoveryGroupPayload, Optional cancellationToken As CancellationToken = Nothing) As Response(Of DiscoveryGroup)" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDiscoveryGroup : string * Azure.Analytics.Defender.Easm.DiscoveryGroupPayload * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup>
override this.CreateOrReplaceDiscoveryGroup : string * Azure.Analytics.Defender.Easm.DiscoveryGroupPayload * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup>" Usage="easmClient.CreateOrReplaceDiscoveryGroup (groupName, discoveryGroupPayload, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="groupName" Type="System.String" />
<Parameter Name="discoveryGroupPayload" Type="Azure.Analytics.Defender.Easm.DiscoveryGroupPayload" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="groupName"> The caller provided unique name for the resource. </param>
<param name="discoveryGroupPayload"> A request body used to create a discovery group. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Create a discovery group with a given groupName. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="groupName" /> or <paramref name="discoveryGroupPayload" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="groupName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call CreateOrReplaceDiscoveryGroup.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload();
Response<DiscoveryGroup> response = client.CreateOrReplaceDiscoveryGroup("<groupName>", discoveryGroupPayload);
]]></code>
This sample shows how to call CreateOrReplaceDiscoveryGroup with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload
{
Name = "<name>",
Description = "<description>",
Tier = "<tier>",
FrequencyMilliseconds = 1234L,
Seeds = {new DiscoverySource
{
Kind = DiscoverySourceKind.As,
Name = "<name>",
}},
Names = { "<names>" },
Excludes = { default },
TemplateId = "<templateId>",
};
Response<DiscoveryGroup> response = client.CreateOrReplaceDiscoveryGroup("<groupName>", discoveryGroupPayload);
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDiscoveryGroup">
<MemberSignature Language="C#" Value="public virtual Azure.Response CreateOrReplaceDiscoveryGroup (string groupName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response CreateOrReplaceDiscoveryGroup(string groupName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDiscoveryGroup(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDiscoveryGroup (groupName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDiscoveryGroup : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.CreateOrReplaceDiscoveryGroup : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response" Usage="easmClient.CreateOrReplaceDiscoveryGroup (groupName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="groupName" Type="System.String" />
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="groupName"> The caller provided unique name for the resource. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Create a discovery group with a given groupName.
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDiscoveryGroup(System.String,Azure.Analytics.Defender.Easm.DiscoveryGroupPayload,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="groupName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="groupName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CreateOrReplaceDiscoveryGroup and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new object());
Response response = client.CreateOrReplaceDiscoveryGroup("<groupName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
]]></code>
This sample shows how to call CreateOrReplaceDiscoveryGroup with all parameters and request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
name = "<name>",
description = "<description>",
tier = "<tier>",
frequencyMilliseconds = 1234L,
seeds = new object[]
{
new
{
kind = "as",
name = "<name>",
}
},
names = new object[]
{
"<names>"
},
excludes = new object[]
{
null
},
templateId = "<templateId>",
});
Response response = client.CreateOrReplaceDiscoveryGroup("<groupName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("tier").ToString());
Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString());
Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("names")[0].ToString());
Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString());
Console.WriteLine(result.GetProperty("createdDate").ToString());
Console.WriteLine(result.GetProperty("templateId").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDiscoveryGroupAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup>> CreateOrReplaceDiscoveryGroupAsync (string groupName, Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, 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.Analytics.Defender.Easm.DiscoveryGroup>> CreateOrReplaceDiscoveryGroupAsync(string groupName, class Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDiscoveryGroupAsync(System.String,Azure.Analytics.Defender.Easm.DiscoveryGroupPayload,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDiscoveryGroupAsync (groupName As String, discoveryGroupPayload As DiscoveryGroupPayload, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DiscoveryGroup))" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDiscoveryGroupAsync : string * Azure.Analytics.Defender.Easm.DiscoveryGroupPayload * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup>>
override this.CreateOrReplaceDiscoveryGroupAsync : string * Azure.Analytics.Defender.Easm.DiscoveryGroupPayload * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup>>" Usage="easmClient.CreateOrReplaceDiscoveryGroupAsync (groupName, discoveryGroupPayload, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Defender.Easm.DiscoveryGroup>></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="groupName" Type="System.String" />
<Parameter Name="discoveryGroupPayload" Type="Azure.Analytics.Defender.Easm.DiscoveryGroupPayload" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="groupName"> The caller provided unique name for the resource. </param>
<param name="discoveryGroupPayload"> A request body used to create a discovery group. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Create a discovery group with a given groupName. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="groupName" /> or <paramref name="discoveryGroupPayload" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="groupName" /> is an empty string, and was expected to be non-empty. </exception>
<example>
This sample shows how to call CreateOrReplaceDiscoveryGroupAsync.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload();
Response<DiscoveryGroup> response = await client.CreateOrReplaceDiscoveryGroupAsync("<groupName>", discoveryGroupPayload);
]]></code>
This sample shows how to call CreateOrReplaceDiscoveryGroupAsync with all parameters.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload
{
Name = "<name>",
Description = "<description>",
Tier = "<tier>",
FrequencyMilliseconds = 1234L,
Seeds = {new DiscoverySource
{
Kind = DiscoverySourceKind.As,
Name = "<name>",
}},
Names = { "<names>" },
Excludes = { default },
TemplateId = "<templateId>",
};
Response<DiscoveryGroup> response = await client.CreateOrReplaceDiscoveryGroupAsync("<groupName>", discoveryGroupPayload);
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceDiscoveryGroupAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<Azure.Response> CreateOrReplaceDiscoveryGroupAsync (string groupName, Azure.Core.RequestContent content, Azure.RequestContext context = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class Azure.Response> CreateOrReplaceDiscoveryGroupAsync(string groupName, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDiscoveryGroupAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceDiscoveryGroupAsync (groupName As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceDiscoveryGroupAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.CreateOrReplaceDiscoveryGroupAsync : string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>" Usage="easmClient.CreateOrReplaceDiscoveryGroupAsync (groupName, content, context)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<Azure.Response></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="groupName" Type="System.String" />
<Parameter Name="content" Type="Azure.Core.RequestContent" />
<Parameter Name="context" Type="Azure.RequestContext" />
</Parameters>
<Docs>
<param name="groupName"> The caller provided unique name for the resource. </param>
<param name="content"> The content to send as the body of the request. </param>
<param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param>
<summary>
[Protocol Method] Create a discovery group with a given groupName.
<list type="bullet"><item><description>
This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios.
</description></item><item><description>
Please try the simpler <see cref="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceDiscoveryGroupAsync(System.String,Azure.Analytics.Defender.Easm.DiscoveryGroupPayload,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first.
</description></item></list></summary>
<returns> The response returned from the service. </returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="groupName" /> or <paramref name="content" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="groupName" /> is an empty string, and was expected to be non-empty. </exception>
<exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception>
<example>
This sample shows how to call CreateOrReplaceDiscoveryGroupAsync and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new object());
Response response = await client.CreateOrReplaceDiscoveryGroupAsync("<groupName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
]]></code>
This sample shows how to call CreateOrReplaceDiscoveryGroupAsync with all parameters and request content and parse the result.
<code><![CDATA[
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
using RequestContent content = RequestContent.Create(new
{
name = "<name>",
description = "<description>",
tier = "<tier>",
frequencyMilliseconds = 1234L,
seeds = new object[]
{
new
{
kind = "as",
name = "<name>",
}
},
names = new object[]
{
"<names>"
},
excludes = new object[]
{
null
},
templateId = "<templateId>",
});
Response response = await client.CreateOrReplaceDiscoveryGroupAsync("<groupName>", content);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("tier").ToString());
Console.WriteLine(result.GetProperty("frequencyMilliseconds").ToString());
Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("names")[0].ToString());
Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("submittedDate").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("startedDate").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("completedDate").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("tier").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("totalAssetsFoundCount").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("seeds")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("excludes")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("latestRun").GetProperty("names")[0].ToString());
Console.WriteLine(result.GetProperty("createdDate").ToString());
Console.WriteLine(result.GetProperty("templateId").ToString());
]]></code></example>
</Docs>
</Member>
<Member MemberName="CreateOrReplaceSavedFilter">
<MemberSignature Language="C#" Value="public virtual Azure.Response<Azure.Analytics.Defender.Easm.SavedFilter> CreateOrReplaceSavedFilter (string filterName, Azure.Analytics.Defender.Easm.SavedFilterPayload savedFilterPayload, System.Threading.CancellationToken cancellationToken = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1<class Azure.Analytics.Defender.Easm.SavedFilter> CreateOrReplaceSavedFilter(string filterName, class Azure.Analytics.Defender.Easm.SavedFilterPayload savedFilterPayload, valuetype System.Threading.CancellationToken cancellationToken) cil managed" />
<MemberSignature Language="DocId" Value="M:Azure.Analytics.Defender.Easm.EasmClient.CreateOrReplaceSavedFilter(System.String,Azure.Analytics.Defender.Easm.SavedFilterPayload,System.Threading.CancellationToken)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CreateOrReplaceSavedFilter (filterName As String, savedFilterPayload As SavedFilterPayload, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SavedFilter)" />
<MemberSignature Language="F#" Value="abstract member CreateOrReplaceSavedFilter : string * Azure.Analytics.Defender.Easm.SavedFilterPayload * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.SavedFilter>
override this.CreateOrReplaceSavedFilter : string * Azure.Analytics.Defender.Easm.SavedFilterPayload * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Defender.Easm.SavedFilter>" Usage="easmClient.CreateOrReplaceSavedFilter (filterName, savedFilterPayload, cancellationToken)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Azure.Analytics.Defender.Easm</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Azure.Response<Azure.Analytics.Defender.Easm.SavedFilter></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filterName" Type="System.String" />
<Parameter Name="savedFilterPayload" Type="Azure.Analytics.Defender.Easm.SavedFilterPayload" />
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" />
</Parameters>
<Docs>
<param name="filterName"> The caller provided unique name for the resource. </param>
<param name="savedFilterPayload"> A request body used to create a saved filter. </param>
<param name="cancellationToken"> The cancellation token to use. </param>
<summary> Create or replace a saved filter with a given filterName. </summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="filterName" /> or <paramref name="savedFilterPayload" /> is null. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="filterName" /> is an empty string, and was expected to be non-empty. </exception>
<example>