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