@azure/arm-databricks 0.1.0 → 3.0.0-alpha.20211103.2

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 (176) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +71 -77
  4. package/dist/index.js +3186 -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/azureDatabricksManagementClient.d.ts +20 -0
  9. package/dist-esm/src/azureDatabricksManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/azureDatabricksManagementClient.js +27 -0
  11. package/dist-esm/src/azureDatabricksManagementClient.js.map +1 -0
  12. package/dist-esm/src/azureDatabricksManagementClientContext.d.ts +16 -0
  13. package/dist-esm/src/azureDatabricksManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/azureDatabricksManagementClientContext.js +49 -0
  15. package/dist-esm/src/azureDatabricksManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +839 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +94 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +44 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/dist-esm/src/models/mappers.js +1298 -0
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +17 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +149 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/index.d.ts +7 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/dist-esm/src/operations/index.js +14 -0
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +32 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +120 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts +22 -0
  45. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts.map +1 -0
  46. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js +65 -0
  47. package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js.map +1 -0
  48. package/dist-esm/src/operations/privateEndpointConnections.d.ts +81 -0
  49. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  50. package/dist-esm/src/operations/privateEndpointConnections.js +347 -0
  51. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  52. package/dist-esm/src/operations/privateLinkResources.d.ts +46 -0
  53. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  54. package/dist-esm/src/operations/privateLinkResources.js +169 -0
  55. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  56. package/dist-esm/src/operations/vNetPeering.d.ts +81 -0
  57. package/dist-esm/src/operations/vNetPeering.d.ts.map +1 -0
  58. package/dist-esm/src/operations/vNetPeering.js +338 -0
  59. package/dist-esm/src/operations/vNetPeering.js.map +1 -0
  60. package/dist-esm/src/operations/workspaces.d.ts +107 -0
  61. package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
  62. package/dist-esm/src/operations/workspaces.js +500 -0
  63. package/dist-esm/src/operations/workspaces.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/index.js +14 -0
  67. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.d.ts +14 -0
  73. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
  77. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
  81. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts +56 -0
  85. package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/vNetPeering.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/vNetPeering.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/workspaces.d.ts +71 -0
  89. package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
  92. package/dist-esm/test/databricks_examples.d.ts +2 -0
  93. package/dist-esm/test/databricks_examples.d.ts.map +1 -0
  94. package/dist-esm/test/databricks_examples.js +100 -0
  95. package/dist-esm/test/databricks_examples.js.map +1 -0
  96. package/package.json +72 -25
  97. package/review/arm-databricks.api.md +742 -0
  98. package/rollup.config.js +184 -27
  99. package/src/azureDatabricksManagementClient.ts +58 -0
  100. package/src/azureDatabricksManagementClientContext.ts +70 -0
  101. package/src/index.ts +13 -0
  102. package/src/lroImpl.ts +34 -0
  103. package/src/models/index.ts +960 -0
  104. package/src/models/mappers.ts +1368 -0
  105. package/src/models/parameters.ts +174 -0
  106. package/src/operations/index.ts +14 -0
  107. package/src/operations/operations.ts +137 -0
  108. package/src/operations/outboundNetworkDependenciesEndpoints.ts +85 -0
  109. package/src/operations/privateEndpointConnections.ts +481 -0
  110. package/src/operations/privateLinkResources.ts +221 -0
  111. package/src/operations/vNetPeering.ts +483 -0
  112. package/src/operations/workspaces.ts +674 -0
  113. package/src/operationsInterfaces/index.ts +14 -0
  114. package/src/operationsInterfaces/operations.ts +22 -0
  115. package/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +29 -0
  116. package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
  117. package/src/operationsInterfaces/privateLinkResources.ts +44 -0
  118. package/src/operationsInterfaces/vNetPeering.ts +109 -0
  119. package/src/operationsInterfaces/workspaces.ts +139 -0
  120. package/tsconfig.json +4 -4
  121. package/types/arm-databricks.d.ts +1198 -0
  122. package/types/tsdoc-metadata.json +11 -0
  123. package/dist/arm-databricks.js +0 -1078
  124. package/dist/arm-databricks.js.map +0 -1
  125. package/dist/arm-databricks.min.js +0 -1
  126. package/dist/arm-databricks.min.js.map +0 -1
  127. package/esm/databricksClient.d.ts +0 -19
  128. package/esm/databricksClient.d.ts.map +0 -1
  129. package/esm/databricksClient.js +0 -34
  130. package/esm/databricksClient.js.map +0 -1
  131. package/esm/databricksClientContext.d.ts +0 -16
  132. package/esm/databricksClientContext.d.ts.map +0 -1
  133. package/esm/databricksClientContext.js +0 -56
  134. package/esm/databricksClientContext.js.map +0 -1
  135. package/esm/models/index.d.ts +0 -486
  136. package/esm/models/index.d.ts.map +0 -1
  137. package/esm/models/index.js +0 -10
  138. package/esm/models/index.js.map +0 -1
  139. package/esm/models/mappers.d.ts +0 -17
  140. package/esm/models/mappers.d.ts.map +0 -1
  141. package/esm/models/mappers.js +0 -370
  142. package/esm/models/mappers.js.map +0 -1
  143. package/esm/models/operationsMappers.d.ts +0 -2
  144. package/esm/models/operationsMappers.d.ts.map +0 -1
  145. package/esm/models/operationsMappers.js +0 -11
  146. package/esm/models/operationsMappers.js.map +0 -1
  147. package/esm/models/parameters.d.ts +0 -8
  148. package/esm/models/parameters.d.ts.map +0 -1
  149. package/esm/models/parameters.js +0 -80
  150. package/esm/models/parameters.js.map +0 -1
  151. package/esm/models/workspacesMappers.d.ts +0 -2
  152. package/esm/models/workspacesMappers.d.ts.map +0 -1
  153. package/esm/models/workspacesMappers.js +0 -11
  154. package/esm/models/workspacesMappers.js.map +0 -1
  155. package/esm/operations/index.d.ts +0 -3
  156. package/esm/operations/index.d.ts.map +0 -1
  157. package/esm/operations/index.js +0 -12
  158. package/esm/operations/index.js.map +0 -1
  159. package/esm/operations/operations.d.ts +0 -46
  160. package/esm/operations/operations.d.ts.map +0 -1
  161. package/esm/operations/operations.js +0 -77
  162. package/esm/operations/operations.js.map +0 -1
  163. package/esm/operations/workspaces.d.ts +0 -156
  164. package/esm/operations/workspaces.d.ts.map +0 -1
  165. package/esm/operations/workspaces.js +0 -332
  166. package/esm/operations/workspaces.js.map +0 -1
  167. package/lib/databricksClient.ts +0 -44
  168. package/lib/databricksClientContext.ts +0 -62
  169. package/lib/models/index.ts +0 -520
  170. package/lib/models/mappers.ts +0 -396
  171. package/lib/models/operationsMappers.ts +0 -19
  172. package/lib/models/parameters.ts +0 -82
  173. package/lib/models/workspacesMappers.ts +0 -24
  174. package/lib/operations/index.ts +0 -12
  175. package/lib/operations/operations.ts +0 -123
  176. package/lib/operations/workspaces.ts +0 -474
@@ -0,0 +1,481 @@
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 { PrivateEndpointConnections } 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 { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ PrivateEndpointConnection,
19
+ PrivateEndpointConnectionsListNextOptionalParams,
20
+ PrivateEndpointConnectionsListOptionalParams,
21
+ PrivateEndpointConnectionsListResponse,
22
+ PrivateEndpointConnectionsGetOptionalParams,
23
+ PrivateEndpointConnectionsGetResponse,
24
+ PrivateEndpointConnectionsCreateOptionalParams,
25
+ PrivateEndpointConnectionsCreateResponse,
26
+ PrivateEndpointConnectionsDeleteOptionalParams,
27
+ PrivateEndpointConnectionsListNextResponse
28
+ } from "../models";
29
+
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing PrivateEndpointConnections operations. */
32
+ export class PrivateEndpointConnectionsImpl
33
+ implements PrivateEndpointConnections {
34
+ private readonly client: AzureDatabricksManagementClientContext;
35
+
36
+ /**
37
+ * Initialize a new instance of the class PrivateEndpointConnections class.
38
+ * @param client Reference to the service client
39
+ */
40
+ constructor(client: AzureDatabricksManagementClientContext) {
41
+ this.client = client;
42
+ }
43
+
44
+ /**
45
+ * List private endpoint connections of the workspace
46
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
47
+ * @param workspaceName The name of the workspace.
48
+ * @param options The options parameters.
49
+ */
50
+ public list(
51
+ resourceGroupName: string,
52
+ workspaceName: string,
53
+ options?: PrivateEndpointConnectionsListOptionalParams
54
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
55
+ const iter = this.listPagingAll(resourceGroupName, workspaceName, options);
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: () => {
64
+ return this.listPagingPage(resourceGroupName, workspaceName, options);
65
+ }
66
+ };
67
+ }
68
+
69
+ private async *listPagingPage(
70
+ resourceGroupName: string,
71
+ workspaceName: string,
72
+ options?: PrivateEndpointConnectionsListOptionalParams
73
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
74
+ let result = await this._list(resourceGroupName, workspaceName, options);
75
+ yield result.value || [];
76
+ let continuationToken = result.nextLink;
77
+ while (continuationToken) {
78
+ result = await this._listNext(
79
+ resourceGroupName,
80
+ workspaceName,
81
+ continuationToken,
82
+ options
83
+ );
84
+ continuationToken = result.nextLink;
85
+ yield result.value || [];
86
+ }
87
+ }
88
+
89
+ private async *listPagingAll(
90
+ resourceGroupName: string,
91
+ workspaceName: string,
92
+ options?: PrivateEndpointConnectionsListOptionalParams
93
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
94
+ for await (const page of this.listPagingPage(
95
+ resourceGroupName,
96
+ workspaceName,
97
+ options
98
+ )) {
99
+ yield* page;
100
+ }
101
+ }
102
+
103
+ /**
104
+ * List private endpoint connections of the workspace
105
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
106
+ * @param workspaceName The name of the workspace.
107
+ * @param options The options parameters.
108
+ */
109
+ private _list(
110
+ resourceGroupName: string,
111
+ workspaceName: string,
112
+ options?: PrivateEndpointConnectionsListOptionalParams
113
+ ): Promise<PrivateEndpointConnectionsListResponse> {
114
+ return this.client.sendOperationRequest(
115
+ { resourceGroupName, workspaceName, options },
116
+ listOperationSpec
117
+ );
118
+ }
119
+
120
+ /**
121
+ * Get a private endpoint connection properties for a workspace
122
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
123
+ * @param workspaceName The name of the workspace.
124
+ * @param privateEndpointConnectionName The name of the private endpoint connection
125
+ * @param options The options parameters.
126
+ */
127
+ get(
128
+ resourceGroupName: string,
129
+ workspaceName: string,
130
+ privateEndpointConnectionName: string,
131
+ options?: PrivateEndpointConnectionsGetOptionalParams
132
+ ): Promise<PrivateEndpointConnectionsGetResponse> {
133
+ return this.client.sendOperationRequest(
134
+ {
135
+ resourceGroupName,
136
+ workspaceName,
137
+ privateEndpointConnectionName,
138
+ options
139
+ },
140
+ getOperationSpec
141
+ );
142
+ }
143
+
144
+ /**
145
+ * Update the status of a private endpoint connection with the specified name
146
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
147
+ * @param workspaceName The name of the workspace.
148
+ * @param privateEndpointConnectionName The name of the private endpoint connection
149
+ * @param privateEndpointConnection The private endpoint connection with updated properties
150
+ * @param options The options parameters.
151
+ */
152
+ async beginCreate(
153
+ resourceGroupName: string,
154
+ workspaceName: string,
155
+ privateEndpointConnectionName: string,
156
+ privateEndpointConnection: PrivateEndpointConnection,
157
+ options?: PrivateEndpointConnectionsCreateOptionalParams
158
+ ): Promise<
159
+ PollerLike<
160
+ PollOperationState<PrivateEndpointConnectionsCreateResponse>,
161
+ PrivateEndpointConnectionsCreateResponse
162
+ >
163
+ > {
164
+ const directSendOperation = async (
165
+ args: coreClient.OperationArguments,
166
+ spec: coreClient.OperationSpec
167
+ ): Promise<PrivateEndpointConnectionsCreateResponse> => {
168
+ return this.client.sendOperationRequest(args, spec);
169
+ };
170
+ const sendOperation = async (
171
+ args: coreClient.OperationArguments,
172
+ spec: coreClient.OperationSpec
173
+ ) => {
174
+ let currentRawResponse:
175
+ | coreClient.FullOperationResponse
176
+ | undefined = undefined;
177
+ const providedCallback = args.options?.onResponse;
178
+ const callback: coreClient.RawResponseCallback = (
179
+ rawResponse: coreClient.FullOperationResponse,
180
+ flatResponse: unknown
181
+ ) => {
182
+ currentRawResponse = rawResponse;
183
+ providedCallback?.(rawResponse, flatResponse);
184
+ };
185
+ const updatedArgs = {
186
+ ...args,
187
+ options: {
188
+ ...args.options,
189
+ onResponse: callback
190
+ }
191
+ };
192
+ const flatResponse = await directSendOperation(updatedArgs, spec);
193
+ return {
194
+ flatResponse,
195
+ rawResponse: {
196
+ statusCode: currentRawResponse!.status,
197
+ body: currentRawResponse!.parsedBody,
198
+ headers: currentRawResponse!.headers.toJSON()
199
+ }
200
+ };
201
+ };
202
+
203
+ const lro = new LroImpl(
204
+ sendOperation,
205
+ {
206
+ resourceGroupName,
207
+ workspaceName,
208
+ privateEndpointConnectionName,
209
+ privateEndpointConnection,
210
+ options
211
+ },
212
+ createOperationSpec
213
+ );
214
+ return new LroEngine(lro, {
215
+ resumeFrom: options?.resumeFrom,
216
+ intervalInMs: options?.updateIntervalInMs
217
+ });
218
+ }
219
+
220
+ /**
221
+ * Update the status of a private endpoint connection with the specified name
222
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
223
+ * @param workspaceName The name of the workspace.
224
+ * @param privateEndpointConnectionName The name of the private endpoint connection
225
+ * @param privateEndpointConnection The private endpoint connection with updated properties
226
+ * @param options The options parameters.
227
+ */
228
+ async beginCreateAndWait(
229
+ resourceGroupName: string,
230
+ workspaceName: string,
231
+ privateEndpointConnectionName: string,
232
+ privateEndpointConnection: PrivateEndpointConnection,
233
+ options?: PrivateEndpointConnectionsCreateOptionalParams
234
+ ): Promise<PrivateEndpointConnectionsCreateResponse> {
235
+ const poller = await this.beginCreate(
236
+ resourceGroupName,
237
+ workspaceName,
238
+ privateEndpointConnectionName,
239
+ privateEndpointConnection,
240
+ options
241
+ );
242
+ return poller.pollUntilDone();
243
+ }
244
+
245
+ /**
246
+ * Remove private endpoint connection with the specified name
247
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
248
+ * @param workspaceName The name of the workspace.
249
+ * @param privateEndpointConnectionName The name of the private endpoint connection
250
+ * @param options The options parameters.
251
+ */
252
+ async beginDelete(
253
+ resourceGroupName: string,
254
+ workspaceName: string,
255
+ privateEndpointConnectionName: string,
256
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
257
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
258
+ const directSendOperation = async (
259
+ args: coreClient.OperationArguments,
260
+ spec: coreClient.OperationSpec
261
+ ): Promise<void> => {
262
+ return this.client.sendOperationRequest(args, spec);
263
+ };
264
+ const sendOperation = async (
265
+ args: coreClient.OperationArguments,
266
+ spec: coreClient.OperationSpec
267
+ ) => {
268
+ let currentRawResponse:
269
+ | coreClient.FullOperationResponse
270
+ | undefined = undefined;
271
+ const providedCallback = args.options?.onResponse;
272
+ const callback: coreClient.RawResponseCallback = (
273
+ rawResponse: coreClient.FullOperationResponse,
274
+ flatResponse: unknown
275
+ ) => {
276
+ currentRawResponse = rawResponse;
277
+ providedCallback?.(rawResponse, flatResponse);
278
+ };
279
+ const updatedArgs = {
280
+ ...args,
281
+ options: {
282
+ ...args.options,
283
+ onResponse: callback
284
+ }
285
+ };
286
+ const flatResponse = await directSendOperation(updatedArgs, spec);
287
+ return {
288
+ flatResponse,
289
+ rawResponse: {
290
+ statusCode: currentRawResponse!.status,
291
+ body: currentRawResponse!.parsedBody,
292
+ headers: currentRawResponse!.headers.toJSON()
293
+ }
294
+ };
295
+ };
296
+
297
+ const lro = new LroImpl(
298
+ sendOperation,
299
+ {
300
+ resourceGroupName,
301
+ workspaceName,
302
+ privateEndpointConnectionName,
303
+ options
304
+ },
305
+ deleteOperationSpec
306
+ );
307
+ return new LroEngine(lro, {
308
+ resumeFrom: options?.resumeFrom,
309
+ intervalInMs: options?.updateIntervalInMs
310
+ });
311
+ }
312
+
313
+ /**
314
+ * Remove private endpoint connection with the specified name
315
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
316
+ * @param workspaceName The name of the workspace.
317
+ * @param privateEndpointConnectionName The name of the private endpoint connection
318
+ * @param options The options parameters.
319
+ */
320
+ async beginDeleteAndWait(
321
+ resourceGroupName: string,
322
+ workspaceName: string,
323
+ privateEndpointConnectionName: string,
324
+ options?: PrivateEndpointConnectionsDeleteOptionalParams
325
+ ): Promise<void> {
326
+ const poller = await this.beginDelete(
327
+ resourceGroupName,
328
+ workspaceName,
329
+ privateEndpointConnectionName,
330
+ options
331
+ );
332
+ return poller.pollUntilDone();
333
+ }
334
+
335
+ /**
336
+ * ListNext
337
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
338
+ * @param workspaceName The name of the workspace.
339
+ * @param nextLink The nextLink from the previous successful call to the List method.
340
+ * @param options The options parameters.
341
+ */
342
+ private _listNext(
343
+ resourceGroupName: string,
344
+ workspaceName: string,
345
+ nextLink: string,
346
+ options?: PrivateEndpointConnectionsListNextOptionalParams
347
+ ): Promise<PrivateEndpointConnectionsListNextResponse> {
348
+ return this.client.sendOperationRequest(
349
+ { resourceGroupName, workspaceName, nextLink, options },
350
+ listNextOperationSpec
351
+ );
352
+ }
353
+ }
354
+ // Operation Specifications
355
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
356
+
357
+ const listOperationSpec: coreClient.OperationSpec = {
358
+ path:
359
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections",
360
+ httpMethod: "GET",
361
+ responses: {
362
+ 200: {
363
+ bodyMapper: Mappers.PrivateEndpointConnectionsList
364
+ },
365
+ default: {
366
+ bodyMapper: Mappers.ErrorResponse
367
+ }
368
+ },
369
+ queryParameters: [Parameters.apiVersion],
370
+ urlParameters: [
371
+ Parameters.$host,
372
+ Parameters.resourceGroupName,
373
+ Parameters.workspaceName,
374
+ Parameters.subscriptionId
375
+ ],
376
+ headerParameters: [Parameters.accept],
377
+ serializer
378
+ };
379
+ const getOperationSpec: coreClient.OperationSpec = {
380
+ path:
381
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
382
+ httpMethod: "GET",
383
+ responses: {
384
+ 200: {
385
+ bodyMapper: Mappers.PrivateEndpointConnection
386
+ },
387
+ default: {
388
+ bodyMapper: Mappers.ErrorResponse
389
+ }
390
+ },
391
+ queryParameters: [Parameters.apiVersion],
392
+ urlParameters: [
393
+ Parameters.$host,
394
+ Parameters.resourceGroupName,
395
+ Parameters.workspaceName,
396
+ Parameters.subscriptionId,
397
+ Parameters.privateEndpointConnectionName
398
+ ],
399
+ headerParameters: [Parameters.accept],
400
+ serializer
401
+ };
402
+ const createOperationSpec: coreClient.OperationSpec = {
403
+ path:
404
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
405
+ httpMethod: "PUT",
406
+ responses: {
407
+ 200: {
408
+ bodyMapper: Mappers.PrivateEndpointConnection
409
+ },
410
+ 201: {
411
+ bodyMapper: Mappers.PrivateEndpointConnection
412
+ },
413
+ 202: {
414
+ bodyMapper: Mappers.PrivateEndpointConnection
415
+ },
416
+ 204: {
417
+ bodyMapper: Mappers.PrivateEndpointConnection
418
+ },
419
+ default: {
420
+ bodyMapper: Mappers.ErrorResponse
421
+ }
422
+ },
423
+ requestBody: Parameters.privateEndpointConnection,
424
+ queryParameters: [Parameters.apiVersion],
425
+ urlParameters: [
426
+ Parameters.$host,
427
+ Parameters.resourceGroupName,
428
+ Parameters.workspaceName,
429
+ Parameters.subscriptionId,
430
+ Parameters.privateEndpointConnectionName
431
+ ],
432
+ headerParameters: [Parameters.accept, Parameters.contentType],
433
+ mediaType: "json",
434
+ serializer
435
+ };
436
+ const deleteOperationSpec: coreClient.OperationSpec = {
437
+ path:
438
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}",
439
+ httpMethod: "DELETE",
440
+ responses: {
441
+ 200: {},
442
+ 201: {},
443
+ 202: {},
444
+ 204: {},
445
+ default: {
446
+ bodyMapper: Mappers.ErrorResponse
447
+ }
448
+ },
449
+ queryParameters: [Parameters.apiVersion],
450
+ urlParameters: [
451
+ Parameters.$host,
452
+ Parameters.resourceGroupName,
453
+ Parameters.workspaceName,
454
+ Parameters.subscriptionId,
455
+ Parameters.privateEndpointConnectionName
456
+ ],
457
+ headerParameters: [Parameters.accept],
458
+ serializer
459
+ };
460
+ const listNextOperationSpec: coreClient.OperationSpec = {
461
+ path: "{nextLink}",
462
+ httpMethod: "GET",
463
+ responses: {
464
+ 200: {
465
+ bodyMapper: Mappers.PrivateEndpointConnectionsList
466
+ },
467
+ default: {
468
+ bodyMapper: Mappers.ErrorResponse
469
+ }
470
+ },
471
+ queryParameters: [Parameters.apiVersion],
472
+ urlParameters: [
473
+ Parameters.$host,
474
+ Parameters.resourceGroupName,
475
+ Parameters.workspaceName,
476
+ Parameters.subscriptionId,
477
+ Parameters.nextLink
478
+ ],
479
+ headerParameters: [Parameters.accept],
480
+ serializer
481
+ };
@@ -0,0 +1,221 @@
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 { PrivateLinkResources } 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 { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext";
15
+ import {
16
+ GroupIdInformation,
17
+ PrivateLinkResourcesListNextOptionalParams,
18
+ PrivateLinkResourcesListOptionalParams,
19
+ PrivateLinkResourcesListResponse,
20
+ PrivateLinkResourcesGetOptionalParams,
21
+ PrivateLinkResourcesGetResponse,
22
+ PrivateLinkResourcesListNextResponse
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Class containing PrivateLinkResources operations. */
27
+ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
28
+ private readonly client: AzureDatabricksManagementClientContext;
29
+
30
+ /**
31
+ * Initialize a new instance of the class PrivateLinkResources class.
32
+ * @param client Reference to the service client
33
+ */
34
+ constructor(client: AzureDatabricksManagementClientContext) {
35
+ this.client = client;
36
+ }
37
+
38
+ /**
39
+ * List private link resources for a given workspace
40
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
41
+ * @param workspaceName The name of the workspace.
42
+ * @param options The options parameters.
43
+ */
44
+ public list(
45
+ resourceGroupName: string,
46
+ workspaceName: string,
47
+ options?: PrivateLinkResourcesListOptionalParams
48
+ ): PagedAsyncIterableIterator<GroupIdInformation> {
49
+ const iter = this.listPagingAll(resourceGroupName, workspaceName, options);
50
+ return {
51
+ next() {
52
+ return iter.next();
53
+ },
54
+ [Symbol.asyncIterator]() {
55
+ return this;
56
+ },
57
+ byPage: () => {
58
+ return this.listPagingPage(resourceGroupName, workspaceName, options);
59
+ }
60
+ };
61
+ }
62
+
63
+ private async *listPagingPage(
64
+ resourceGroupName: string,
65
+ workspaceName: string,
66
+ options?: PrivateLinkResourcesListOptionalParams
67
+ ): AsyncIterableIterator<GroupIdInformation[]> {
68
+ let result = await this._list(resourceGroupName, workspaceName, options);
69
+ yield result.value || [];
70
+ let continuationToken = result.nextLink;
71
+ while (continuationToken) {
72
+ result = await this._listNext(
73
+ resourceGroupName,
74
+ workspaceName,
75
+ continuationToken,
76
+ options
77
+ );
78
+ continuationToken = result.nextLink;
79
+ yield result.value || [];
80
+ }
81
+ }
82
+
83
+ private async *listPagingAll(
84
+ resourceGroupName: string,
85
+ workspaceName: string,
86
+ options?: PrivateLinkResourcesListOptionalParams
87
+ ): AsyncIterableIterator<GroupIdInformation> {
88
+ for await (const page of this.listPagingPage(
89
+ resourceGroupName,
90
+ workspaceName,
91
+ options
92
+ )) {
93
+ yield* page;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * List private link resources for a given workspace
99
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
100
+ * @param workspaceName The name of the workspace.
101
+ * @param options The options parameters.
102
+ */
103
+ private _list(
104
+ resourceGroupName: string,
105
+ workspaceName: string,
106
+ options?: PrivateLinkResourcesListOptionalParams
107
+ ): Promise<PrivateLinkResourcesListResponse> {
108
+ return this.client.sendOperationRequest(
109
+ { resourceGroupName, workspaceName, options },
110
+ listOperationSpec
111
+ );
112
+ }
113
+
114
+ /**
115
+ * Get the specified private link resource for the given group id (sub-resource)
116
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
117
+ * @param workspaceName The name of the workspace.
118
+ * @param groupId The name of the private link resource
119
+ * @param options The options parameters.
120
+ */
121
+ get(
122
+ resourceGroupName: string,
123
+ workspaceName: string,
124
+ groupId: string,
125
+ options?: PrivateLinkResourcesGetOptionalParams
126
+ ): Promise<PrivateLinkResourcesGetResponse> {
127
+ return this.client.sendOperationRequest(
128
+ { resourceGroupName, workspaceName, groupId, options },
129
+ getOperationSpec
130
+ );
131
+ }
132
+
133
+ /**
134
+ * ListNext
135
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
136
+ * @param workspaceName The name of the workspace.
137
+ * @param nextLink The nextLink from the previous successful call to the List method.
138
+ * @param options The options parameters.
139
+ */
140
+ private _listNext(
141
+ resourceGroupName: string,
142
+ workspaceName: string,
143
+ nextLink: string,
144
+ options?: PrivateLinkResourcesListNextOptionalParams
145
+ ): Promise<PrivateLinkResourcesListNextResponse> {
146
+ return this.client.sendOperationRequest(
147
+ { resourceGroupName, workspaceName, nextLink, options },
148
+ listNextOperationSpec
149
+ );
150
+ }
151
+ }
152
+ // Operation Specifications
153
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
154
+
155
+ const listOperationSpec: coreClient.OperationSpec = {
156
+ path:
157
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources",
158
+ httpMethod: "GET",
159
+ responses: {
160
+ 200: {
161
+ bodyMapper: Mappers.PrivateLinkResourcesList
162
+ },
163
+ default: {
164
+ bodyMapper: Mappers.ErrorResponse
165
+ }
166
+ },
167
+ queryParameters: [Parameters.apiVersion],
168
+ urlParameters: [
169
+ Parameters.$host,
170
+ Parameters.resourceGroupName,
171
+ Parameters.workspaceName,
172
+ Parameters.subscriptionId
173
+ ],
174
+ headerParameters: [Parameters.accept],
175
+ serializer
176
+ };
177
+ const getOperationSpec: coreClient.OperationSpec = {
178
+ path:
179
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/privateLinkResources/{groupId}",
180
+ httpMethod: "GET",
181
+ responses: {
182
+ 200: {
183
+ bodyMapper: Mappers.GroupIdInformation
184
+ },
185
+ default: {
186
+ bodyMapper: Mappers.ErrorResponse
187
+ }
188
+ },
189
+ queryParameters: [Parameters.apiVersion],
190
+ urlParameters: [
191
+ Parameters.$host,
192
+ Parameters.resourceGroupName,
193
+ Parameters.workspaceName,
194
+ Parameters.subscriptionId,
195
+ Parameters.groupId
196
+ ],
197
+ headerParameters: [Parameters.accept],
198
+ serializer
199
+ };
200
+ const listNextOperationSpec: coreClient.OperationSpec = {
201
+ path: "{nextLink}",
202
+ httpMethod: "GET",
203
+ responses: {
204
+ 200: {
205
+ bodyMapper: Mappers.PrivateLinkResourcesList
206
+ },
207
+ default: {
208
+ bodyMapper: Mappers.ErrorResponse
209
+ }
210
+ },
211
+ queryParameters: [Parameters.apiVersion],
212
+ urlParameters: [
213
+ Parameters.$host,
214
+ Parameters.resourceGroupName,
215
+ Parameters.workspaceName,
216
+ Parameters.subscriptionId,
217
+ Parameters.nextLink
218
+ ],
219
+ headerParameters: [Parameters.accept],
220
+ serializer
221
+ };