@azure/arm-redisenterprisecache 2.0.0 → 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 +25 -13
  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
@@ -256,7 +256,7 @@ export interface Persistence {
256
256
  export interface Module {
257
257
  /** The name of the module, e.g. 'RedisBloom', 'RediSearch', 'RedisTimeSeries' */
258
258
  name: string;
259
- /** Configuration options for the module, e.g. 'ERROR_RATE 0.00 INITIAL_SIZE 400'. */
259
+ /** Configuration options for the module, e.g. 'ERROR_RATE 0.01 INITIAL_SIZE 400'. */
260
260
  args?: string;
261
261
  /**
262
262
  * The version of the module, e.g. '1.0'.
@@ -265,6 +265,25 @@ export interface Module {
265
265
  readonly version?: string;
266
266
  }
267
267
 
268
+ /** Optional set of properties to configure geo replication for this database. */
269
+ export interface DatabasePropertiesGeoReplication {
270
+ /** Name for the group of linked database resources */
271
+ groupNickname?: string;
272
+ /** List of database resources to link with this database */
273
+ linkedDatabases?: LinkedDatabase[];
274
+ }
275
+
276
+ /** Specifies details of a linked database resource. */
277
+ export interface LinkedDatabase {
278
+ /** Resource ID of a database resource to link with this database. */
279
+ id?: string;
280
+ /**
281
+ * State of the link between the database resources.
282
+ * NOTE: This property will not be serialized. It can only be populated by the server.
283
+ */
284
+ readonly state?: LinkState;
285
+ }
286
+
268
287
  /** A partial update to the RedisEnterprise database */
269
288
  export interface DatabaseUpdate {
270
289
  /** Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. */
@@ -289,6 +308,8 @@ export interface DatabaseUpdate {
289
308
  persistence?: Persistence;
290
309
  /** Optional set of redis modules to enable in this database - modules can only be added at creation time. */
291
310
  modules?: Module[];
311
+ /** Optional set of properties to configure geo replication for this database. */
312
+ geoReplication?: DatabasePropertiesGeoReplication;
292
313
  }
293
314
 
294
315
  /** The secret access keys used for authenticating connections to redis */
@@ -335,6 +356,12 @@ export interface PrivateLinkResourceListResult {
335
356
  value?: PrivateLinkResource[];
336
357
  }
337
358
 
359
+ /** Parameters for a Redis Enterprise Active Geo Replication Force Unlink operation. */
360
+ export interface ForceUnlinkParameters {
361
+ /** The resource IDs of the database resources to be unlinked. */
362
+ ids: string[];
363
+ }
364
+
338
365
  /** The Private Endpoint Connection resource. */
339
366
  export type PrivateEndpointConnection = Resource & {
340
367
  /** The resource of private end point. */
@@ -434,6 +461,8 @@ export type Database = ProxyResource & {
434
461
  persistence?: Persistence;
435
462
  /** Optional set of redis modules to enable in this database - modules can only be added at creation time. */
436
463
  modules?: Module[];
464
+ /** Optional set of properties to configure geo replication for this database. */
465
+ geoReplication?: DatabasePropertiesGeoReplication;
437
466
  };
438
467
 
439
468
  /** Known values of {@link Origin} that the service accepts. */
@@ -703,6 +732,28 @@ export enum KnownRdbFrequency {
703
732
  * **12h**
704
733
  */
705
734
  export type RdbFrequency = string;
735
+
736
+ /** Known values of {@link LinkState} that the service accepts. */
737
+ export enum KnownLinkState {
738
+ Linked = "Linked",
739
+ Linking = "Linking",
740
+ Unlinking = "Unlinking",
741
+ LinkFailed = "LinkFailed",
742
+ UnlinkFailed = "UnlinkFailed"
743
+ }
744
+
745
+ /**
746
+ * Defines values for LinkState. \
747
+ * {@link KnownLinkState} can be used interchangeably with LinkState,
748
+ * this enum contains the known values that the service supports.
749
+ * ### Known values supported by the service
750
+ * **Linked** \
751
+ * **Linking** \
752
+ * **Unlinking** \
753
+ * **LinkFailed** \
754
+ * **UnlinkFailed**
755
+ */
756
+ export type LinkState = string;
706
757
  /** Defines values for AccessKeyType. */
707
758
  export type AccessKeyType = "Primary" | "Secondary";
708
759
 
@@ -879,6 +930,15 @@ export interface DatabasesExportOptionalParams
879
930
  resumeFrom?: string;
880
931
  }
881
932
 
933
+ /** Optional parameters. */
934
+ export interface DatabasesForceUnlinkOptionalParams
935
+ extends coreClient.OperationOptions {
936
+ /** Delay to wait until next poll, in milliseconds. */
937
+ updateIntervalInMs?: number;
938
+ /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
939
+ resumeFrom?: string;
940
+ }
941
+
882
942
  /** Optional parameters. */
883
943
  export interface DatabasesListByClusterNextOptionalParams
884
944
  extends coreClient.OperationOptions {}
@@ -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
+ }