@azure/arm-redisenterprisecache 2.0.0-alpha.20220412.1 → 2.1.0

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 (139) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +11 -0
  3. package/dist/index.js +323 -79
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/databasesCreateSample.d.ts +2 -0
  8. package/dist-esm/samples-dev/databasesCreateSample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/databasesCreateSample.js +80 -0
  10. package/dist-esm/samples-dev/databasesCreateSample.js.map +1 -0
  11. package/dist-esm/samples-dev/databasesDeleteSample.d.ts +2 -0
  12. package/dist-esm/samples-dev/databasesDeleteSample.d.ts.map +1 -0
  13. package/dist-esm/samples-dev/databasesDeleteSample.js +32 -0
  14. package/dist-esm/samples-dev/databasesDeleteSample.js.map +1 -0
  15. package/dist-esm/samples-dev/databasesExportSample.d.ts +2 -0
  16. package/dist-esm/samples-dev/databasesExportSample.d.ts.map +1 -0
  17. package/dist-esm/samples-dev/databasesExportSample.js +35 -0
  18. package/dist-esm/samples-dev/databasesExportSample.js.map +1 -0
  19. package/dist-esm/samples-dev/databasesForceUnlinkSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/databasesForceUnlinkSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/databasesForceUnlinkSample.js +37 -0
  22. package/dist-esm/samples-dev/databasesForceUnlinkSample.js.map +1 -0
  23. package/dist-esm/samples-dev/databasesGetSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/databasesGetSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/databasesGetSample.js +32 -0
  26. package/dist-esm/samples-dev/databasesGetSample.js.map +1 -0
  27. package/dist-esm/samples-dev/databasesImportSample.d.ts +2 -0
  28. package/dist-esm/samples-dev/databasesImportSample.d.ts.map +1 -0
  29. package/dist-esm/samples-dev/databasesImportSample.js +38 -0
  30. package/dist-esm/samples-dev/databasesImportSample.js.map +1 -0
  31. package/dist-esm/samples-dev/databasesListByClusterSample.d.ts +2 -0
  32. package/dist-esm/samples-dev/databasesListByClusterSample.d.ts.map +1 -0
  33. package/dist-esm/samples-dev/databasesListByClusterSample.js +45 -0
  34. package/dist-esm/samples-dev/databasesListByClusterSample.js.map +1 -0
  35. package/dist-esm/samples-dev/databasesListKeysSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/databasesListKeysSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/databasesListKeysSample.js +32 -0
  38. package/dist-esm/samples-dev/databasesListKeysSample.js.map +1 -0
  39. package/dist-esm/samples-dev/databasesRegenerateKeySample.d.ts +2 -0
  40. package/dist-esm/samples-dev/databasesRegenerateKeySample.d.ts.map +1 -0
  41. package/dist-esm/samples-dev/databasesRegenerateKeySample.js +33 -0
  42. package/dist-esm/samples-dev/databasesRegenerateKeySample.js.map +1 -0
  43. package/dist-esm/samples-dev/databasesUpdateSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/databasesUpdateSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/databasesUpdateSample.js +37 -0
  46. package/dist-esm/samples-dev/databasesUpdateSample.js.map +1 -0
  47. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  50. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  51. package/dist-esm/samples-dev/operationsStatusGetSample.d.ts +2 -0
  52. package/dist-esm/samples-dev/operationsStatusGetSample.d.ts.map +1 -0
  53. package/dist-esm/samples-dev/operationsStatusGetSample.js +31 -0
  54. package/dist-esm/samples-dev/operationsStatusGetSample.js.map +1 -0
  55. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  56. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  57. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +32 -0
  58. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  59. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  60. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  61. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +32 -0
  62. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  63. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
  64. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +45 -0
  66. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
  67. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +38 -0
  70. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -0
  71. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js +45 -0
  74. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js.map +1 -0
  75. package/dist-esm/samples-dev/redisEnterpriseCreateSample.d.ts +2 -0
  76. package/dist-esm/samples-dev/redisEnterpriseCreateSample.d.ts.map +1 -0
  77. package/dist-esm/samples-dev/redisEnterpriseCreateSample.js +38 -0
  78. package/dist-esm/samples-dev/redisEnterpriseCreateSample.js.map +1 -0
  79. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.d.ts +2 -0
  80. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.d.ts.map +1 -0
  81. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.js +31 -0
  82. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.js.map +1 -0
  83. package/dist-esm/samples-dev/redisEnterpriseGetSample.d.ts +2 -0
  84. package/dist-esm/samples-dev/redisEnterpriseGetSample.d.ts.map +1 -0
  85. package/dist-esm/samples-dev/redisEnterpriseGetSample.js +31 -0
  86. package/dist-esm/samples-dev/redisEnterpriseGetSample.js.map +1 -0
  87. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.d.ts +2 -0
  88. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.d.ts.map +1 -0
  89. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.js +44 -0
  90. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.js.map +1 -0
  91. package/dist-esm/samples-dev/redisEnterpriseListSample.d.ts +2 -0
  92. package/dist-esm/samples-dev/redisEnterpriseListSample.d.ts.map +1 -0
  93. package/dist-esm/samples-dev/redisEnterpriseListSample.js +43 -0
  94. package/dist-esm/samples-dev/redisEnterpriseListSample.js.map +1 -0
  95. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.d.ts +2 -0
  96. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.d.ts.map +1 -0
  97. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.js +36 -0
  98. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.js.map +1 -0
  99. package/dist-esm/src/models/index.d.ts +54 -1
  100. package/dist-esm/src/models/index.d.ts.map +1 -1
  101. package/dist-esm/src/models/index.js +9 -0
  102. package/dist-esm/src/models/index.js.map +1 -1
  103. package/dist-esm/src/models/mappers.d.ts +3 -0
  104. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  105. package/dist-esm/src/models/mappers.js +80 -0
  106. package/dist-esm/src/models/mappers.js.map +1 -1
  107. package/dist-esm/src/models/parameters.d.ts +1 -0
  108. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  109. package/dist-esm/src/models/parameters.js +6 -2
  110. package/dist-esm/src/models/parameters.js.map +1 -1
  111. package/dist-esm/src/operations/databases.d.ts +19 -1
  112. package/dist-esm/src/operations/databases.d.ts.map +1 -1
  113. package/dist-esm/src/operations/databases.js +99 -6
  114. package/dist-esm/src/operations/databases.js.map +1 -1
  115. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  116. package/dist-esm/src/operations/privateEndpointConnections.js +3 -1
  117. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  118. package/dist-esm/src/operations/redisEnterprise.d.ts.map +1 -1
  119. package/dist-esm/src/operations/redisEnterprise.js +9 -3
  120. package/dist-esm/src/operations/redisEnterprise.js.map +1 -1
  121. package/dist-esm/src/operationsInterfaces/databases.d.ts +19 -1
  122. package/dist-esm/src/operationsInterfaces/databases.d.ts.map +1 -1
  123. package/dist-esm/src/redisEnterpriseManagementClient.d.ts.map +1 -1
  124. package/dist-esm/src/redisEnterpriseManagementClient.js +4 -3
  125. package/dist-esm/src/redisEnterpriseManagementClient.js.map +1 -1
  126. package/package.json +9 -9
  127. package/review/arm-redisenterprisecache.api.md +44 -0
  128. package/rollup.config.js +6 -72
  129. package/src/models/index.ts +61 -1
  130. package/src/models/mappers.ts +84 -0
  131. package/src/models/parameters.ts +7 -1
  132. package/src/operations/databases.ts +139 -6
  133. package/src/operations/privateEndpointConnections.ts +3 -1
  134. package/src/operations/redisEnterprise.ts +9 -3
  135. package/src/operationsInterfaces/databases.ts +33 -1
  136. package/src/redisEnterpriseManagementClient.ts +4 -3
  137. package/tsconfig.json +18 -5
  138. package/types/arm-redisenterprisecache.d.ts +78 -1
  139. package/types/tsdoc-metadata.json +1 -1
@@ -543,6 +543,55 @@ export const Module: coreClient.CompositeMapper = {
543
543
  }
544
544
  };
545
545
 
546
+ export const DatabasePropertiesGeoReplication: coreClient.CompositeMapper = {
547
+ type: {
548
+ name: "Composite",
549
+ className: "DatabasePropertiesGeoReplication",
550
+ modelProperties: {
551
+ groupNickname: {
552
+ serializedName: "groupNickname",
553
+ type: {
554
+ name: "String"
555
+ }
556
+ },
557
+ linkedDatabases: {
558
+ serializedName: "linkedDatabases",
559
+ type: {
560
+ name: "Sequence",
561
+ element: {
562
+ type: {
563
+ name: "Composite",
564
+ className: "LinkedDatabase"
565
+ }
566
+ }
567
+ }
568
+ }
569
+ }
570
+ }
571
+ };
572
+
573
+ export const LinkedDatabase: coreClient.CompositeMapper = {
574
+ type: {
575
+ name: "Composite",
576
+ className: "LinkedDatabase",
577
+ modelProperties: {
578
+ id: {
579
+ serializedName: "id",
580
+ type: {
581
+ name: "String"
582
+ }
583
+ },
584
+ state: {
585
+ serializedName: "state",
586
+ readOnly: true,
587
+ type: {
588
+ name: "String"
589
+ }
590
+ }
591
+ }
592
+ }
593
+ };
594
+
546
595
  export const DatabaseUpdate: coreClient.CompositeMapper = {
547
596
  type: {
548
597
  name: "Composite",
@@ -604,6 +653,13 @@ export const DatabaseUpdate: coreClient.CompositeMapper = {
604
653
  }
605
654
  }
606
655
  }
656
+ },
657
+ geoReplication: {
658
+ serializedName: "properties.geoReplication",
659
+ type: {
660
+ name: "Composite",
661
+ className: "DatabasePropertiesGeoReplication"
662
+ }
607
663
  }
608
664
  }
609
665
  }
@@ -728,6 +784,27 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = {
728
784
  }
729
785
  };
730
786
 
787
+ export const ForceUnlinkParameters: coreClient.CompositeMapper = {
788
+ type: {
789
+ name: "Composite",
790
+ className: "ForceUnlinkParameters",
791
+ modelProperties: {
792
+ ids: {
793
+ serializedName: "ids",
794
+ required: true,
795
+ type: {
796
+ name: "Sequence",
797
+ element: {
798
+ type: {
799
+ name: "String"
800
+ }
801
+ }
802
+ }
803
+ }
804
+ }
805
+ }
806
+ };
807
+
731
808
  export const PrivateEndpointConnection: coreClient.CompositeMapper = {
732
809
  type: {
733
810
  name: "Composite",
@@ -970,6 +1047,13 @@ export const Database: coreClient.CompositeMapper = {
970
1047
  }
971
1048
  }
972
1049
  }
1050
+ },
1051
+ geoReplication: {
1052
+ serializedName: "properties.geoReplication",
1053
+ type: {
1054
+ name: "Composite",
1055
+ className: "DatabasePropertiesGeoReplication"
1056
+ }
973
1057
  }
974
1058
  }
975
1059
  }
@@ -19,6 +19,7 @@ import {
19
19
  RegenerateKeyParameters as RegenerateKeyParametersMapper,
20
20
  ImportClusterParameters as ImportClusterParametersMapper,
21
21
  ExportClusterParameters as ExportClusterParametersMapper,
22
+ ForceUnlinkParameters as ForceUnlinkParametersMapper,
22
23
  PrivateEndpointConnection as PrivateEndpointConnectionMapper
23
24
  } from "../models/mappers";
24
25
 
@@ -49,7 +50,7 @@ export const $host: OperationURLParameter = {
49
50
  export const apiVersion: OperationQueryParameter = {
50
51
  parameterPath: "apiVersion",
51
52
  mapper: {
52
- defaultValue: "2021-08-01",
53
+ defaultValue: "2022-01-01",
53
54
  isConstant: true,
54
55
  serializedName: "api-version",
55
56
  type: {
@@ -190,6 +191,11 @@ export const parameters6: OperationParameter = {
190
191
  mapper: ExportClusterParametersMapper
191
192
  };
192
193
 
194
+ export const parameters7: OperationParameter = {
195
+ parameterPath: "parameters",
196
+ mapper: ForceUnlinkParametersMapper
197
+ };
198
+
193
199
  export const privateEndpointConnectionName: OperationURLParameter = {
194
200
  parameterPath: "privateEndpointConnectionName",
195
201
  mapper: {
@@ -36,6 +36,8 @@ import {
36
36
  DatabasesImportOptionalParams,
37
37
  ExportClusterParameters,
38
38
  DatabasesExportOptionalParams,
39
+ ForceUnlinkParameters,
40
+ DatabasesForceUnlinkOptionalParams,
39
41
  DatabasesListByClusterNextResponse
40
42
  } from "../models";
41
43
 
@@ -204,11 +206,13 @@ export class DatabasesImpl implements Databases {
204
206
  { resourceGroupName, clusterName, databaseName, parameters, options },
205
207
  createOperationSpec
206
208
  );
207
- return new LroEngine(lro, {
209
+ const poller = new LroEngine(lro, {
208
210
  resumeFrom: options?.resumeFrom,
209
211
  intervalInMs: options?.updateIntervalInMs,
210
212
  lroResourceLocationConfig: "original-uri"
211
213
  });
214
+ await poller.poll();
215
+ return poller;
212
216
  }
213
217
 
214
218
  /**
@@ -300,11 +304,13 @@ export class DatabasesImpl implements Databases {
300
304
  { resourceGroupName, clusterName, databaseName, parameters, options },
301
305
  updateOperationSpec
302
306
  );
303
- return new LroEngine(lro, {
307
+ const poller = new LroEngine(lro, {
304
308
  resumeFrom: options?.resumeFrom,
305
309
  intervalInMs: options?.updateIntervalInMs,
306
310
  lroResourceLocationConfig: "azure-async-operation"
307
311
  });
312
+ await poller.poll();
313
+ return poller;
308
314
  }
309
315
 
310
316
  /**
@@ -408,11 +414,13 @@ export class DatabasesImpl implements Databases {
408
414
  { resourceGroupName, clusterName, databaseName, options },
409
415
  deleteOperationSpec
410
416
  );
411
- return new LroEngine(lro, {
417
+ const poller = new LroEngine(lro, {
412
418
  resumeFrom: options?.resumeFrom,
413
419
  intervalInMs: options?.updateIntervalInMs,
414
420
  lroResourceLocationConfig: "azure-async-operation"
415
421
  });
422
+ await poller.poll();
423
+ return poller;
416
424
  }
417
425
 
418
426
  /**
@@ -520,11 +528,13 @@ export class DatabasesImpl implements Databases {
520
528
  { resourceGroupName, clusterName, databaseName, parameters, options },
521
529
  regenerateKeyOperationSpec
522
530
  );
523
- return new LroEngine(lro, {
531
+ const poller = new LroEngine(lro, {
524
532
  resumeFrom: options?.resumeFrom,
525
533
  intervalInMs: options?.updateIntervalInMs,
526
534
  lroResourceLocationConfig: "azure-async-operation"
527
535
  });
536
+ await poller.poll();
537
+ return poller;
528
538
  }
529
539
 
530
540
  /**
@@ -611,11 +621,13 @@ export class DatabasesImpl implements Databases {
611
621
  { resourceGroupName, clusterName, databaseName, parameters, options },
612
622
  importOperationSpec
613
623
  );
614
- return new LroEngine(lro, {
624
+ const poller = new LroEngine(lro, {
615
625
  resumeFrom: options?.resumeFrom,
616
626
  intervalInMs: options?.updateIntervalInMs,
617
627
  lroResourceLocationConfig: "azure-async-operation"
618
628
  });
629
+ await poller.poll();
630
+ return poller;
619
631
  }
620
632
 
621
633
  /**
@@ -702,11 +714,13 @@ export class DatabasesImpl implements Databases {
702
714
  { resourceGroupName, clusterName, databaseName, parameters, options },
703
715
  exportOperationSpec
704
716
  );
705
- return new LroEngine(lro, {
717
+ const poller = new LroEngine(lro, {
706
718
  resumeFrom: options?.resumeFrom,
707
719
  intervalInMs: options?.updateIntervalInMs,
708
720
  lroResourceLocationConfig: "azure-async-operation"
709
721
  });
722
+ await poller.poll();
723
+ return poller;
710
724
  }
711
725
 
712
726
  /**
@@ -734,6 +748,99 @@ export class DatabasesImpl implements Databases {
734
748
  return poller.pollUntilDone();
735
749
  }
736
750
 
751
+ /**
752
+ * Forcibly removes the link to the specified database resource.
753
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
754
+ * @param clusterName The name of the RedisEnterprise cluster.
755
+ * @param databaseName The name of the database.
756
+ * @param parameters Information identifying the database to be unlinked.
757
+ * @param options The options parameters.
758
+ */
759
+ async beginForceUnlink(
760
+ resourceGroupName: string,
761
+ clusterName: string,
762
+ databaseName: string,
763
+ parameters: ForceUnlinkParameters,
764
+ options?: DatabasesForceUnlinkOptionalParams
765
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
766
+ const directSendOperation = async (
767
+ args: coreClient.OperationArguments,
768
+ spec: coreClient.OperationSpec
769
+ ): Promise<void> => {
770
+ return this.client.sendOperationRequest(args, spec);
771
+ };
772
+ const sendOperation = async (
773
+ args: coreClient.OperationArguments,
774
+ spec: coreClient.OperationSpec
775
+ ) => {
776
+ let currentRawResponse:
777
+ | coreClient.FullOperationResponse
778
+ | undefined = undefined;
779
+ const providedCallback = args.options?.onResponse;
780
+ const callback: coreClient.RawResponseCallback = (
781
+ rawResponse: coreClient.FullOperationResponse,
782
+ flatResponse: unknown
783
+ ) => {
784
+ currentRawResponse = rawResponse;
785
+ providedCallback?.(rawResponse, flatResponse);
786
+ };
787
+ const updatedArgs = {
788
+ ...args,
789
+ options: {
790
+ ...args.options,
791
+ onResponse: callback
792
+ }
793
+ };
794
+ const flatResponse = await directSendOperation(updatedArgs, spec);
795
+ return {
796
+ flatResponse,
797
+ rawResponse: {
798
+ statusCode: currentRawResponse!.status,
799
+ body: currentRawResponse!.parsedBody,
800
+ headers: currentRawResponse!.headers.toJSON()
801
+ }
802
+ };
803
+ };
804
+
805
+ const lro = new LroImpl(
806
+ sendOperation,
807
+ { resourceGroupName, clusterName, databaseName, parameters, options },
808
+ forceUnlinkOperationSpec
809
+ );
810
+ const poller = new LroEngine(lro, {
811
+ resumeFrom: options?.resumeFrom,
812
+ intervalInMs: options?.updateIntervalInMs,
813
+ lroResourceLocationConfig: "azure-async-operation"
814
+ });
815
+ await poller.poll();
816
+ return poller;
817
+ }
818
+
819
+ /**
820
+ * Forcibly removes the link to the specified database resource.
821
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
822
+ * @param clusterName The name of the RedisEnterprise cluster.
823
+ * @param databaseName The name of the database.
824
+ * @param parameters Information identifying the database to be unlinked.
825
+ * @param options The options parameters.
826
+ */
827
+ async beginForceUnlinkAndWait(
828
+ resourceGroupName: string,
829
+ clusterName: string,
830
+ databaseName: string,
831
+ parameters: ForceUnlinkParameters,
832
+ options?: DatabasesForceUnlinkOptionalParams
833
+ ): Promise<void> {
834
+ const poller = await this.beginForceUnlink(
835
+ resourceGroupName,
836
+ clusterName,
837
+ databaseName,
838
+ parameters,
839
+ options
840
+ );
841
+ return poller.pollUntilDone();
842
+ }
843
+
737
844
  /**
738
845
  * ListByClusterNext
739
846
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -1002,6 +1109,32 @@ const exportOperationSpec: coreClient.OperationSpec = {
1002
1109
  mediaType: "json",
1003
1110
  serializer
1004
1111
  };
1112
+ const forceUnlinkOperationSpec: coreClient.OperationSpec = {
1113
+ path:
1114
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/forceUnlink",
1115
+ httpMethod: "POST",
1116
+ responses: {
1117
+ 200: {},
1118
+ 201: {},
1119
+ 202: {},
1120
+ 204: {},
1121
+ default: {
1122
+ bodyMapper: Mappers.ErrorResponse
1123
+ }
1124
+ },
1125
+ requestBody: Parameters.parameters7,
1126
+ queryParameters: [Parameters.apiVersion],
1127
+ urlParameters: [
1128
+ Parameters.$host,
1129
+ Parameters.subscriptionId,
1130
+ Parameters.resourceGroupName,
1131
+ Parameters.clusterName,
1132
+ Parameters.databaseName
1133
+ ],
1134
+ headerParameters: [Parameters.accept, Parameters.contentType],
1135
+ mediaType: "json",
1136
+ serializer
1137
+ };
1005
1138
  const listByClusterNextOperationSpec: coreClient.OperationSpec = {
1006
1139
  path: "{nextLink}",
1007
1140
  httpMethod: "GET",
@@ -201,10 +201,12 @@ export class PrivateEndpointConnectionsImpl
201
201
  },
202
202
  putOperationSpec
203
203
  );
204
- return new LroEngine(lro, {
204
+ const poller = new LroEngine(lro, {
205
205
  resumeFrom: options?.resumeFrom,
206
206
  intervalInMs: options?.updateIntervalInMs
207
207
  });
208
+ await poller.poll();
209
+ return poller;
208
210
  }
209
211
 
210
212
  /**
@@ -204,11 +204,13 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
204
204
  { resourceGroupName, clusterName, parameters, options },
205
205
  createOperationSpec
206
206
  );
207
- return new LroEngine(lro, {
207
+ const poller = new LroEngine(lro, {
208
208
  resumeFrom: options?.resumeFrom,
209
209
  intervalInMs: options?.updateIntervalInMs,
210
210
  lroResourceLocationConfig: "original-uri"
211
211
  });
212
+ await poller.poll();
213
+ return poller;
212
214
  }
213
215
 
214
216
  /**
@@ -295,11 +297,13 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
295
297
  { resourceGroupName, clusterName, parameters, options },
296
298
  updateOperationSpec
297
299
  );
298
- return new LroEngine(lro, {
300
+ const poller = new LroEngine(lro, {
299
301
  resumeFrom: options?.resumeFrom,
300
302
  intervalInMs: options?.updateIntervalInMs,
301
303
  lroResourceLocationConfig: "azure-async-operation"
302
304
  });
305
+ await poller.poll();
306
+ return poller;
303
307
  }
304
308
 
305
309
  /**
@@ -379,11 +383,13 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
379
383
  { resourceGroupName, clusterName, options },
380
384
  deleteOperationSpec
381
385
  );
382
- return new LroEngine(lro, {
386
+ const poller = new LroEngine(lro, {
383
387
  resumeFrom: options?.resumeFrom,
384
388
  intervalInMs: options?.updateIntervalInMs,
385
389
  lroResourceLocationConfig: "azure-async-operation"
386
390
  });
391
+ await poller.poll();
392
+ return poller;
387
393
  }
388
394
 
389
395
  /**
@@ -27,7 +27,9 @@ import {
27
27
  ImportClusterParameters,
28
28
  DatabasesImportOptionalParams,
29
29
  ExportClusterParameters,
30
- DatabasesExportOptionalParams
30
+ DatabasesExportOptionalParams,
31
+ ForceUnlinkParameters,
32
+ DatabasesForceUnlinkOptionalParams
31
33
  } from "../models";
32
34
 
33
35
  /// <reference lib="esnext.asynciterable" />
@@ -261,4 +263,34 @@ export interface Databases {
261
263
  parameters: ExportClusterParameters,
262
264
  options?: DatabasesExportOptionalParams
263
265
  ): Promise<void>;
266
+ /**
267
+ * Forcibly removes the link to the specified database resource.
268
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
269
+ * @param clusterName The name of the RedisEnterprise cluster.
270
+ * @param databaseName The name of the database.
271
+ * @param parameters Information identifying the database to be unlinked.
272
+ * @param options The options parameters.
273
+ */
274
+ beginForceUnlink(
275
+ resourceGroupName: string,
276
+ clusterName: string,
277
+ databaseName: string,
278
+ parameters: ForceUnlinkParameters,
279
+ options?: DatabasesForceUnlinkOptionalParams
280
+ ): Promise<PollerLike<PollOperationState<void>, void>>;
281
+ /**
282
+ * Forcibly removes the link to the specified database resource.
283
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
284
+ * @param clusterName The name of the RedisEnterprise cluster.
285
+ * @param databaseName The name of the database.
286
+ * @param parameters Information identifying the database to be unlinked.
287
+ * @param options The options parameters.
288
+ */
289
+ beginForceUnlinkAndWait(
290
+ resourceGroupName: string,
291
+ clusterName: string,
292
+ databaseName: string,
293
+ parameters: ForceUnlinkParameters,
294
+ options?: DatabasesForceUnlinkOptionalParams
295
+ ): Promise<void>;
264
296
  }
@@ -58,7 +58,7 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient {
58
58
  credential: credentials
59
59
  };
60
60
 
61
- const packageDetails = `azsdk-js-arm-redisenterprisecache/2.0.0`;
61
+ const packageDetails = `azsdk-js-arm-redisenterprisecache/2.1.0`;
62
62
  const userAgentPrefix =
63
63
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
64
64
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -73,7 +73,8 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient {
73
73
  userAgentOptions: {
74
74
  userAgentPrefix
75
75
  },
76
- baseUri: options.endpoint || "https://management.azure.com"
76
+ baseUri:
77
+ options.endpoint ?? options.baseUri ?? "https://management.azure.com"
77
78
  };
78
79
  super(optionsWithDefaults);
79
80
  // Parameter assignments
@@ -81,7 +82,7 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient {
81
82
 
82
83
  // Assigning values to Constant parameters
83
84
  this.$host = options.$host || "https://management.azure.com";
84
- this.apiVersion = options.apiVersion || "2021-08-01";
85
+ this.apiVersion = options.apiVersion || "2022-01-01";
85
86
  this.operations = new OperationsImpl(this);
86
87
  this.operationsStatus = new OperationsStatusImpl(this);
87
88
  this.redisEnterprise = new RedisEnterpriseImpl(this);
package/tsconfig.json CHANGED
@@ -9,12 +9,25 @@
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6", "dom"],
12
+ "lib": [
13
+ "es6",
14
+ "dom"
15
+ ],
13
16
  "declaration": true,
14
17
  "outDir": "./dist-esm",
15
18
  "importHelpers": true,
16
- "paths": { "@azure/arm-redisenterprisecache": ["./src/index"] }
19
+ "paths": {
20
+ "@azure/arm-redisenterprisecache": [
21
+ "./src/index"
22
+ ]
23
+ }
17
24
  },
18
- "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"],
19
- "exclude": ["node_modules"]
20
- }
25
+ "include": [
26
+ "./src/**/*.ts",
27
+ "./test/**/*.ts",
28
+ "samples-dev/**/*.ts"
29
+ ],
30
+ "exclude": [
31
+ "node_modules"
32
+ ]
33
+ }
@@ -157,6 +157,8 @@ export declare type Database = ProxyResource & {
157
157
  persistence?: Persistence;
158
158
  /** Optional set of redis modules to enable in this database - modules can only be added at creation time. */
159
159
  modules?: Module[];
160
+ /** Optional set of properties to configure geo replication for this database. */
161
+ geoReplication?: DatabasePropertiesGeoReplication;
160
162
  };
161
163
 
162
164
  /** The response of a list-all operation. */
@@ -170,6 +172,14 @@ export declare interface DatabaseList {
170
172
  readonly nextLink?: string;
171
173
  }
172
174
 
175
+ /** Optional set of properties to configure geo replication for this database. */
176
+ export declare interface DatabasePropertiesGeoReplication {
177
+ /** Name for the group of linked database resources */
178
+ groupNickname?: string;
179
+ /** List of database resources to link with this database */
180
+ linkedDatabases?: LinkedDatabase[];
181
+ }
182
+
173
183
  /** Interface representing a Databases. */
174
184
  export declare interface Databases {
175
185
  /**
@@ -301,6 +311,24 @@ export declare interface Databases {
301
311
  * @param options The options parameters.
302
312
  */
303
313
  beginExportAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ExportClusterParameters, options?: DatabasesExportOptionalParams): Promise<void>;
314
+ /**
315
+ * Forcibly removes the link to the specified database resource.
316
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
317
+ * @param clusterName The name of the RedisEnterprise cluster.
318
+ * @param databaseName The name of the database.
319
+ * @param parameters Information identifying the database to be unlinked.
320
+ * @param options The options parameters.
321
+ */
322
+ beginForceUnlink(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ForceUnlinkParameters, options?: DatabasesForceUnlinkOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
323
+ /**
324
+ * Forcibly removes the link to the specified database resource.
325
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
326
+ * @param clusterName The name of the RedisEnterprise cluster.
327
+ * @param databaseName The name of the database.
328
+ * @param parameters Information identifying the database to be unlinked.
329
+ * @param options The options parameters.
330
+ */
331
+ beginForceUnlinkAndWait(resourceGroupName: string, clusterName: string, databaseName: string, parameters: ForceUnlinkParameters, options?: DatabasesForceUnlinkOptionalParams): Promise<void>;
304
332
  }
305
333
 
306
334
  /** Optional parameters. */
@@ -330,6 +358,14 @@ export declare interface DatabasesExportOptionalParams extends coreClient.Operat
330
358
  resumeFrom?: string;
331
359
  }
332
360
 
361
+ /** Optional parameters. */
362
+ export declare interface DatabasesForceUnlinkOptionalParams extends coreClient.OperationOptions {
363
+ /** Delay to wait until next poll, in milliseconds. */
364
+ updateIntervalInMs?: number;
365
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
366
+ resumeFrom?: string;
367
+ }
368
+
333
369
  /** Optional parameters. */
334
370
  export declare interface DatabasesGetOptionalParams extends coreClient.OperationOptions {
335
371
  }
@@ -412,6 +448,8 @@ export declare interface DatabaseUpdate {
412
448
  persistence?: Persistence;
413
449
  /** Optional set of redis modules to enable in this database - modules can only be added at creation time. */
414
450
  modules?: Module[];
451
+ /** Optional set of properties to configure geo replication for this database. */
452
+ geoReplication?: DatabasePropertiesGeoReplication;
415
453
  }
416
454
 
417
455
  /** The resource management error additional info. */
@@ -485,6 +523,12 @@ export declare interface ExportClusterParameters {
485
523
  sasUri: string;
486
524
  }
487
525
 
526
+ /** Parameters for a Redis Enterprise Active Geo Replication Force Unlink operation. */
527
+ export declare interface ForceUnlinkParameters {
528
+ /** The resource IDs of the database resources to be unlinked. */
529
+ ids: string[];
530
+ }
531
+
488
532
  /** Parameters for a Redis Enterprise import operation. */
489
533
  export declare interface ImportClusterParameters {
490
534
  /** SAS URIs for the target blobs to import from */
@@ -520,6 +564,15 @@ export declare enum KnownEvictionPolicy {
520
564
  NoEviction = "NoEviction"
521
565
  }
522
566
 
567
+ /** Known values of {@link LinkState} that the service accepts. */
568
+ export declare enum KnownLinkState {
569
+ Linked = "Linked",
570
+ Linking = "Linking",
571
+ Unlinking = "Unlinking",
572
+ LinkFailed = "LinkFailed",
573
+ UnlinkFailed = "UnlinkFailed"
574
+ }
575
+
523
576
  /** Known values of {@link Origin} that the service accepts. */
524
577
  export declare enum KnownOrigin {
525
578
  User = "user",
@@ -599,11 +652,35 @@ export declare enum KnownTlsVersion {
599
652
  One2 = "1.2"
600
653
  }
601
654
 
655
+ /** Specifies details of a linked database resource. */
656
+ export declare interface LinkedDatabase {
657
+ /** Resource ID of a database resource to link with this database. */
658
+ id?: string;
659
+ /**
660
+ * State of the link between the database resources.
661
+ * NOTE: This property will not be serialized. It can only be populated by the server.
662
+ */
663
+ readonly state?: LinkState;
664
+ }
665
+
666
+ /**
667
+ * Defines values for LinkState. \
668
+ * {@link KnownLinkState} can be used interchangeably with LinkState,
669
+ * this enum contains the known values that the service supports.
670
+ * ### Known values supported by the service
671
+ * **Linked** \
672
+ * **Linking** \
673
+ * **Unlinking** \
674
+ * **LinkFailed** \
675
+ * **UnlinkFailed**
676
+ */
677
+ export declare type LinkState = string;
678
+
602
679
  /** Specifies configuration of a redis module */
603
680
  export declare interface Module {
604
681
  /** The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries' */
605
682
  name: string;
606
- /** Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'. */
683
+ /** Configuration options for the module, e.g. 'ERROR_RATE 0.01 INITIAL_SIZE 400'. */
607
684
  args?: string;
608
685
  /**
609
686
  * The version of the module, e.g. '1.0'.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.20.0"
8
+ "packageVersion": "7.22.1"
9
9
  }
10
10
  ]
11
11
  }