@azure/arm-operationalinsights 8.0.0-beta.1

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 (252) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +94 -0
  4. package/dist/index.js +5674 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +6 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +13 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1418 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +157 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +64 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/dist-esm/src/models/mappers.js +2023 -0
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +40 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +351 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operationalInsightsManagementClient.d.ts +33 -0
  29. package/dist-esm/src/operationalInsightsManagementClient.d.ts.map +1 -0
  30. package/dist-esm/src/operationalInsightsManagementClient.js +40 -0
  31. package/dist-esm/src/operationalInsightsManagementClient.js.map +1 -0
  32. package/dist-esm/src/operationalInsightsManagementClientContext.d.ts +15 -0
  33. package/dist-esm/src/operationalInsightsManagementClientContext.d.ts.map +1 -0
  34. package/dist-esm/src/operationalInsightsManagementClientContext.js +48 -0
  35. package/dist-esm/src/operationalInsightsManagementClientContext.js.map +1 -0
  36. package/dist-esm/src/operations/availableServiceTiers.d.ts +20 -0
  37. package/dist-esm/src/operations/availableServiceTiers.d.ts.map +1 -0
  38. package/dist-esm/src/operations/availableServiceTiers.js +57 -0
  39. package/dist-esm/src/operations/availableServiceTiers.js.map +1 -0
  40. package/dist-esm/src/operations/clusters.d.ts +99 -0
  41. package/dist-esm/src/operations/clusters.d.ts.map +1 -0
  42. package/dist-esm/src/operations/clusters.js +450 -0
  43. package/dist-esm/src/operations/clusters.js.map +1 -0
  44. package/dist-esm/src/operations/dataExports.d.ts +55 -0
  45. package/dist-esm/src/operations/dataExports.d.ts.map +1 -0
  46. package/dist-esm/src/operations/dataExports.js +200 -0
  47. package/dist-esm/src/operations/dataExports.js.map +1 -0
  48. package/dist-esm/src/operations/dataSources.d.ts +66 -0
  49. package/dist-esm/src/operations/dataSources.d.ts.map +1 -0
  50. package/dist-esm/src/operations/dataSources.js +230 -0
  51. package/dist-esm/src/operations/dataSources.js.map +1 -0
  52. package/dist-esm/src/operations/deletedWorkspaces.d.ts +40 -0
  53. package/dist-esm/src/operations/deletedWorkspaces.d.ts.map +1 -0
  54. package/dist-esm/src/operations/deletedWorkspaces.js +161 -0
  55. package/dist-esm/src/operations/deletedWorkspaces.js.map +1 -0
  56. package/dist-esm/src/operations/gateways.d.ts +21 -0
  57. package/dist-esm/src/operations/gateways.d.ts.map +1 -0
  58. package/dist-esm/src/operations/gateways.js +47 -0
  59. package/dist-esm/src/operations/gateways.js.map +1 -0
  60. package/dist-esm/src/operations/index.d.ts +20 -0
  61. package/dist-esm/src/operations/index.d.ts.map +1 -0
  62. package/dist-esm/src/operations/index.js +27 -0
  63. package/dist-esm/src/operations/index.js.map +1 -0
  64. package/dist-esm/src/operations/intelligencePacks.d.ts +37 -0
  65. package/dist-esm/src/operations/intelligencePacks.d.ts.map +1 -0
  66. package/dist-esm/src/operations/intelligencePacks.js +106 -0
  67. package/dist-esm/src/operations/intelligencePacks.js.map +1 -0
  68. package/dist-esm/src/operations/linkedServices.d.ts +73 -0
  69. package/dist-esm/src/operations/linkedServices.d.ts.map +1 -0
  70. package/dist-esm/src/operations/linkedServices.js +295 -0
  71. package/dist-esm/src/operations/linkedServices.js.map +1 -0
  72. package/dist-esm/src/operations/linkedStorageAccounts.d.ts +60 -0
  73. package/dist-esm/src/operations/linkedStorageAccounts.d.ts.map +1 -0
  74. package/dist-esm/src/operations/linkedStorageAccounts.js +186 -0
  75. package/dist-esm/src/operations/linkedStorageAccounts.js.map +1 -0
  76. package/dist-esm/src/operations/managementGroups.d.ts +30 -0
  77. package/dist-esm/src/operations/managementGroups.d.ts.map +1 -0
  78. package/dist-esm/src/operations/managementGroups.js +96 -0
  79. package/dist-esm/src/operations/managementGroups.js.map +1 -0
  80. package/dist-esm/src/operations/operationStatuses.d.ts +20 -0
  81. package/dist-esm/src/operations/operationStatuses.d.ts.map +1 -0
  82. package/dist-esm/src/operations/operationStatuses.js +50 -0
  83. package/dist-esm/src/operations/operationStatuses.js.map +1 -0
  84. package/dist-esm/src/operations/operations.d.ts +32 -0
  85. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  86. package/dist-esm/src/operations/operations.js +120 -0
  87. package/dist-esm/src/operations/operations.js.map +1 -0
  88. package/dist-esm/src/operations/savedSearches.d.ts +45 -0
  89. package/dist-esm/src/operations/savedSearches.d.ts.map +1 -0
  90. package/dist-esm/src/operations/savedSearches.js +135 -0
  91. package/dist-esm/src/operations/savedSearches.js.map +1 -0
  92. package/dist-esm/src/operations/schema.d.ts +20 -0
  93. package/dist-esm/src/operations/schema.d.ts.map +1 -0
  94. package/dist-esm/src/operations/schema.js +50 -0
  95. package/dist-esm/src/operations/schema.js.map +1 -0
  96. package/dist-esm/src/operations/sharedKeysOperations.d.ts +28 -0
  97. package/dist-esm/src/operations/sharedKeysOperations.d.ts.map +1 -0
  98. package/dist-esm/src/operations/sharedKeysOperations.js +78 -0
  99. package/dist-esm/src/operations/sharedKeysOperations.js.map +1 -0
  100. package/dist-esm/src/operations/storageInsightConfigs.d.ts +63 -0
  101. package/dist-esm/src/operations/storageInsightConfigs.d.ts.map +1 -0
  102. package/dist-esm/src/operations/storageInsightConfigs.js +225 -0
  103. package/dist-esm/src/operations/storageInsightConfigs.js.map +1 -0
  104. package/dist-esm/src/operations/usages.d.ts +30 -0
  105. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  106. package/dist-esm/src/operations/usages.js +96 -0
  107. package/dist-esm/src/operations/usages.js.map +1 -0
  108. package/dist-esm/src/operations/workspacePurge.d.ts +36 -0
  109. package/dist-esm/src/operations/workspacePurge.d.ts.map +1 -0
  110. package/dist-esm/src/operations/workspacePurge.js +90 -0
  111. package/dist-esm/src/operations/workspacePurge.js.map +1 -0
  112. package/dist-esm/src/operations/workspaces.d.ts +90 -0
  113. package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
  114. package/dist-esm/src/operations/workspaces.js +384 -0
  115. package/dist-esm/src/operations/workspaces.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/availableServiceTiers.d.ts +12 -0
  117. package/dist-esm/src/operationsInterfaces/availableServiceTiers.d.ts.map +1 -0
  118. package/dist-esm/src/operationsInterfaces/availableServiceTiers.js +9 -0
  119. package/dist-esm/src/operationsInterfaces/availableServiceTiers.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/clusters.d.ts +63 -0
  121. package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/clusters.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/dataExports.d.ts +38 -0
  125. package/dist-esm/src/operationsInterfaces/dataExports.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/dataExports.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/dataExports.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/dataSources.d.ts +39 -0
  129. package/dist-esm/src/operationsInterfaces/dataSources.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/dataSources.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/dataSources.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/deletedWorkspaces.d.ts +17 -0
  133. package/dist-esm/src/operationsInterfaces/deletedWorkspaces.d.ts.map +1 -0
  134. package/dist-esm/src/operationsInterfaces/deletedWorkspaces.js +9 -0
  135. package/dist-esm/src/operationsInterfaces/deletedWorkspaces.js.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/gateways.d.ts +13 -0
  137. package/dist-esm/src/operationsInterfaces/gateways.d.ts.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/gateways.js +9 -0
  139. package/dist-esm/src/operationsInterfaces/gateways.js.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/index.d.ts +20 -0
  141. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  142. package/dist-esm/src/operationsInterfaces/index.js +27 -0
  143. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  144. package/dist-esm/src/operationsInterfaces/intelligencePacks.d.ts +29 -0
  145. package/dist-esm/src/operationsInterfaces/intelligencePacks.d.ts.map +1 -0
  146. package/dist-esm/src/operationsInterfaces/intelligencePacks.js +9 -0
  147. package/dist-esm/src/operationsInterfaces/intelligencePacks.js.map +1 -0
  148. package/dist-esm/src/operationsInterfaces/linkedServices.d.ts +56 -0
  149. package/dist-esm/src/operationsInterfaces/linkedServices.d.ts.map +1 -0
  150. package/dist-esm/src/operationsInterfaces/linkedServices.js +9 -0
  151. package/dist-esm/src/operationsInterfaces/linkedServices.js.map +1 -0
  152. package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.d.ts +42 -0
  153. package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.d.ts.map +1 -0
  154. package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.js +9 -0
  155. package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.js.map +1 -0
  156. package/dist-esm/src/operationsInterfaces/managementGroups.d.ts +13 -0
  157. package/dist-esm/src/operationsInterfaces/managementGroups.d.ts.map +1 -0
  158. package/dist-esm/src/operationsInterfaces/managementGroups.js +9 -0
  159. package/dist-esm/src/operationsInterfaces/managementGroups.js.map +1 -0
  160. package/dist-esm/src/operationsInterfaces/operationStatuses.d.ts +12 -0
  161. package/dist-esm/src/operationsInterfaces/operationStatuses.d.ts.map +1 -0
  162. package/dist-esm/src/operationsInterfaces/operationStatuses.js +9 -0
  163. package/dist-esm/src/operationsInterfaces/operationStatuses.js.map +1 -0
  164. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  165. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  166. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  167. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  168. package/dist-esm/src/operationsInterfaces/savedSearches.d.ts +37 -0
  169. package/dist-esm/src/operationsInterfaces/savedSearches.d.ts.map +1 -0
  170. package/dist-esm/src/operationsInterfaces/savedSearches.js +9 -0
  171. package/dist-esm/src/operationsInterfaces/savedSearches.js.map +1 -0
  172. package/dist-esm/src/operationsInterfaces/schema.d.ts +12 -0
  173. package/dist-esm/src/operationsInterfaces/schema.d.ts.map +1 -0
  174. package/dist-esm/src/operationsInterfaces/schema.js +9 -0
  175. package/dist-esm/src/operationsInterfaces/schema.js.map +1 -0
  176. package/dist-esm/src/operationsInterfaces/sharedKeysOperations.d.ts +20 -0
  177. package/dist-esm/src/operationsInterfaces/sharedKeysOperations.d.ts.map +1 -0
  178. package/dist-esm/src/operationsInterfaces/sharedKeysOperations.js +9 -0
  179. package/dist-esm/src/operationsInterfaces/sharedKeysOperations.js.map +1 -0
  180. package/dist-esm/src/operationsInterfaces/storageInsightConfigs.d.ts +38 -0
  181. package/dist-esm/src/operationsInterfaces/storageInsightConfigs.d.ts.map +1 -0
  182. package/dist-esm/src/operationsInterfaces/storageInsightConfigs.js +9 -0
  183. package/dist-esm/src/operationsInterfaces/storageInsightConfigs.js.map +1 -0
  184. package/dist-esm/src/operationsInterfaces/usages.d.ts +13 -0
  185. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  186. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  187. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  188. package/dist-esm/src/operationsInterfaces/workspacePurge.d.ts +28 -0
  189. package/dist-esm/src/operationsInterfaces/workspacePurge.d.ts.map +1 -0
  190. package/dist-esm/src/operationsInterfaces/workspacePurge.js +9 -0
  191. package/dist-esm/src/operationsInterfaces/workspacePurge.js.map +1 -0
  192. package/dist-esm/src/operationsInterfaces/workspaces.d.ts +67 -0
  193. package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
  194. package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
  195. package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
  196. package/dist-esm/test/sampleTest.d.ts +2 -0
  197. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  198. package/dist-esm/test/sampleTest.js +40 -0
  199. package/dist-esm/test/sampleTest.js.map +1 -0
  200. package/package.json +92 -0
  201. package/review/arm-operationalinsights.api.md +1349 -0
  202. package/rollup.config.js +188 -0
  203. package/src/index.ts +13 -0
  204. package/src/lroImpl.ts +34 -0
  205. package/src/models/index.ts +1622 -0
  206. package/src/models/mappers.ts +2183 -0
  207. package/src/models/parameters.ts +406 -0
  208. package/src/operationalInsightsManagementClient.ts +108 -0
  209. package/src/operationalInsightsManagementClientContext.ts +68 -0
  210. package/src/operations/availableServiceTiers.ts +76 -0
  211. package/src/operations/clusters.ts +591 -0
  212. package/src/operations/dataExports.ts +272 -0
  213. package/src/operations/dataSources.ts +328 -0
  214. package/src/operations/deletedWorkspaces.ts +180 -0
  215. package/src/operations/gateways.ts +64 -0
  216. package/src/operations/index.ts +27 -0
  217. package/src/operations/intelligencePacks.ts +147 -0
  218. package/src/operations/linkedServices.ts +430 -0
  219. package/src/operations/linkedStorageAccounts.ts +259 -0
  220. package/src/operations/managementGroups.ts +120 -0
  221. package/src/operations/operationStatuses.ts +69 -0
  222. package/src/operations/operations.ts +137 -0
  223. package/src/operations/savedSearches.ts +191 -0
  224. package/src/operations/schema.ts +66 -0
  225. package/src/operations/sharedKeysOperations.ts +108 -0
  226. package/src/operations/storageInsightConfigs.ts +313 -0
  227. package/src/operations/usages.ts +120 -0
  228. package/src/operations/workspacePurge.ts +123 -0
  229. package/src/operations/workspaces.ts +502 -0
  230. package/src/operationsInterfaces/availableServiceTiers.ts +27 -0
  231. package/src/operationsInterfaces/clusters.ts +121 -0
  232. package/src/operationsInterfaces/dataExports.ts +75 -0
  233. package/src/operationsInterfaces/dataSources.ts +77 -0
  234. package/src/operationsInterfaces/deletedWorkspaces.ts +35 -0
  235. package/src/operationsInterfaces/gateways.ts +26 -0
  236. package/src/operationsInterfaces/index.ts +27 -0
  237. package/src/operationsInterfaces/intelligencePacks.ts +56 -0
  238. package/src/operationsInterfaces/linkedServices.ts +115 -0
  239. package/src/operationsInterfaces/linkedStorageAccounts.ts +80 -0
  240. package/src/operationsInterfaces/managementGroups.ts +26 -0
  241. package/src/operationsInterfaces/operationStatuses.ts +27 -0
  242. package/src/operationsInterfaces/operations.ts +22 -0
  243. package/src/operationsInterfaces/savedSearches.ts +74 -0
  244. package/src/operationsInterfaces/schema.ts +24 -0
  245. package/src/operationsInterfaces/sharedKeysOperations.ts +41 -0
  246. package/src/operationsInterfaces/storageInsightConfigs.ts +75 -0
  247. package/src/operationsInterfaces/usages.ts +26 -0
  248. package/src/operationsInterfaces/workspacePurge.ts +52 -0
  249. package/src/operationsInterfaces/workspaces.ts +125 -0
  250. package/tsconfig.json +19 -0
  251. package/types/arm-operationalinsights.d.ts +2190 -0
  252. package/types/tsdoc-metadata.json +11 -0
@@ -0,0 +1,272 @@
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 { DataExports } 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 { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
15
+ import {
16
+ DataExport,
17
+ DataExportsListByWorkspaceOptionalParams,
18
+ DataExportsListByWorkspaceResponse,
19
+ DataExportsCreateOrUpdateOptionalParams,
20
+ DataExportsCreateOrUpdateResponse,
21
+ DataExportsGetOptionalParams,
22
+ DataExportsGetResponse,
23
+ DataExportsDeleteOptionalParams
24
+ } from "../models";
25
+
26
+ /// <reference lib="esnext.asynciterable" />
27
+ /** Class containing DataExports operations. */
28
+ export class DataExportsImpl implements DataExports {
29
+ private readonly client: OperationalInsightsManagementClientContext;
30
+
31
+ /**
32
+ * Initialize a new instance of the class DataExports class.
33
+ * @param client Reference to the service client
34
+ */
35
+ constructor(client: OperationalInsightsManagementClientContext) {
36
+ this.client = client;
37
+ }
38
+
39
+ /**
40
+ * Lists the data export instances within a workspace.
41
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
42
+ * @param workspaceName The name of the workspace.
43
+ * @param options The options parameters.
44
+ */
45
+ public listByWorkspace(
46
+ resourceGroupName: string,
47
+ workspaceName: string,
48
+ options?: DataExportsListByWorkspaceOptionalParams
49
+ ): PagedAsyncIterableIterator<DataExport> {
50
+ const iter = this.listByWorkspacePagingAll(
51
+ resourceGroupName,
52
+ workspaceName,
53
+ options
54
+ );
55
+ return {
56
+ next() {
57
+ return iter.next();
58
+ },
59
+ [Symbol.asyncIterator]() {
60
+ return this;
61
+ },
62
+ byPage: () => {
63
+ return this.listByWorkspacePagingPage(
64
+ resourceGroupName,
65
+ workspaceName,
66
+ options
67
+ );
68
+ }
69
+ };
70
+ }
71
+
72
+ private async *listByWorkspacePagingPage(
73
+ resourceGroupName: string,
74
+ workspaceName: string,
75
+ options?: DataExportsListByWorkspaceOptionalParams
76
+ ): AsyncIterableIterator<DataExport[]> {
77
+ let result = await this._listByWorkspace(
78
+ resourceGroupName,
79
+ workspaceName,
80
+ options
81
+ );
82
+ yield result.value || [];
83
+ }
84
+
85
+ private async *listByWorkspacePagingAll(
86
+ resourceGroupName: string,
87
+ workspaceName: string,
88
+ options?: DataExportsListByWorkspaceOptionalParams
89
+ ): AsyncIterableIterator<DataExport> {
90
+ for await (const page of this.listByWorkspacePagingPage(
91
+ resourceGroupName,
92
+ workspaceName,
93
+ options
94
+ )) {
95
+ yield* page;
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Lists the data export instances within a workspace.
101
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
102
+ * @param workspaceName The name of the workspace.
103
+ * @param options The options parameters.
104
+ */
105
+ private _listByWorkspace(
106
+ resourceGroupName: string,
107
+ workspaceName: string,
108
+ options?: DataExportsListByWorkspaceOptionalParams
109
+ ): Promise<DataExportsListByWorkspaceResponse> {
110
+ return this.client.sendOperationRequest(
111
+ { resourceGroupName, workspaceName, options },
112
+ listByWorkspaceOperationSpec
113
+ );
114
+ }
115
+
116
+ /**
117
+ * Create or update a data export.
118
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
119
+ * @param workspaceName The name of the workspace.
120
+ * @param dataExportName The data export rule name.
121
+ * @param parameters The parameters required to create or update a data export.
122
+ * @param options The options parameters.
123
+ */
124
+ createOrUpdate(
125
+ resourceGroupName: string,
126
+ workspaceName: string,
127
+ dataExportName: string,
128
+ parameters: DataExport,
129
+ options?: DataExportsCreateOrUpdateOptionalParams
130
+ ): Promise<DataExportsCreateOrUpdateResponse> {
131
+ return this.client.sendOperationRequest(
132
+ { resourceGroupName, workspaceName, dataExportName, parameters, options },
133
+ createOrUpdateOperationSpec
134
+ );
135
+ }
136
+
137
+ /**
138
+ * Gets a data export instance.
139
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
140
+ * @param workspaceName The name of the workspace.
141
+ * @param dataExportName The data export rule name.
142
+ * @param options The options parameters.
143
+ */
144
+ get(
145
+ resourceGroupName: string,
146
+ workspaceName: string,
147
+ dataExportName: string,
148
+ options?: DataExportsGetOptionalParams
149
+ ): Promise<DataExportsGetResponse> {
150
+ return this.client.sendOperationRequest(
151
+ { resourceGroupName, workspaceName, dataExportName, options },
152
+ getOperationSpec
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Deletes the specified data export in a given workspace..
158
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
159
+ * @param workspaceName The name of the workspace.
160
+ * @param dataExportName The data export rule name.
161
+ * @param options The options parameters.
162
+ */
163
+ delete(
164
+ resourceGroupName: string,
165
+ workspaceName: string,
166
+ dataExportName: string,
167
+ options?: DataExportsDeleteOptionalParams
168
+ ): Promise<void> {
169
+ return this.client.sendOperationRequest(
170
+ { resourceGroupName, workspaceName, dataExportName, options },
171
+ deleteOperationSpec
172
+ );
173
+ }
174
+ }
175
+ // Operation Specifications
176
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
177
+
178
+ const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
179
+ path:
180
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports",
181
+ httpMethod: "GET",
182
+ responses: {
183
+ 200: {
184
+ bodyMapper: Mappers.DataExportListResult
185
+ },
186
+ default: {
187
+ bodyMapper: Mappers.ErrorResponse
188
+ }
189
+ },
190
+ queryParameters: [Parameters.apiVersion],
191
+ urlParameters: [
192
+ Parameters.$host,
193
+ Parameters.subscriptionId,
194
+ Parameters.resourceGroupName,
195
+ Parameters.workspaceName
196
+ ],
197
+ headerParameters: [Parameters.accept],
198
+ serializer
199
+ };
200
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
201
+ path:
202
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}",
203
+ httpMethod: "PUT",
204
+ responses: {
205
+ 200: {
206
+ bodyMapper: Mappers.DataExport
207
+ },
208
+ 201: {
209
+ bodyMapper: Mappers.DataExport
210
+ },
211
+ default: {
212
+ bodyMapper: Mappers.ErrorResponse
213
+ }
214
+ },
215
+ requestBody: Parameters.parameters,
216
+ queryParameters: [Parameters.apiVersion],
217
+ urlParameters: [
218
+ Parameters.$host,
219
+ Parameters.subscriptionId,
220
+ Parameters.resourceGroupName,
221
+ Parameters.workspaceName,
222
+ Parameters.dataExportName
223
+ ],
224
+ headerParameters: [Parameters.accept, Parameters.contentType],
225
+ mediaType: "json",
226
+ serializer
227
+ };
228
+ const getOperationSpec: coreClient.OperationSpec = {
229
+ path:
230
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}",
231
+ httpMethod: "GET",
232
+ responses: {
233
+ 200: {
234
+ bodyMapper: Mappers.DataExport
235
+ },
236
+ default: {
237
+ bodyMapper: Mappers.ErrorResponse
238
+ }
239
+ },
240
+ queryParameters: [Parameters.apiVersion],
241
+ urlParameters: [
242
+ Parameters.$host,
243
+ Parameters.subscriptionId,
244
+ Parameters.resourceGroupName,
245
+ Parameters.workspaceName,
246
+ Parameters.dataExportName1
247
+ ],
248
+ headerParameters: [Parameters.accept],
249
+ serializer
250
+ };
251
+ const deleteOperationSpec: coreClient.OperationSpec = {
252
+ path:
253
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}",
254
+ httpMethod: "DELETE",
255
+ responses: {
256
+ 200: {},
257
+ 404: {},
258
+ default: {
259
+ bodyMapper: Mappers.ErrorResponse
260
+ }
261
+ },
262
+ queryParameters: [Parameters.apiVersion],
263
+ urlParameters: [
264
+ Parameters.$host,
265
+ Parameters.subscriptionId,
266
+ Parameters.resourceGroupName,
267
+ Parameters.workspaceName,
268
+ Parameters.dataExportName1
269
+ ],
270
+ headerParameters: [Parameters.accept],
271
+ serializer
272
+ };
@@ -0,0 +1,328 @@
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 { DataSources } 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 { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
15
+ import {
16
+ DataSource,
17
+ DataSourcesListByWorkspaceNextOptionalParams,
18
+ DataSourcesListByWorkspaceOptionalParams,
19
+ DataSourcesCreateOrUpdateOptionalParams,
20
+ DataSourcesCreateOrUpdateResponse,
21
+ DataSourcesDeleteOptionalParams,
22
+ DataSourcesGetOptionalParams,
23
+ DataSourcesGetResponse,
24
+ DataSourcesListByWorkspaceResponse,
25
+ DataSourcesListByWorkspaceNextResponse
26
+ } from "../models";
27
+
28
+ /// <reference lib="esnext.asynciterable" />
29
+ /** Class containing DataSources operations. */
30
+ export class DataSourcesImpl implements DataSources {
31
+ private readonly client: OperationalInsightsManagementClientContext;
32
+
33
+ /**
34
+ * Initialize a new instance of the class DataSources class.
35
+ * @param client Reference to the service client
36
+ */
37
+ constructor(client: OperationalInsightsManagementClientContext) {
38
+ this.client = client;
39
+ }
40
+
41
+ /**
42
+ * Gets the first page of data source instances in a workspace with the link to the next page.
43
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
44
+ * @param workspaceName The name of the workspace.
45
+ * @param filter The filter to apply on the operation.
46
+ * @param options The options parameters.
47
+ */
48
+ public listByWorkspace(
49
+ resourceGroupName: string,
50
+ workspaceName: string,
51
+ filter: string,
52
+ options?: DataSourcesListByWorkspaceOptionalParams
53
+ ): PagedAsyncIterableIterator<DataSource> {
54
+ const iter = this.listByWorkspacePagingAll(
55
+ resourceGroupName,
56
+ workspaceName,
57
+ filter,
58
+ options
59
+ );
60
+ return {
61
+ next() {
62
+ return iter.next();
63
+ },
64
+ [Symbol.asyncIterator]() {
65
+ return this;
66
+ },
67
+ byPage: () => {
68
+ return this.listByWorkspacePagingPage(
69
+ resourceGroupName,
70
+ workspaceName,
71
+ filter,
72
+ options
73
+ );
74
+ }
75
+ };
76
+ }
77
+
78
+ private async *listByWorkspacePagingPage(
79
+ resourceGroupName: string,
80
+ workspaceName: string,
81
+ filter: string,
82
+ options?: DataSourcesListByWorkspaceOptionalParams
83
+ ): AsyncIterableIterator<DataSource[]> {
84
+ let result = await this._listByWorkspace(
85
+ resourceGroupName,
86
+ workspaceName,
87
+ filter,
88
+ options
89
+ );
90
+ yield result.value || [];
91
+ let continuationToken = result.nextLink;
92
+ while (continuationToken) {
93
+ result = await this._listByWorkspaceNext(
94
+ resourceGroupName,
95
+ workspaceName,
96
+ filter,
97
+ continuationToken,
98
+ options
99
+ );
100
+ continuationToken = result.nextLink;
101
+ yield result.value || [];
102
+ }
103
+ }
104
+
105
+ private async *listByWorkspacePagingAll(
106
+ resourceGroupName: string,
107
+ workspaceName: string,
108
+ filter: string,
109
+ options?: DataSourcesListByWorkspaceOptionalParams
110
+ ): AsyncIterableIterator<DataSource> {
111
+ for await (const page of this.listByWorkspacePagingPage(
112
+ resourceGroupName,
113
+ workspaceName,
114
+ filter,
115
+ options
116
+ )) {
117
+ yield* page;
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Create or update a data source.
123
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
124
+ * @param workspaceName The name of the workspace.
125
+ * @param dataSourceName The name of the datasource resource.
126
+ * @param parameters The parameters required to create or update a datasource.
127
+ * @param options The options parameters.
128
+ */
129
+ createOrUpdate(
130
+ resourceGroupName: string,
131
+ workspaceName: string,
132
+ dataSourceName: string,
133
+ parameters: DataSource,
134
+ options?: DataSourcesCreateOrUpdateOptionalParams
135
+ ): Promise<DataSourcesCreateOrUpdateResponse> {
136
+ return this.client.sendOperationRequest(
137
+ { resourceGroupName, workspaceName, dataSourceName, parameters, options },
138
+ createOrUpdateOperationSpec
139
+ );
140
+ }
141
+
142
+ /**
143
+ * Deletes a data source instance.
144
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
145
+ * @param workspaceName The name of the workspace.
146
+ * @param dataSourceName Name of the datasource.
147
+ * @param options The options parameters.
148
+ */
149
+ delete(
150
+ resourceGroupName: string,
151
+ workspaceName: string,
152
+ dataSourceName: string,
153
+ options?: DataSourcesDeleteOptionalParams
154
+ ): Promise<void> {
155
+ return this.client.sendOperationRequest(
156
+ { resourceGroupName, workspaceName, dataSourceName, options },
157
+ deleteOperationSpec
158
+ );
159
+ }
160
+
161
+ /**
162
+ * Gets a datasource instance.
163
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
164
+ * @param workspaceName The name of the workspace.
165
+ * @param dataSourceName Name of the datasource
166
+ * @param options The options parameters.
167
+ */
168
+ get(
169
+ resourceGroupName: string,
170
+ workspaceName: string,
171
+ dataSourceName: string,
172
+ options?: DataSourcesGetOptionalParams
173
+ ): Promise<DataSourcesGetResponse> {
174
+ return this.client.sendOperationRequest(
175
+ { resourceGroupName, workspaceName, dataSourceName, options },
176
+ getOperationSpec
177
+ );
178
+ }
179
+
180
+ /**
181
+ * Gets the first page of data source instances in a workspace with the link to the next page.
182
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
183
+ * @param workspaceName The name of the workspace.
184
+ * @param filter The filter to apply on the operation.
185
+ * @param options The options parameters.
186
+ */
187
+ private _listByWorkspace(
188
+ resourceGroupName: string,
189
+ workspaceName: string,
190
+ filter: string,
191
+ options?: DataSourcesListByWorkspaceOptionalParams
192
+ ): Promise<DataSourcesListByWorkspaceResponse> {
193
+ return this.client.sendOperationRequest(
194
+ { resourceGroupName, workspaceName, filter, options },
195
+ listByWorkspaceOperationSpec
196
+ );
197
+ }
198
+
199
+ /**
200
+ * ListByWorkspaceNext
201
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
202
+ * @param workspaceName The name of the workspace.
203
+ * @param filter The filter to apply on the operation.
204
+ * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method.
205
+ * @param options The options parameters.
206
+ */
207
+ private _listByWorkspaceNext(
208
+ resourceGroupName: string,
209
+ workspaceName: string,
210
+ filter: string,
211
+ nextLink: string,
212
+ options?: DataSourcesListByWorkspaceNextOptionalParams
213
+ ): Promise<DataSourcesListByWorkspaceNextResponse> {
214
+ return this.client.sendOperationRequest(
215
+ { resourceGroupName, workspaceName, filter, nextLink, options },
216
+ listByWorkspaceNextOperationSpec
217
+ );
218
+ }
219
+ }
220
+ // Operation Specifications
221
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
222
+
223
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
224
+ path:
225
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}",
226
+ httpMethod: "PUT",
227
+ responses: {
228
+ 200: {
229
+ bodyMapper: Mappers.DataSource
230
+ },
231
+ 201: {
232
+ bodyMapper: Mappers.DataSource
233
+ }
234
+ },
235
+ requestBody: Parameters.parameters1,
236
+ queryParameters: [Parameters.apiVersion],
237
+ urlParameters: [
238
+ Parameters.$host,
239
+ Parameters.subscriptionId,
240
+ Parameters.resourceGroupName,
241
+ Parameters.workspaceName,
242
+ Parameters.dataSourceName
243
+ ],
244
+ headerParameters: [Parameters.accept, Parameters.contentType],
245
+ mediaType: "json",
246
+ serializer
247
+ };
248
+ const deleteOperationSpec: coreClient.OperationSpec = {
249
+ path:
250
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}",
251
+ httpMethod: "DELETE",
252
+ responses: { 200: {}, 204: {} },
253
+ queryParameters: [Parameters.apiVersion],
254
+ urlParameters: [
255
+ Parameters.$host,
256
+ Parameters.subscriptionId,
257
+ Parameters.resourceGroupName,
258
+ Parameters.workspaceName,
259
+ Parameters.dataSourceName
260
+ ],
261
+ serializer
262
+ };
263
+ const getOperationSpec: coreClient.OperationSpec = {
264
+ path:
265
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}",
266
+ httpMethod: "GET",
267
+ responses: {
268
+ 200: {
269
+ bodyMapper: Mappers.DataSource
270
+ }
271
+ },
272
+ queryParameters: [Parameters.apiVersion],
273
+ urlParameters: [
274
+ Parameters.$host,
275
+ Parameters.subscriptionId,
276
+ Parameters.resourceGroupName,
277
+ Parameters.workspaceName,
278
+ Parameters.dataSourceName
279
+ ],
280
+ headerParameters: [Parameters.accept],
281
+ serializer
282
+ };
283
+ const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
284
+ path:
285
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources",
286
+ httpMethod: "GET",
287
+ responses: {
288
+ 200: {
289
+ bodyMapper: Mappers.DataSourceListResult
290
+ }
291
+ },
292
+ queryParameters: [
293
+ Parameters.apiVersion,
294
+ Parameters.filter,
295
+ Parameters.skiptoken
296
+ ],
297
+ urlParameters: [
298
+ Parameters.$host,
299
+ Parameters.subscriptionId,
300
+ Parameters.resourceGroupName,
301
+ Parameters.workspaceName
302
+ ],
303
+ headerParameters: [Parameters.accept],
304
+ serializer
305
+ };
306
+ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {
307
+ path: "{nextLink}",
308
+ httpMethod: "GET",
309
+ responses: {
310
+ 200: {
311
+ bodyMapper: Mappers.DataSourceListResult
312
+ }
313
+ },
314
+ queryParameters: [
315
+ Parameters.apiVersion,
316
+ Parameters.filter,
317
+ Parameters.skiptoken
318
+ ],
319
+ urlParameters: [
320
+ Parameters.$host,
321
+ Parameters.subscriptionId,
322
+ Parameters.resourceGroupName,
323
+ Parameters.workspaceName,
324
+ Parameters.nextLink
325
+ ],
326
+ headerParameters: [Parameters.accept],
327
+ serializer
328
+ };