@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
@@ -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
  Cluster,
20
24
  RedisEnterpriseListByResourceGroupNextOptionalParams,
@@ -184,8 +188,8 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
184
188
  parameters: Cluster,
185
189
  options?: RedisEnterpriseCreateOptionalParams
186
190
  ): Promise<
187
- PollerLike<
188
- PollOperationState<RedisEnterpriseCreateResponse>,
191
+ SimplePollerLike<
192
+ OperationState<RedisEnterpriseCreateResponse>,
189
193
  RedisEnterpriseCreateResponse
190
194
  >
191
195
  > {
@@ -195,7 +199,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
195
199
  ): Promise<RedisEnterpriseCreateResponse> => {
196
200
  return this.client.sendOperationRequest(args, spec);
197
201
  };
198
- const sendOperation = async (
202
+ const sendOperationFn = async (
199
203
  args: coreClient.OperationArguments,
200
204
  spec: coreClient.OperationSpec
201
205
  ) => {
@@ -228,15 +232,18 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
228
232
  };
229
233
  };
230
234
 
231
- const lro = new LroImpl(
232
- sendOperation,
233
- { resourceGroupName, clusterName, parameters, options },
234
- createOperationSpec
235
- );
236
- const poller = new LroEngine(lro, {
237
- resumeFrom: options?.resumeFrom,
235
+ const lro = createLroSpec({
236
+ sendOperationFn,
237
+ args: { resourceGroupName, clusterName, parameters, options },
238
+ spec: createOperationSpec
239
+ });
240
+ const poller = await createHttpPoller<
241
+ RedisEnterpriseCreateResponse,
242
+ OperationState<RedisEnterpriseCreateResponse>
243
+ >(lro, {
244
+ restoreFrom: options?.resumeFrom,
238
245
  intervalInMs: options?.updateIntervalInMs,
239
- lroResourceLocationConfig: "original-uri"
246
+ resourceLocationConfig: "original-uri"
240
247
  });
241
248
  await poller.poll();
242
249
  return poller;
@@ -277,8 +284,8 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
277
284
  parameters: ClusterUpdate,
278
285
  options?: RedisEnterpriseUpdateOptionalParams
279
286
  ): Promise<
280
- PollerLike<
281
- PollOperationState<RedisEnterpriseUpdateResponse>,
287
+ SimplePollerLike<
288
+ OperationState<RedisEnterpriseUpdateResponse>,
282
289
  RedisEnterpriseUpdateResponse
283
290
  >
284
291
  > {
@@ -288,7 +295,7 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
288
295
  ): Promise<RedisEnterpriseUpdateResponse> => {
289
296
  return this.client.sendOperationRequest(args, spec);
290
297
  };
291
- const sendOperation = async (
298
+ const sendOperationFn = async (
292
299
  args: coreClient.OperationArguments,
293
300
  spec: coreClient.OperationSpec
294
301
  ) => {
@@ -321,15 +328,18 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
321
328
  };
322
329
  };
323
330
 
324
- const lro = new LroImpl(
325
- sendOperation,
326
- { resourceGroupName, clusterName, parameters, options },
327
- updateOperationSpec
328
- );
329
- const poller = new LroEngine(lro, {
330
- resumeFrom: options?.resumeFrom,
331
+ const lro = createLroSpec({
332
+ sendOperationFn,
333
+ args: { resourceGroupName, clusterName, parameters, options },
334
+ spec: updateOperationSpec
335
+ });
336
+ const poller = await createHttpPoller<
337
+ RedisEnterpriseUpdateResponse,
338
+ OperationState<RedisEnterpriseUpdateResponse>
339
+ >(lro, {
340
+ restoreFrom: options?.resumeFrom,
331
341
  intervalInMs: options?.updateIntervalInMs,
332
- lroResourceLocationConfig: "azure-async-operation"
342
+ resourceLocationConfig: "azure-async-operation"
333
343
  });
334
344
  await poller.poll();
335
345
  return poller;
@@ -367,14 +377,14 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
367
377
  resourceGroupName: string,
368
378
  clusterName: string,
369
379
  options?: RedisEnterpriseDeleteOptionalParams
370
- ): Promise<PollerLike<PollOperationState<void>, void>> {
380
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
371
381
  const directSendOperation = async (
372
382
  args: coreClient.OperationArguments,
373
383
  spec: coreClient.OperationSpec
374
384
  ): Promise<void> => {
375
385
  return this.client.sendOperationRequest(args, spec);
376
386
  };
377
- const sendOperation = async (
387
+ const sendOperationFn = async (
378
388
  args: coreClient.OperationArguments,
379
389
  spec: coreClient.OperationSpec
380
390
  ) => {
@@ -407,15 +417,15 @@ export class RedisEnterpriseImpl implements RedisEnterprise {
407
417
  };
408
418
  };
409
419
 
410
- const lro = new LroImpl(
411
- sendOperation,
412
- { resourceGroupName, clusterName, options },
413
- deleteOperationSpec
414
- );
415
- const poller = new LroEngine(lro, {
416
- resumeFrom: options?.resumeFrom,
420
+ const lro = createLroSpec({
421
+ sendOperationFn,
422
+ args: { resourceGroupName, clusterName, options },
423
+ spec: deleteOperationSpec
424
+ });
425
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
426
+ restoreFrom: options?.resumeFrom,
417
427
  intervalInMs: options?.updateIntervalInMs,
418
- lroResourceLocationConfig: "azure-async-operation"
428
+ resourceLocationConfig: "azure-async-operation"
419
429
  });
420
430
  await poller.poll();
421
431
  return poller;
@@ -0,0 +1,117 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { Skus } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { RedisEnterpriseManagementClient } from "../redisEnterpriseManagementClient";
15
+ import {
16
+ RegionSkuDetail,
17
+ SkusListOptionalParams,
18
+ SkusListResponse
19
+ } from "../models";
20
+
21
+ /// <reference lib="esnext.asynciterable" />
22
+ /** Class containing Skus operations. */
23
+ export class SkusImpl implements Skus {
24
+ private readonly client: RedisEnterpriseManagementClient;
25
+
26
+ /**
27
+ * Initialize a new instance of the class Skus class.
28
+ * @param client Reference to the service client
29
+ */
30
+ constructor(client: RedisEnterpriseManagementClient) {
31
+ this.client = client;
32
+ }
33
+
34
+ /**
35
+ * Gets information about skus in specified location for the given subscription id
36
+ * @param location The name of Azure region.
37
+ * @param options The options parameters.
38
+ */
39
+ public list(
40
+ location: string,
41
+ options?: SkusListOptionalParams
42
+ ): PagedAsyncIterableIterator<RegionSkuDetail> {
43
+ const iter = this.listPagingAll(location, options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
50
+ },
51
+ byPage: (settings?: PageSettings) => {
52
+ if (settings?.maxPageSize) {
53
+ throw new Error("maxPageSize is not supported by this operation.");
54
+ }
55
+ return this.listPagingPage(location, options, settings);
56
+ }
57
+ };
58
+ }
59
+
60
+ private async *listPagingPage(
61
+ location: string,
62
+ options?: SkusListOptionalParams,
63
+ _settings?: PageSettings
64
+ ): AsyncIterableIterator<RegionSkuDetail[]> {
65
+ let result: SkusListResponse;
66
+ result = await this._list(location, options);
67
+ yield result.value || [];
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ location: string,
72
+ options?: SkusListOptionalParams
73
+ ): AsyncIterableIterator<RegionSkuDetail> {
74
+ for await (const page of this.listPagingPage(location, options)) {
75
+ yield* page;
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Gets information about skus in specified location for the given subscription id
81
+ * @param location The name of Azure region.
82
+ * @param options The options parameters.
83
+ */
84
+ private _list(
85
+ location: string,
86
+ options?: SkusListOptionalParams
87
+ ): Promise<SkusListResponse> {
88
+ return this.client.sendOperationRequest(
89
+ { location, options },
90
+ listOperationSpec
91
+ );
92
+ }
93
+ }
94
+ // Operation Specifications
95
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
96
+
97
+ const listOperationSpec: coreClient.OperationSpec = {
98
+ path:
99
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/skus",
100
+ httpMethod: "GET",
101
+ responses: {
102
+ 200: {
103
+ bodyMapper: Mappers.RegionSkuDetails
104
+ },
105
+ default: {
106
+ bodyMapper: Mappers.ErrorResponse
107
+ }
108
+ },
109
+ queryParameters: [Parameters.apiVersion],
110
+ urlParameters: [
111
+ Parameters.$host,
112
+ Parameters.location,
113
+ Parameters.subscriptionId
114
+ ],
115
+ headerParameters: [Parameters.accept],
116
+ serializer
117
+ };
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  Database,
13
13
  DatabasesListByClusterOptionalParams,
@@ -29,7 +29,9 @@ import {
29
29
  ExportClusterParameters,
30
30
  DatabasesExportOptionalParams,
31
31
  ForceUnlinkParameters,
32
- DatabasesForceUnlinkOptionalParams
32
+ DatabasesForceUnlinkOptionalParams,
33
+ FlushParameters,
34
+ DatabasesFlushOptionalParams
33
35
  } from "../models";
34
36
 
35
37
  /// <reference lib="esnext.asynciterable" />
@@ -61,8 +63,8 @@ export interface Databases {
61
63
  parameters: Database,
62
64
  options?: DatabasesCreateOptionalParams
63
65
  ): Promise<
64
- PollerLike<
65
- PollOperationState<DatabasesCreateResponse>,
66
+ SimplePollerLike<
67
+ OperationState<DatabasesCreateResponse>,
66
68
  DatabasesCreateResponse
67
69
  >
68
70
  >;
@@ -96,8 +98,8 @@ export interface Databases {
96
98
  parameters: DatabaseUpdate,
97
99
  options?: DatabasesUpdateOptionalParams
98
100
  ): Promise<
99
- PollerLike<
100
- PollOperationState<DatabasesUpdateResponse>,
101
+ SimplePollerLike<
102
+ OperationState<DatabasesUpdateResponse>,
101
103
  DatabasesUpdateResponse
102
104
  >
103
105
  >;
@@ -141,7 +143,7 @@ export interface Databases {
141
143
  clusterName: string,
142
144
  databaseName: string,
143
145
  options?: DatabasesDeleteOptionalParams
144
- ): Promise<PollerLike<PollOperationState<void>, void>>;
146
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
145
147
  /**
146
148
  * Deletes a single database
147
149
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -183,8 +185,8 @@ export interface Databases {
183
185
  parameters: RegenerateKeyParameters,
184
186
  options?: DatabasesRegenerateKeyOptionalParams
185
187
  ): Promise<
186
- PollerLike<
187
- PollOperationState<DatabasesRegenerateKeyResponse>,
188
+ SimplePollerLike<
189
+ OperationState<DatabasesRegenerateKeyResponse>,
188
190
  DatabasesRegenerateKeyResponse
189
191
  >
190
192
  >;
@@ -217,7 +219,7 @@ export interface Databases {
217
219
  databaseName: string,
218
220
  parameters: ImportClusterParameters,
219
221
  options?: DatabasesImportOptionalParams
220
- ): Promise<PollerLike<PollOperationState<void>, void>>;
222
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
221
223
  /**
222
224
  * Imports database files to target database.
223
225
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -247,7 +249,7 @@ export interface Databases {
247
249
  databaseName: string,
248
250
  parameters: ExportClusterParameters,
249
251
  options?: DatabasesExportOptionalParams
250
- ): Promise<PollerLike<PollOperationState<void>, void>>;
252
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
251
253
  /**
252
254
  * Exports a database file from target database.
253
255
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -277,7 +279,7 @@ export interface Databases {
277
279
  databaseName: string,
278
280
  parameters: ForceUnlinkParameters,
279
281
  options?: DatabasesForceUnlinkOptionalParams
280
- ): Promise<PollerLike<PollOperationState<void>, void>>;
282
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
281
283
  /**
282
284
  * Forcibly removes the link to the specified database resource.
283
285
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -293,4 +295,34 @@ export interface Databases {
293
295
  parameters: ForceUnlinkParameters,
294
296
  options?: DatabasesForceUnlinkOptionalParams
295
297
  ): Promise<void>;
298
+ /**
299
+ * Flushes all the keys in this database and also from its linked databases.
300
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
301
+ * @param clusterName The name of the RedisEnterprise cluster.
302
+ * @param databaseName The name of the database.
303
+ * @param parameters Information identifying the databases to be flushed
304
+ * @param options The options parameters.
305
+ */
306
+ beginFlush(
307
+ resourceGroupName: string,
308
+ clusterName: string,
309
+ databaseName: string,
310
+ parameters: FlushParameters,
311
+ options?: DatabasesFlushOptionalParams
312
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
313
+ /**
314
+ * Flushes all the keys in this database and also from its linked databases.
315
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
316
+ * @param clusterName The name of the RedisEnterprise cluster.
317
+ * @param databaseName The name of the database.
318
+ * @param parameters Information identifying the databases to be flushed
319
+ * @param options The options parameters.
320
+ */
321
+ beginFlushAndWait(
322
+ resourceGroupName: string,
323
+ clusterName: string,
324
+ databaseName: string,
325
+ parameters: FlushParameters,
326
+ options?: DatabasesFlushOptionalParams
327
+ ): Promise<void>;
296
328
  }
@@ -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";
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  PrivateEndpointConnection,
13
13
  PrivateEndpointConnectionsListOptionalParams,
@@ -63,8 +63,8 @@ export interface PrivateEndpointConnections {
63
63
  properties: PrivateEndpointConnection,
64
64
  options?: PrivateEndpointConnectionsPutOptionalParams
65
65
  ): Promise<
66
- PollerLike<
67
- PollOperationState<PrivateEndpointConnectionsPutResponse>,
66
+ SimplePollerLike<
67
+ OperationState<PrivateEndpointConnectionsPutResponse>,
68
68
  PrivateEndpointConnectionsPutResponse
69
69
  >
70
70
  >;
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  Cluster,
13
13
  RedisEnterpriseListByResourceGroupOptionalParams,
@@ -54,8 +54,8 @@ export interface RedisEnterprise {
54
54
  parameters: Cluster,
55
55
  options?: RedisEnterpriseCreateOptionalParams
56
56
  ): Promise<
57
- PollerLike<
58
- PollOperationState<RedisEnterpriseCreateResponse>,
57
+ SimplePollerLike<
58
+ OperationState<RedisEnterpriseCreateResponse>,
59
59
  RedisEnterpriseCreateResponse
60
60
  >
61
61
  >;
@@ -85,8 +85,8 @@ export interface RedisEnterprise {
85
85
  parameters: ClusterUpdate,
86
86
  options?: RedisEnterpriseUpdateOptionalParams
87
87
  ): Promise<
88
- PollerLike<
89
- PollOperationState<RedisEnterpriseUpdateResponse>,
88
+ SimplePollerLike<
89
+ OperationState<RedisEnterpriseUpdateResponse>,
90
90
  RedisEnterpriseUpdateResponse
91
91
  >
92
92
  >;
@@ -113,7 +113,7 @@ export interface RedisEnterprise {
113
113
  resourceGroupName: string,
114
114
  clusterName: string,
115
115
  options?: RedisEnterpriseDeleteOptionalParams
116
- ): Promise<PollerLike<PollOperationState<void>, void>>;
116
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
117
117
  /**
118
118
  * Deletes a RedisEnterprise cache cluster.
119
119
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { RegionSkuDetail, SkusListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Skus. */
14
+ export interface Skus {
15
+ /**
16
+ * Gets information about skus in specified location for the given subscription id
17
+ * @param location The name of Azure region.
18
+ * @param options The options parameters.
19
+ */
20
+ list(
21
+ location: string,
22
+ options?: SkusListOptionalParams
23
+ ): PagedAsyncIterableIterator<RegionSkuDetail>;
24
+ }
@@ -20,7 +20,8 @@ import {
20
20
  RedisEnterpriseImpl,
21
21
  DatabasesImpl,
22
22
  PrivateEndpointConnectionsImpl,
23
- PrivateLinkResourcesImpl
23
+ PrivateLinkResourcesImpl,
24
+ SkusImpl
24
25
  } from "./operations";
25
26
  import {
26
27
  Operations,
@@ -28,7 +29,8 @@ import {
28
29
  RedisEnterprise,
29
30
  Databases,
30
31
  PrivateEndpointConnections,
31
- PrivateLinkResources
32
+ PrivateLinkResources,
33
+ Skus
32
34
  } from "./operationsInterfaces";
33
35
  import { RedisEnterpriseManagementClientOptionalParams } from "./models";
34
36
 
@@ -64,7 +66,7 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient {
64
66
  credential: credentials
65
67
  };
66
68
 
67
- const packageDetails = `azsdk-js-arm-redisenterprisecache/2.2.1`;
69
+ const packageDetails = `azsdk-js-arm-redisenterprisecache/2.3.0-beta.1`;
68
70
  const userAgentPrefix =
69
71
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
70
72
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -117,13 +119,14 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient {
117
119
 
118
120
  // Assigning values to Constant parameters
119
121
  this.$host = options.$host || "https://management.azure.com";
120
- this.apiVersion = options.apiVersion || "2022-01-01";
122
+ this.apiVersion = options.apiVersion || "2023-03-01-preview";
121
123
  this.operations = new OperationsImpl(this);
122
124
  this.operationsStatus = new OperationsStatusImpl(this);
123
125
  this.redisEnterprise = new RedisEnterpriseImpl(this);
124
126
  this.databases = new DatabasesImpl(this);
125
127
  this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
126
128
  this.privateLinkResources = new PrivateLinkResourcesImpl(this);
129
+ this.skus = new SkusImpl(this);
127
130
  this.addCustomApiVersionPolicy(options.apiVersion);
128
131
  }
129
132
 
@@ -161,4 +164,5 @@ export class RedisEnterpriseManagementClient extends coreClient.ServiceClient {
161
164
  databases: Databases;
162
165
  privateEndpointConnections: PrivateEndpointConnections;
163
166
  privateLinkResources: PrivateLinkResources;
167
+ skus: Skus;
164
168
  }