@azure/arm-redisenterprisecache 2.2.1-alpha.20230418.1 → 2.3.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 (133) hide show
  1. package/CHANGELOG.md +36 -10
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +777 -121
  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/databasesCreateSample.js +15 -8
  9. package/dist-esm/samples-dev/databasesCreateSample.js.map +1 -1
  10. package/dist-esm/samples-dev/databasesDeleteSample.js +11 -4
  11. package/dist-esm/samples-dev/databasesDeleteSample.js.map +1 -1
  12. package/dist-esm/samples-dev/databasesExportSample.js +11 -4
  13. package/dist-esm/samples-dev/databasesExportSample.js.map +1 -1
  14. package/dist-esm/samples-dev/databasesFlushSample.d.ts +2 -0
  15. package/dist-esm/samples-dev/databasesFlushSample.d.ts.map +1 -0
  16. package/dist-esm/samples-dev/databasesFlushSample.js +44 -0
  17. package/dist-esm/samples-dev/databasesFlushSample.js.map +1 -0
  18. package/dist-esm/samples-dev/databasesForceUnlinkSample.js +11 -4
  19. package/dist-esm/samples-dev/databasesForceUnlinkSample.js.map +1 -1
  20. package/dist-esm/samples-dev/databasesGetSample.js +11 -4
  21. package/dist-esm/samples-dev/databasesGetSample.js.map +1 -1
  22. package/dist-esm/samples-dev/databasesImportSample.js +11 -4
  23. package/dist-esm/samples-dev/databasesImportSample.js.map +1 -1
  24. package/dist-esm/samples-dev/databasesListByClusterSample.js +11 -4
  25. package/dist-esm/samples-dev/databasesListByClusterSample.js.map +1 -1
  26. package/dist-esm/samples-dev/databasesListKeysSample.js +11 -4
  27. package/dist-esm/samples-dev/databasesListKeysSample.js.map +1 -1
  28. package/dist-esm/samples-dev/databasesRegenerateKeySample.js +11 -4
  29. package/dist-esm/samples-dev/databasesRegenerateKeySample.js.map +1 -1
  30. package/dist-esm/samples-dev/databasesUpdateSample.js +11 -4
  31. package/dist-esm/samples-dev/databasesUpdateSample.js.map +1 -1
  32. package/dist-esm/samples-dev/operationsListSample.js +11 -3
  33. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  34. package/dist-esm/samples-dev/operationsStatusGetSample.js +10 -3
  35. package/dist-esm/samples-dev/operationsStatusGetSample.js.map +1 -1
  36. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +11 -4
  37. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
  38. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +11 -4
  39. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
  40. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +11 -4
  41. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
  42. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +11 -4
  43. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -1
  44. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js +11 -4
  45. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js.map +1 -1
  46. package/dist-esm/samples-dev/redisEnterpriseCreateSample.js +26 -4
  47. package/dist-esm/samples-dev/redisEnterpriseCreateSample.js.map +1 -1
  48. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.js +11 -4
  49. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.js.map +1 -1
  50. package/dist-esm/samples-dev/redisEnterpriseGetSample.js +11 -4
  51. package/dist-esm/samples-dev/redisEnterpriseGetSample.js.map +1 -1
  52. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.js +11 -4
  53. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.js.map +1 -1
  54. package/dist-esm/samples-dev/redisEnterpriseListSample.js +10 -3
  55. package/dist-esm/samples-dev/redisEnterpriseListSample.js.map +1 -1
  56. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.js +11 -4
  57. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.js.map +1 -1
  58. package/dist-esm/samples-dev/skusListSample.d.ts +2 -0
  59. package/dist-esm/samples-dev/skusListSample.d.ts.map +1 -0
  60. package/dist-esm/samples-dev/skusListSample.js +58 -0
  61. package/dist-esm/samples-dev/skusListSample.js.map +1 -0
  62. package/dist-esm/src/lroImpl.d.ts +6 -11
  63. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  64. package/dist-esm/src/lroImpl.js +12 -20
  65. package/dist-esm/src/lroImpl.js.map +1 -1
  66. package/dist-esm/src/models/index.d.ts +196 -0
  67. package/dist-esm/src/models/index.d.ts.map +1 -1
  68. package/dist-esm/src/models/index.js +32 -0
  69. package/dist-esm/src/models/index.js.map +1 -1
  70. package/dist-esm/src/models/mappers.d.ts +13 -0
  71. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  72. package/dist-esm/src/models/mappers.js +340 -0
  73. package/dist-esm/src/models/mappers.js.map +1 -1
  74. package/dist-esm/src/models/parameters.d.ts +1 -0
  75. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  76. package/dist-esm/src/models/parameters.js +6 -2
  77. package/dist-esm/src/models/parameters.js.map +1 -1
  78. package/dist-esm/src/operations/databases.d.ts +27 -9
  79. package/dist-esm/src/operations/databases.d.ts.map +1 -1
  80. package/dist-esm/src/operations/databases.js +192 -37
  81. package/dist-esm/src/operations/databases.js.map +1 -1
  82. package/dist-esm/src/operations/index.d.ts +1 -0
  83. package/dist-esm/src/operations/index.d.ts.map +1 -1
  84. package/dist-esm/src/operations/index.js +1 -0
  85. package/dist-esm/src/operations/index.js.map +1 -1
  86. package/dist-esm/src/operations/privateEndpointConnections.d.ts +2 -2
  87. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  88. package/dist-esm/src/operations/privateEndpointConnections.js +16 -12
  89. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  90. package/dist-esm/src/operations/redisEnterprise.d.ts +4 -4
  91. package/dist-esm/src/operations/redisEnterprise.d.ts.map +1 -1
  92. package/dist-esm/src/operations/redisEnterprise.js +29 -17
  93. package/dist-esm/src/operations/redisEnterprise.js.map +1 -1
  94. package/dist-esm/src/operations/skus.d.ts +28 -0
  95. package/dist-esm/src/operations/skus.d.ts.map +1 -0
  96. package/dist-esm/src/operations/skus.js +107 -0
  97. package/dist-esm/src/operations/skus.js.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/databases.d.ts +27 -9
  99. package/dist-esm/src/operationsInterfaces/databases.d.ts.map +1 -1
  100. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  101. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  102. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  103. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  104. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +2 -2
  105. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
  106. package/dist-esm/src/operationsInterfaces/redisEnterprise.d.ts +4 -4
  107. package/dist-esm/src/operationsInterfaces/redisEnterprise.d.ts.map +1 -1
  108. package/dist-esm/src/operationsInterfaces/skus.d.ts +12 -0
  109. package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/skus.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
  112. package/dist-esm/src/redisEnterpriseManagementClient.d.ts +2 -1
  113. package/dist-esm/src/redisEnterpriseManagementClient.d.ts.map +1 -1
  114. package/dist-esm/src/redisEnterpriseManagementClient.js +4 -3
  115. package/dist-esm/src/redisEnterpriseManagementClient.js.map +1 -1
  116. package/package.json +8 -7
  117. package/review/arm-redisenterprisecache.api.md +154 -13
  118. package/src/lroImpl.ts +31 -23
  119. package/src/models/index.ts +216 -0
  120. package/src/models/mappers.ts +357 -0
  121. package/src/models/parameters.ts +7 -1
  122. package/src/operations/databases.ts +251 -75
  123. package/src/operations/index.ts +1 -0
  124. package/src/operations/privateEndpointConnections.ts +19 -12
  125. package/src/operations/redisEnterprise.ts +44 -34
  126. package/src/operations/skus.ts +117 -0
  127. package/src/operationsInterfaces/databases.ts +44 -12
  128. package/src/operationsInterfaces/index.ts +1 -0
  129. package/src/operationsInterfaces/privateEndpointConnections.ts +3 -3
  130. package/src/operationsInterfaces/redisEnterprise.ts +6 -6
  131. package/src/operationsInterfaces/skus.ts +24 -0
  132. package/src/redisEnterpriseManagementClient.ts +8 -4
  133. package/types/arm-redisenterprisecache.d.ts +260 -13
@@ -20,6 +20,7 @@ import {
20
20
  ImportClusterParameters as ImportClusterParametersMapper,
21
21
  ExportClusterParameters as ExportClusterParametersMapper,
22
22
  ForceUnlinkParameters as ForceUnlinkParametersMapper,
23
+ FlushParameters as FlushParametersMapper,
23
24
  PrivateEndpointConnection as PrivateEndpointConnectionMapper
24
25
  } from "../models/mappers";
25
26
 
@@ -50,7 +51,7 @@ export const $host: OperationURLParameter = {
50
51
  export const apiVersion: OperationQueryParameter = {
51
52
  parameterPath: "apiVersion",
52
53
  mapper: {
53
- defaultValue: "2022-01-01",
54
+ defaultValue: "2023-03-01-preview",
54
55
  isConstant: true,
55
56
  serializedName: "api-version",
56
57
  type: {
@@ -202,6 +203,11 @@ export const parameters7: OperationParameter = {
202
203
  mapper: ForceUnlinkParametersMapper
203
204
  };
204
205
 
206
+ export const parameters8: OperationParameter = {
207
+ parameterPath: "parameters",
208
+ mapper: FlushParametersMapper
209
+ };
210
+
205
211
  export const privateEndpointConnectionName: OperationURLParameter = {
206
212
  parameterPath: "privateEndpointConnectionName",
207
213
  mapper: {
@@ -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 { RedisEnterpriseManagementClient } from "../redisEnterpriseManagementClient";
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
  Database,
20
24
  DatabasesListByClusterNextOptionalParams,
@@ -39,6 +43,8 @@ import {
39
43
  DatabasesExportOptionalParams,
40
44
  ForceUnlinkParameters,
41
45
  DatabasesForceUnlinkOptionalParams,
46
+ FlushParameters,
47
+ DatabasesFlushOptionalParams,
42
48
  DatabasesListByClusterNextResponse
43
49
  } from "../models";
44
50
 
@@ -171,8 +177,8 @@ export class DatabasesImpl implements Databases {
171
177
  parameters: Database,
172
178
  options?: DatabasesCreateOptionalParams
173
179
  ): Promise<
174
- PollerLike<
175
- PollOperationState<DatabasesCreateResponse>,
180
+ SimplePollerLike<
181
+ OperationState<DatabasesCreateResponse>,
176
182
  DatabasesCreateResponse
177
183
  >
178
184
  > {
@@ -182,7 +188,7 @@ export class DatabasesImpl implements Databases {
182
188
  ): Promise<DatabasesCreateResponse> => {
183
189
  return this.client.sendOperationRequest(args, spec);
184
190
  };
185
- const sendOperation = async (
191
+ const sendOperationFn = async (
186
192
  args: coreClient.OperationArguments,
187
193
  spec: coreClient.OperationSpec
188
194
  ) => {
@@ -215,15 +221,24 @@ export class DatabasesImpl implements Databases {
215
221
  };
216
222
  };
217
223
 
218
- const lro = new LroImpl(
219
- sendOperation,
220
- { resourceGroupName, clusterName, databaseName, parameters, options },
221
- createOperationSpec
222
- );
223
- const poller = new LroEngine(lro, {
224
- resumeFrom: options?.resumeFrom,
224
+ const lro = createLroSpec({
225
+ sendOperationFn,
226
+ args: {
227
+ resourceGroupName,
228
+ clusterName,
229
+ databaseName,
230
+ parameters,
231
+ options
232
+ },
233
+ spec: createOperationSpec
234
+ });
235
+ const poller = await createHttpPoller<
236
+ DatabasesCreateResponse,
237
+ OperationState<DatabasesCreateResponse>
238
+ >(lro, {
239
+ restoreFrom: options?.resumeFrom,
225
240
  intervalInMs: options?.updateIntervalInMs,
226
- lroResourceLocationConfig: "original-uri"
241
+ resourceLocationConfig: "original-uri"
227
242
  });
228
243
  await poller.poll();
229
244
  return poller;
@@ -269,8 +284,8 @@ export class DatabasesImpl implements Databases {
269
284
  parameters: DatabaseUpdate,
270
285
  options?: DatabasesUpdateOptionalParams
271
286
  ): Promise<
272
- PollerLike<
273
- PollOperationState<DatabasesUpdateResponse>,
287
+ SimplePollerLike<
288
+ OperationState<DatabasesUpdateResponse>,
274
289
  DatabasesUpdateResponse
275
290
  >
276
291
  > {
@@ -280,7 +295,7 @@ export class DatabasesImpl implements Databases {
280
295
  ): Promise<DatabasesUpdateResponse> => {
281
296
  return this.client.sendOperationRequest(args, spec);
282
297
  };
283
- const sendOperation = async (
298
+ const sendOperationFn = async (
284
299
  args: coreClient.OperationArguments,
285
300
  spec: coreClient.OperationSpec
286
301
  ) => {
@@ -313,15 +328,24 @@ export class DatabasesImpl implements Databases {
313
328
  };
314
329
  };
315
330
 
316
- const lro = new LroImpl(
317
- sendOperation,
318
- { resourceGroupName, clusterName, databaseName, parameters, options },
319
- updateOperationSpec
320
- );
321
- const poller = new LroEngine(lro, {
322
- resumeFrom: options?.resumeFrom,
331
+ const lro = createLroSpec({
332
+ sendOperationFn,
333
+ args: {
334
+ resourceGroupName,
335
+ clusterName,
336
+ databaseName,
337
+ parameters,
338
+ options
339
+ },
340
+ spec: updateOperationSpec
341
+ });
342
+ const poller = await createHttpPoller<
343
+ DatabasesUpdateResponse,
344
+ OperationState<DatabasesUpdateResponse>
345
+ >(lro, {
346
+ restoreFrom: options?.resumeFrom,
323
347
  intervalInMs: options?.updateIntervalInMs,
324
- lroResourceLocationConfig: "azure-async-operation"
348
+ resourceLocationConfig: "azure-async-operation"
325
349
  });
326
350
  await poller.poll();
327
351
  return poller;
@@ -383,14 +407,14 @@ export class DatabasesImpl implements Databases {
383
407
  clusterName: string,
384
408
  databaseName: string,
385
409
  options?: DatabasesDeleteOptionalParams
386
- ): Promise<PollerLike<PollOperationState<void>, void>> {
410
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
387
411
  const directSendOperation = async (
388
412
  args: coreClient.OperationArguments,
389
413
  spec: coreClient.OperationSpec
390
414
  ): Promise<void> => {
391
415
  return this.client.sendOperationRequest(args, spec);
392
416
  };
393
- const sendOperation = async (
417
+ const sendOperationFn = async (
394
418
  args: coreClient.OperationArguments,
395
419
  spec: coreClient.OperationSpec
396
420
  ) => {
@@ -423,15 +447,15 @@ export class DatabasesImpl implements Databases {
423
447
  };
424
448
  };
425
449
 
426
- const lro = new LroImpl(
427
- sendOperation,
428
- { resourceGroupName, clusterName, databaseName, options },
429
- deleteOperationSpec
430
- );
431
- const poller = new LroEngine(lro, {
432
- resumeFrom: options?.resumeFrom,
450
+ const lro = createLroSpec({
451
+ sendOperationFn,
452
+ args: { resourceGroupName, clusterName, databaseName, options },
453
+ spec: deleteOperationSpec
454
+ });
455
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
456
+ restoreFrom: options?.resumeFrom,
433
457
  intervalInMs: options?.updateIntervalInMs,
434
- lroResourceLocationConfig: "azure-async-operation"
458
+ resourceLocationConfig: "azure-async-operation"
435
459
  });
436
460
  await poller.poll();
437
461
  return poller;
@@ -493,8 +517,8 @@ export class DatabasesImpl implements Databases {
493
517
  parameters: RegenerateKeyParameters,
494
518
  options?: DatabasesRegenerateKeyOptionalParams
495
519
  ): Promise<
496
- PollerLike<
497
- PollOperationState<DatabasesRegenerateKeyResponse>,
520
+ SimplePollerLike<
521
+ OperationState<DatabasesRegenerateKeyResponse>,
498
522
  DatabasesRegenerateKeyResponse
499
523
  >
500
524
  > {
@@ -504,7 +528,7 @@ export class DatabasesImpl implements Databases {
504
528
  ): Promise<DatabasesRegenerateKeyResponse> => {
505
529
  return this.client.sendOperationRequest(args, spec);
506
530
  };
507
- const sendOperation = async (
531
+ const sendOperationFn = async (
508
532
  args: coreClient.OperationArguments,
509
533
  spec: coreClient.OperationSpec
510
534
  ) => {
@@ -537,15 +561,24 @@ export class DatabasesImpl implements Databases {
537
561
  };
538
562
  };
539
563
 
540
- const lro = new LroImpl(
541
- sendOperation,
542
- { resourceGroupName, clusterName, databaseName, parameters, options },
543
- regenerateKeyOperationSpec
544
- );
545
- const poller = new LroEngine(lro, {
546
- resumeFrom: options?.resumeFrom,
564
+ const lro = createLroSpec({
565
+ sendOperationFn,
566
+ args: {
567
+ resourceGroupName,
568
+ clusterName,
569
+ databaseName,
570
+ parameters,
571
+ options
572
+ },
573
+ spec: regenerateKeyOperationSpec
574
+ });
575
+ const poller = await createHttpPoller<
576
+ DatabasesRegenerateKeyResponse,
577
+ OperationState<DatabasesRegenerateKeyResponse>
578
+ >(lro, {
579
+ restoreFrom: options?.resumeFrom,
547
580
  intervalInMs: options?.updateIntervalInMs,
548
- lroResourceLocationConfig: "azure-async-operation"
581
+ resourceLocationConfig: "location"
549
582
  });
550
583
  await poller.poll();
551
584
  return poller;
@@ -590,14 +623,14 @@ export class DatabasesImpl implements Databases {
590
623
  databaseName: string,
591
624
  parameters: ImportClusterParameters,
592
625
  options?: DatabasesImportOptionalParams
593
- ): Promise<PollerLike<PollOperationState<void>, void>> {
626
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
594
627
  const directSendOperation = async (
595
628
  args: coreClient.OperationArguments,
596
629
  spec: coreClient.OperationSpec
597
630
  ): Promise<void> => {
598
631
  return this.client.sendOperationRequest(args, spec);
599
632
  };
600
- const sendOperation = async (
633
+ const sendOperationFn = async (
601
634
  args: coreClient.OperationArguments,
602
635
  spec: coreClient.OperationSpec
603
636
  ) => {
@@ -630,15 +663,21 @@ export class DatabasesImpl implements Databases {
630
663
  };
631
664
  };
632
665
 
633
- const lro = new LroImpl(
634
- sendOperation,
635
- { resourceGroupName, clusterName, databaseName, parameters, options },
636
- importOperationSpec
637
- );
638
- const poller = new LroEngine(lro, {
639
- resumeFrom: options?.resumeFrom,
666
+ const lro = createLroSpec({
667
+ sendOperationFn,
668
+ args: {
669
+ resourceGroupName,
670
+ clusterName,
671
+ databaseName,
672
+ parameters,
673
+ options
674
+ },
675
+ spec: importOperationSpec
676
+ });
677
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
678
+ restoreFrom: options?.resumeFrom,
640
679
  intervalInMs: options?.updateIntervalInMs,
641
- lroResourceLocationConfig: "azure-async-operation"
680
+ resourceLocationConfig: "azure-async-operation"
642
681
  });
643
682
  await poller.poll();
644
683
  return poller;
@@ -683,14 +722,14 @@ export class DatabasesImpl implements Databases {
683
722
  databaseName: string,
684
723
  parameters: ExportClusterParameters,
685
724
  options?: DatabasesExportOptionalParams
686
- ): Promise<PollerLike<PollOperationState<void>, void>> {
725
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
687
726
  const directSendOperation = async (
688
727
  args: coreClient.OperationArguments,
689
728
  spec: coreClient.OperationSpec
690
729
  ): Promise<void> => {
691
730
  return this.client.sendOperationRequest(args, spec);
692
731
  };
693
- const sendOperation = async (
732
+ const sendOperationFn = async (
694
733
  args: coreClient.OperationArguments,
695
734
  spec: coreClient.OperationSpec
696
735
  ) => {
@@ -723,15 +762,21 @@ export class DatabasesImpl implements Databases {
723
762
  };
724
763
  };
725
764
 
726
- const lro = new LroImpl(
727
- sendOperation,
728
- { resourceGroupName, clusterName, databaseName, parameters, options },
729
- exportOperationSpec
730
- );
731
- const poller = new LroEngine(lro, {
732
- resumeFrom: options?.resumeFrom,
765
+ const lro = createLroSpec({
766
+ sendOperationFn,
767
+ args: {
768
+ resourceGroupName,
769
+ clusterName,
770
+ databaseName,
771
+ parameters,
772
+ options
773
+ },
774
+ spec: exportOperationSpec
775
+ });
776
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
777
+ restoreFrom: options?.resumeFrom,
733
778
  intervalInMs: options?.updateIntervalInMs,
734
- lroResourceLocationConfig: "azure-async-operation"
779
+ resourceLocationConfig: "azure-async-operation"
735
780
  });
736
781
  await poller.poll();
737
782
  return poller;
@@ -776,14 +821,14 @@ export class DatabasesImpl implements Databases {
776
821
  databaseName: string,
777
822
  parameters: ForceUnlinkParameters,
778
823
  options?: DatabasesForceUnlinkOptionalParams
779
- ): Promise<PollerLike<PollOperationState<void>, void>> {
824
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
780
825
  const directSendOperation = async (
781
826
  args: coreClient.OperationArguments,
782
827
  spec: coreClient.OperationSpec
783
828
  ): Promise<void> => {
784
829
  return this.client.sendOperationRequest(args, spec);
785
830
  };
786
- const sendOperation = async (
831
+ const sendOperationFn = async (
787
832
  args: coreClient.OperationArguments,
788
833
  spec: coreClient.OperationSpec
789
834
  ) => {
@@ -816,15 +861,21 @@ export class DatabasesImpl implements Databases {
816
861
  };
817
862
  };
818
863
 
819
- const lro = new LroImpl(
820
- sendOperation,
821
- { resourceGroupName, clusterName, databaseName, parameters, options },
822
- forceUnlinkOperationSpec
823
- );
824
- const poller = new LroEngine(lro, {
825
- resumeFrom: options?.resumeFrom,
864
+ const lro = createLroSpec({
865
+ sendOperationFn,
866
+ args: {
867
+ resourceGroupName,
868
+ clusterName,
869
+ databaseName,
870
+ parameters,
871
+ options
872
+ },
873
+ spec: forceUnlinkOperationSpec
874
+ });
875
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
876
+ restoreFrom: options?.resumeFrom,
826
877
  intervalInMs: options?.updateIntervalInMs,
827
- lroResourceLocationConfig: "azure-async-operation"
878
+ resourceLocationConfig: "azure-async-operation"
828
879
  });
829
880
  await poller.poll();
830
881
  return poller;
@@ -855,6 +906,105 @@ export class DatabasesImpl implements Databases {
855
906
  return poller.pollUntilDone();
856
907
  }
857
908
 
909
+ /**
910
+ * Flushes all the keys in this database and also from its linked databases.
911
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
912
+ * @param clusterName The name of the RedisEnterprise cluster.
913
+ * @param databaseName The name of the database.
914
+ * @param parameters Information identifying the databases to be flushed
915
+ * @param options The options parameters.
916
+ */
917
+ async beginFlush(
918
+ resourceGroupName: string,
919
+ clusterName: string,
920
+ databaseName: string,
921
+ parameters: FlushParameters,
922
+ options?: DatabasesFlushOptionalParams
923
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
924
+ const directSendOperation = async (
925
+ args: coreClient.OperationArguments,
926
+ spec: coreClient.OperationSpec
927
+ ): Promise<void> => {
928
+ return this.client.sendOperationRequest(args, spec);
929
+ };
930
+ const sendOperationFn = async (
931
+ args: coreClient.OperationArguments,
932
+ spec: coreClient.OperationSpec
933
+ ) => {
934
+ let currentRawResponse:
935
+ | coreClient.FullOperationResponse
936
+ | undefined = undefined;
937
+ const providedCallback = args.options?.onResponse;
938
+ const callback: coreClient.RawResponseCallback = (
939
+ rawResponse: coreClient.FullOperationResponse,
940
+ flatResponse: unknown
941
+ ) => {
942
+ currentRawResponse = rawResponse;
943
+ providedCallback?.(rawResponse, flatResponse);
944
+ };
945
+ const updatedArgs = {
946
+ ...args,
947
+ options: {
948
+ ...args.options,
949
+ onResponse: callback
950
+ }
951
+ };
952
+ const flatResponse = await directSendOperation(updatedArgs, spec);
953
+ return {
954
+ flatResponse,
955
+ rawResponse: {
956
+ statusCode: currentRawResponse!.status,
957
+ body: currentRawResponse!.parsedBody,
958
+ headers: currentRawResponse!.headers.toJSON()
959
+ }
960
+ };
961
+ };
962
+
963
+ const lro = createLroSpec({
964
+ sendOperationFn,
965
+ args: {
966
+ resourceGroupName,
967
+ clusterName,
968
+ databaseName,
969
+ parameters,
970
+ options
971
+ },
972
+ spec: flushOperationSpec
973
+ });
974
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
975
+ restoreFrom: options?.resumeFrom,
976
+ intervalInMs: options?.updateIntervalInMs,
977
+ resourceLocationConfig: "location"
978
+ });
979
+ await poller.poll();
980
+ return poller;
981
+ }
982
+
983
+ /**
984
+ * Flushes all the keys in this database and also from its linked databases.
985
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
986
+ * @param clusterName The name of the RedisEnterprise cluster.
987
+ * @param databaseName The name of the database.
988
+ * @param parameters Information identifying the databases to be flushed
989
+ * @param options The options parameters.
990
+ */
991
+ async beginFlushAndWait(
992
+ resourceGroupName: string,
993
+ clusterName: string,
994
+ databaseName: string,
995
+ parameters: FlushParameters,
996
+ options?: DatabasesFlushOptionalParams
997
+ ): Promise<void> {
998
+ const poller = await this.beginFlush(
999
+ resourceGroupName,
1000
+ clusterName,
1001
+ databaseName,
1002
+ parameters,
1003
+ options
1004
+ );
1005
+ return poller.pollUntilDone();
1006
+ }
1007
+
858
1008
  /**
859
1009
  * ListByClusterNext
860
1010
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -1149,6 +1299,32 @@ const forceUnlinkOperationSpec: coreClient.OperationSpec = {
1149
1299
  mediaType: "json",
1150
1300
  serializer
1151
1301
  };
1302
+ const flushOperationSpec: coreClient.OperationSpec = {
1303
+ path:
1304
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/flush",
1305
+ httpMethod: "POST",
1306
+ responses: {
1307
+ 200: {},
1308
+ 201: {},
1309
+ 202: {},
1310
+ 204: {},
1311
+ default: {
1312
+ bodyMapper: Mappers.ErrorResponse
1313
+ }
1314
+ },
1315
+ requestBody: Parameters.parameters8,
1316
+ queryParameters: [Parameters.apiVersion],
1317
+ urlParameters: [
1318
+ Parameters.$host,
1319
+ Parameters.subscriptionId,
1320
+ Parameters.resourceGroupName,
1321
+ Parameters.clusterName,
1322
+ Parameters.databaseName
1323
+ ],
1324
+ headerParameters: [Parameters.accept, Parameters.contentType],
1325
+ mediaType: "json",
1326
+ serializer
1327
+ };
1152
1328
  const listByClusterNextOperationSpec: coreClient.OperationSpec = {
1153
1329
  path: "{nextLink}",
1154
1330
  httpMethod: "GET",
@@ -12,3 +12,4 @@ export * from "./redisEnterprise";
12
12
  export * from "./databases";
13
13
  export * from "./privateEndpointConnections";
14
14
  export * from "./privateLinkResources";
15
+ export * from "./skus";
@@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
14
  import { RedisEnterpriseManagementClient } from "../redisEnterpriseManagementClient";
15
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
- import { LroImpl } from "../lroImpl";
15
+ import {
16
+ SimplePollerLike,
17
+ OperationState,
18
+ createHttpPoller
19
+ } from "@azure/core-lro";
20
+ import { createLroSpec } from "../lroImpl";
17
21
  import {
18
22
  PrivateEndpointConnection,
19
23
  PrivateEndpointConnectionsListOptionalParams,
@@ -156,8 +160,8 @@ export class PrivateEndpointConnectionsImpl
156
160
  properties: PrivateEndpointConnection,
157
161
  options?: PrivateEndpointConnectionsPutOptionalParams
158
162
  ): Promise<
159
- PollerLike<
160
- PollOperationState<PrivateEndpointConnectionsPutResponse>,
163
+ SimplePollerLike<
164
+ OperationState<PrivateEndpointConnectionsPutResponse>,
161
165
  PrivateEndpointConnectionsPutResponse
162
166
  >
163
167
  > {
@@ -167,7 +171,7 @@ export class PrivateEndpointConnectionsImpl
167
171
  ): Promise<PrivateEndpointConnectionsPutResponse> => {
168
172
  return this.client.sendOperationRequest(args, spec);
169
173
  };
170
- const sendOperation = async (
174
+ const sendOperationFn = async (
171
175
  args: coreClient.OperationArguments,
172
176
  spec: coreClient.OperationSpec
173
177
  ) => {
@@ -200,19 +204,22 @@ export class PrivateEndpointConnectionsImpl
200
204
  };
201
205
  };
202
206
 
203
- const lro = new LroImpl(
204
- sendOperation,
205
- {
207
+ const lro = createLroSpec({
208
+ sendOperationFn,
209
+ args: {
206
210
  resourceGroupName,
207
211
  clusterName,
208
212
  privateEndpointConnectionName,
209
213
  properties,
210
214
  options
211
215
  },
212
- putOperationSpec
213
- );
214
- const poller = new LroEngine(lro, {
215
- resumeFrom: options?.resumeFrom,
216
+ spec: putOperationSpec
217
+ });
218
+ const poller = await createHttpPoller<
219
+ PrivateEndpointConnectionsPutResponse,
220
+ OperationState<PrivateEndpointConnectionsPutResponse>
221
+ >(lro, {
222
+ restoreFrom: options?.resumeFrom,
216
223
  intervalInMs: options?.updateIntervalInMs
217
224
  });
218
225
  await poller.poll();