@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,120 @@
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 { ManagementGroups } 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
+ ManagementGroup,
17
+ ManagementGroupsListOptionalParams,
18
+ ManagementGroupsListResponse
19
+ } from "../models";
20
+
21
+ /// <reference lib="esnext.asynciterable" />
22
+ /** Class containing ManagementGroups operations. */
23
+ export class ManagementGroupsImpl implements ManagementGroups {
24
+ private readonly client: OperationalInsightsManagementClientContext;
25
+
26
+ /**
27
+ * Initialize a new instance of the class ManagementGroups class.
28
+ * @param client Reference to the service client
29
+ */
30
+ constructor(client: OperationalInsightsManagementClientContext) {
31
+ this.client = client;
32
+ }
33
+
34
+ /**
35
+ * Gets a list of management groups connected to a workspace.
36
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
37
+ * @param workspaceName The name of the workspace.
38
+ * @param options The options parameters.
39
+ */
40
+ public list(
41
+ resourceGroupName: string,
42
+ workspaceName: string,
43
+ options?: ManagementGroupsListOptionalParams
44
+ ): PagedAsyncIterableIterator<ManagementGroup> {
45
+ const iter = this.listPagingAll(resourceGroupName, workspaceName, options);
46
+ return {
47
+ next() {
48
+ return iter.next();
49
+ },
50
+ [Symbol.asyncIterator]() {
51
+ return this;
52
+ },
53
+ byPage: () => {
54
+ return this.listPagingPage(resourceGroupName, workspaceName, options);
55
+ }
56
+ };
57
+ }
58
+
59
+ private async *listPagingPage(
60
+ resourceGroupName: string,
61
+ workspaceName: string,
62
+ options?: ManagementGroupsListOptionalParams
63
+ ): AsyncIterableIterator<ManagementGroup[]> {
64
+ let result = await this._list(resourceGroupName, workspaceName, options);
65
+ yield result.value || [];
66
+ }
67
+
68
+ private async *listPagingAll(
69
+ resourceGroupName: string,
70
+ workspaceName: string,
71
+ options?: ManagementGroupsListOptionalParams
72
+ ): AsyncIterableIterator<ManagementGroup> {
73
+ for await (const page of this.listPagingPage(
74
+ resourceGroupName,
75
+ workspaceName,
76
+ options
77
+ )) {
78
+ yield* page;
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Gets a list of management groups connected to a workspace.
84
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
85
+ * @param workspaceName The name of the workspace.
86
+ * @param options The options parameters.
87
+ */
88
+ private _list(
89
+ resourceGroupName: string,
90
+ workspaceName: string,
91
+ options?: ManagementGroupsListOptionalParams
92
+ ): Promise<ManagementGroupsListResponse> {
93
+ return this.client.sendOperationRequest(
94
+ { resourceGroupName, workspaceName, options },
95
+ listOperationSpec
96
+ );
97
+ }
98
+ }
99
+ // Operation Specifications
100
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
101
+
102
+ const listOperationSpec: coreClient.OperationSpec = {
103
+ path:
104
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups",
105
+ httpMethod: "GET",
106
+ responses: {
107
+ 200: {
108
+ bodyMapper: Mappers.WorkspaceListManagementGroupsResult
109
+ }
110
+ },
111
+ queryParameters: [Parameters.apiVersion],
112
+ urlParameters: [
113
+ Parameters.$host,
114
+ Parameters.subscriptionId,
115
+ Parameters.resourceGroupName,
116
+ Parameters.workspaceName
117
+ ],
118
+ headerParameters: [Parameters.accept],
119
+ serializer
120
+ };
@@ -0,0 +1,69 @@
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 { OperationStatuses } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
14
+ import {
15
+ OperationStatusesGetOptionalParams,
16
+ OperationStatusesGetResponse
17
+ } from "../models";
18
+
19
+ /** Class containing OperationStatuses operations. */
20
+ export class OperationStatusesImpl implements OperationStatuses {
21
+ private readonly client: OperationalInsightsManagementClientContext;
22
+
23
+ /**
24
+ * Initialize a new instance of the class OperationStatuses class.
25
+ * @param client Reference to the service client
26
+ */
27
+ constructor(client: OperationalInsightsManagementClientContext) {
28
+ this.client = client;
29
+ }
30
+
31
+ /**
32
+ * Get the status of a long running azure asynchronous operation.
33
+ * @param location The region name of operation.
34
+ * @param asyncOperationId The operation Id.
35
+ * @param options The options parameters.
36
+ */
37
+ get(
38
+ location: string,
39
+ asyncOperationId: string,
40
+ options?: OperationStatusesGetOptionalParams
41
+ ): Promise<OperationStatusesGetResponse> {
42
+ return this.client.sendOperationRequest(
43
+ { location, asyncOperationId, options },
44
+ getOperationSpec
45
+ );
46
+ }
47
+ }
48
+ // Operation Specifications
49
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
50
+
51
+ const getOperationSpec: coreClient.OperationSpec = {
52
+ path:
53
+ "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}",
54
+ httpMethod: "GET",
55
+ responses: {
56
+ 200: {
57
+ bodyMapper: Mappers.OperationStatus
58
+ }
59
+ },
60
+ queryParameters: [Parameters.apiVersion],
61
+ urlParameters: [
62
+ Parameters.$host,
63
+ Parameters.subscriptionId,
64
+ Parameters.location,
65
+ Parameters.asyncOperationId
66
+ ],
67
+ headerParameters: [Parameters.accept],
68
+ serializer
69
+ };
@@ -0,0 +1,137 @@
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 { Operations } 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
+ Operation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
22
+
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: OperationalInsightsManagementClientContext;
27
+
28
+ /**
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
31
+ */
32
+ constructor(client: OperationalInsightsManagementClientContext) {
33
+ this.client = client;
34
+ }
35
+
36
+ /**
37
+ * Lists all of the available OperationalInsights Rest API operations.
38
+ * @param options The options parameters.
39
+ */
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<Operation> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
50
+ },
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<Operation[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<Operation> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Lists all of the available OperationalInsights Rest API operations.
80
+ * @param options The options parameters.
81
+ */
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
88
+ /**
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
92
+ */
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
97
+ return this.client.sendOperationRequest(
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
101
+ }
102
+ }
103
+ // Operation Specifications
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.OperationalInsights/operations",
108
+ httpMethod: "GET",
109
+ responses: {
110
+ 200: {
111
+ bodyMapper: Mappers.OperationListResult
112
+ },
113
+ default: {
114
+ bodyMapper: Mappers.ErrorResponse
115
+ }
116
+ },
117
+ queryParameters: [Parameters.apiVersion1],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
120
+ serializer
121
+ };
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
123
+ path: "{nextLink}",
124
+ httpMethod: "GET",
125
+ responses: {
126
+ 200: {
127
+ bodyMapper: Mappers.OperationListResult
128
+ },
129
+ default: {
130
+ bodyMapper: Mappers.ErrorResponse
131
+ }
132
+ },
133
+ queryParameters: [Parameters.apiVersion1],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
136
+ serializer
137
+ };
@@ -0,0 +1,191 @@
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 { SavedSearches } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
14
+ import {
15
+ SavedSearchesDeleteOptionalParams,
16
+ SavedSearch,
17
+ SavedSearchesCreateOrUpdateOptionalParams,
18
+ SavedSearchesCreateOrUpdateResponse,
19
+ SavedSearchesGetOptionalParams,
20
+ SavedSearchesGetResponse,
21
+ SavedSearchesListByWorkspaceOptionalParams,
22
+ SavedSearchesListByWorkspaceResponse
23
+ } from "../models";
24
+
25
+ /** Class containing SavedSearches operations. */
26
+ export class SavedSearchesImpl implements SavedSearches {
27
+ private readonly client: OperationalInsightsManagementClientContext;
28
+
29
+ /**
30
+ * Initialize a new instance of the class SavedSearches class.
31
+ * @param client Reference to the service client
32
+ */
33
+ constructor(client: OperationalInsightsManagementClientContext) {
34
+ this.client = client;
35
+ }
36
+
37
+ /**
38
+ * Deletes the specified saved search in a given workspace.
39
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
40
+ * @param workspaceName The name of the workspace.
41
+ * @param savedSearchId The id of the saved search.
42
+ * @param options The options parameters.
43
+ */
44
+ delete(
45
+ resourceGroupName: string,
46
+ workspaceName: string,
47
+ savedSearchId: string,
48
+ options?: SavedSearchesDeleteOptionalParams
49
+ ): Promise<void> {
50
+ return this.client.sendOperationRequest(
51
+ { resourceGroupName, workspaceName, savedSearchId, options },
52
+ deleteOperationSpec
53
+ );
54
+ }
55
+
56
+ /**
57
+ * Creates or updates a saved search for a given workspace.
58
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
59
+ * @param workspaceName The name of the workspace.
60
+ * @param savedSearchId The id of the saved search.
61
+ * @param parameters The parameters required to save a search.
62
+ * @param options The options parameters.
63
+ */
64
+ createOrUpdate(
65
+ resourceGroupName: string,
66
+ workspaceName: string,
67
+ savedSearchId: string,
68
+ parameters: SavedSearch,
69
+ options?: SavedSearchesCreateOrUpdateOptionalParams
70
+ ): Promise<SavedSearchesCreateOrUpdateResponse> {
71
+ return this.client.sendOperationRequest(
72
+ { resourceGroupName, workspaceName, savedSearchId, parameters, options },
73
+ createOrUpdateOperationSpec
74
+ );
75
+ }
76
+
77
+ /**
78
+ * Gets the specified saved search for a given workspace.
79
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
80
+ * @param workspaceName The name of the workspace.
81
+ * @param savedSearchId The id of the saved search.
82
+ * @param options The options parameters.
83
+ */
84
+ get(
85
+ resourceGroupName: string,
86
+ workspaceName: string,
87
+ savedSearchId: string,
88
+ options?: SavedSearchesGetOptionalParams
89
+ ): Promise<SavedSearchesGetResponse> {
90
+ return this.client.sendOperationRequest(
91
+ { resourceGroupName, workspaceName, savedSearchId, options },
92
+ getOperationSpec
93
+ );
94
+ }
95
+
96
+ /**
97
+ * Gets the saved searches for a given Log Analytics Workspace
98
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
99
+ * @param workspaceName The name of the workspace.
100
+ * @param options The options parameters.
101
+ */
102
+ listByWorkspace(
103
+ resourceGroupName: string,
104
+ workspaceName: string,
105
+ options?: SavedSearchesListByWorkspaceOptionalParams
106
+ ): Promise<SavedSearchesListByWorkspaceResponse> {
107
+ return this.client.sendOperationRequest(
108
+ { resourceGroupName, workspaceName, options },
109
+ listByWorkspaceOperationSpec
110
+ );
111
+ }
112
+ }
113
+ // Operation Specifications
114
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
115
+
116
+ const deleteOperationSpec: coreClient.OperationSpec = {
117
+ path:
118
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}",
119
+ httpMethod: "DELETE",
120
+ responses: { 200: {} },
121
+ queryParameters: [Parameters.apiVersion],
122
+ urlParameters: [
123
+ Parameters.$host,
124
+ Parameters.subscriptionId,
125
+ Parameters.resourceGroupName,
126
+ Parameters.workspaceName,
127
+ Parameters.savedSearchId
128
+ ],
129
+ serializer
130
+ };
131
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
132
+ path:
133
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}",
134
+ httpMethod: "PUT",
135
+ responses: {
136
+ 200: {
137
+ bodyMapper: Mappers.SavedSearch
138
+ }
139
+ },
140
+ requestBody: Parameters.parameters5,
141
+ queryParameters: [Parameters.apiVersion],
142
+ urlParameters: [
143
+ Parameters.$host,
144
+ Parameters.subscriptionId,
145
+ Parameters.resourceGroupName,
146
+ Parameters.workspaceName,
147
+ Parameters.savedSearchId
148
+ ],
149
+ headerParameters: [Parameters.accept, Parameters.contentType],
150
+ mediaType: "json",
151
+ serializer
152
+ };
153
+ const getOperationSpec: coreClient.OperationSpec = {
154
+ path:
155
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}",
156
+ httpMethod: "GET",
157
+ responses: {
158
+ 200: {
159
+ bodyMapper: Mappers.SavedSearch
160
+ }
161
+ },
162
+ queryParameters: [Parameters.apiVersion],
163
+ urlParameters: [
164
+ Parameters.$host,
165
+ Parameters.subscriptionId,
166
+ Parameters.resourceGroupName,
167
+ Parameters.workspaceName,
168
+ Parameters.savedSearchId
169
+ ],
170
+ headerParameters: [Parameters.accept],
171
+ serializer
172
+ };
173
+ const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
174
+ path:
175
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches",
176
+ httpMethod: "GET",
177
+ responses: {
178
+ 200: {
179
+ bodyMapper: Mappers.SavedSearchesListResult
180
+ }
181
+ },
182
+ queryParameters: [Parameters.apiVersion],
183
+ urlParameters: [
184
+ Parameters.$host,
185
+ Parameters.subscriptionId,
186
+ Parameters.resourceGroupName,
187
+ Parameters.workspaceName
188
+ ],
189
+ headerParameters: [Parameters.accept],
190
+ serializer
191
+ };
@@ -0,0 +1,66 @@
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 { Schema } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
14
+ import { SchemaGetOptionalParams, SchemaGetResponse } from "../models";
15
+
16
+ /** Class containing Schema operations. */
17
+ export class SchemaImpl implements Schema {
18
+ private readonly client: OperationalInsightsManagementClientContext;
19
+
20
+ /**
21
+ * Initialize a new instance of the class Schema class.
22
+ * @param client Reference to the service client
23
+ */
24
+ constructor(client: OperationalInsightsManagementClientContext) {
25
+ this.client = client;
26
+ }
27
+
28
+ /**
29
+ * Gets the schema for a given workspace.
30
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
31
+ * @param workspaceName The name of the workspace.
32
+ * @param options The options parameters.
33
+ */
34
+ get(
35
+ resourceGroupName: string,
36
+ workspaceName: string,
37
+ options?: SchemaGetOptionalParams
38
+ ): Promise<SchemaGetResponse> {
39
+ return this.client.sendOperationRequest(
40
+ { resourceGroupName, workspaceName, options },
41
+ getOperationSpec
42
+ );
43
+ }
44
+ }
45
+ // Operation Specifications
46
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
47
+
48
+ const getOperationSpec: coreClient.OperationSpec = {
49
+ path:
50
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema",
51
+ httpMethod: "POST",
52
+ responses: {
53
+ 200: {
54
+ bodyMapper: Mappers.SearchGetSchemaResponse
55
+ }
56
+ },
57
+ queryParameters: [Parameters.apiVersion],
58
+ urlParameters: [
59
+ Parameters.$host,
60
+ Parameters.subscriptionId,
61
+ Parameters.resourceGroupName,
62
+ Parameters.workspaceName
63
+ ],
64
+ headerParameters: [Parameters.accept],
65
+ serializer
66
+ };
@@ -0,0 +1,108 @@
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 { SharedKeysOperations } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
14
+ import {
15
+ SharedKeysGetSharedKeysOptionalParams,
16
+ SharedKeysGetSharedKeysResponse,
17
+ SharedKeysRegenerateOptionalParams,
18
+ SharedKeysRegenerateResponse
19
+ } from "../models";
20
+
21
+ /** Class containing SharedKeysOperations operations. */
22
+ export class SharedKeysOperationsImpl implements SharedKeysOperations {
23
+ private readonly client: OperationalInsightsManagementClientContext;
24
+
25
+ /**
26
+ * Initialize a new instance of the class SharedKeysOperations class.
27
+ * @param client Reference to the service client
28
+ */
29
+ constructor(client: OperationalInsightsManagementClientContext) {
30
+ this.client = client;
31
+ }
32
+
33
+ /**
34
+ * Gets the shared keys for a workspace.
35
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
36
+ * @param workspaceName The name of the workspace.
37
+ * @param options The options parameters.
38
+ */
39
+ getSharedKeys(
40
+ resourceGroupName: string,
41
+ workspaceName: string,
42
+ options?: SharedKeysGetSharedKeysOptionalParams
43
+ ): Promise<SharedKeysGetSharedKeysResponse> {
44
+ return this.client.sendOperationRequest(
45
+ { resourceGroupName, workspaceName, options },
46
+ getSharedKeysOperationSpec
47
+ );
48
+ }
49
+
50
+ /**
51
+ * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft
52
+ * Operational Insights agents to the workspace.
53
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
54
+ * @param workspaceName The name of the workspace.
55
+ * @param options The options parameters.
56
+ */
57
+ regenerate(
58
+ resourceGroupName: string,
59
+ workspaceName: string,
60
+ options?: SharedKeysRegenerateOptionalParams
61
+ ): Promise<SharedKeysRegenerateResponse> {
62
+ return this.client.sendOperationRequest(
63
+ { resourceGroupName, workspaceName, options },
64
+ regenerateOperationSpec
65
+ );
66
+ }
67
+ }
68
+ // Operation Specifications
69
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
70
+
71
+ const getSharedKeysOperationSpec: coreClient.OperationSpec = {
72
+ path:
73
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys",
74
+ httpMethod: "POST",
75
+ responses: {
76
+ 200: {
77
+ bodyMapper: Mappers.SharedKeys
78
+ }
79
+ },
80
+ queryParameters: [Parameters.apiVersion],
81
+ urlParameters: [
82
+ Parameters.$host,
83
+ Parameters.subscriptionId,
84
+ Parameters.resourceGroupName,
85
+ Parameters.workspaceName
86
+ ],
87
+ headerParameters: [Parameters.accept],
88
+ serializer
89
+ };
90
+ const regenerateOperationSpec: coreClient.OperationSpec = {
91
+ path:
92
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey",
93
+ httpMethod: "POST",
94
+ responses: {
95
+ 200: {
96
+ bodyMapper: Mappers.SharedKeys
97
+ }
98
+ },
99
+ queryParameters: [Parameters.apiVersion],
100
+ urlParameters: [
101
+ Parameters.$host,
102
+ Parameters.subscriptionId,
103
+ Parameters.resourceGroupName,
104
+ Parameters.workspaceName
105
+ ],
106
+ headerParameters: [Parameters.accept],
107
+ serializer
108
+ };