11<?xml version =" 1.0" encoding =" utf-8" ?>
22<doc >
33 <members >
4+ <member name =" UploadAsync(string,string,IEnumerable{IDictionary{string,BinaryData}},string,CancellationToken)" >
5+ <example >
6+ This sample shows how to call UploadAsync.
7+ <code ><![CDATA[
8+ Uri endpoint = new Uri("<https://my-service.azure.com>");
9+ TokenCredential credential = new DefaultAzureCredential();
10+ LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
11+
12+ Response response = await client.UploadAsync("<ruleId>", "<streamName>", new IDictionary<string, BinaryData>[]
13+ {
14+ new Dictionary<string, BinaryData>
15+ {
16+ ["key"] = BinaryData.FromObjectAsJson(new object())
17+ }
18+ });
19+ ]]> </code >
20+ This sample shows how to call UploadAsync with all parameters.
21+ <code ><![CDATA[
22+ Uri endpoint = new Uri("<https://my-service.azure.com>");
23+ TokenCredential credential = new DefaultAzureCredential();
24+ LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
25+
26+ Response response = await client.UploadAsync("<ruleId>", "<streamName>", new IDictionary<string, BinaryData>[]
27+ {
28+ new Dictionary<string, BinaryData>
29+ {
30+ ["key"] = BinaryData.FromObjectAsJson(new object())
31+ }
32+ }, contentEncoding: "<contentEncoding>");
33+ ]]> </code ></example >
34+ </member >
35+ <member name =" Upload(string,string,IEnumerable{IDictionary{string,BinaryData}},string,CancellationToken)" >
36+ <example >
37+ This sample shows how to call Upload.
38+ <code ><![CDATA[
39+ Uri endpoint = new Uri("<https://my-service.azure.com>");
40+ TokenCredential credential = new DefaultAzureCredential();
41+ LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
42+
43+ Response response = client.Upload("<ruleId>", "<streamName>", new IDictionary<string, BinaryData>[]
44+ {
45+ new Dictionary<string, BinaryData>
46+ {
47+ ["key"] = BinaryData.FromObjectAsJson(new object())
48+ }
49+ });
50+ ]]> </code >
51+ This sample shows how to call Upload with all parameters.
52+ <code ><![CDATA[
53+ Uri endpoint = new Uri("<https://my-service.azure.com>");
54+ TokenCredential credential = new DefaultAzureCredential();
55+ LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
56+
57+ Response response = client.Upload("<ruleId>", "<streamName>", new IDictionary<string, BinaryData>[]
58+ {
59+ new Dictionary<string, BinaryData>
60+ {
61+ ["key"] = BinaryData.FromObjectAsJson(new object())
62+ }
63+ }, contentEncoding: "<contentEncoding>");
64+ ]]> </code ></example >
65+ </member >
466 <member name =" UploadAsync(string,string,RequestContent,string,RequestContext)" >
567 <example >
668This sample shows how to call UploadAsync.
769<code ><![CDATA[
8- Uri endpoint = new Uri("<endpoint >");
70+ Uri endpoint = new Uri("<https://my-service.azure.com >");
971TokenCredential credential = new DefaultAzureCredential();
1072LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
1173
1274using RequestContent content = RequestContent.Create(new object[]
1375{
14- new object()
76+ new
77+ {
78+ key = new object(),
79+ }
1580});
1681Response response = await client.UploadAsync("<ruleId>", "<streamName>", content);
1782
1883Console.WriteLine(response.Status);
1984]]> </code >
2085This sample shows how to call UploadAsync with all parameters and request content.
2186<code ><![CDATA[
22- Uri endpoint = new Uri("<endpoint >");
87+ Uri endpoint = new Uri("<https://my-service.azure.com >");
2388TokenCredential credential = new DefaultAzureCredential();
2489LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
2590
2691using RequestContent content = RequestContent.Create(new object[]
2792{
28- new object()
93+ new
94+ {
95+ key = new object(),
96+ }
2997});
3098Response response = await client.UploadAsync("<ruleId>", "<streamName>", content, contentEncoding: "<contentEncoding>");
3199
@@ -36,27 +104,33 @@ Console.WriteLine(response.Status);
36104 <example >
37105This sample shows how to call Upload.
38106<code ><![CDATA[
39- Uri endpoint = new Uri("<endpoint >");
107+ Uri endpoint = new Uri("<https://my-service.azure.com >");
40108TokenCredential credential = new DefaultAzureCredential();
41109LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
42110
43111using RequestContent content = RequestContent.Create(new object[]
44112{
45- new object()
113+ new
114+ {
115+ key = new object(),
116+ }
46117});
47118Response response = client.Upload("<ruleId>", "<streamName>", content);
48119
49120Console.WriteLine(response.Status);
50121]]> </code >
51122This sample shows how to call Upload with all parameters and request content.
52123<code ><![CDATA[
53- Uri endpoint = new Uri("<endpoint >");
124+ Uri endpoint = new Uri("<https://my-service.azure.com >");
54125TokenCredential credential = new DefaultAzureCredential();
55126LogsIngestionClient client = new LogsIngestionClient(endpoint, credential);
56127
57128using RequestContent content = RequestContent.Create(new object[]
58129{
59- new object()
130+ new
131+ {
132+ key = new object(),
133+ }
60134});
61135Response response = client.Upload("<ruleId>", "<streamName>", content, contentEncoding: "<contentEncoding>");
62136
0 commit comments