@azure/arm-databricks 3.0.0-beta.4 → 3.0.1-alpha.20231124.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 (152) hide show
  1. package/CHANGELOG.md +14 -4
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/dist/index.js +1101 -274
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.js +58 -0
  11. package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/accessConnectorsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/accessConnectorsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/accessConnectorsDeleteSample.js +38 -0
  15. package/dist-esm/samples-dev/accessConnectorsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/accessConnectorsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/accessConnectorsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/accessConnectorsGetSample.js +38 -0
  19. package/dist-esm/samples-dev/accessConnectorsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.js +53 -0
  23. package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.js.map +1 -0
  24. package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.js +52 -0
  27. package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.js.map +1 -0
  28. package/dist-esm/samples-dev/accessConnectorsUpdateSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/accessConnectorsUpdateSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/accessConnectorsUpdateSample.js +39 -0
  31. package/dist-esm/samples-dev/accessConnectorsUpdateSample.js.map +1 -0
  32. package/dist-esm/samples-dev/operationsListSample.js +17 -7
  33. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  34. package/dist-esm/samples-dev/outboundNetworkDependenciesEndpointsListSample.js +12 -4
  35. package/dist-esm/samples-dev/outboundNetworkDependenciesEndpointsListSample.js.map +1 -1
  36. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js +12 -4
  37. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js.map +1 -1
  38. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +12 -4
  39. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
  40. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +12 -4
  41. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
  42. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +18 -8
  43. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
  44. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +12 -4
  45. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js.map +1 -1
  46. package/dist-esm/samples-dev/privateLinkResourcesListSample.js +18 -8
  47. package/dist-esm/samples-dev/privateLinkResourcesListSample.js.map +1 -1
  48. package/dist-esm/samples-dev/vNetPeeringCreateOrUpdateSample.js +11 -4
  49. package/dist-esm/samples-dev/vNetPeeringCreateOrUpdateSample.js.map +1 -1
  50. package/dist-esm/samples-dev/vNetPeeringDeleteSample.js +11 -4
  51. package/dist-esm/samples-dev/vNetPeeringDeleteSample.js.map +1 -1
  52. package/dist-esm/samples-dev/vNetPeeringGetSample.js +11 -4
  53. package/dist-esm/samples-dev/vNetPeeringGetSample.js.map +1 -1
  54. package/dist-esm/samples-dev/vNetPeeringListByWorkspaceSample.js +17 -8
  55. package/dist-esm/samples-dev/vNetPeeringListByWorkspaceSample.js.map +1 -1
  56. package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js +98 -20
  57. package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js.map +1 -1
  58. package/dist-esm/samples-dev/workspacesDeleteSample.js +11 -4
  59. package/dist-esm/samples-dev/workspacesDeleteSample.js.map +1 -1
  60. package/dist-esm/samples-dev/workspacesGetSample.js +33 -8
  61. package/dist-esm/samples-dev/workspacesGetSample.js.map +1 -1
  62. package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +17 -8
  63. package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js.map +1 -1
  64. package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +16 -7
  65. package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js.map +1 -1
  66. package/dist-esm/samples-dev/workspacesUpdateSample.js +11 -4
  67. package/dist-esm/samples-dev/workspacesUpdateSample.js.map +1 -1
  68. package/dist-esm/src/azureDatabricksManagementClient.d.ts +2 -4
  69. package/dist-esm/src/azureDatabricksManagementClient.d.ts.map +1 -1
  70. package/dist-esm/src/azureDatabricksManagementClient.js +3 -32
  71. package/dist-esm/src/azureDatabricksManagementClient.js.map +1 -1
  72. package/dist-esm/src/lroImpl.d.ts +6 -11
  73. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  74. package/dist-esm/src/lroImpl.js +12 -20
  75. package/dist-esm/src/lroImpl.js.map +1 -1
  76. package/dist-esm/src/models/index.d.ts +204 -36
  77. package/dist-esm/src/models/index.d.ts.map +1 -1
  78. package/dist-esm/src/models/index.js +12 -0
  79. package/dist-esm/src/models/index.js.map +1 -1
  80. package/dist-esm/src/models/mappers.d.ts +8 -0
  81. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  82. package/dist-esm/src/models/mappers.js +243 -2
  83. package/dist-esm/src/models/mappers.js.map +1 -1
  84. package/dist-esm/src/models/parameters.d.ts +4 -0
  85. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  86. package/dist-esm/src/models/parameters.js +35 -2
  87. package/dist-esm/src/models/parameters.js.map +1 -1
  88. package/dist-esm/src/operations/accessConnectors.d.ts +107 -0
  89. package/dist-esm/src/operations/accessConnectors.d.ts.map +1 -0
  90. package/dist-esm/src/operations/accessConnectors.js +543 -0
  91. package/dist-esm/src/operations/accessConnectors.js.map +1 -0
  92. package/dist-esm/src/operations/index.d.ts +1 -0
  93. package/dist-esm/src/operations/index.d.ts.map +1 -1
  94. package/dist-esm/src/operations/index.js +1 -0
  95. package/dist-esm/src/operations/index.js.map +1 -1
  96. package/dist-esm/src/operations/operations.js +6 -5
  97. package/dist-esm/src/operations/operations.js.map +1 -1
  98. package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
  99. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  100. package/dist-esm/src/operations/privateEndpointConnections.js +35 -26
  101. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  102. package/dist-esm/src/operations/privateLinkResources.js +6 -5
  103. package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
  104. package/dist-esm/src/operations/vNetPeering.d.ts +3 -3
  105. package/dist-esm/src/operations/vNetPeering.d.ts.map +1 -1
  106. package/dist-esm/src/operations/vNetPeering.js +30 -21
  107. package/dist-esm/src/operations/vNetPeering.js.map +1 -1
  108. package/dist-esm/src/operations/workspaces.d.ts +4 -4
  109. package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
  110. package/dist-esm/src/operations/workspaces.js +38 -24
  111. package/dist-esm/src/operations/workspaces.js.map +1 -1
  112. package/dist-esm/src/operationsInterfaces/accessConnectors.d.ts +71 -0
  113. package/dist-esm/src/operationsInterfaces/accessConnectors.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/accessConnectors.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/accessConnectors.js.map +1 -0
  116. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  117. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  118. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  119. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  120. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +3 -3
  121. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
  122. package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts +3 -3
  123. package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts.map +1 -1
  124. package/dist-esm/src/operationsInterfaces/workspaces.d.ts +4 -4
  125. package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -1
  126. package/dist-esm/src/pagingHelper.d.ts +4 -4
  127. package/dist-esm/src/pagingHelper.js +4 -4
  128. package/dist-esm/test/databricks_examples.js +6 -4
  129. package/dist-esm/test/databricks_examples.js.map +1 -1
  130. package/package.json +21 -24
  131. package/review/arm-databricks.api.md +155 -12
  132. package/src/azureDatabricksManagementClient.ts +7 -39
  133. package/src/lroImpl.ts +31 -23
  134. package/src/models/index.ts +196 -4
  135. package/src/models/mappers.ts +258 -2
  136. package/src/models/parameters.ts +41 -2
  137. package/src/operations/accessConnectors.ts +717 -0
  138. package/src/operations/index.ts +1 -0
  139. package/src/operations/operations.ts +0 -1
  140. package/src/operations/privateEndpointConnections.ts +28 -22
  141. package/src/operations/privateLinkResources.ts +0 -1
  142. package/src/operations/vNetPeering.ts +28 -22
  143. package/src/operations/workspaces.ts +41 -33
  144. package/src/operationsInterfaces/accessConnectors.ts +139 -0
  145. package/src/operationsInterfaces/index.ts +1 -0
  146. package/src/operationsInterfaces/privateEndpointConnections.ts +4 -4
  147. package/src/operationsInterfaces/vNetPeering.ts +4 -4
  148. package/src/operationsInterfaces/workspaces.ts +6 -6
  149. package/src/pagingHelper.ts +4 -4
  150. package/types/arm-databricks.d.ts +279 -20
  151. package/types/tsdoc-metadata.json +1 -1
  152. package/rollup.config.js +0 -122
@@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
143
143
  bodyMapper: Mappers.ErrorResponse
144
144
  }
145
145
  },
146
- queryParameters: [Parameters.apiVersion],
147
146
  urlParameters: [Parameters.$host, Parameters.nextLink],
148
147
  headerParameters: [Parameters.accept],
149
148
  serializer
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { AzureDatabricksManagementClient } from "../azureDatabricksManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  PrivateEndpointConnection,
20
24
  PrivateEndpointConnectionsListNextOptionalParams,
@@ -174,8 +178,8 @@ export class PrivateEndpointConnectionsImpl
174
178
  privateEndpointConnection: PrivateEndpointConnection,
175
179
  options?: PrivateEndpointConnectionsCreateOptionalParams
176
180
  ): Promise<
177
- PollerLike<
178
- PollOperationState<PrivateEndpointConnectionsCreateResponse>,
181
+ SimplePollerLike<
182
+ OperationState<PrivateEndpointConnectionsCreateResponse>,
179
183
  PrivateEndpointConnectionsCreateResponse
180
184
  >
181
185
  > {
@@ -185,7 +189,7 @@ export class PrivateEndpointConnectionsImpl
185
189
  ): Promise<PrivateEndpointConnectionsCreateResponse> => {
186
190
  return this.client.sendOperationRequest(args, spec);
187
191
  };
188
- const sendOperation = async (
192
+ const sendOperationFn = async (
189
193
  args: coreClient.OperationArguments,
190
194
  spec: coreClient.OperationSpec
191
195
  ) => {
@@ -218,19 +222,22 @@ export class PrivateEndpointConnectionsImpl
218
222
  };
219
223
  };
220
224
 
221
- const lro = new LroImpl(
222
- sendOperation,
223
- {
225
+ const lro = createLroSpec({
226
+ sendOperationFn,
227
+ args: {
224
228
  resourceGroupName,
225
229
  workspaceName,
226
230
  privateEndpointConnectionName,
227
231
  privateEndpointConnection,
228
232
  options
229
233
  },
230
- createOperationSpec
231
- );
232
- const poller = new LroEngine(lro, {
233
- resumeFrom: options?.resumeFrom,
234
+ spec: createOperationSpec
235
+ });
236
+ const poller = await createHttpPoller<
237
+ PrivateEndpointConnectionsCreateResponse,
238
+ OperationState<PrivateEndpointConnectionsCreateResponse>
239
+ >(lro, {
240
+ restoreFrom: options?.resumeFrom,
234
241
  intervalInMs: options?.updateIntervalInMs
235
242
  });
236
243
  await poller.poll();
@@ -274,14 +281,14 @@ export class PrivateEndpointConnectionsImpl
274
281
  workspaceName: string,
275
282
  privateEndpointConnectionName: string,
276
283
  options?: PrivateEndpointConnectionsDeleteOptionalParams
277
- ): Promise<PollerLike<PollOperationState<void>, void>> {
284
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
278
285
  const directSendOperation = async (
279
286
  args: coreClient.OperationArguments,
280
287
  spec: coreClient.OperationSpec
281
288
  ): Promise<void> => {
282
289
  return this.client.sendOperationRequest(args, spec);
283
290
  };
284
- const sendOperation = async (
291
+ const sendOperationFn = async (
285
292
  args: coreClient.OperationArguments,
286
293
  spec: coreClient.OperationSpec
287
294
  ) => {
@@ -314,18 +321,18 @@ export class PrivateEndpointConnectionsImpl
314
321
  };
315
322
  };
316
323
 
317
- const lro = new LroImpl(
318
- sendOperation,
319
- {
324
+ const lro = createLroSpec({
325
+ sendOperationFn,
326
+ args: {
320
327
  resourceGroupName,
321
328
  workspaceName,
322
329
  privateEndpointConnectionName,
323
330
  options
324
331
  },
325
- deleteOperationSpec
326
- );
327
- const poller = new LroEngine(lro, {
328
- resumeFrom: options?.resumeFrom,
332
+ spec: deleteOperationSpec
333
+ });
334
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
335
+ restoreFrom: options?.resumeFrom,
329
336
  intervalInMs: options?.updateIntervalInMs
330
337
  });
331
338
  await poller.poll();
@@ -490,7 +497,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
490
497
  bodyMapper: Mappers.ErrorResponse
491
498
  }
492
499
  },
493
- queryParameters: [Parameters.apiVersion],
494
500
  urlParameters: [
495
501
  Parameters.$host,
496
502
  Parameters.resourceGroupName,
@@ -226,7 +226,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
226
226
  bodyMapper: Mappers.ErrorResponse
227
227
  }
228
228
  },
229
- queryParameters: [Parameters.apiVersion],
230
229
  urlParameters: [
231
230
  Parameters.$host,
232
231
  Parameters.resourceGroupName,
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { AzureDatabricksManagementClient } from "../azureDatabricksManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  VirtualNetworkPeering,
20
24
  VNetPeeringListByWorkspaceNextOptionalParams,
@@ -156,14 +160,14 @@ export class VNetPeeringImpl implements VNetPeering {
156
160
  workspaceName: string,
157
161
  peeringName: string,
158
162
  options?: VNetPeeringDeleteOptionalParams
159
- ): Promise<PollerLike<PollOperationState<void>, void>> {
163
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
160
164
  const directSendOperation = async (
161
165
  args: coreClient.OperationArguments,
162
166
  spec: coreClient.OperationSpec
163
167
  ): Promise<void> => {
164
168
  return this.client.sendOperationRequest(args, spec);
165
169
  };
166
- const sendOperation = async (
170
+ const sendOperationFn = async (
167
171
  args: coreClient.OperationArguments,
168
172
  spec: coreClient.OperationSpec
169
173
  ) => {
@@ -196,13 +200,13 @@ export class VNetPeeringImpl implements VNetPeering {
196
200
  };
197
201
  };
198
202
 
199
- const lro = new LroImpl(
200
- sendOperation,
201
- { resourceGroupName, workspaceName, peeringName, options },
202
- deleteOperationSpec
203
- );
204
- const poller = new LroEngine(lro, {
205
- resumeFrom: options?.resumeFrom,
203
+ const lro = createLroSpec({
204
+ sendOperationFn,
205
+ args: { resourceGroupName, workspaceName, peeringName, options },
206
+ spec: deleteOperationSpec
207
+ });
208
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
209
+ restoreFrom: options?.resumeFrom,
206
210
  intervalInMs: options?.updateIntervalInMs
207
211
  });
208
212
  await poller.poll();
@@ -246,8 +250,8 @@ export class VNetPeeringImpl implements VNetPeering {
246
250
  virtualNetworkPeeringParameters: VirtualNetworkPeering,
247
251
  options?: VNetPeeringCreateOrUpdateOptionalParams
248
252
  ): Promise<
249
- PollerLike<
250
- PollOperationState<VNetPeeringCreateOrUpdateResponse>,
253
+ SimplePollerLike<
254
+ OperationState<VNetPeeringCreateOrUpdateResponse>,
251
255
  VNetPeeringCreateOrUpdateResponse
252
256
  >
253
257
  > {
@@ -257,7 +261,7 @@ export class VNetPeeringImpl implements VNetPeering {
257
261
  ): Promise<VNetPeeringCreateOrUpdateResponse> => {
258
262
  return this.client.sendOperationRequest(args, spec);
259
263
  };
260
- const sendOperation = async (
264
+ const sendOperationFn = async (
261
265
  args: coreClient.OperationArguments,
262
266
  spec: coreClient.OperationSpec
263
267
  ) => {
@@ -290,19 +294,22 @@ export class VNetPeeringImpl implements VNetPeering {
290
294
  };
291
295
  };
292
296
 
293
- const lro = new LroImpl(
294
- sendOperation,
295
- {
297
+ const lro = createLroSpec({
298
+ sendOperationFn,
299
+ args: {
296
300
  resourceGroupName,
297
301
  workspaceName,
298
302
  peeringName,
299
303
  virtualNetworkPeeringParameters,
300
304
  options
301
305
  },
302
- createOrUpdateOperationSpec
303
- );
304
- const poller = new LroEngine(lro, {
305
- resumeFrom: options?.resumeFrom,
306
+ spec: createOrUpdateOperationSpec
307
+ });
308
+ const poller = await createHttpPoller<
309
+ VNetPeeringCreateOrUpdateResponse,
310
+ OperationState<VNetPeeringCreateOrUpdateResponse>
311
+ >(lro, {
312
+ restoreFrom: options?.resumeFrom,
306
313
  intervalInMs: options?.updateIntervalInMs
307
314
  });
308
315
  await poller.poll();
@@ -488,7 +495,6 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {
488
495
  bodyMapper: Mappers.ErrorResponse
489
496
  }
490
497
  },
491
- queryParameters: [Parameters.apiVersion],
492
498
  urlParameters: [
493
499
  Parameters.$host,
494
500
  Parameters.resourceGroupName,
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { AzureDatabricksManagementClient } from "../azureDatabricksManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  Workspace,
20
24
  WorkspacesListByResourceGroupNextOptionalParams,
@@ -198,14 +202,14 @@ export class WorkspacesImpl implements Workspaces {
198
202
  resourceGroupName: string,
199
203
  workspaceName: string,
200
204
  options?: WorkspacesDeleteOptionalParams
201
- ): Promise<PollerLike<PollOperationState<void>, void>> {
205
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
202
206
  const directSendOperation = async (
203
207
  args: coreClient.OperationArguments,
204
208
  spec: coreClient.OperationSpec
205
209
  ): Promise<void> => {
206
210
  return this.client.sendOperationRequest(args, spec);
207
211
  };
208
- const sendOperation = async (
212
+ const sendOperationFn = async (
209
213
  args: coreClient.OperationArguments,
210
214
  spec: coreClient.OperationSpec
211
215
  ) => {
@@ -238,13 +242,13 @@ export class WorkspacesImpl implements Workspaces {
238
242
  };
239
243
  };
240
244
 
241
- const lro = new LroImpl(
242
- sendOperation,
243
- { resourceGroupName, workspaceName, options },
244
- deleteOperationSpec
245
- );
246
- const poller = new LroEngine(lro, {
247
- resumeFrom: options?.resumeFrom,
245
+ const lro = createLroSpec({
246
+ sendOperationFn,
247
+ args: { resourceGroupName, workspaceName, options },
248
+ spec: deleteOperationSpec
249
+ });
250
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
251
+ restoreFrom: options?.resumeFrom,
248
252
  intervalInMs: options?.updateIntervalInMs
249
253
  });
250
254
  await poller.poll();
@@ -283,8 +287,8 @@ export class WorkspacesImpl implements Workspaces {
283
287
  parameters: Workspace,
284
288
  options?: WorkspacesCreateOrUpdateOptionalParams
285
289
  ): Promise<
286
- PollerLike<
287
- PollOperationState<WorkspacesCreateOrUpdateResponse>,
290
+ SimplePollerLike<
291
+ OperationState<WorkspacesCreateOrUpdateResponse>,
288
292
  WorkspacesCreateOrUpdateResponse
289
293
  >
290
294
  > {
@@ -294,7 +298,7 @@ export class WorkspacesImpl implements Workspaces {
294
298
  ): Promise<WorkspacesCreateOrUpdateResponse> => {
295
299
  return this.client.sendOperationRequest(args, spec);
296
300
  };
297
- const sendOperation = async (
301
+ const sendOperationFn = async (
298
302
  args: coreClient.OperationArguments,
299
303
  spec: coreClient.OperationSpec
300
304
  ) => {
@@ -327,13 +331,16 @@ export class WorkspacesImpl implements Workspaces {
327
331
  };
328
332
  };
329
333
 
330
- const lro = new LroImpl(
331
- sendOperation,
332
- { resourceGroupName, workspaceName, parameters, options },
333
- createOrUpdateOperationSpec
334
- );
335
- const poller = new LroEngine(lro, {
336
- resumeFrom: options?.resumeFrom,
334
+ const lro = createLroSpec({
335
+ sendOperationFn,
336
+ args: { resourceGroupName, workspaceName, parameters, options },
337
+ spec: createOrUpdateOperationSpec
338
+ });
339
+ const poller = await createHttpPoller<
340
+ WorkspacesCreateOrUpdateResponse,
341
+ OperationState<WorkspacesCreateOrUpdateResponse>
342
+ >(lro, {
343
+ restoreFrom: options?.resumeFrom,
337
344
  intervalInMs: options?.updateIntervalInMs
338
345
  });
339
346
  await poller.poll();
@@ -375,8 +382,8 @@ export class WorkspacesImpl implements Workspaces {
375
382
  parameters: WorkspaceUpdate,
376
383
  options?: WorkspacesUpdateOptionalParams
377
384
  ): Promise<
378
- PollerLike<
379
- PollOperationState<WorkspacesUpdateResponse>,
385
+ SimplePollerLike<
386
+ OperationState<WorkspacesUpdateResponse>,
380
387
  WorkspacesUpdateResponse
381
388
  >
382
389
  > {
@@ -386,7 +393,7 @@ export class WorkspacesImpl implements Workspaces {
386
393
  ): Promise<WorkspacesUpdateResponse> => {
387
394
  return this.client.sendOperationRequest(args, spec);
388
395
  };
389
- const sendOperation = async (
396
+ const sendOperationFn = async (
390
397
  args: coreClient.OperationArguments,
391
398
  spec: coreClient.OperationSpec
392
399
  ) => {
@@ -419,13 +426,16 @@ export class WorkspacesImpl implements Workspaces {
419
426
  };
420
427
  };
421
428
 
422
- const lro = new LroImpl(
423
- sendOperation,
424
- { resourceGroupName, workspaceName, parameters, options },
425
- updateOperationSpec
426
- );
427
- const poller = new LroEngine(lro, {
428
- resumeFrom: options?.resumeFrom,
429
+ const lro = createLroSpec({
430
+ sendOperationFn,
431
+ args: { resourceGroupName, workspaceName, parameters, options },
432
+ spec: updateOperationSpec
433
+ });
434
+ const poller = await createHttpPoller<
435
+ WorkspacesUpdateResponse,
436
+ OperationState<WorkspacesUpdateResponse>
437
+ >(lro, {
438
+ restoreFrom: options?.resumeFrom,
429
439
  intervalInMs: options?.updateIntervalInMs
430
440
  });
431
441
  await poller.poll();
@@ -677,7 +687,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
677
687
  bodyMapper: Mappers.ErrorResponse
678
688
  }
679
689
  },
680
- queryParameters: [Parameters.apiVersion],
681
690
  urlParameters: [
682
691
  Parameters.$host,
683
692
  Parameters.resourceGroupName,
@@ -698,7 +707,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
698
707
  bodyMapper: Mappers.ErrorResponse
699
708
  }
700
709
  },
701
- queryParameters: [Parameters.apiVersion],
702
710
  urlParameters: [
703
711
  Parameters.$host,
704
712
  Parameters.subscriptionId,
@@ -0,0 +1,139 @@
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 { SimplePollerLike, OperationState } from "@azure/core-lro";
11
+ import {
12
+ AccessConnector,
13
+ AccessConnectorsListByResourceGroupOptionalParams,
14
+ AccessConnectorsListBySubscriptionOptionalParams,
15
+ AccessConnectorsGetOptionalParams,
16
+ AccessConnectorsGetResponse,
17
+ AccessConnectorsDeleteOptionalParams,
18
+ AccessConnectorsCreateOrUpdateOptionalParams,
19
+ AccessConnectorsCreateOrUpdateResponse,
20
+ AccessConnectorUpdate,
21
+ AccessConnectorsUpdateOptionalParams,
22
+ AccessConnectorsUpdateResponse
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Interface representing a AccessConnectors. */
27
+ export interface AccessConnectors {
28
+ /**
29
+ * Gets all the azure databricks accessConnectors within 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?: AccessConnectorsListByResourceGroupOptionalParams
36
+ ): PagedAsyncIterableIterator<AccessConnector>;
37
+ /**
38
+ * Gets all the azure databricks accessConnectors within a subscription.
39
+ * @param options The options parameters.
40
+ */
41
+ listBySubscription(
42
+ options?: AccessConnectorsListBySubscriptionOptionalParams
43
+ ): PagedAsyncIterableIterator<AccessConnector>;
44
+ /**
45
+ * Gets an azure databricks accessConnector.
46
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
47
+ * @param connectorName The name of the azure databricks accessConnector.
48
+ * @param options The options parameters.
49
+ */
50
+ get(
51
+ resourceGroupName: string,
52
+ connectorName: string,
53
+ options?: AccessConnectorsGetOptionalParams
54
+ ): Promise<AccessConnectorsGetResponse>;
55
+ /**
56
+ * Deletes the azure databricks accessConnector.
57
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
58
+ * @param connectorName The name of the azure databricks accessConnector.
59
+ * @param options The options parameters.
60
+ */
61
+ beginDelete(
62
+ resourceGroupName: string,
63
+ connectorName: string,
64
+ options?: AccessConnectorsDeleteOptionalParams
65
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
66
+ /**
67
+ * Deletes the azure databricks accessConnector.
68
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
69
+ * @param connectorName The name of the azure databricks accessConnector.
70
+ * @param options The options parameters.
71
+ */
72
+ beginDeleteAndWait(
73
+ resourceGroupName: string,
74
+ connectorName: string,
75
+ options?: AccessConnectorsDeleteOptionalParams
76
+ ): Promise<void>;
77
+ /**
78
+ * Creates or updates azure databricks accessConnector.
79
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
80
+ * @param connectorName The name of the azure databricks accessConnector.
81
+ * @param parameters Parameters supplied to the create or update an azure databricks accessConnector.
82
+ * @param options The options parameters.
83
+ */
84
+ beginCreateOrUpdate(
85
+ resourceGroupName: string,
86
+ connectorName: string,
87
+ parameters: AccessConnector,
88
+ options?: AccessConnectorsCreateOrUpdateOptionalParams
89
+ ): Promise<
90
+ SimplePollerLike<
91
+ OperationState<AccessConnectorsCreateOrUpdateResponse>,
92
+ AccessConnectorsCreateOrUpdateResponse
93
+ >
94
+ >;
95
+ /**
96
+ * Creates or updates azure databricks accessConnector.
97
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
98
+ * @param connectorName The name of the azure databricks accessConnector.
99
+ * @param parameters Parameters supplied to the create or update an azure databricks accessConnector.
100
+ * @param options The options parameters.
101
+ */
102
+ beginCreateOrUpdateAndWait(
103
+ resourceGroupName: string,
104
+ connectorName: string,
105
+ parameters: AccessConnector,
106
+ options?: AccessConnectorsCreateOrUpdateOptionalParams
107
+ ): Promise<AccessConnectorsCreateOrUpdateResponse>;
108
+ /**
109
+ * Updates an azure databricks accessConnector.
110
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
111
+ * @param connectorName The name of the azure databricks accessConnector.
112
+ * @param parameters The update to the azure databricks accessConnector.
113
+ * @param options The options parameters.
114
+ */
115
+ beginUpdate(
116
+ resourceGroupName: string,
117
+ connectorName: string,
118
+ parameters: AccessConnectorUpdate,
119
+ options?: AccessConnectorsUpdateOptionalParams
120
+ ): Promise<
121
+ SimplePollerLike<
122
+ OperationState<AccessConnectorsUpdateResponse>,
123
+ AccessConnectorsUpdateResponse
124
+ >
125
+ >;
126
+ /**
127
+ * Updates an azure databricks accessConnector.
128
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
129
+ * @param connectorName The name of the azure databricks accessConnector.
130
+ * @param parameters The update to the azure databricks accessConnector.
131
+ * @param options The options parameters.
132
+ */
133
+ beginUpdateAndWait(
134
+ resourceGroupName: string,
135
+ connectorName: string,
136
+ parameters: AccessConnectorUpdate,
137
+ options?: AccessConnectorsUpdateOptionalParams
138
+ ): Promise<AccessConnectorsUpdateResponse>;
139
+ }
@@ -12,3 +12,4 @@ export * from "./privateLinkResources";
12
12
  export * from "./privateEndpointConnections";
13
13
  export * from "./outboundNetworkDependenciesEndpoints";
14
14
  export * from "./vNetPeering";
15
+ export * from "./accessConnectors";
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  PrivateEndpointConnection,
13
13
  PrivateEndpointConnectionsListOptionalParams,
@@ -60,8 +60,8 @@ export interface PrivateEndpointConnections {
60
60
  privateEndpointConnection: PrivateEndpointConnection,
61
61
  options?: PrivateEndpointConnectionsCreateOptionalParams
62
62
  ): Promise<
63
- PollerLike<
64
- PollOperationState<PrivateEndpointConnectionsCreateResponse>,
63
+ SimplePollerLike<
64
+ OperationState<PrivateEndpointConnectionsCreateResponse>,
65
65
  PrivateEndpointConnectionsCreateResponse
66
66
  >
67
67
  >;
@@ -92,7 +92,7 @@ export interface PrivateEndpointConnections {
92
92
  workspaceName: string,
93
93
  privateEndpointConnectionName: string,
94
94
  options?: PrivateEndpointConnectionsDeleteOptionalParams
95
- ): Promise<PollerLike<PollOperationState<void>, void>>;
95
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
96
96
  /**
97
97
  * Remove private endpoint connection with the specified name
98
98
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  VirtualNetworkPeering,
13
13
  VNetPeeringListByWorkspaceOptionalParams,
@@ -57,7 +57,7 @@ export interface VNetPeering {
57
57
  workspaceName: string,
58
58
  peeringName: string,
59
59
  options?: VNetPeeringDeleteOptionalParams
60
- ): Promise<PollerLike<PollOperationState<void>, void>>;
60
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
61
61
  /**
62
62
  * Deletes the workspace vNetPeering.
63
63
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -86,8 +86,8 @@ export interface VNetPeering {
86
86
  virtualNetworkPeeringParameters: VirtualNetworkPeering,
87
87
  options?: VNetPeeringCreateOrUpdateOptionalParams
88
88
  ): Promise<
89
- PollerLike<
90
- PollOperationState<VNetPeeringCreateOrUpdateResponse>,
89
+ SimplePollerLike<
90
+ OperationState<VNetPeeringCreateOrUpdateResponse>,
91
91
  VNetPeeringCreateOrUpdateResponse
92
92
  >
93
93
  >;
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  Workspace,
13
13
  WorkspacesListByResourceGroupOptionalParams,
@@ -62,7 +62,7 @@ export interface Workspaces {
62
62
  resourceGroupName: string,
63
63
  workspaceName: string,
64
64
  options?: WorkspacesDeleteOptionalParams
65
- ): Promise<PollerLike<PollOperationState<void>, void>>;
65
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
66
66
  /**
67
67
  * Deletes the workspace.
68
68
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -87,8 +87,8 @@ export interface Workspaces {
87
87
  parameters: Workspace,
88
88
  options?: WorkspacesCreateOrUpdateOptionalParams
89
89
  ): Promise<
90
- PollerLike<
91
- PollOperationState<WorkspacesCreateOrUpdateResponse>,
90
+ SimplePollerLike<
91
+ OperationState<WorkspacesCreateOrUpdateResponse>,
92
92
  WorkspacesCreateOrUpdateResponse
93
93
  >
94
94
  >;
@@ -118,8 +118,8 @@ export interface Workspaces {
118
118
  parameters: WorkspaceUpdate,
119
119
  options?: WorkspacesUpdateOptionalParams
120
120
  ): Promise<
121
- PollerLike<
122
- PollOperationState<WorkspacesUpdateResponse>,
121
+ SimplePollerLike<
122
+ OperationState<WorkspacesUpdateResponse>,
123
123
  WorkspacesUpdateResponse
124
124
  >
125
125
  >;
@@ -13,11 +13,11 @@ export interface PageInfo {
13
13
  const pageMap = new WeakMap<object, PageInfo>();
14
14
 
15
15
  /**
16
- * Given a result page from a pageable operation, returns a
17
- * continuation token that can be used to begin paging from
16
+ * Given the last `.value` produced by the `byPage` iterator,
17
+ * returns a continuation token that can be used to begin paging from
18
18
  * that point later.
19
- * @param page A result object from calling .byPage() on a paged operation.
20
- * @returns The continuation token that can be passed into byPage().
19
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
20
+ * @returns The continuation token that can be passed into byPage() during future calls.
21
21
  */
22
22
  export function getContinuationToken(page: unknown): string | undefined {
23
23
  if (typeof page !== "object" || page === null) {