@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,502 @@
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 { Workspaces } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ Workspace,
19
+ WorkspacesListOptionalParams,
20
+ WorkspacesListByResourceGroupOptionalParams,
21
+ WorkspacesListResponse,
22
+ WorkspacesListByResourceGroupResponse,
23
+ WorkspacesCreateOrUpdateOptionalParams,
24
+ WorkspacesCreateOrUpdateResponse,
25
+ WorkspacesDeleteOptionalParams,
26
+ WorkspacesGetOptionalParams,
27
+ WorkspacesGetResponse,
28
+ WorkspacePatch,
29
+ WorkspacesUpdateOptionalParams,
30
+ WorkspacesUpdateResponse
31
+ } from "../models";
32
+
33
+ /// <reference lib="esnext.asynciterable" />
34
+ /** Class containing Workspaces operations. */
35
+ export class WorkspacesImpl implements Workspaces {
36
+ private readonly client: OperationalInsightsManagementClientContext;
37
+
38
+ /**
39
+ * Initialize a new instance of the class Workspaces class.
40
+ * @param client Reference to the service client
41
+ */
42
+ constructor(client: OperationalInsightsManagementClientContext) {
43
+ this.client = client;
44
+ }
45
+
46
+ /**
47
+ * Gets the workspaces in a subscription.
48
+ * @param options The options parameters.
49
+ */
50
+ public list(
51
+ options?: WorkspacesListOptionalParams
52
+ ): PagedAsyncIterableIterator<Workspace> {
53
+ const iter = this.listPagingAll(options);
54
+ return {
55
+ next() {
56
+ return iter.next();
57
+ },
58
+ [Symbol.asyncIterator]() {
59
+ return this;
60
+ },
61
+ byPage: () => {
62
+ return this.listPagingPage(options);
63
+ }
64
+ };
65
+ }
66
+
67
+ private async *listPagingPage(
68
+ options?: WorkspacesListOptionalParams
69
+ ): AsyncIterableIterator<Workspace[]> {
70
+ let result = await this._list(options);
71
+ yield result.value || [];
72
+ }
73
+
74
+ private async *listPagingAll(
75
+ options?: WorkspacesListOptionalParams
76
+ ): AsyncIterableIterator<Workspace> {
77
+ for await (const page of this.listPagingPage(options)) {
78
+ yield* page;
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Gets workspaces in a resource group.
84
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
85
+ * @param options The options parameters.
86
+ */
87
+ public listByResourceGroup(
88
+ resourceGroupName: string,
89
+ options?: WorkspacesListByResourceGroupOptionalParams
90
+ ): PagedAsyncIterableIterator<Workspace> {
91
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
92
+ return {
93
+ next() {
94
+ return iter.next();
95
+ },
96
+ [Symbol.asyncIterator]() {
97
+ return this;
98
+ },
99
+ byPage: () => {
100
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
101
+ }
102
+ };
103
+ }
104
+
105
+ private async *listByResourceGroupPagingPage(
106
+ resourceGroupName: string,
107
+ options?: WorkspacesListByResourceGroupOptionalParams
108
+ ): AsyncIterableIterator<Workspace[]> {
109
+ let result = await this._listByResourceGroup(resourceGroupName, options);
110
+ yield result.value || [];
111
+ }
112
+
113
+ private async *listByResourceGroupPagingAll(
114
+ resourceGroupName: string,
115
+ options?: WorkspacesListByResourceGroupOptionalParams
116
+ ): AsyncIterableIterator<Workspace> {
117
+ for await (const page of this.listByResourceGroupPagingPage(
118
+ resourceGroupName,
119
+ options
120
+ )) {
121
+ yield* page;
122
+ }
123
+ }
124
+
125
+ /**
126
+ * Gets the workspaces in a subscription.
127
+ * @param options The options parameters.
128
+ */
129
+ private _list(
130
+ options?: WorkspacesListOptionalParams
131
+ ): Promise<WorkspacesListResponse> {
132
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
133
+ }
134
+
135
+ /**
136
+ * Gets workspaces in a resource group.
137
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
138
+ * @param options The options parameters.
139
+ */
140
+ private _listByResourceGroup(
141
+ resourceGroupName: string,
142
+ options?: WorkspacesListByResourceGroupOptionalParams
143
+ ): Promise<WorkspacesListByResourceGroupResponse> {
144
+ return this.client.sendOperationRequest(
145
+ { resourceGroupName, options },
146
+ listByResourceGroupOperationSpec
147
+ );
148
+ }
149
+
150
+ /**
151
+ * Create or update a workspace.
152
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
153
+ * @param workspaceName The name of the workspace.
154
+ * @param parameters The parameters required to create or update a workspace.
155
+ * @param options The options parameters.
156
+ */
157
+ async beginCreateOrUpdate(
158
+ resourceGroupName: string,
159
+ workspaceName: string,
160
+ parameters: Workspace,
161
+ options?: WorkspacesCreateOrUpdateOptionalParams
162
+ ): Promise<
163
+ PollerLike<
164
+ PollOperationState<WorkspacesCreateOrUpdateResponse>,
165
+ WorkspacesCreateOrUpdateResponse
166
+ >
167
+ > {
168
+ const directSendOperation = async (
169
+ args: coreClient.OperationArguments,
170
+ spec: coreClient.OperationSpec
171
+ ): Promise<WorkspacesCreateOrUpdateResponse> => {
172
+ return this.client.sendOperationRequest(args, spec);
173
+ };
174
+ const sendOperation = async (
175
+ args: coreClient.OperationArguments,
176
+ spec: coreClient.OperationSpec
177
+ ) => {
178
+ let currentRawResponse:
179
+ | coreClient.FullOperationResponse
180
+ | undefined = undefined;
181
+ const providedCallback = args.options?.onResponse;
182
+ const callback: coreClient.RawResponseCallback = (
183
+ rawResponse: coreClient.FullOperationResponse,
184
+ flatResponse: unknown
185
+ ) => {
186
+ currentRawResponse = rawResponse;
187
+ providedCallback?.(rawResponse, flatResponse);
188
+ };
189
+ const updatedArgs = {
190
+ ...args,
191
+ options: {
192
+ ...args.options,
193
+ onResponse: callback
194
+ }
195
+ };
196
+ const flatResponse = await directSendOperation(updatedArgs, spec);
197
+ return {
198
+ flatResponse,
199
+ rawResponse: {
200
+ statusCode: currentRawResponse!.status,
201
+ body: currentRawResponse!.parsedBody,
202
+ headers: currentRawResponse!.headers.toJSON()
203
+ }
204
+ };
205
+ };
206
+
207
+ const lro = new LroImpl(
208
+ sendOperation,
209
+ { resourceGroupName, workspaceName, parameters, options },
210
+ createOrUpdateOperationSpec
211
+ );
212
+ return new LroEngine(lro, {
213
+ resumeFrom: options?.resumeFrom,
214
+ intervalInMs: options?.updateIntervalInMs
215
+ });
216
+ }
217
+
218
+ /**
219
+ * Create or update a workspace.
220
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
221
+ * @param workspaceName The name of the workspace.
222
+ * @param parameters The parameters required to create or update a workspace.
223
+ * @param options The options parameters.
224
+ */
225
+ async beginCreateOrUpdateAndWait(
226
+ resourceGroupName: string,
227
+ workspaceName: string,
228
+ parameters: Workspace,
229
+ options?: WorkspacesCreateOrUpdateOptionalParams
230
+ ): Promise<WorkspacesCreateOrUpdateResponse> {
231
+ const poller = await this.beginCreateOrUpdate(
232
+ resourceGroupName,
233
+ workspaceName,
234
+ parameters,
235
+ options
236
+ );
237
+ return poller.pollUntilDone();
238
+ }
239
+
240
+ /**
241
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the
242
+ * same subscription, resource group and location. The name is kept for 14 days and cannot be used for
243
+ * another workspace. To remove the workspace completely and release the name, use the force flag.
244
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
245
+ * @param workspaceName The name of the workspace.
246
+ * @param options The options parameters.
247
+ */
248
+ async beginDelete(
249
+ resourceGroupName: string,
250
+ workspaceName: string,
251
+ options?: WorkspacesDeleteOptionalParams
252
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
253
+ const directSendOperation = async (
254
+ args: coreClient.OperationArguments,
255
+ spec: coreClient.OperationSpec
256
+ ): Promise<void> => {
257
+ return this.client.sendOperationRequest(args, spec);
258
+ };
259
+ const sendOperation = async (
260
+ args: coreClient.OperationArguments,
261
+ spec: coreClient.OperationSpec
262
+ ) => {
263
+ let currentRawResponse:
264
+ | coreClient.FullOperationResponse
265
+ | undefined = undefined;
266
+ const providedCallback = args.options?.onResponse;
267
+ const callback: coreClient.RawResponseCallback = (
268
+ rawResponse: coreClient.FullOperationResponse,
269
+ flatResponse: unknown
270
+ ) => {
271
+ currentRawResponse = rawResponse;
272
+ providedCallback?.(rawResponse, flatResponse);
273
+ };
274
+ const updatedArgs = {
275
+ ...args,
276
+ options: {
277
+ ...args.options,
278
+ onResponse: callback
279
+ }
280
+ };
281
+ const flatResponse = await directSendOperation(updatedArgs, spec);
282
+ return {
283
+ flatResponse,
284
+ rawResponse: {
285
+ statusCode: currentRawResponse!.status,
286
+ body: currentRawResponse!.parsedBody,
287
+ headers: currentRawResponse!.headers.toJSON()
288
+ }
289
+ };
290
+ };
291
+
292
+ const lro = new LroImpl(
293
+ sendOperation,
294
+ { resourceGroupName, workspaceName, options },
295
+ deleteOperationSpec
296
+ );
297
+ return new LroEngine(lro, {
298
+ resumeFrom: options?.resumeFrom,
299
+ intervalInMs: options?.updateIntervalInMs
300
+ });
301
+ }
302
+
303
+ /**
304
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the
305
+ * same subscription, resource group and location. The name is kept for 14 days and cannot be used for
306
+ * another workspace. To remove the workspace completely and release the name, use the force flag.
307
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
308
+ * @param workspaceName The name of the workspace.
309
+ * @param options The options parameters.
310
+ */
311
+ async beginDeleteAndWait(
312
+ resourceGroupName: string,
313
+ workspaceName: string,
314
+ options?: WorkspacesDeleteOptionalParams
315
+ ): Promise<void> {
316
+ const poller = await this.beginDelete(
317
+ resourceGroupName,
318
+ workspaceName,
319
+ options
320
+ );
321
+ return poller.pollUntilDone();
322
+ }
323
+
324
+ /**
325
+ * Gets a workspace instance.
326
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
327
+ * @param workspaceName The name of the workspace.
328
+ * @param options The options parameters.
329
+ */
330
+ get(
331
+ resourceGroupName: string,
332
+ workspaceName: string,
333
+ options?: WorkspacesGetOptionalParams
334
+ ): Promise<WorkspacesGetResponse> {
335
+ return this.client.sendOperationRequest(
336
+ { resourceGroupName, workspaceName, options },
337
+ getOperationSpec
338
+ );
339
+ }
340
+
341
+ /**
342
+ * Updates a workspace.
343
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
344
+ * @param workspaceName The name of the workspace.
345
+ * @param parameters The parameters required to patch a workspace.
346
+ * @param options The options parameters.
347
+ */
348
+ update(
349
+ resourceGroupName: string,
350
+ workspaceName: string,
351
+ parameters: WorkspacePatch,
352
+ options?: WorkspacesUpdateOptionalParams
353
+ ): Promise<WorkspacesUpdateResponse> {
354
+ return this.client.sendOperationRequest(
355
+ { resourceGroupName, workspaceName, parameters, options },
356
+ updateOperationSpec
357
+ );
358
+ }
359
+ }
360
+ // Operation Specifications
361
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
362
+
363
+ const listOperationSpec: coreClient.OperationSpec = {
364
+ path:
365
+ "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces",
366
+ httpMethod: "GET",
367
+ responses: {
368
+ 200: {
369
+ bodyMapper: Mappers.WorkspaceListResult
370
+ },
371
+ default: {
372
+ bodyMapper: Mappers.ErrorResponse
373
+ }
374
+ },
375
+ queryParameters: [Parameters.apiVersion2],
376
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
377
+ headerParameters: [Parameters.accept],
378
+ serializer
379
+ };
380
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
381
+ path:
382
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces",
383
+ httpMethod: "GET",
384
+ responses: {
385
+ 200: {
386
+ bodyMapper: Mappers.WorkspaceListResult
387
+ },
388
+ default: {
389
+ bodyMapper: Mappers.ErrorResponse
390
+ }
391
+ },
392
+ queryParameters: [Parameters.apiVersion2],
393
+ urlParameters: [
394
+ Parameters.$host,
395
+ Parameters.subscriptionId,
396
+ Parameters.resourceGroupName
397
+ ],
398
+ headerParameters: [Parameters.accept],
399
+ serializer
400
+ };
401
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
402
+ path:
403
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}",
404
+ httpMethod: "PUT",
405
+ responses: {
406
+ 200: {
407
+ bodyMapper: Mappers.Workspace
408
+ },
409
+ 201: {
410
+ bodyMapper: Mappers.Workspace
411
+ },
412
+ 202: {
413
+ bodyMapper: Mappers.Workspace
414
+ },
415
+ 204: {
416
+ bodyMapper: Mappers.Workspace
417
+ },
418
+ default: {
419
+ bodyMapper: Mappers.ErrorResponse
420
+ }
421
+ },
422
+ requestBody: Parameters.parameters8,
423
+ queryParameters: [Parameters.apiVersion2],
424
+ urlParameters: [
425
+ Parameters.$host,
426
+ Parameters.subscriptionId,
427
+ Parameters.resourceGroupName,
428
+ Parameters.workspaceName
429
+ ],
430
+ headerParameters: [Parameters.accept, Parameters.contentType],
431
+ mediaType: "json",
432
+ serializer
433
+ };
434
+ const deleteOperationSpec: coreClient.OperationSpec = {
435
+ path:
436
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}",
437
+ httpMethod: "DELETE",
438
+ responses: {
439
+ 200: {},
440
+ 201: {},
441
+ 202: {},
442
+ 204: {},
443
+ default: {
444
+ bodyMapper: Mappers.ErrorResponse
445
+ }
446
+ },
447
+ queryParameters: [Parameters.apiVersion2, Parameters.force],
448
+ urlParameters: [
449
+ Parameters.$host,
450
+ Parameters.subscriptionId,
451
+ Parameters.resourceGroupName,
452
+ Parameters.workspaceName
453
+ ],
454
+ headerParameters: [Parameters.accept],
455
+ serializer
456
+ };
457
+ const getOperationSpec: coreClient.OperationSpec = {
458
+ path:
459
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}",
460
+ httpMethod: "GET",
461
+ responses: {
462
+ 200: {
463
+ bodyMapper: Mappers.Workspace
464
+ },
465
+ default: {
466
+ bodyMapper: Mappers.ErrorResponse
467
+ }
468
+ },
469
+ queryParameters: [Parameters.apiVersion2],
470
+ urlParameters: [
471
+ Parameters.$host,
472
+ Parameters.subscriptionId,
473
+ Parameters.resourceGroupName,
474
+ Parameters.workspaceName
475
+ ],
476
+ headerParameters: [Parameters.accept],
477
+ serializer
478
+ };
479
+ const updateOperationSpec: coreClient.OperationSpec = {
480
+ path:
481
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}",
482
+ httpMethod: "PATCH",
483
+ responses: {
484
+ 200: {
485
+ bodyMapper: Mappers.Workspace
486
+ },
487
+ default: {
488
+ bodyMapper: Mappers.ErrorResponse
489
+ }
490
+ },
491
+ requestBody: Parameters.parameters9,
492
+ queryParameters: [Parameters.apiVersion2],
493
+ urlParameters: [
494
+ Parameters.$host,
495
+ Parameters.subscriptionId,
496
+ Parameters.resourceGroupName,
497
+ Parameters.workspaceName
498
+ ],
499
+ headerParameters: [Parameters.accept, Parameters.contentType],
500
+ mediaType: "json",
501
+ serializer
502
+ };
@@ -0,0 +1,27 @@
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 {
10
+ AvailableServiceTiersListByWorkspaceOptionalParams,
11
+ AvailableServiceTiersListByWorkspaceResponse
12
+ } from "../models";
13
+
14
+ /** Interface representing a AvailableServiceTiers. */
15
+ export interface AvailableServiceTiers {
16
+ /**
17
+ * Gets the available service tiers for the workspace.
18
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
19
+ * @param workspaceName The name of the workspace.
20
+ * @param options The options parameters.
21
+ */
22
+ listByWorkspace(
23
+ resourceGroupName: string,
24
+ workspaceName: string,
25
+ options?: AvailableServiceTiersListByWorkspaceOptionalParams
26
+ ): Promise<AvailableServiceTiersListByWorkspaceResponse>;
27
+ }
@@ -0,0 +1,121 @@
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
+ Cluster,
13
+ ClustersListByResourceGroupOptionalParams,
14
+ ClustersListOptionalParams,
15
+ ClustersCreateOrUpdateOptionalParams,
16
+ ClustersCreateOrUpdateResponse,
17
+ ClustersDeleteOptionalParams,
18
+ ClustersGetOptionalParams,
19
+ ClustersGetResponse,
20
+ ClusterPatch,
21
+ ClustersUpdateOptionalParams,
22
+ ClustersUpdateResponse
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Interface representing a Clusters. */
27
+ export interface Clusters {
28
+ /**
29
+ * Gets Log Analytics clusters in a resource group.
30
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
31
+ * @param options The options parameters.
32
+ */
33
+ listByResourceGroup(
34
+ resourceGroupName: string,
35
+ options?: ClustersListByResourceGroupOptionalParams
36
+ ): PagedAsyncIterableIterator<Cluster>;
37
+ /**
38
+ * Gets the Log Analytics clusters in a subscription.
39
+ * @param options The options parameters.
40
+ */
41
+ list(
42
+ options?: ClustersListOptionalParams
43
+ ): PagedAsyncIterableIterator<Cluster>;
44
+ /**
45
+ * Create or update a Log Analytics cluster.
46
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
47
+ * @param clusterName The name of the Log Analytics cluster.
48
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
49
+ * @param options The options parameters.
50
+ */
51
+ beginCreateOrUpdate(
52
+ resourceGroupName: string,
53
+ clusterName: string,
54
+ parameters: Cluster,
55
+ options?: ClustersCreateOrUpdateOptionalParams
56
+ ): Promise<
57
+ PollerLike<
58
+ PollOperationState<ClustersCreateOrUpdateResponse>,
59
+ ClustersCreateOrUpdateResponse
60
+ >
61
+ >;
62
+ /**
63
+ * Create or update a Log Analytics cluster.
64
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
65
+ * @param clusterName The name of the Log Analytics cluster.
66
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
67
+ * @param options The options parameters.
68
+ */
69
+ beginCreateOrUpdateAndWait(
70
+ resourceGroupName: string,
71
+ clusterName: string,
72
+ parameters: Cluster,
73
+ options?: ClustersCreateOrUpdateOptionalParams
74
+ ): Promise<ClustersCreateOrUpdateResponse>;
75
+ /**
76
+ * Deletes a cluster instance.
77
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
78
+ * @param clusterName Name of the Log Analytics Cluster.
79
+ * @param options The options parameters.
80
+ */
81
+ beginDelete(
82
+ resourceGroupName: string,
83
+ clusterName: string,
84
+ options?: ClustersDeleteOptionalParams
85
+ ): Promise<PollerLike<PollOperationState<void>, void>>;
86
+ /**
87
+ * Deletes a cluster instance.
88
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
89
+ * @param clusterName Name of the Log Analytics Cluster.
90
+ * @param options The options parameters.
91
+ */
92
+ beginDeleteAndWait(
93
+ resourceGroupName: string,
94
+ clusterName: string,
95
+ options?: ClustersDeleteOptionalParams
96
+ ): Promise<void>;
97
+ /**
98
+ * Gets a Log Analytics cluster instance.
99
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
100
+ * @param clusterName Name of the Log Analytics Cluster.
101
+ * @param options The options parameters.
102
+ */
103
+ get(
104
+ resourceGroupName: string,
105
+ clusterName: string,
106
+ options?: ClustersGetOptionalParams
107
+ ): Promise<ClustersGetResponse>;
108
+ /**
109
+ * Updates a Log Analytics cluster.
110
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
111
+ * @param clusterName Name of the Log Analytics Cluster.
112
+ * @param parameters The parameters required to patch a Log Analytics cluster.
113
+ * @param options The options parameters.
114
+ */
115
+ update(
116
+ resourceGroupName: string,
117
+ clusterName: string,
118
+ parameters: ClusterPatch,
119
+ options?: ClustersUpdateOptionalParams
120
+ ): Promise<ClustersUpdateResponse>;
121
+ }