@azure/arm-redisenterprisecache 3.1.0-beta.1 → 3.1.0-beta.2

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 +112 -0
  2. package/dist/index.js +1095 -163
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/accessPolicyAssignmentCreateUpdateSample.d.ts +2 -0
  7. package/dist-esm/samples-dev/accessPolicyAssignmentCreateUpdateSample.d.ts.map +1 -0
  8. package/dist-esm/samples-dev/accessPolicyAssignmentCreateUpdateSample.js +45 -0
  9. package/dist-esm/samples-dev/accessPolicyAssignmentCreateUpdateSample.js.map +1 -0
  10. package/dist-esm/samples-dev/accessPolicyAssignmentDeleteSample.d.ts +2 -0
  11. package/dist-esm/samples-dev/accessPolicyAssignmentDeleteSample.d.ts.map +1 -0
  12. package/dist-esm/samples-dev/accessPolicyAssignmentDeleteSample.js +41 -0
  13. package/dist-esm/samples-dev/accessPolicyAssignmentDeleteSample.js.map +1 -0
  14. package/dist-esm/samples-dev/accessPolicyAssignmentGetSample.d.ts +2 -0
  15. package/dist-esm/samples-dev/accessPolicyAssignmentGetSample.d.ts.map +1 -0
  16. package/dist-esm/samples-dev/accessPolicyAssignmentGetSample.js +41 -0
  17. package/dist-esm/samples-dev/accessPolicyAssignmentGetSample.js.map +1 -0
  18. package/dist-esm/samples-dev/accessPolicyAssignmentListSample.d.ts +2 -0
  19. package/dist-esm/samples-dev/accessPolicyAssignmentListSample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/accessPolicyAssignmentListSample.js +56 -0
  21. package/dist-esm/samples-dev/accessPolicyAssignmentListSample.js.map +1 -0
  22. package/dist-esm/samples-dev/databasesCreateSample.js +10 -6
  23. package/dist-esm/samples-dev/databasesCreateSample.js.map +1 -1
  24. package/dist-esm/samples-dev/databasesDeleteSample.js +3 -2
  25. package/dist-esm/samples-dev/databasesDeleteSample.js.map +1 -1
  26. package/dist-esm/samples-dev/databasesExportSample.js +3 -2
  27. package/dist-esm/samples-dev/databasesExportSample.js.map +1 -1
  28. package/dist-esm/samples-dev/databasesFlushSample.js +4 -3
  29. package/dist-esm/samples-dev/databasesFlushSample.js.map +1 -1
  30. package/dist-esm/samples-dev/databasesForceLinkToReplicationGroupSample.js +1 -1
  31. package/dist-esm/samples-dev/databasesForceUnlinkSample.js +4 -3
  32. package/dist-esm/samples-dev/databasesForceUnlinkSample.js.map +1 -1
  33. package/dist-esm/samples-dev/databasesGetSample.js +5 -4
  34. package/dist-esm/samples-dev/databasesGetSample.js.map +1 -1
  35. package/dist-esm/samples-dev/databasesImportSample.js +3 -2
  36. package/dist-esm/samples-dev/databasesImportSample.js.map +1 -1
  37. package/dist-esm/samples-dev/databasesListByClusterSample.js +5 -4
  38. package/dist-esm/samples-dev/databasesListByClusterSample.js.map +1 -1
  39. package/dist-esm/samples-dev/databasesListKeysSample.js +5 -4
  40. package/dist-esm/samples-dev/databasesListKeysSample.js.map +1 -1
  41. package/dist-esm/samples-dev/databasesRegenerateKeySample.js +5 -4
  42. package/dist-esm/samples-dev/databasesRegenerateKeySample.js.map +1 -1
  43. package/dist-esm/samples-dev/databasesUpdateSample.js +4 -2
  44. package/dist-esm/samples-dev/databasesUpdateSample.js.map +1 -1
  45. package/dist-esm/samples-dev/databasesUpgradeDbRedisVersionSample.js +3 -2
  46. package/dist-esm/samples-dev/databasesUpgradeDbRedisVersionSample.js.map +1 -1
  47. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  48. package/dist-esm/samples-dev/operationsStatusGetSample.js +3 -2
  49. package/dist-esm/samples-dev/operationsStatusGetSample.js.map +1 -1
  50. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +5 -4
  51. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
  52. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +5 -4
  53. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
  54. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +5 -4
  55. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
  56. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +5 -4
  57. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -1
  58. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js +5 -4
  59. package/dist-esm/samples-dev/privateLinkResourcesListByClusterSample.js.map +1 -1
  60. package/dist-esm/samples-dev/redisEnterpriseCreateSample.js +3 -2
  61. package/dist-esm/samples-dev/redisEnterpriseCreateSample.js.map +1 -1
  62. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.js +5 -4
  63. package/dist-esm/samples-dev/redisEnterpriseDeleteSample.js.map +1 -1
  64. package/dist-esm/samples-dev/redisEnterpriseGetSample.js +5 -4
  65. package/dist-esm/samples-dev/redisEnterpriseGetSample.js.map +1 -1
  66. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.js +5 -4
  67. package/dist-esm/samples-dev/redisEnterpriseListByResourceGroupSample.js.map +1 -1
  68. package/dist-esm/samples-dev/redisEnterpriseListSample.js +5 -4
  69. package/dist-esm/samples-dev/redisEnterpriseListSample.js.map +1 -1
  70. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.js +5 -4
  71. package/dist-esm/samples-dev/redisEnterpriseUpdateSample.js.map +1 -1
  72. package/dist-esm/src/models/index.d.ts +423 -27
  73. package/dist-esm/src/models/index.d.ts.map +1 -1
  74. package/dist-esm/src/models/index.js +134 -2
  75. package/dist-esm/src/models/index.js.map +1 -1
  76. package/dist-esm/src/models/mappers.d.ts +16 -1
  77. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  78. package/dist-esm/src/models/mappers.js +372 -2
  79. package/dist-esm/src/models/mappers.js.map +1 -1
  80. package/dist-esm/src/models/parameters.d.ts +2 -0
  81. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  82. package/dist-esm/src/models/parameters.js +19 -2
  83. package/dist-esm/src/models/parameters.js.map +1 -1
  84. package/dist-esm/src/operations/accessPolicyAssignmentOperations.d.ts +94 -0
  85. package/dist-esm/src/operations/accessPolicyAssignmentOperations.d.ts.map +1 -0
  86. package/dist-esm/src/operations/accessPolicyAssignmentOperations.js +403 -0
  87. package/dist-esm/src/operations/accessPolicyAssignmentOperations.js.map +1 -0
  88. package/dist-esm/src/operations/databases.d.ts +6 -6
  89. package/dist-esm/src/operations/databases.js +6 -6
  90. package/dist-esm/src/operations/index.d.ts +1 -0
  91. package/dist-esm/src/operations/index.d.ts.map +1 -1
  92. package/dist-esm/src/operations/index.js +1 -0
  93. package/dist-esm/src/operations/index.js.map +1 -1
  94. package/dist-esm/src/operations/privateEndpointConnections.d.ts +7 -7
  95. package/dist-esm/src/operations/privateEndpointConnections.js +7 -7
  96. package/dist-esm/src/operations/privateLinkResources.d.ts +2 -2
  97. package/dist-esm/src/operations/privateLinkResources.js +2 -2
  98. package/dist-esm/src/operations/redisEnterprise.d.ts +13 -13
  99. package/dist-esm/src/operations/redisEnterprise.js +13 -13
  100. package/dist-esm/src/operationsInterfaces/accessPolicyAssignmentOperations.d.ts +67 -0
  101. package/dist-esm/src/operationsInterfaces/accessPolicyAssignmentOperations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/accessPolicyAssignmentOperations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/accessPolicyAssignmentOperations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/databases.d.ts +5 -5
  105. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  106. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  107. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  108. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  109. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +6 -6
  110. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +1 -1
  111. package/dist-esm/src/operationsInterfaces/redisEnterprise.d.ts +11 -11
  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 +5 -3
  115. package/dist-esm/src/redisEnterpriseManagementClient.js.map +1 -1
  116. package/dist-esm/test/redisenterprisecache_test.spec.d.ts.map +1 -1
  117. package/dist-esm/test/redisenterprisecache_test.spec.js +5 -1
  118. package/dist-esm/test/redisenterprisecache_test.spec.js.map +1 -1
  119. package/package.json +31 -30
  120. package/review/arm-redisenterprisecache.api.md +239 -2
  121. package/src/lroImpl.ts +1 -1
  122. package/src/models/index.ts +457 -26
  123. package/src/models/mappers.ts +400 -2
  124. package/src/models/parameters.ts +21 -1
  125. package/src/operations/accessPolicyAssignmentOperations.ts +569 -0
  126. package/src/operations/databases.ts +6 -6
  127. package/src/operations/index.ts +1 -0
  128. package/src/operations/privateEndpointConnections.ts +7 -7
  129. package/src/operations/privateLinkResources.ts +2 -2
  130. package/src/operations/redisEnterprise.ts +13 -13
  131. package/src/operationsInterfaces/accessPolicyAssignmentOperations.ts +132 -0
  132. package/src/operationsInterfaces/databases.ts +5 -5
  133. package/src/operationsInterfaces/index.ts +1 -0
  134. package/src/operationsInterfaces/privateEndpointConnections.ts +6 -6
  135. package/src/operationsInterfaces/privateLinkResources.ts +1 -1
  136. package/src/operationsInterfaces/redisEnterprise.ts +11 -11
  137. package/src/redisEnterpriseManagementClient.ts +7 -2
  138. package/types/arm-redisenterprisecache.d.ts +544 -50
  139. package/types/tsdoc-metadata.json +1 -1
@@ -0,0 +1,569 @@
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 { setContinuationToken } from "../pagingHelper";
11
+ import { AccessPolicyAssignmentOperations } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { RedisEnterpriseManagementClient } from "../redisEnterpriseManagementClient";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller,
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
22
+ import {
23
+ AccessPolicyAssignment,
24
+ AccessPolicyAssignmentListNextOptionalParams,
25
+ AccessPolicyAssignmentListOptionalParams,
26
+ AccessPolicyAssignmentListResponse,
27
+ AccessPolicyAssignmentCreateUpdateOptionalParams,
28
+ AccessPolicyAssignmentCreateUpdateResponse,
29
+ AccessPolicyAssignmentGetOptionalParams,
30
+ AccessPolicyAssignmentGetResponse,
31
+ AccessPolicyAssignmentDeleteOptionalParams,
32
+ AccessPolicyAssignmentDeleteResponse,
33
+ AccessPolicyAssignmentListNextResponse,
34
+ } from "../models";
35
+
36
+ /// <reference lib="esnext.asynciterable" />
37
+ /** Class containing AccessPolicyAssignmentOperations operations. */
38
+ export class AccessPolicyAssignmentOperationsImpl
39
+ implements AccessPolicyAssignmentOperations
40
+ {
41
+ private readonly client: RedisEnterpriseManagementClient;
42
+
43
+ /**
44
+ * Initialize a new instance of the class AccessPolicyAssignmentOperations class.
45
+ * @param client Reference to the service client
46
+ */
47
+ constructor(client: RedisEnterpriseManagementClient) {
48
+ this.client = client;
49
+ }
50
+
51
+ /**
52
+ * Gets all access policy assignments..
53
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
54
+ * @param clusterName The name of the Redis Enterprise cluster.
55
+ * @param databaseName The name of the Redis Enterprise database.
56
+ * @param options The options parameters.
57
+ */
58
+ public list(
59
+ resourceGroupName: string,
60
+ clusterName: string,
61
+ databaseName: string,
62
+ options?: AccessPolicyAssignmentListOptionalParams,
63
+ ): PagedAsyncIterableIterator<AccessPolicyAssignment> {
64
+ const iter = this.listPagingAll(
65
+ resourceGroupName,
66
+ clusterName,
67
+ databaseName,
68
+ options,
69
+ );
70
+ return {
71
+ next() {
72
+ return iter.next();
73
+ },
74
+ [Symbol.asyncIterator]() {
75
+ return this;
76
+ },
77
+ byPage: (settings?: PageSettings) => {
78
+ if (settings?.maxPageSize) {
79
+ throw new Error("maxPageSize is not supported by this operation.");
80
+ }
81
+ return this.listPagingPage(
82
+ resourceGroupName,
83
+ clusterName,
84
+ databaseName,
85
+ options,
86
+ settings,
87
+ );
88
+ },
89
+ };
90
+ }
91
+
92
+ private async *listPagingPage(
93
+ resourceGroupName: string,
94
+ clusterName: string,
95
+ databaseName: string,
96
+ options?: AccessPolicyAssignmentListOptionalParams,
97
+ settings?: PageSettings,
98
+ ): AsyncIterableIterator<AccessPolicyAssignment[]> {
99
+ let result: AccessPolicyAssignmentListResponse;
100
+ let continuationToken = settings?.continuationToken;
101
+ if (!continuationToken) {
102
+ result = await this._list(
103
+ resourceGroupName,
104
+ clusterName,
105
+ databaseName,
106
+ options,
107
+ );
108
+ let page = result.value || [];
109
+ continuationToken = result.nextLink;
110
+ setContinuationToken(page, continuationToken);
111
+ yield page;
112
+ }
113
+ while (continuationToken) {
114
+ result = await this._listNext(
115
+ resourceGroupName,
116
+ clusterName,
117
+ databaseName,
118
+ continuationToken,
119
+ options,
120
+ );
121
+ continuationToken = result.nextLink;
122
+ let page = result.value || [];
123
+ setContinuationToken(page, continuationToken);
124
+ yield page;
125
+ }
126
+ }
127
+
128
+ private async *listPagingAll(
129
+ resourceGroupName: string,
130
+ clusterName: string,
131
+ databaseName: string,
132
+ options?: AccessPolicyAssignmentListOptionalParams,
133
+ ): AsyncIterableIterator<AccessPolicyAssignment> {
134
+ for await (const page of this.listPagingPage(
135
+ resourceGroupName,
136
+ clusterName,
137
+ databaseName,
138
+ options,
139
+ )) {
140
+ yield* page;
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Creates/Updates a particular access policy assignment for a database
146
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
147
+ * @param clusterName The name of the Redis Enterprise cluster.
148
+ * @param databaseName The name of the Redis Enterprise database.
149
+ * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy
150
+ * assignment.
151
+ * @param parameters Parameters supplied to the create access policy assignment for database.
152
+ * @param options The options parameters.
153
+ */
154
+ async beginCreateUpdate(
155
+ resourceGroupName: string,
156
+ clusterName: string,
157
+ databaseName: string,
158
+ accessPolicyAssignmentName: string,
159
+ parameters: AccessPolicyAssignment,
160
+ options?: AccessPolicyAssignmentCreateUpdateOptionalParams,
161
+ ): Promise<
162
+ SimplePollerLike<
163
+ OperationState<AccessPolicyAssignmentCreateUpdateResponse>,
164
+ AccessPolicyAssignmentCreateUpdateResponse
165
+ >
166
+ > {
167
+ const directSendOperation = async (
168
+ args: coreClient.OperationArguments,
169
+ spec: coreClient.OperationSpec,
170
+ ): Promise<AccessPolicyAssignmentCreateUpdateResponse> => {
171
+ return this.client.sendOperationRequest(args, spec);
172
+ };
173
+ const sendOperationFn = async (
174
+ args: coreClient.OperationArguments,
175
+ spec: coreClient.OperationSpec,
176
+ ) => {
177
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
178
+ undefined;
179
+ const providedCallback = args.options?.onResponse;
180
+ const callback: coreClient.RawResponseCallback = (
181
+ rawResponse: coreClient.FullOperationResponse,
182
+ flatResponse: unknown,
183
+ ) => {
184
+ currentRawResponse = rawResponse;
185
+ providedCallback?.(rawResponse, flatResponse);
186
+ };
187
+ const updatedArgs = {
188
+ ...args,
189
+ options: {
190
+ ...args.options,
191
+ onResponse: callback,
192
+ },
193
+ };
194
+ const flatResponse = await directSendOperation(updatedArgs, spec);
195
+ return {
196
+ flatResponse,
197
+ rawResponse: {
198
+ statusCode: currentRawResponse!.status,
199
+ body: currentRawResponse!.parsedBody,
200
+ headers: currentRawResponse!.headers.toJSON(),
201
+ },
202
+ };
203
+ };
204
+
205
+ const lro = createLroSpec({
206
+ sendOperationFn,
207
+ args: {
208
+ resourceGroupName,
209
+ clusterName,
210
+ databaseName,
211
+ accessPolicyAssignmentName,
212
+ parameters,
213
+ options,
214
+ },
215
+ spec: createUpdateOperationSpec,
216
+ });
217
+ const poller = await createHttpPoller<
218
+ AccessPolicyAssignmentCreateUpdateResponse,
219
+ OperationState<AccessPolicyAssignmentCreateUpdateResponse>
220
+ >(lro, {
221
+ restoreFrom: options?.resumeFrom,
222
+ intervalInMs: options?.updateIntervalInMs,
223
+ resourceLocationConfig: "original-uri",
224
+ });
225
+ await poller.poll();
226
+ return poller;
227
+ }
228
+
229
+ /**
230
+ * Creates/Updates a particular access policy assignment for a database
231
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
232
+ * @param clusterName The name of the Redis Enterprise cluster.
233
+ * @param databaseName The name of the Redis Enterprise database.
234
+ * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy
235
+ * assignment.
236
+ * @param parameters Parameters supplied to the create access policy assignment for database.
237
+ * @param options The options parameters.
238
+ */
239
+ async beginCreateUpdateAndWait(
240
+ resourceGroupName: string,
241
+ clusterName: string,
242
+ databaseName: string,
243
+ accessPolicyAssignmentName: string,
244
+ parameters: AccessPolicyAssignment,
245
+ options?: AccessPolicyAssignmentCreateUpdateOptionalParams,
246
+ ): Promise<AccessPolicyAssignmentCreateUpdateResponse> {
247
+ const poller = await this.beginCreateUpdate(
248
+ resourceGroupName,
249
+ clusterName,
250
+ databaseName,
251
+ accessPolicyAssignmentName,
252
+ parameters,
253
+ options,
254
+ );
255
+ return poller.pollUntilDone();
256
+ }
257
+
258
+ /**
259
+ * Gets information about access policy assignment for database.
260
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
261
+ * @param clusterName The name of the Redis Enterprise cluster.
262
+ * @param databaseName The name of the Redis Enterprise database.
263
+ * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy
264
+ * assignment.
265
+ * @param options The options parameters.
266
+ */
267
+ get(
268
+ resourceGroupName: string,
269
+ clusterName: string,
270
+ databaseName: string,
271
+ accessPolicyAssignmentName: string,
272
+ options?: AccessPolicyAssignmentGetOptionalParams,
273
+ ): Promise<AccessPolicyAssignmentGetResponse> {
274
+ return this.client.sendOperationRequest(
275
+ {
276
+ resourceGroupName,
277
+ clusterName,
278
+ databaseName,
279
+ accessPolicyAssignmentName,
280
+ options,
281
+ },
282
+ getOperationSpec,
283
+ );
284
+ }
285
+
286
+ /**
287
+ * Deletes a single access policy assignment.
288
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
289
+ * @param clusterName The name of the Redis Enterprise cluster.
290
+ * @param databaseName The name of the Redis Enterprise database.
291
+ * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy
292
+ * assignment.
293
+ * @param options The options parameters.
294
+ */
295
+ async beginDelete(
296
+ resourceGroupName: string,
297
+ clusterName: string,
298
+ databaseName: string,
299
+ accessPolicyAssignmentName: string,
300
+ options?: AccessPolicyAssignmentDeleteOptionalParams,
301
+ ): Promise<
302
+ SimplePollerLike<
303
+ OperationState<AccessPolicyAssignmentDeleteResponse>,
304
+ AccessPolicyAssignmentDeleteResponse
305
+ >
306
+ > {
307
+ const directSendOperation = async (
308
+ args: coreClient.OperationArguments,
309
+ spec: coreClient.OperationSpec,
310
+ ): Promise<AccessPolicyAssignmentDeleteResponse> => {
311
+ return this.client.sendOperationRequest(args, spec);
312
+ };
313
+ const sendOperationFn = async (
314
+ args: coreClient.OperationArguments,
315
+ spec: coreClient.OperationSpec,
316
+ ) => {
317
+ let currentRawResponse: coreClient.FullOperationResponse | undefined =
318
+ undefined;
319
+ const providedCallback = args.options?.onResponse;
320
+ const callback: coreClient.RawResponseCallback = (
321
+ rawResponse: coreClient.FullOperationResponse,
322
+ flatResponse: unknown,
323
+ ) => {
324
+ currentRawResponse = rawResponse;
325
+ providedCallback?.(rawResponse, flatResponse);
326
+ };
327
+ const updatedArgs = {
328
+ ...args,
329
+ options: {
330
+ ...args.options,
331
+ onResponse: callback,
332
+ },
333
+ };
334
+ const flatResponse = await directSendOperation(updatedArgs, spec);
335
+ return {
336
+ flatResponse,
337
+ rawResponse: {
338
+ statusCode: currentRawResponse!.status,
339
+ body: currentRawResponse!.parsedBody,
340
+ headers: currentRawResponse!.headers.toJSON(),
341
+ },
342
+ };
343
+ };
344
+
345
+ const lro = createLroSpec({
346
+ sendOperationFn,
347
+ args: {
348
+ resourceGroupName,
349
+ clusterName,
350
+ databaseName,
351
+ accessPolicyAssignmentName,
352
+ options,
353
+ },
354
+ spec: deleteOperationSpec,
355
+ });
356
+ const poller = await createHttpPoller<
357
+ AccessPolicyAssignmentDeleteResponse,
358
+ OperationState<AccessPolicyAssignmentDeleteResponse>
359
+ >(lro, {
360
+ restoreFrom: options?.resumeFrom,
361
+ intervalInMs: options?.updateIntervalInMs,
362
+ resourceLocationConfig: "azure-async-operation",
363
+ });
364
+ await poller.poll();
365
+ return poller;
366
+ }
367
+
368
+ /**
369
+ * Deletes a single access policy assignment.
370
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
371
+ * @param clusterName The name of the Redis Enterprise cluster.
372
+ * @param databaseName The name of the Redis Enterprise database.
373
+ * @param accessPolicyAssignmentName The name of the Redis Enterprise database access policy
374
+ * assignment.
375
+ * @param options The options parameters.
376
+ */
377
+ async beginDeleteAndWait(
378
+ resourceGroupName: string,
379
+ clusterName: string,
380
+ databaseName: string,
381
+ accessPolicyAssignmentName: string,
382
+ options?: AccessPolicyAssignmentDeleteOptionalParams,
383
+ ): Promise<AccessPolicyAssignmentDeleteResponse> {
384
+ const poller = await this.beginDelete(
385
+ resourceGroupName,
386
+ clusterName,
387
+ databaseName,
388
+ accessPolicyAssignmentName,
389
+ options,
390
+ );
391
+ return poller.pollUntilDone();
392
+ }
393
+
394
+ /**
395
+ * Gets all access policy assignments..
396
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
397
+ * @param clusterName The name of the Redis Enterprise cluster.
398
+ * @param databaseName The name of the Redis Enterprise database.
399
+ * @param options The options parameters.
400
+ */
401
+ private _list(
402
+ resourceGroupName: string,
403
+ clusterName: string,
404
+ databaseName: string,
405
+ options?: AccessPolicyAssignmentListOptionalParams,
406
+ ): Promise<AccessPolicyAssignmentListResponse> {
407
+ return this.client.sendOperationRequest(
408
+ { resourceGroupName, clusterName, databaseName, options },
409
+ listOperationSpec,
410
+ );
411
+ }
412
+
413
+ /**
414
+ * ListNext
415
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
416
+ * @param clusterName The name of the Redis Enterprise cluster.
417
+ * @param databaseName The name of the Redis Enterprise database.
418
+ * @param nextLink The nextLink from the previous successful call to the List method.
419
+ * @param options The options parameters.
420
+ */
421
+ private _listNext(
422
+ resourceGroupName: string,
423
+ clusterName: string,
424
+ databaseName: string,
425
+ nextLink: string,
426
+ options?: AccessPolicyAssignmentListNextOptionalParams,
427
+ ): Promise<AccessPolicyAssignmentListNextResponse> {
428
+ return this.client.sendOperationRequest(
429
+ { resourceGroupName, clusterName, databaseName, nextLink, options },
430
+ listNextOperationSpec,
431
+ );
432
+ }
433
+ }
434
+ // Operation Specifications
435
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
436
+
437
+ const createUpdateOperationSpec: coreClient.OperationSpec = {
438
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
439
+ httpMethod: "PUT",
440
+ responses: {
441
+ 200: {
442
+ bodyMapper: Mappers.AccessPolicyAssignment,
443
+ },
444
+ 201: {
445
+ bodyMapper: Mappers.AccessPolicyAssignment,
446
+ },
447
+ 202: {
448
+ bodyMapper: Mappers.AccessPolicyAssignment,
449
+ },
450
+ 204: {
451
+ bodyMapper: Mappers.AccessPolicyAssignment,
452
+ },
453
+ default: {
454
+ bodyMapper: Mappers.ErrorResponse,
455
+ },
456
+ },
457
+ requestBody: Parameters.parameters10,
458
+ queryParameters: [Parameters.apiVersion],
459
+ urlParameters: [
460
+ Parameters.$host,
461
+ Parameters.subscriptionId,
462
+ Parameters.resourceGroupName,
463
+ Parameters.clusterName,
464
+ Parameters.databaseName,
465
+ Parameters.accessPolicyAssignmentName,
466
+ ],
467
+ headerParameters: [Parameters.accept, Parameters.contentType],
468
+ mediaType: "json",
469
+ serializer,
470
+ };
471
+ const getOperationSpec: coreClient.OperationSpec = {
472
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
473
+ httpMethod: "GET",
474
+ responses: {
475
+ 200: {
476
+ bodyMapper: Mappers.AccessPolicyAssignment,
477
+ },
478
+ default: {
479
+ bodyMapper: Mappers.ErrorResponse,
480
+ },
481
+ },
482
+ queryParameters: [Parameters.apiVersion],
483
+ urlParameters: [
484
+ Parameters.$host,
485
+ Parameters.subscriptionId,
486
+ Parameters.resourceGroupName,
487
+ Parameters.clusterName,
488
+ Parameters.databaseName,
489
+ Parameters.accessPolicyAssignmentName,
490
+ ],
491
+ headerParameters: [Parameters.accept],
492
+ serializer,
493
+ };
494
+ const deleteOperationSpec: coreClient.OperationSpec = {
495
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments/{accessPolicyAssignmentName}",
496
+ httpMethod: "DELETE",
497
+ responses: {
498
+ 200: {
499
+ headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders,
500
+ },
501
+ 201: {
502
+ headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders,
503
+ },
504
+ 202: {
505
+ headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders,
506
+ },
507
+ 204: {
508
+ headersMapper: Mappers.AccessPolicyAssignmentDeleteHeaders,
509
+ },
510
+ default: {
511
+ bodyMapper: Mappers.ErrorResponse,
512
+ },
513
+ },
514
+ queryParameters: [Parameters.apiVersion],
515
+ urlParameters: [
516
+ Parameters.$host,
517
+ Parameters.subscriptionId,
518
+ Parameters.resourceGroupName,
519
+ Parameters.clusterName,
520
+ Parameters.databaseName,
521
+ Parameters.accessPolicyAssignmentName,
522
+ ],
523
+ headerParameters: [Parameters.accept],
524
+ serializer,
525
+ };
526
+ const listOperationSpec: coreClient.OperationSpec = {
527
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/accessPolicyAssignments",
528
+ httpMethod: "GET",
529
+ responses: {
530
+ 200: {
531
+ bodyMapper: Mappers.AccessPolicyAssignmentList,
532
+ },
533
+ default: {
534
+ bodyMapper: Mappers.ErrorResponse,
535
+ },
536
+ },
537
+ queryParameters: [Parameters.apiVersion],
538
+ urlParameters: [
539
+ Parameters.$host,
540
+ Parameters.subscriptionId,
541
+ Parameters.resourceGroupName,
542
+ Parameters.clusterName,
543
+ Parameters.databaseName,
544
+ ],
545
+ headerParameters: [Parameters.accept],
546
+ serializer,
547
+ };
548
+ const listNextOperationSpec: coreClient.OperationSpec = {
549
+ path: "{nextLink}",
550
+ httpMethod: "GET",
551
+ responses: {
552
+ 200: {
553
+ bodyMapper: Mappers.AccessPolicyAssignmentList,
554
+ },
555
+ default: {
556
+ bodyMapper: Mappers.ErrorResponse,
557
+ },
558
+ },
559
+ urlParameters: [
560
+ Parameters.$host,
561
+ Parameters.nextLink,
562
+ Parameters.subscriptionId,
563
+ Parameters.resourceGroupName,
564
+ Parameters.clusterName,
565
+ Parameters.databaseName,
566
+ ],
567
+ headerParameters: [Parameters.accept],
568
+ serializer,
569
+ };
@@ -67,7 +67,7 @@ export class DatabasesImpl implements Databases {
67
67
  }
68
68
 
69
69
  /**
70
- * Gets all databases in the specified RedisEnterprise cluster.
70
+ * Gets all databases in the specified Redis Enterprise cluster.
71
71
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
72
72
  * @param clusterName The name of the Redis Enterprise cluster.
73
73
  * @param options The options parameters.
@@ -151,7 +151,7 @@ export class DatabasesImpl implements Databases {
151
151
  }
152
152
 
153
153
  /**
154
- * Gets all databases in the specified RedisEnterprise cluster.
154
+ * Gets all databases in the specified Redis Enterprise cluster.
155
155
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
156
156
  * @param clusterName The name of the Redis Enterprise cluster.
157
157
  * @param options The options parameters.
@@ -380,7 +380,7 @@ export class DatabasesImpl implements Databases {
380
380
  }
381
381
 
382
382
  /**
383
- * Gets information about a database in a RedisEnterprise cluster.
383
+ * Gets information about a database in a Redis Enterprise cluster.
384
384
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
385
385
  * @param clusterName The name of the Redis Enterprise cluster.
386
386
  * @param databaseName The name of the Redis Enterprise database.
@@ -486,7 +486,7 @@ export class DatabasesImpl implements Databases {
486
486
  }
487
487
 
488
488
  /**
489
- * Retrieves the access keys for the RedisEnterprise database.
489
+ * Retrieves the access keys for the Redis Enterprise database.
490
490
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
491
491
  * @param clusterName The name of the Redis Enterprise cluster.
492
492
  * @param databaseName The name of the Redis Enterprise database.
@@ -505,7 +505,7 @@ export class DatabasesImpl implements Databases {
505
505
  }
506
506
 
507
507
  /**
508
- * Regenerates the RedisEnterprise database's access keys.
508
+ * Regenerates the Redis Enterprise database's access keys.
509
509
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
510
510
  * @param clusterName The name of the Redis Enterprise cluster.
511
511
  * @param databaseName The name of the Redis Enterprise database.
@@ -586,7 +586,7 @@ export class DatabasesImpl implements Databases {
586
586
  }
587
587
 
588
588
  /**
589
- * Regenerates the RedisEnterprise database's access keys.
589
+ * Regenerates the Redis Enterprise database's access keys.
590
590
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
591
591
  * @param clusterName The name of the Redis Enterprise cluster.
592
592
  * @param databaseName The name of the Redis Enterprise database.
@@ -10,5 +10,6 @@ export * from "./operations";
10
10
  export * from "./operationsStatus";
11
11
  export * from "./redisEnterprise";
12
12
  export * from "./databases";
13
+ export * from "./accessPolicyAssignmentOperations";
13
14
  export * from "./privateEndpointConnections";
14
15
  export * from "./privateLinkResources";
@@ -45,7 +45,7 @@ export class PrivateEndpointConnectionsImpl
45
45
  }
46
46
 
47
47
  /**
48
- * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
48
+ * Lists all the private endpoint connections associated with the Redis Enterprise cluster.
49
49
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
50
50
  * @param clusterName The name of the Redis Enterprise cluster.
51
51
  * @param options The options parameters.
@@ -103,7 +103,7 @@ export class PrivateEndpointConnectionsImpl
103
103
  }
104
104
 
105
105
  /**
106
- * Lists all the private endpoint connections associated with the RedisEnterprise cluster.
106
+ * Lists all the private endpoint connections associated with the Redis Enterprise cluster.
107
107
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
108
108
  * @param clusterName The name of the Redis Enterprise cluster.
109
109
  * @param options The options parameters.
@@ -120,7 +120,7 @@ export class PrivateEndpointConnectionsImpl
120
120
  }
121
121
 
122
122
  /**
123
- * Gets the specified private endpoint connection associated with the RedisEnterprise cluster.
123
+ * Gets the specified private endpoint connection associated with the Redis Enterprise cluster.
124
124
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
125
125
  * @param clusterName The name of the Redis Enterprise cluster.
126
126
  * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
@@ -145,7 +145,7 @@ export class PrivateEndpointConnectionsImpl
145
145
  }
146
146
 
147
147
  /**
148
- * Updates the state of the specified private endpoint connection associated with the RedisEnterprise
148
+ * Updates the state of the specified private endpoint connection associated with the Redis Enterprise
149
149
  * cluster.
150
150
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
151
151
  * @param clusterName The name of the Redis Enterprise cluster.
@@ -227,7 +227,7 @@ export class PrivateEndpointConnectionsImpl
227
227
  }
228
228
 
229
229
  /**
230
- * Updates the state of the specified private endpoint connection associated with the RedisEnterprise
230
+ * Updates the state of the specified private endpoint connection associated with the Redis Enterprise
231
231
  * cluster.
232
232
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
233
233
  * @param clusterName The name of the Redis Enterprise cluster.
@@ -254,7 +254,7 @@ export class PrivateEndpointConnectionsImpl
254
254
  }
255
255
 
256
256
  /**
257
- * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
257
+ * Deletes the specified private endpoint connection associated with the Redis Enterprise cluster.
258
258
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
259
259
  * @param clusterName The name of the Redis Enterprise cluster.
260
260
  * @param privateEndpointConnectionName The name of the private endpoint connection associated with the
@@ -325,7 +325,7 @@ export class PrivateEndpointConnectionsImpl
325
325
  }
326
326
 
327
327
  /**
328
- * Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
328
+ * Deletes the specified private endpoint connection associated with the Redis Enterprise cluster.
329
329
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
330
330
  * @param clusterName The name of the Redis Enterprise cluster.
331
331
  * @param privateEndpointConnectionName The name of the private endpoint connection associated with the