@azure/arm-securityinsight 1.0.0-beta.4 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/dist/index.js +1116 -367
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/actionsCreateOrUpdateSample.js +1 -1
  7. package/dist-esm/samples-dev/actionsDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/actionsGetSample.js +1 -1
  9. package/dist-esm/samples-dev/actionsListByAlertRuleSample.js +1 -1
  10. package/dist-esm/samples-dev/alertRuleTemplatesGetSample.js +1 -1
  11. package/dist-esm/samples-dev/alertRuleTemplatesListSample.js +1 -1
  12. package/dist-esm/samples-dev/alertRulesCreateOrUpdateSample.js +6 -5
  13. package/dist-esm/samples-dev/alertRulesCreateOrUpdateSample.js.map +1 -1
  14. package/dist-esm/samples-dev/alertRulesDeleteSample.js +1 -1
  15. package/dist-esm/samples-dev/alertRulesGetSample.js +4 -4
  16. package/dist-esm/samples-dev/alertRulesListSample.js +1 -1
  17. package/dist-esm/samples-dev/automationRulesCreateOrUpdateSample.js +1 -1
  18. package/dist-esm/samples-dev/automationRulesDeleteSample.js +1 -1
  19. package/dist-esm/samples-dev/automationRulesGetSample.js +1 -1
  20. package/dist-esm/samples-dev/automationRulesListSample.js +1 -1
  21. package/dist-esm/samples-dev/bookmarkExpandSample.js +1 -1
  22. package/dist-esm/samples-dev/bookmarkRelationsCreateOrUpdateSample.js +1 -1
  23. package/dist-esm/samples-dev/bookmarkRelationsDeleteSample.js +1 -1
  24. package/dist-esm/samples-dev/bookmarkRelationsGetSample.js +1 -1
  25. package/dist-esm/samples-dev/bookmarkRelationsListSample.js +1 -1
  26. package/dist-esm/samples-dev/bookmarksCreateOrUpdateSample.js +1 -1
  27. package/dist-esm/samples-dev/bookmarksDeleteSample.js +1 -1
  28. package/dist-esm/samples-dev/bookmarksGetSample.js +1 -1
  29. package/dist-esm/samples-dev/bookmarksListSample.js +1 -1
  30. package/dist-esm/samples-dev/dataConnectorsCheckRequirementsPostSample.js +16 -16
  31. package/dist-esm/samples-dev/dataConnectorsConnectSample.js +2 -2
  32. package/dist-esm/samples-dev/dataConnectorsCreateOrUpdateSample.js +8 -8
  33. package/dist-esm/samples-dev/dataConnectorsDeleteSample.js +5 -5
  34. package/dist-esm/samples-dev/dataConnectorsDisconnectSample.js +1 -1
  35. package/dist-esm/samples-dev/dataConnectorsGetSample.js +20 -20
  36. package/dist-esm/samples-dev/dataConnectorsListSample.js +1 -1
  37. package/dist-esm/samples-dev/domainWhoisGetSample.js +1 -1
  38. package/dist-esm/samples-dev/entitiesExpandSample.js +1 -1
  39. package/dist-esm/samples-dev/entitiesGetInsightsSample.js +1 -1
  40. package/dist-esm/samples-dev/entitiesGetSample.js +20 -20
  41. package/dist-esm/samples-dev/entitiesGetTimelineListSample.js +1 -1
  42. package/dist-esm/samples-dev/entitiesListSample.js +1 -1
  43. package/dist-esm/samples-dev/entitiesQueriesSample.js +1 -1
  44. package/dist-esm/samples-dev/entitiesRelationsListSample.js +1 -1
  45. package/dist-esm/samples-dev/entityQueriesCreateOrUpdateSample.js +1 -1
  46. package/dist-esm/samples-dev/entityQueriesDeleteSample.js +1 -1
  47. package/dist-esm/samples-dev/entityQueriesGetSample.js +2 -2
  48. package/dist-esm/samples-dev/entityQueriesListSample.js +1 -1
  49. package/dist-esm/samples-dev/entityQueryTemplatesGetSample.js +1 -1
  50. package/dist-esm/samples-dev/entityQueryTemplatesListSample.js +1 -1
  51. package/dist-esm/samples-dev/entityRelationsGetRelationSample.js +1 -1
  52. package/dist-esm/samples-dev/fileImportsCreateSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/fileImportsCreateSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/fileImportsCreateSample.js +38 -0
  55. package/dist-esm/samples-dev/fileImportsCreateSample.js.map +1 -0
  56. package/dist-esm/samples-dev/fileImportsDeleteSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/fileImportsDeleteSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/fileImportsDeleteSample.js +32 -0
  59. package/dist-esm/samples-dev/fileImportsDeleteSample.js.map +1 -0
  60. package/dist-esm/samples-dev/fileImportsGetSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/fileImportsGetSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/fileImportsGetSample.js +32 -0
  63. package/dist-esm/samples-dev/fileImportsGetSample.js.map +1 -0
  64. package/dist-esm/samples-dev/fileImportsListSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/fileImportsListSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/fileImportsListSample.js +48 -0
  67. package/dist-esm/samples-dev/fileImportsListSample.js.map +1 -0
  68. package/dist-esm/samples-dev/incidentCommentsCreateOrUpdateSample.js +1 -1
  69. package/dist-esm/samples-dev/incidentCommentsDeleteSample.js +1 -1
  70. package/dist-esm/samples-dev/incidentCommentsGetSample.js +1 -1
  71. package/dist-esm/samples-dev/incidentCommentsListSample.js +1 -1
  72. package/dist-esm/samples-dev/incidentRelationsCreateOrUpdateSample.js +1 -1
  73. package/dist-esm/samples-dev/incidentRelationsDeleteSample.js +1 -1
  74. package/dist-esm/samples-dev/incidentRelationsGetSample.js +1 -1
  75. package/dist-esm/samples-dev/incidentRelationsListSample.js +1 -1
  76. package/dist-esm/samples-dev/incidentsCreateOrUpdateSample.js +1 -1
  77. package/dist-esm/samples-dev/incidentsCreateTeamSample.js +1 -1
  78. package/dist-esm/samples-dev/incidentsDeleteSample.js +1 -1
  79. package/dist-esm/samples-dev/incidentsGetSample.js +1 -1
  80. package/dist-esm/samples-dev/incidentsListAlertsSample.js +1 -1
  81. package/dist-esm/samples-dev/incidentsListBookmarksSample.js +1 -1
  82. package/dist-esm/samples-dev/incidentsListEntitiesSample.js +1 -1
  83. package/dist-esm/samples-dev/incidentsListSample.js +1 -1
  84. package/dist-esm/samples-dev/incidentsRunPlaybookSample.js +1 -1
  85. package/dist-esm/samples-dev/ipGeodataGetSample.js +1 -1
  86. package/dist-esm/samples-dev/metadataCreateSample.js +2 -2
  87. package/dist-esm/samples-dev/metadataDeleteSample.js +1 -1
  88. package/dist-esm/samples-dev/metadataGetSample.js +1 -1
  89. package/dist-esm/samples-dev/metadataListSample.js +2 -2
  90. package/dist-esm/samples-dev/metadataUpdateSample.js +1 -1
  91. package/dist-esm/samples-dev/officeConsentsDeleteSample.js +1 -1
  92. package/dist-esm/samples-dev/officeConsentsGetSample.js +1 -1
  93. package/dist-esm/samples-dev/officeConsentsListSample.js +1 -1
  94. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  95. package/dist-esm/samples-dev/productSettingsDeleteSample.js +1 -1
  96. package/dist-esm/samples-dev/productSettingsGetSample.js +1 -1
  97. package/dist-esm/samples-dev/productSettingsListSample.js +1 -1
  98. package/dist-esm/samples-dev/productSettingsUpdateSample.js +1 -1
  99. package/dist-esm/samples-dev/securityMlAnalyticsSettingsCreateOrUpdateSample.js +1 -1
  100. package/dist-esm/samples-dev/securityMlAnalyticsSettingsDeleteSample.js +1 -1
  101. package/dist-esm/samples-dev/securityMlAnalyticsSettingsGetSample.js +1 -1
  102. package/dist-esm/samples-dev/securityMlAnalyticsSettingsListSample.js +1 -1
  103. package/dist-esm/samples-dev/sentinelOnboardingStatesCreateSample.js +1 -1
  104. package/dist-esm/samples-dev/sentinelOnboardingStatesDeleteSample.js +1 -1
  105. package/dist-esm/samples-dev/sentinelOnboardingStatesGetSample.js +1 -1
  106. package/dist-esm/samples-dev/sentinelOnboardingStatesListSample.js +1 -1
  107. package/dist-esm/samples-dev/sourceControlListRepositoriesSample.js +1 -1
  108. package/dist-esm/samples-dev/sourceControlsCreateSample.js +1 -1
  109. package/dist-esm/samples-dev/sourceControlsDeleteSample.js +1 -1
  110. package/dist-esm/samples-dev/sourceControlsGetSample.js +1 -1
  111. package/dist-esm/samples-dev/sourceControlsListSample.js +1 -1
  112. package/dist-esm/samples-dev/threatIntelligenceIndicatorAppendTagsSample.js +1 -1
  113. package/dist-esm/samples-dev/threatIntelligenceIndicatorCreateIndicatorSample.js +1 -1
  114. package/dist-esm/samples-dev/threatIntelligenceIndicatorCreateSample.js +1 -1
  115. package/dist-esm/samples-dev/threatIntelligenceIndicatorDeleteSample.js +1 -1
  116. package/dist-esm/samples-dev/threatIntelligenceIndicatorGetSample.js +1 -1
  117. package/dist-esm/samples-dev/threatIntelligenceIndicatorMetricsListSample.js +1 -1
  118. package/dist-esm/samples-dev/threatIntelligenceIndicatorQueryIndicatorsSample.js +1 -1
  119. package/dist-esm/samples-dev/threatIntelligenceIndicatorReplaceTagsSample.js +1 -1
  120. package/dist-esm/samples-dev/threatIntelligenceIndicatorsListSample.js +1 -1
  121. package/dist-esm/samples-dev/watchlistItemsCreateOrUpdateSample.js +1 -1
  122. package/dist-esm/samples-dev/watchlistItemsDeleteSample.js +1 -1
  123. package/dist-esm/samples-dev/watchlistItemsGetSample.js +1 -1
  124. package/dist-esm/samples-dev/watchlistItemsListSample.js +1 -1
  125. package/dist-esm/samples-dev/watchlistsCreateOrUpdateSample.js +2 -2
  126. package/dist-esm/samples-dev/watchlistsDeleteSample.js +1 -1
  127. package/dist-esm/samples-dev/watchlistsGetSample.js +1 -1
  128. package/dist-esm/samples-dev/watchlistsListSample.js +1 -1
  129. package/dist-esm/src/lroImpl.d.ts +16 -0
  130. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  131. package/dist-esm/src/lroImpl.js +29 -0
  132. package/dist-esm/src/lroImpl.js.map +1 -0
  133. package/dist-esm/src/models/index.d.ts +482 -20
  134. package/dist-esm/src/models/index.d.ts.map +1 -1
  135. package/dist-esm/src/models/index.js +98 -8
  136. package/dist-esm/src/models/index.js.map +1 -1
  137. package/dist-esm/src/models/mappers.d.ts +82 -63
  138. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  139. package/dist-esm/src/models/mappers.js +511 -201
  140. package/dist-esm/src/models/mappers.js.map +1 -1
  141. package/dist-esm/src/models/parameters.d.ts +2 -0
  142. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  143. package/dist-esm/src/models/parameters.js +16 -2
  144. package/dist-esm/src/models/parameters.js.map +1 -1
  145. package/dist-esm/src/operations/fileImports.d.ts +72 -0
  146. package/dist-esm/src/operations/fileImports.d.ts.map +1 -0
  147. package/dist-esm/src/operations/fileImports.js +303 -0
  148. package/dist-esm/src/operations/fileImports.js.map +1 -0
  149. package/dist-esm/src/operations/index.d.ts +1 -0
  150. package/dist-esm/src/operations/index.d.ts.map +1 -1
  151. package/dist-esm/src/operations/index.js +1 -0
  152. package/dist-esm/src/operations/index.js.map +1 -1
  153. package/dist-esm/src/operationsInterfaces/fileImports.d.ts +47 -0
  154. package/dist-esm/src/operationsInterfaces/fileImports.d.ts.map +1 -0
  155. package/dist-esm/src/operationsInterfaces/fileImports.js +9 -0
  156. package/dist-esm/src/operationsInterfaces/fileImports.js.map +1 -0
  157. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  158. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  159. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  160. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  161. package/dist-esm/src/securityInsights.d.ts +2 -1
  162. package/dist-esm/src/securityInsights.d.ts.map +1 -1
  163. package/dist-esm/src/securityInsights.js +4 -3
  164. package/dist-esm/src/securityInsights.js.map +1 -1
  165. package/dist-esm/test/securityinsights_examples.spec.d.ts +4 -0
  166. package/dist-esm/test/securityinsights_examples.spec.d.ts.map +1 -0
  167. package/dist-esm/test/securityinsights_examples.spec.js +98 -0
  168. package/dist-esm/test/securityinsights_examples.spec.js.map +1 -0
  169. package/package.json +6 -4
  170. package/review/arm-securityinsight.api.md +283 -3
  171. package/src/lroImpl.ts +34 -0
  172. package/src/models/index.ts +526 -19
  173. package/src/models/mappers.ts +546 -201
  174. package/src/models/parameters.ts +18 -1
  175. package/src/operations/fileImports.ts +410 -0
  176. package/src/operations/index.ts +1 -0
  177. package/src/operationsInterfaces/fileImports.ts +95 -0
  178. package/src/operationsInterfaces/index.ts +1 -0
  179. package/src/securityInsights.ts +6 -2
  180. package/types/arm-securityinsight.d.ts +548 -5
  181. package/types/tsdoc-metadata.json +1 -1
  182. package/dist-esm/test/sampleTest.d.ts +0 -2
  183. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  184. package/dist-esm/test/sampleTest.js +0 -38
  185. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -25,6 +25,7 @@ import {
25
25
  EntityGetInsightsParameters as EntityGetInsightsParametersMapper,
26
26
  EntityTimelineParameters as EntityTimelineParametersMapper,
27
27
  CustomEntityQuery as CustomEntityQueryMapper,
28
+ FileImport as FileImportMapper,
28
29
  IncidentComment as IncidentCommentMapper,
29
30
  MetadataModel as MetadataModelMapper,
30
31
  MetadataPatch as MetadataPatchMapper,
@@ -69,7 +70,7 @@ export const $host: OperationURLParameter = {
69
70
  export const apiVersion: OperationQueryParameter = {
70
71
  parameterPath: "apiVersion",
71
72
  mapper: {
72
- defaultValue: "2022-07-01-preview",
73
+ defaultValue: "2022-09-01-preview",
73
74
  isConstant: true,
74
75
  serializedName: "api-version",
75
76
  type: {
@@ -427,6 +428,22 @@ export const entityQueryTemplateId: OperationURLParameter = {
427
428
  }
428
429
  };
429
430
 
431
+ export const fileImportId: OperationURLParameter = {
432
+ parameterPath: "fileImportId",
433
+ mapper: {
434
+ serializedName: "fileImportId",
435
+ required: true,
436
+ type: {
437
+ name: "String"
438
+ }
439
+ }
440
+ };
441
+
442
+ export const fileImport: OperationParameter = {
443
+ parameterPath: "fileImport",
444
+ mapper: FileImportMapper
445
+ };
446
+
430
447
  export const incidentCommentId: OperationURLParameter = {
431
448
  parameterPath: "incidentCommentId",
432
449
  mapper: {
@@ -0,0 +1,410 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { FileImports } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { SecurityInsights } from "../securityInsights";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ FileImport,
19
+ FileImportsListNextOptionalParams,
20
+ FileImportsListOptionalParams,
21
+ FileImportsListResponse,
22
+ FileImportsGetOptionalParams,
23
+ FileImportsGetResponse,
24
+ FileImportsCreateOptionalParams,
25
+ FileImportsCreateResponse,
26
+ FileImportsDeleteOptionalParams,
27
+ FileImportsDeleteResponse,
28
+ FileImportsListNextResponse
29
+ } from "../models";
30
+
31
+ /// <reference lib="esnext.asynciterable" />
32
+ /** Class containing FileImports operations. */
33
+ export class FileImportsImpl implements FileImports {
34
+ private readonly client: SecurityInsights;
35
+
36
+ /**
37
+ * Initialize a new instance of the class FileImports class.
38
+ * @param client Reference to the service client
39
+ */
40
+ constructor(client: SecurityInsights) {
41
+ this.client = client;
42
+ }
43
+
44
+ /**
45
+ * Gets all file imports.
46
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
47
+ * @param workspaceName The name of the workspace.
48
+ * @param options The options parameters.
49
+ */
50
+ public list(
51
+ resourceGroupName: string,
52
+ workspaceName: string,
53
+ options?: FileImportsListOptionalParams
54
+ ): PagedAsyncIterableIterator<FileImport> {
55
+ const iter = this.listPagingAll(resourceGroupName, workspaceName, options);
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: () => {
64
+ return this.listPagingPage(resourceGroupName, workspaceName, options);
65
+ }
66
+ };
67
+ }
68
+
69
+ private async *listPagingPage(
70
+ resourceGroupName: string,
71
+ workspaceName: string,
72
+ options?: FileImportsListOptionalParams
73
+ ): AsyncIterableIterator<FileImport[]> {
74
+ let result = await this._list(resourceGroupName, workspaceName, options);
75
+ yield result.value || [];
76
+ let continuationToken = result.nextLink;
77
+ while (continuationToken) {
78
+ result = await this._listNext(
79
+ resourceGroupName,
80
+ workspaceName,
81
+ continuationToken,
82
+ options
83
+ );
84
+ continuationToken = result.nextLink;
85
+ yield result.value || [];
86
+ }
87
+ }
88
+
89
+ private async *listPagingAll(
90
+ resourceGroupName: string,
91
+ workspaceName: string,
92
+ options?: FileImportsListOptionalParams
93
+ ): AsyncIterableIterator<FileImport> {
94
+ for await (const page of this.listPagingPage(
95
+ resourceGroupName,
96
+ workspaceName,
97
+ options
98
+ )) {
99
+ yield* page;
100
+ }
101
+ }
102
+
103
+ /**
104
+ * Gets all file imports.
105
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
106
+ * @param workspaceName The name of the workspace.
107
+ * @param options The options parameters.
108
+ */
109
+ private _list(
110
+ resourceGroupName: string,
111
+ workspaceName: string,
112
+ options?: FileImportsListOptionalParams
113
+ ): Promise<FileImportsListResponse> {
114
+ return this.client.sendOperationRequest(
115
+ { resourceGroupName, workspaceName, options },
116
+ listOperationSpec
117
+ );
118
+ }
119
+
120
+ /**
121
+ * Gets a file import.
122
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
123
+ * @param workspaceName The name of the workspace.
124
+ * @param fileImportId File import ID
125
+ * @param options The options parameters.
126
+ */
127
+ get(
128
+ resourceGroupName: string,
129
+ workspaceName: string,
130
+ fileImportId: string,
131
+ options?: FileImportsGetOptionalParams
132
+ ): Promise<FileImportsGetResponse> {
133
+ return this.client.sendOperationRequest(
134
+ { resourceGroupName, workspaceName, fileImportId, options },
135
+ getOperationSpec
136
+ );
137
+ }
138
+
139
+ /**
140
+ * Creates the file import.
141
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
142
+ * @param workspaceName The name of the workspace.
143
+ * @param fileImportId File import ID
144
+ * @param fileImport The file import
145
+ * @param options The options parameters.
146
+ */
147
+ create(
148
+ resourceGroupName: string,
149
+ workspaceName: string,
150
+ fileImportId: string,
151
+ fileImport: FileImport,
152
+ options?: FileImportsCreateOptionalParams
153
+ ): Promise<FileImportsCreateResponse> {
154
+ return this.client.sendOperationRequest(
155
+ { resourceGroupName, workspaceName, fileImportId, fileImport, options },
156
+ createOperationSpec
157
+ );
158
+ }
159
+
160
+ /**
161
+ * Delete the file import.
162
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
163
+ * @param workspaceName The name of the workspace.
164
+ * @param fileImportId File import ID
165
+ * @param options The options parameters.
166
+ */
167
+ async beginDelete(
168
+ resourceGroupName: string,
169
+ workspaceName: string,
170
+ fileImportId: string,
171
+ options?: FileImportsDeleteOptionalParams
172
+ ): Promise<
173
+ PollerLike<
174
+ PollOperationState<FileImportsDeleteResponse>,
175
+ FileImportsDeleteResponse
176
+ >
177
+ > {
178
+ const directSendOperation = async (
179
+ args: coreClient.OperationArguments,
180
+ spec: coreClient.OperationSpec
181
+ ): Promise<FileImportsDeleteResponse> => {
182
+ return this.client.sendOperationRequest(args, spec);
183
+ };
184
+ const sendOperation = async (
185
+ args: coreClient.OperationArguments,
186
+ spec: coreClient.OperationSpec
187
+ ) => {
188
+ let currentRawResponse:
189
+ | coreClient.FullOperationResponse
190
+ | undefined = undefined;
191
+ const providedCallback = args.options?.onResponse;
192
+ const callback: coreClient.RawResponseCallback = (
193
+ rawResponse: coreClient.FullOperationResponse,
194
+ flatResponse: unknown
195
+ ) => {
196
+ currentRawResponse = rawResponse;
197
+ providedCallback?.(rawResponse, flatResponse);
198
+ };
199
+ const updatedArgs = {
200
+ ...args,
201
+ options: {
202
+ ...args.options,
203
+ onResponse: callback
204
+ }
205
+ };
206
+ const flatResponse = await directSendOperation(updatedArgs, spec);
207
+ return {
208
+ flatResponse,
209
+ rawResponse: {
210
+ statusCode: currentRawResponse!.status,
211
+ body: currentRawResponse!.parsedBody,
212
+ headers: currentRawResponse!.headers.toJSON()
213
+ }
214
+ };
215
+ };
216
+
217
+ const lro = new LroImpl(
218
+ sendOperation,
219
+ { resourceGroupName, workspaceName, fileImportId, options },
220
+ deleteOperationSpec
221
+ );
222
+ const poller = new LroEngine(lro, {
223
+ resumeFrom: options?.resumeFrom,
224
+ intervalInMs: options?.updateIntervalInMs,
225
+ lroResourceLocationConfig: "location"
226
+ });
227
+ await poller.poll();
228
+ return poller;
229
+ }
230
+
231
+ /**
232
+ * Delete the file import.
233
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
234
+ * @param workspaceName The name of the workspace.
235
+ * @param fileImportId File import ID
236
+ * @param options The options parameters.
237
+ */
238
+ async beginDeleteAndWait(
239
+ resourceGroupName: string,
240
+ workspaceName: string,
241
+ fileImportId: string,
242
+ options?: FileImportsDeleteOptionalParams
243
+ ): Promise<FileImportsDeleteResponse> {
244
+ const poller = await this.beginDelete(
245
+ resourceGroupName,
246
+ workspaceName,
247
+ fileImportId,
248
+ options
249
+ );
250
+ return poller.pollUntilDone();
251
+ }
252
+
253
+ /**
254
+ * ListNext
255
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
256
+ * @param workspaceName The name of the workspace.
257
+ * @param nextLink The nextLink from the previous successful call to the List method.
258
+ * @param options The options parameters.
259
+ */
260
+ private _listNext(
261
+ resourceGroupName: string,
262
+ workspaceName: string,
263
+ nextLink: string,
264
+ options?: FileImportsListNextOptionalParams
265
+ ): Promise<FileImportsListNextResponse> {
266
+ return this.client.sendOperationRequest(
267
+ { resourceGroupName, workspaceName, nextLink, options },
268
+ listNextOperationSpec
269
+ );
270
+ }
271
+ }
272
+ // Operation Specifications
273
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
274
+
275
+ const listOperationSpec: coreClient.OperationSpec = {
276
+ path:
277
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports",
278
+ httpMethod: "GET",
279
+ responses: {
280
+ 200: {
281
+ bodyMapper: Mappers.FileImportList
282
+ },
283
+ default: {
284
+ bodyMapper: Mappers.CloudError
285
+ }
286
+ },
287
+ queryParameters: [
288
+ Parameters.apiVersion,
289
+ Parameters.filter,
290
+ Parameters.orderby,
291
+ Parameters.top,
292
+ Parameters.skipToken
293
+ ],
294
+ urlParameters: [
295
+ Parameters.$host,
296
+ Parameters.subscriptionId,
297
+ Parameters.resourceGroupName,
298
+ Parameters.workspaceName
299
+ ],
300
+ headerParameters: [Parameters.accept],
301
+ serializer
302
+ };
303
+ const getOperationSpec: coreClient.OperationSpec = {
304
+ path:
305
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}",
306
+ httpMethod: "GET",
307
+ responses: {
308
+ 200: {
309
+ bodyMapper: Mappers.FileImport
310
+ },
311
+ default: {
312
+ bodyMapper: Mappers.CloudError
313
+ }
314
+ },
315
+ queryParameters: [Parameters.apiVersion],
316
+ urlParameters: [
317
+ Parameters.$host,
318
+ Parameters.subscriptionId,
319
+ Parameters.resourceGroupName,
320
+ Parameters.workspaceName,
321
+ Parameters.fileImportId
322
+ ],
323
+ headerParameters: [Parameters.accept],
324
+ serializer
325
+ };
326
+ const createOperationSpec: coreClient.OperationSpec = {
327
+ path:
328
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}",
329
+ httpMethod: "PUT",
330
+ responses: {
331
+ 201: {
332
+ bodyMapper: Mappers.FileImport
333
+ },
334
+ default: {
335
+ bodyMapper: Mappers.CloudError
336
+ }
337
+ },
338
+ requestBody: Parameters.fileImport,
339
+ queryParameters: [Parameters.apiVersion],
340
+ urlParameters: [
341
+ Parameters.$host,
342
+ Parameters.subscriptionId,
343
+ Parameters.resourceGroupName,
344
+ Parameters.workspaceName,
345
+ Parameters.fileImportId
346
+ ],
347
+ headerParameters: [Parameters.accept, Parameters.contentType],
348
+ mediaType: "json",
349
+ serializer
350
+ };
351
+ const deleteOperationSpec: coreClient.OperationSpec = {
352
+ path:
353
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/fileImports/{fileImportId}",
354
+ httpMethod: "DELETE",
355
+ responses: {
356
+ 200: {
357
+ bodyMapper: Mappers.FileImport
358
+ },
359
+ 201: {
360
+ bodyMapper: Mappers.FileImport
361
+ },
362
+ 202: {
363
+ bodyMapper: Mappers.FileImport
364
+ },
365
+ 204: {
366
+ bodyMapper: Mappers.FileImport
367
+ },
368
+ default: {
369
+ bodyMapper: Mappers.CloudError
370
+ }
371
+ },
372
+ queryParameters: [Parameters.apiVersion],
373
+ urlParameters: [
374
+ Parameters.$host,
375
+ Parameters.subscriptionId,
376
+ Parameters.resourceGroupName,
377
+ Parameters.workspaceName,
378
+ Parameters.fileImportId
379
+ ],
380
+ headerParameters: [Parameters.accept],
381
+ serializer
382
+ };
383
+ const listNextOperationSpec: coreClient.OperationSpec = {
384
+ path: "{nextLink}",
385
+ httpMethod: "GET",
386
+ responses: {
387
+ 200: {
388
+ bodyMapper: Mappers.FileImportList
389
+ },
390
+ default: {
391
+ bodyMapper: Mappers.CloudError
392
+ }
393
+ },
394
+ queryParameters: [
395
+ Parameters.apiVersion,
396
+ Parameters.filter,
397
+ Parameters.orderby,
398
+ Parameters.top,
399
+ Parameters.skipToken
400
+ ],
401
+ urlParameters: [
402
+ Parameters.$host,
403
+ Parameters.subscriptionId,
404
+ Parameters.resourceGroupName,
405
+ Parameters.workspaceName,
406
+ Parameters.nextLink
407
+ ],
408
+ headerParameters: [Parameters.accept],
409
+ serializer
410
+ };
@@ -22,6 +22,7 @@ export * from "./entitiesRelations";
22
22
  export * from "./entityRelations";
23
23
  export * from "./entityQueries";
24
24
  export * from "./entityQueryTemplates";
25
+ export * from "./fileImports";
25
26
  export * from "./incidentComments";
26
27
  export * from "./incidentRelations";
27
28
  export * from "./metadata";
@@ -0,0 +1,95 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
11
+ import {
12
+ FileImport,
13
+ FileImportsListOptionalParams,
14
+ FileImportsGetOptionalParams,
15
+ FileImportsGetResponse,
16
+ FileImportsCreateOptionalParams,
17
+ FileImportsCreateResponse,
18
+ FileImportsDeleteOptionalParams,
19
+ FileImportsDeleteResponse
20
+ } from "../models";
21
+
22
+ /// <reference lib="esnext.asynciterable" />
23
+ /** Interface representing a FileImports. */
24
+ export interface FileImports {
25
+ /**
26
+ * Gets all file imports.
27
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
28
+ * @param workspaceName The name of the workspace.
29
+ * @param options The options parameters.
30
+ */
31
+ list(
32
+ resourceGroupName: string,
33
+ workspaceName: string,
34
+ options?: FileImportsListOptionalParams
35
+ ): PagedAsyncIterableIterator<FileImport>;
36
+ /**
37
+ * Gets a file import.
38
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
39
+ * @param workspaceName The name of the workspace.
40
+ * @param fileImportId File import ID
41
+ * @param options The options parameters.
42
+ */
43
+ get(
44
+ resourceGroupName: string,
45
+ workspaceName: string,
46
+ fileImportId: string,
47
+ options?: FileImportsGetOptionalParams
48
+ ): Promise<FileImportsGetResponse>;
49
+ /**
50
+ * Creates the file import.
51
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
52
+ * @param workspaceName The name of the workspace.
53
+ * @param fileImportId File import ID
54
+ * @param fileImport The file import
55
+ * @param options The options parameters.
56
+ */
57
+ create(
58
+ resourceGroupName: string,
59
+ workspaceName: string,
60
+ fileImportId: string,
61
+ fileImport: FileImport,
62
+ options?: FileImportsCreateOptionalParams
63
+ ): Promise<FileImportsCreateResponse>;
64
+ /**
65
+ * Delete the file import.
66
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
67
+ * @param workspaceName The name of the workspace.
68
+ * @param fileImportId File import ID
69
+ * @param options The options parameters.
70
+ */
71
+ beginDelete(
72
+ resourceGroupName: string,
73
+ workspaceName: string,
74
+ fileImportId: string,
75
+ options?: FileImportsDeleteOptionalParams
76
+ ): Promise<
77
+ PollerLike<
78
+ PollOperationState<FileImportsDeleteResponse>,
79
+ FileImportsDeleteResponse
80
+ >
81
+ >;
82
+ /**
83
+ * Delete the file import.
84
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
85
+ * @param workspaceName The name of the workspace.
86
+ * @param fileImportId File import ID
87
+ * @param options The options parameters.
88
+ */
89
+ beginDeleteAndWait(
90
+ resourceGroupName: string,
91
+ workspaceName: string,
92
+ fileImportId: string,
93
+ options?: FileImportsDeleteOptionalParams
94
+ ): Promise<FileImportsDeleteResponse>;
95
+ }
@@ -22,6 +22,7 @@ export * from "./entitiesRelations";
22
22
  export * from "./entityRelations";
23
23
  export * from "./entityQueries";
24
24
  export * from "./entityQueryTemplates";
25
+ export * from "./fileImports";
25
26
  export * from "./incidentComments";
26
27
  export * from "./incidentRelations";
27
28
  export * from "./metadata";
@@ -31,6 +31,7 @@ import {
31
31
  EntityRelationsImpl,
32
32
  EntityQueriesImpl,
33
33
  EntityQueryTemplatesImpl,
34
+ FileImportsImpl,
34
35
  IncidentCommentsImpl,
35
36
  IncidentRelationsImpl,
36
37
  MetadataImpl,
@@ -66,6 +67,7 @@ import {
66
67
  EntityRelations,
67
68
  EntityQueries,
68
69
  EntityQueryTemplates,
70
+ FileImports,
69
71
  IncidentComments,
70
72
  IncidentRelations,
71
73
  Metadata,
@@ -118,7 +120,7 @@ export class SecurityInsights extends coreClient.ServiceClient {
118
120
  credential: credentials
119
121
  };
120
122
 
121
- const packageDetails = `azsdk-js-arm-securityinsight/1.0.0-beta.4`;
123
+ const packageDetails = `azsdk-js-arm-securityinsight/1.0.0-beta.5`;
122
124
  const userAgentPrefix =
123
125
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
124
126
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -172,7 +174,7 @@ export class SecurityInsights extends coreClient.ServiceClient {
172
174
 
173
175
  // Assigning values to Constant parameters
174
176
  this.$host = options.$host || "https://management.azure.com";
175
- this.apiVersion = options.apiVersion || "2022-07-01-preview";
177
+ this.apiVersion = options.apiVersion || "2022-09-01-preview";
176
178
  this.alertRules = new AlertRulesImpl(this);
177
179
  this.actions = new ActionsImpl(this);
178
180
  this.alertRuleTemplates = new AlertRuleTemplatesImpl(this);
@@ -189,6 +191,7 @@ export class SecurityInsights extends coreClient.ServiceClient {
189
191
  this.entityRelations = new EntityRelationsImpl(this);
190
192
  this.entityQueries = new EntityQueriesImpl(this);
191
193
  this.entityQueryTemplates = new EntityQueryTemplatesImpl(this);
194
+ this.fileImports = new FileImportsImpl(this);
192
195
  this.incidentComments = new IncidentCommentsImpl(this);
193
196
  this.incidentRelations = new IncidentRelationsImpl(this);
194
197
  this.metadata = new MetadataImpl(this);
@@ -263,6 +266,7 @@ export class SecurityInsights extends coreClient.ServiceClient {
263
266
  entityRelations: EntityRelations;
264
267
  entityQueries: EntityQueries;
265
268
  entityQueryTemplates: EntityQueryTemplates;
269
+ fileImports: FileImports;
266
270
  incidentComments: IncidentComments;
267
271
  incidentRelations: IncidentRelations;
268
272
  metadata: Metadata;