@azure/arm-confidentialledger 1.3.0-beta.1 → 1.3.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.
- package/CHANGELOG.md +58 -1
- package/LICENSE +1 -1
- package/dist/index.js +1013 -434
- 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/checkNameAvailabilitySample.js +3 -3
- package/dist-esm/samples-dev/checkNameAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/ledgerBackupSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerBackupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerBackupSample.js +44 -0
- package/dist-esm/samples-dev/ledgerBackupSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerCreateSample.js +9 -8
- package/dist-esm/samples-dev/ledgerCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/ledgerDeleteSample.js +1 -1
- package/dist-esm/samples-dev/ledgerGetSample.js +1 -1
- package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js +7 -5
- package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js +7 -5
- package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/ledgerRestoreSample.d.ts +2 -0
- package/dist-esm/samples-dev/ledgerRestoreSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/ledgerRestoreSample.js +45 -0
- package/dist-esm/samples-dev/ledgerRestoreSample.js.map +1 -0
- package/dist-esm/samples-dev/ledgerUpdateSample.js +9 -9
- package/dist-esm/samples-dev/ledgerUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/managedCcfBackupSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedCcfBackupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedCcfBackupSample.js +44 -0
- package/dist-esm/samples-dev/managedCcfBackupSample.js.map +1 -0
- package/dist-esm/samples-dev/managedCcfCreateSample.js +7 -7
- package/dist-esm/samples-dev/managedCcfCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/managedCcfDeleteSample.js +1 -1
- package/dist-esm/samples-dev/managedCcfGetSample.js +1 -1
- package/dist-esm/samples-dev/managedCcfListByResourceGroupSample.js +7 -5
- package/dist-esm/samples-dev/managedCcfListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/managedCcfListBySubscriptionSample.js +7 -5
- package/dist-esm/samples-dev/managedCcfListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/managedCcfRestoreSample.d.ts +2 -0
- package/dist-esm/samples-dev/managedCcfRestoreSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managedCcfRestoreSample.js +45 -0
- package/dist-esm/samples-dev/managedCcfRestoreSample.js.map +1 -0
- package/dist-esm/samples-dev/managedCcfUpdateSample.js +5 -5
- package/dist-esm/samples-dev/managedCcfUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +7 -5
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/src/confidentialLedgerClient.d.ts.map +1 -1
- package/dist-esm/src/confidentialLedgerClient.js +13 -13
- package/dist-esm/src/confidentialLedgerClient.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +149 -24
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +10 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +8 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +385 -213
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +55 -39
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/ledger.d.ts +33 -1
- package/dist-esm/src/operations/ledger.d.ts.map +1 -1
- package/dist-esm/src/operations/ledger.js +249 -67
- package/dist-esm/src/operations/ledger.js.map +1 -1
- package/dist-esm/src/operations/managedCCFOperations.d.ts +35 -3
- package/dist-esm/src/operations/managedCCFOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/managedCCFOperations.js +257 -67
- package/dist-esm/src/operations/managedCCFOperations.js.map +1 -1
- package/dist-esm/src/operations/operations.js +15 -13
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/ledger.d.ts +33 -1
- package/dist-esm/src/operationsInterfaces/ledger.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/managedCCFOperations.d.ts +35 -3
- package/dist-esm/src/operationsInterfaces/managedCCFOperations.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.js.map +1 -1
- package/dist-esm/test/confidentialledger_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/confidentialledger_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/confidentialledger_operations_test.spec.js +71 -0
- package/dist-esm/test/confidentialledger_operations_test.spec.js.map +1 -0
- package/package.json +17 -22
- package/review/arm-confidentialledger.api.md +107 -2
- package/src/confidentialLedgerClient.ts +26 -26
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +158 -9
- package/src/models/mappers.ts +396 -216
- package/src/models/parameters.ts +64 -40
- package/src/operations/ledger.ts +370 -124
- package/src/operations/managedCCFOperations.ts +393 -127
- package/src/operations/operations.ts +16 -16
- package/src/operationsInterfaces/ledger.ts +75 -10
- package/src/operationsInterfaces/managedCCFOperations.ts +86 -12
- package/src/operationsInterfaces/operations.ts +2 -2
- package/src/pagingHelper.ts +1 -1
- package/types/arm-confidentialledger.d.ts +211 -3
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
- package/rollup.config.js +0 -122
package/src/operations/ledger.ts
CHANGED
@@ -16,7 +16,7 @@ import { ConfidentialLedgerClient } from "../confidentialLedgerClient";
|
|
16
16
|
import {
|
17
17
|
SimplePollerLike,
|
18
18
|
OperationState,
|
19
|
-
createHttpPoller
|
19
|
+
createHttpPoller,
|
20
20
|
} from "@azure/core-lro";
|
21
21
|
import { createLroSpec } from "../lroImpl";
|
22
22
|
import {
|
@@ -34,8 +34,14 @@ import {
|
|
34
34
|
LedgerCreateResponse,
|
35
35
|
LedgerUpdateOptionalParams,
|
36
36
|
LedgerUpdateResponse,
|
37
|
+
ConfidentialLedgerBackup,
|
38
|
+
LedgerBackupOptionalParams,
|
39
|
+
LedgerBackupResponse,
|
40
|
+
ConfidentialLedgerRestore,
|
41
|
+
LedgerRestoreOptionalParams,
|
42
|
+
LedgerRestoreResponse,
|
37
43
|
LedgerListByResourceGroupNextResponse,
|
38
|
-
LedgerListBySubscriptionNextResponse
|
44
|
+
LedgerListBySubscriptionNextResponse,
|
39
45
|
} from "../models";
|
40
46
|
|
41
47
|
/// <reference lib="esnext.asynciterable" />
|
@@ -58,7 +64,7 @@ export class LedgerImpl implements Ledger {
|
|
58
64
|
*/
|
59
65
|
public listByResourceGroup(
|
60
66
|
resourceGroupName: string,
|
61
|
-
options?: LedgerListByResourceGroupOptionalParams
|
67
|
+
options?: LedgerListByResourceGroupOptionalParams,
|
62
68
|
): PagedAsyncIterableIterator<ConfidentialLedger> {
|
63
69
|
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
64
70
|
return {
|
@@ -75,16 +81,16 @@ export class LedgerImpl implements Ledger {
|
|
75
81
|
return this.listByResourceGroupPagingPage(
|
76
82
|
resourceGroupName,
|
77
83
|
options,
|
78
|
-
settings
|
84
|
+
settings,
|
79
85
|
);
|
80
|
-
}
|
86
|
+
},
|
81
87
|
};
|
82
88
|
}
|
83
89
|
|
84
90
|
private async *listByResourceGroupPagingPage(
|
85
91
|
resourceGroupName: string,
|
86
92
|
options?: LedgerListByResourceGroupOptionalParams,
|
87
|
-
settings?: PageSettings
|
93
|
+
settings?: PageSettings,
|
88
94
|
): AsyncIterableIterator<ConfidentialLedger[]> {
|
89
95
|
let result: LedgerListByResourceGroupResponse;
|
90
96
|
let continuationToken = settings?.continuationToken;
|
@@ -99,7 +105,7 @@ export class LedgerImpl implements Ledger {
|
|
99
105
|
result = await this._listByResourceGroupNext(
|
100
106
|
resourceGroupName,
|
101
107
|
continuationToken,
|
102
|
-
options
|
108
|
+
options,
|
103
109
|
);
|
104
110
|
continuationToken = result.nextLink;
|
105
111
|
let page = result.value || [];
|
@@ -110,11 +116,11 @@ export class LedgerImpl implements Ledger {
|
|
110
116
|
|
111
117
|
private async *listByResourceGroupPagingAll(
|
112
118
|
resourceGroupName: string,
|
113
|
-
options?: LedgerListByResourceGroupOptionalParams
|
119
|
+
options?: LedgerListByResourceGroupOptionalParams,
|
114
120
|
): AsyncIterableIterator<ConfidentialLedger> {
|
115
121
|
for await (const page of this.listByResourceGroupPagingPage(
|
116
122
|
resourceGroupName,
|
117
|
-
options
|
123
|
+
options,
|
118
124
|
)) {
|
119
125
|
yield* page;
|
120
126
|
}
|
@@ -125,7 +131,7 @@ export class LedgerImpl implements Ledger {
|
|
125
131
|
* @param options The options parameters.
|
126
132
|
*/
|
127
133
|
public listBySubscription(
|
128
|
-
options?: LedgerListBySubscriptionOptionalParams
|
134
|
+
options?: LedgerListBySubscriptionOptionalParams,
|
129
135
|
): PagedAsyncIterableIterator<ConfidentialLedger> {
|
130
136
|
const iter = this.listBySubscriptionPagingAll(options);
|
131
137
|
return {
|
@@ -140,13 +146,13 @@ export class LedgerImpl implements Ledger {
|
|
140
146
|
throw new Error("maxPageSize is not supported by this operation.");
|
141
147
|
}
|
142
148
|
return this.listBySubscriptionPagingPage(options, settings);
|
143
|
-
}
|
149
|
+
},
|
144
150
|
};
|
145
151
|
}
|
146
152
|
|
147
153
|
private async *listBySubscriptionPagingPage(
|
148
154
|
options?: LedgerListBySubscriptionOptionalParams,
|
149
|
-
settings?: PageSettings
|
155
|
+
settings?: PageSettings,
|
150
156
|
): AsyncIterableIterator<ConfidentialLedger[]> {
|
151
157
|
let result: LedgerListBySubscriptionResponse;
|
152
158
|
let continuationToken = settings?.continuationToken;
|
@@ -167,7 +173,7 @@ export class LedgerImpl implements Ledger {
|
|
167
173
|
}
|
168
174
|
|
169
175
|
private async *listBySubscriptionPagingAll(
|
170
|
-
options?: LedgerListBySubscriptionOptionalParams
|
176
|
+
options?: LedgerListBySubscriptionOptionalParams,
|
171
177
|
): AsyncIterableIterator<ConfidentialLedger> {
|
172
178
|
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
173
179
|
yield* page;
|
@@ -183,11 +189,11 @@ export class LedgerImpl implements Ledger {
|
|
183
189
|
get(
|
184
190
|
resourceGroupName: string,
|
185
191
|
ledgerName: string,
|
186
|
-
options?: LedgerGetOptionalParams
|
192
|
+
options?: LedgerGetOptionalParams,
|
187
193
|
): Promise<LedgerGetResponse> {
|
188
194
|
return this.client.sendOperationRequest(
|
189
195
|
{ resourceGroupName, ledgerName, options },
|
190
|
-
getOperationSpec
|
196
|
+
getOperationSpec,
|
191
197
|
);
|
192
198
|
}
|
193
199
|
|
@@ -200,25 +206,24 @@ export class LedgerImpl implements Ledger {
|
|
200
206
|
async beginDelete(
|
201
207
|
resourceGroupName: string,
|
202
208
|
ledgerName: string,
|
203
|
-
options?: LedgerDeleteOptionalParams
|
209
|
+
options?: LedgerDeleteOptionalParams,
|
204
210
|
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
205
211
|
const directSendOperation = async (
|
206
212
|
args: coreClient.OperationArguments,
|
207
|
-
spec: coreClient.OperationSpec
|
213
|
+
spec: coreClient.OperationSpec,
|
208
214
|
): Promise<void> => {
|
209
215
|
return this.client.sendOperationRequest(args, spec);
|
210
216
|
};
|
211
217
|
const sendOperationFn = async (
|
212
218
|
args: coreClient.OperationArguments,
|
213
|
-
spec: coreClient.OperationSpec
|
219
|
+
spec: coreClient.OperationSpec,
|
214
220
|
) => {
|
215
|
-
let currentRawResponse:
|
216
|
-
|
217
|
-
| undefined = undefined;
|
221
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
222
|
+
undefined;
|
218
223
|
const providedCallback = args.options?.onResponse;
|
219
224
|
const callback: coreClient.RawResponseCallback = (
|
220
225
|
rawResponse: coreClient.FullOperationResponse,
|
221
|
-
flatResponse: unknown
|
226
|
+
flatResponse: unknown,
|
222
227
|
) => {
|
223
228
|
currentRawResponse = rawResponse;
|
224
229
|
providedCallback?.(rawResponse, flatResponse);
|
@@ -227,8 +232,8 @@ export class LedgerImpl implements Ledger {
|
|
227
232
|
...args,
|
228
233
|
options: {
|
229
234
|
...args.options,
|
230
|
-
onResponse: callback
|
231
|
-
}
|
235
|
+
onResponse: callback,
|
236
|
+
},
|
232
237
|
};
|
233
238
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
234
239
|
return {
|
@@ -236,19 +241,19 @@ export class LedgerImpl implements Ledger {
|
|
236
241
|
rawResponse: {
|
237
242
|
statusCode: currentRawResponse!.status,
|
238
243
|
body: currentRawResponse!.parsedBody,
|
239
|
-
headers: currentRawResponse!.headers.toJSON()
|
240
|
-
}
|
244
|
+
headers: currentRawResponse!.headers.toJSON(),
|
245
|
+
},
|
241
246
|
};
|
242
247
|
};
|
243
248
|
|
244
249
|
const lro = createLroSpec({
|
245
250
|
sendOperationFn,
|
246
251
|
args: { resourceGroupName, ledgerName, options },
|
247
|
-
spec: deleteOperationSpec
|
252
|
+
spec: deleteOperationSpec,
|
248
253
|
});
|
249
254
|
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
250
255
|
restoreFrom: options?.resumeFrom,
|
251
|
-
intervalInMs: options?.updateIntervalInMs
|
256
|
+
intervalInMs: options?.updateIntervalInMs,
|
252
257
|
});
|
253
258
|
await poller.poll();
|
254
259
|
return poller;
|
@@ -263,12 +268,12 @@ export class LedgerImpl implements Ledger {
|
|
263
268
|
async beginDeleteAndWait(
|
264
269
|
resourceGroupName: string,
|
265
270
|
ledgerName: string,
|
266
|
-
options?: LedgerDeleteOptionalParams
|
271
|
+
options?: LedgerDeleteOptionalParams,
|
267
272
|
): Promise<void> {
|
268
273
|
const poller = await this.beginDelete(
|
269
274
|
resourceGroupName,
|
270
275
|
ledgerName,
|
271
|
-
options
|
276
|
+
options,
|
272
277
|
);
|
273
278
|
return poller.pollUntilDone();
|
274
279
|
}
|
@@ -284,27 +289,26 @@ export class LedgerImpl implements Ledger {
|
|
284
289
|
resourceGroupName: string,
|
285
290
|
ledgerName: string,
|
286
291
|
confidentialLedger: ConfidentialLedger,
|
287
|
-
options?: LedgerCreateOptionalParams
|
292
|
+
options?: LedgerCreateOptionalParams,
|
288
293
|
): Promise<
|
289
294
|
SimplePollerLike<OperationState<LedgerCreateResponse>, LedgerCreateResponse>
|
290
295
|
> {
|
291
296
|
const directSendOperation = async (
|
292
297
|
args: coreClient.OperationArguments,
|
293
|
-
spec: coreClient.OperationSpec
|
298
|
+
spec: coreClient.OperationSpec,
|
294
299
|
): Promise<LedgerCreateResponse> => {
|
295
300
|
return this.client.sendOperationRequest(args, spec);
|
296
301
|
};
|
297
302
|
const sendOperationFn = async (
|
298
303
|
args: coreClient.OperationArguments,
|
299
|
-
spec: coreClient.OperationSpec
|
304
|
+
spec: coreClient.OperationSpec,
|
300
305
|
) => {
|
301
|
-
let currentRawResponse:
|
302
|
-
|
303
|
-
| undefined = undefined;
|
306
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
307
|
+
undefined;
|
304
308
|
const providedCallback = args.options?.onResponse;
|
305
309
|
const callback: coreClient.RawResponseCallback = (
|
306
310
|
rawResponse: coreClient.FullOperationResponse,
|
307
|
-
flatResponse: unknown
|
311
|
+
flatResponse: unknown,
|
308
312
|
) => {
|
309
313
|
currentRawResponse = rawResponse;
|
310
314
|
providedCallback?.(rawResponse, flatResponse);
|
@@ -313,8 +317,8 @@ export class LedgerImpl implements Ledger {
|
|
313
317
|
...args,
|
314
318
|
options: {
|
315
319
|
...args.options,
|
316
|
-
onResponse: callback
|
317
|
-
}
|
320
|
+
onResponse: callback,
|
321
|
+
},
|
318
322
|
};
|
319
323
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
320
324
|
return {
|
@@ -322,15 +326,15 @@ export class LedgerImpl implements Ledger {
|
|
322
326
|
rawResponse: {
|
323
327
|
statusCode: currentRawResponse!.status,
|
324
328
|
body: currentRawResponse!.parsedBody,
|
325
|
-
headers: currentRawResponse!.headers.toJSON()
|
326
|
-
}
|
329
|
+
headers: currentRawResponse!.headers.toJSON(),
|
330
|
+
},
|
327
331
|
};
|
328
332
|
};
|
329
333
|
|
330
334
|
const lro = createLroSpec({
|
331
335
|
sendOperationFn,
|
332
336
|
args: { resourceGroupName, ledgerName, confidentialLedger, options },
|
333
|
-
spec: createOperationSpec
|
337
|
+
spec: createOperationSpec,
|
334
338
|
});
|
335
339
|
const poller = await createHttpPoller<
|
336
340
|
LedgerCreateResponse,
|
@@ -338,7 +342,7 @@ export class LedgerImpl implements Ledger {
|
|
338
342
|
>(lro, {
|
339
343
|
restoreFrom: options?.resumeFrom,
|
340
344
|
intervalInMs: options?.updateIntervalInMs,
|
341
|
-
resourceLocationConfig: "azure-async-operation"
|
345
|
+
resourceLocationConfig: "azure-async-operation",
|
342
346
|
});
|
343
347
|
await poller.poll();
|
344
348
|
return poller;
|
@@ -355,13 +359,13 @@ export class LedgerImpl implements Ledger {
|
|
355
359
|
resourceGroupName: string,
|
356
360
|
ledgerName: string,
|
357
361
|
confidentialLedger: ConfidentialLedger,
|
358
|
-
options?: LedgerCreateOptionalParams
|
362
|
+
options?: LedgerCreateOptionalParams,
|
359
363
|
): Promise<LedgerCreateResponse> {
|
360
364
|
const poller = await this.beginCreate(
|
361
365
|
resourceGroupName,
|
362
366
|
ledgerName,
|
363
367
|
confidentialLedger,
|
364
|
-
options
|
368
|
+
options,
|
365
369
|
);
|
366
370
|
return poller.pollUntilDone();
|
367
371
|
}
|
@@ -377,27 +381,26 @@ export class LedgerImpl implements Ledger {
|
|
377
381
|
resourceGroupName: string,
|
378
382
|
ledgerName: string,
|
379
383
|
confidentialLedger: ConfidentialLedger,
|
380
|
-
options?: LedgerUpdateOptionalParams
|
384
|
+
options?: LedgerUpdateOptionalParams,
|
381
385
|
): Promise<
|
382
386
|
SimplePollerLike<OperationState<LedgerUpdateResponse>, LedgerUpdateResponse>
|
383
387
|
> {
|
384
388
|
const directSendOperation = async (
|
385
389
|
args: coreClient.OperationArguments,
|
386
|
-
spec: coreClient.OperationSpec
|
390
|
+
spec: coreClient.OperationSpec,
|
387
391
|
): Promise<LedgerUpdateResponse> => {
|
388
392
|
return this.client.sendOperationRequest(args, spec);
|
389
393
|
};
|
390
394
|
const sendOperationFn = async (
|
391
395
|
args: coreClient.OperationArguments,
|
392
|
-
spec: coreClient.OperationSpec
|
396
|
+
spec: coreClient.OperationSpec,
|
393
397
|
) => {
|
394
|
-
let currentRawResponse:
|
395
|
-
|
396
|
-
| undefined = undefined;
|
398
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
399
|
+
undefined;
|
397
400
|
const providedCallback = args.options?.onResponse;
|
398
401
|
const callback: coreClient.RawResponseCallback = (
|
399
402
|
rawResponse: coreClient.FullOperationResponse,
|
400
|
-
flatResponse: unknown
|
403
|
+
flatResponse: unknown,
|
401
404
|
) => {
|
402
405
|
currentRawResponse = rawResponse;
|
403
406
|
providedCallback?.(rawResponse, flatResponse);
|
@@ -406,8 +409,8 @@ export class LedgerImpl implements Ledger {
|
|
406
409
|
...args,
|
407
410
|
options: {
|
408
411
|
...args.options,
|
409
|
-
onResponse: callback
|
410
|
-
}
|
412
|
+
onResponse: callback,
|
413
|
+
},
|
411
414
|
};
|
412
415
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
413
416
|
return {
|
@@ -415,22 +418,22 @@ export class LedgerImpl implements Ledger {
|
|
415
418
|
rawResponse: {
|
416
419
|
statusCode: currentRawResponse!.status,
|
417
420
|
body: currentRawResponse!.parsedBody,
|
418
|
-
headers: currentRawResponse!.headers.toJSON()
|
419
|
-
}
|
421
|
+
headers: currentRawResponse!.headers.toJSON(),
|
422
|
+
},
|
420
423
|
};
|
421
424
|
};
|
422
425
|
|
423
426
|
const lro = createLroSpec({
|
424
427
|
sendOperationFn,
|
425
428
|
args: { resourceGroupName, ledgerName, confidentialLedger, options },
|
426
|
-
spec: updateOperationSpec
|
429
|
+
spec: updateOperationSpec,
|
427
430
|
});
|
428
431
|
const poller = await createHttpPoller<
|
429
432
|
LedgerUpdateResponse,
|
430
433
|
OperationState<LedgerUpdateResponse>
|
431
434
|
>(lro, {
|
432
435
|
restoreFrom: options?.resumeFrom,
|
433
|
-
intervalInMs: options?.updateIntervalInMs
|
436
|
+
intervalInMs: options?.updateIntervalInMs,
|
434
437
|
});
|
435
438
|
await poller.poll();
|
436
439
|
return poller;
|
@@ -447,13 +450,13 @@ export class LedgerImpl implements Ledger {
|
|
447
450
|
resourceGroupName: string,
|
448
451
|
ledgerName: string,
|
449
452
|
confidentialLedger: ConfidentialLedger,
|
450
|
-
options?: LedgerUpdateOptionalParams
|
453
|
+
options?: LedgerUpdateOptionalParams,
|
451
454
|
): Promise<LedgerUpdateResponse> {
|
452
455
|
const poller = await this.beginUpdate(
|
453
456
|
resourceGroupName,
|
454
457
|
ledgerName,
|
455
458
|
confidentialLedger,
|
456
|
-
options
|
459
|
+
options,
|
457
460
|
);
|
458
461
|
return poller.pollUntilDone();
|
459
462
|
}
|
@@ -465,11 +468,11 @@ export class LedgerImpl implements Ledger {
|
|
465
468
|
*/
|
466
469
|
private _listByResourceGroup(
|
467
470
|
resourceGroupName: string,
|
468
|
-
options?: LedgerListByResourceGroupOptionalParams
|
471
|
+
options?: LedgerListByResourceGroupOptionalParams,
|
469
472
|
): Promise<LedgerListByResourceGroupResponse> {
|
470
473
|
return this.client.sendOperationRequest(
|
471
474
|
{ resourceGroupName, options },
|
472
|
-
listByResourceGroupOperationSpec
|
475
|
+
listByResourceGroupOperationSpec,
|
473
476
|
);
|
474
477
|
}
|
475
478
|
|
@@ -478,14 +481,199 @@ export class LedgerImpl implements Ledger {
|
|
478
481
|
* @param options The options parameters.
|
479
482
|
*/
|
480
483
|
private _listBySubscription(
|
481
|
-
options?: LedgerListBySubscriptionOptionalParams
|
484
|
+
options?: LedgerListBySubscriptionOptionalParams,
|
482
485
|
): Promise<LedgerListBySubscriptionResponse> {
|
483
486
|
return this.client.sendOperationRequest(
|
484
487
|
{ options },
|
485
|
-
listBySubscriptionOperationSpec
|
488
|
+
listBySubscriptionOperationSpec,
|
486
489
|
);
|
487
490
|
}
|
488
491
|
|
492
|
+
/**
|
493
|
+
* Backs up a Confidential Ledger Resource.
|
494
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
495
|
+
* @param ledgerName Name of the Confidential Ledger
|
496
|
+
* @param confidentialLedger Confidential Ledger Backup Request Body
|
497
|
+
* @param options The options parameters.
|
498
|
+
*/
|
499
|
+
async beginBackup(
|
500
|
+
resourceGroupName: string,
|
501
|
+
ledgerName: string,
|
502
|
+
confidentialLedger: ConfidentialLedgerBackup,
|
503
|
+
options?: LedgerBackupOptionalParams,
|
504
|
+
): Promise<
|
505
|
+
SimplePollerLike<OperationState<LedgerBackupResponse>, LedgerBackupResponse>
|
506
|
+
> {
|
507
|
+
const directSendOperation = async (
|
508
|
+
args: coreClient.OperationArguments,
|
509
|
+
spec: coreClient.OperationSpec,
|
510
|
+
): Promise<LedgerBackupResponse> => {
|
511
|
+
return this.client.sendOperationRequest(args, spec);
|
512
|
+
};
|
513
|
+
const sendOperationFn = async (
|
514
|
+
args: coreClient.OperationArguments,
|
515
|
+
spec: coreClient.OperationSpec,
|
516
|
+
) => {
|
517
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
518
|
+
undefined;
|
519
|
+
const providedCallback = args.options?.onResponse;
|
520
|
+
const callback: coreClient.RawResponseCallback = (
|
521
|
+
rawResponse: coreClient.FullOperationResponse,
|
522
|
+
flatResponse: unknown,
|
523
|
+
) => {
|
524
|
+
currentRawResponse = rawResponse;
|
525
|
+
providedCallback?.(rawResponse, flatResponse);
|
526
|
+
};
|
527
|
+
const updatedArgs = {
|
528
|
+
...args,
|
529
|
+
options: {
|
530
|
+
...args.options,
|
531
|
+
onResponse: callback,
|
532
|
+
},
|
533
|
+
};
|
534
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
535
|
+
return {
|
536
|
+
flatResponse,
|
537
|
+
rawResponse: {
|
538
|
+
statusCode: currentRawResponse!.status,
|
539
|
+
body: currentRawResponse!.parsedBody,
|
540
|
+
headers: currentRawResponse!.headers.toJSON(),
|
541
|
+
},
|
542
|
+
};
|
543
|
+
};
|
544
|
+
|
545
|
+
const lro = createLroSpec({
|
546
|
+
sendOperationFn,
|
547
|
+
args: { resourceGroupName, ledgerName, confidentialLedger, options },
|
548
|
+
spec: backupOperationSpec,
|
549
|
+
});
|
550
|
+
const poller = await createHttpPoller<
|
551
|
+
LedgerBackupResponse,
|
552
|
+
OperationState<LedgerBackupResponse>
|
553
|
+
>(lro, {
|
554
|
+
restoreFrom: options?.resumeFrom,
|
555
|
+
intervalInMs: options?.updateIntervalInMs,
|
556
|
+
});
|
557
|
+
await poller.poll();
|
558
|
+
return poller;
|
559
|
+
}
|
560
|
+
|
561
|
+
/**
|
562
|
+
* Backs up a Confidential Ledger Resource.
|
563
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
564
|
+
* @param ledgerName Name of the Confidential Ledger
|
565
|
+
* @param confidentialLedger Confidential Ledger Backup Request Body
|
566
|
+
* @param options The options parameters.
|
567
|
+
*/
|
568
|
+
async beginBackupAndWait(
|
569
|
+
resourceGroupName: string,
|
570
|
+
ledgerName: string,
|
571
|
+
confidentialLedger: ConfidentialLedgerBackup,
|
572
|
+
options?: LedgerBackupOptionalParams,
|
573
|
+
): Promise<LedgerBackupResponse> {
|
574
|
+
const poller = await this.beginBackup(
|
575
|
+
resourceGroupName,
|
576
|
+
ledgerName,
|
577
|
+
confidentialLedger,
|
578
|
+
options,
|
579
|
+
);
|
580
|
+
return poller.pollUntilDone();
|
581
|
+
}
|
582
|
+
|
583
|
+
/**
|
584
|
+
* Restores a Confidential Ledger Resource.
|
585
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
586
|
+
* @param ledgerName Name of the Confidential Ledger
|
587
|
+
* @param confidentialLedger Confidential Ledger Restore Request Body
|
588
|
+
* @param options The options parameters.
|
589
|
+
*/
|
590
|
+
async beginRestore(
|
591
|
+
resourceGroupName: string,
|
592
|
+
ledgerName: string,
|
593
|
+
confidentialLedger: ConfidentialLedgerRestore,
|
594
|
+
options?: LedgerRestoreOptionalParams,
|
595
|
+
): Promise<
|
596
|
+
SimplePollerLike<
|
597
|
+
OperationState<LedgerRestoreResponse>,
|
598
|
+
LedgerRestoreResponse
|
599
|
+
>
|
600
|
+
> {
|
601
|
+
const directSendOperation = async (
|
602
|
+
args: coreClient.OperationArguments,
|
603
|
+
spec: coreClient.OperationSpec,
|
604
|
+
): Promise<LedgerRestoreResponse> => {
|
605
|
+
return this.client.sendOperationRequest(args, spec);
|
606
|
+
};
|
607
|
+
const sendOperationFn = async (
|
608
|
+
args: coreClient.OperationArguments,
|
609
|
+
spec: coreClient.OperationSpec,
|
610
|
+
) => {
|
611
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
612
|
+
undefined;
|
613
|
+
const providedCallback = args.options?.onResponse;
|
614
|
+
const callback: coreClient.RawResponseCallback = (
|
615
|
+
rawResponse: coreClient.FullOperationResponse,
|
616
|
+
flatResponse: unknown,
|
617
|
+
) => {
|
618
|
+
currentRawResponse = rawResponse;
|
619
|
+
providedCallback?.(rawResponse, flatResponse);
|
620
|
+
};
|
621
|
+
const updatedArgs = {
|
622
|
+
...args,
|
623
|
+
options: {
|
624
|
+
...args.options,
|
625
|
+
onResponse: callback,
|
626
|
+
},
|
627
|
+
};
|
628
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
629
|
+
return {
|
630
|
+
flatResponse,
|
631
|
+
rawResponse: {
|
632
|
+
statusCode: currentRawResponse!.status,
|
633
|
+
body: currentRawResponse!.parsedBody,
|
634
|
+
headers: currentRawResponse!.headers.toJSON(),
|
635
|
+
},
|
636
|
+
};
|
637
|
+
};
|
638
|
+
|
639
|
+
const lro = createLroSpec({
|
640
|
+
sendOperationFn,
|
641
|
+
args: { resourceGroupName, ledgerName, confidentialLedger, options },
|
642
|
+
spec: restoreOperationSpec,
|
643
|
+
});
|
644
|
+
const poller = await createHttpPoller<
|
645
|
+
LedgerRestoreResponse,
|
646
|
+
OperationState<LedgerRestoreResponse>
|
647
|
+
>(lro, {
|
648
|
+
restoreFrom: options?.resumeFrom,
|
649
|
+
intervalInMs: options?.updateIntervalInMs,
|
650
|
+
});
|
651
|
+
await poller.poll();
|
652
|
+
return poller;
|
653
|
+
}
|
654
|
+
|
655
|
+
/**
|
656
|
+
* Restores a Confidential Ledger Resource.
|
657
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
658
|
+
* @param ledgerName Name of the Confidential Ledger
|
659
|
+
* @param confidentialLedger Confidential Ledger Restore Request Body
|
660
|
+
* @param options The options parameters.
|
661
|
+
*/
|
662
|
+
async beginRestoreAndWait(
|
663
|
+
resourceGroupName: string,
|
664
|
+
ledgerName: string,
|
665
|
+
confidentialLedger: ConfidentialLedgerRestore,
|
666
|
+
options?: LedgerRestoreOptionalParams,
|
667
|
+
): Promise<LedgerRestoreResponse> {
|
668
|
+
const poller = await this.beginRestore(
|
669
|
+
resourceGroupName,
|
670
|
+
ledgerName,
|
671
|
+
confidentialLedger,
|
672
|
+
options,
|
673
|
+
);
|
674
|
+
return poller.pollUntilDone();
|
675
|
+
}
|
676
|
+
|
489
677
|
/**
|
490
678
|
* ListByResourceGroupNext
|
491
679
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
@@ -495,11 +683,11 @@ export class LedgerImpl implements Ledger {
|
|
495
683
|
private _listByResourceGroupNext(
|
496
684
|
resourceGroupName: string,
|
497
685
|
nextLink: string,
|
498
|
-
options?: LedgerListByResourceGroupNextOptionalParams
|
686
|
+
options?: LedgerListByResourceGroupNextOptionalParams,
|
499
687
|
): Promise<LedgerListByResourceGroupNextResponse> {
|
500
688
|
return this.client.sendOperationRequest(
|
501
689
|
{ resourceGroupName, nextLink, options },
|
502
|
-
listByResourceGroupNextOperationSpec
|
690
|
+
listByResourceGroupNextOperationSpec,
|
503
691
|
);
|
504
692
|
}
|
505
693
|
|
@@ -510,11 +698,11 @@ export class LedgerImpl implements Ledger {
|
|
510
698
|
*/
|
511
699
|
private _listBySubscriptionNext(
|
512
700
|
nextLink: string,
|
513
|
-
options?: LedgerListBySubscriptionNextOptionalParams
|
701
|
+
options?: LedgerListBySubscriptionNextOptionalParams,
|
514
702
|
): Promise<LedgerListBySubscriptionNextResponse> {
|
515
703
|
return this.client.sendOperationRequest(
|
516
704
|
{ nextLink, options },
|
517
|
-
listBySubscriptionNextOperationSpec
|
705
|
+
listBySubscriptionNextOperationSpec,
|
518
706
|
);
|
519
707
|
}
|
520
708
|
}
|
@@ -522,30 +710,28 @@ export class LedgerImpl implements Ledger {
|
|
522
710
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
523
711
|
|
524
712
|
const getOperationSpec: coreClient.OperationSpec = {
|
525
|
-
path:
|
526
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
713
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
527
714
|
httpMethod: "GET",
|
528
715
|
responses: {
|
529
716
|
200: {
|
530
|
-
bodyMapper: Mappers.ConfidentialLedger
|
717
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
531
718
|
},
|
532
719
|
default: {
|
533
|
-
bodyMapper: Mappers.ErrorResponse
|
534
|
-
}
|
720
|
+
bodyMapper: Mappers.ErrorResponse,
|
721
|
+
},
|
535
722
|
},
|
536
723
|
queryParameters: [Parameters.apiVersion],
|
537
724
|
urlParameters: [
|
538
725
|
Parameters.$host,
|
539
726
|
Parameters.subscriptionId,
|
540
727
|
Parameters.resourceGroupName,
|
541
|
-
Parameters.ledgerName
|
728
|
+
Parameters.ledgerName,
|
542
729
|
],
|
543
730
|
headerParameters: [Parameters.accept],
|
544
|
-
serializer
|
731
|
+
serializer,
|
545
732
|
};
|
546
733
|
const deleteOperationSpec: coreClient.OperationSpec = {
|
547
|
-
path:
|
548
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
734
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
549
735
|
httpMethod: "DELETE",
|
550
736
|
responses: {
|
551
737
|
200: {},
|
@@ -553,39 +739,38 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
553
739
|
202: {},
|
554
740
|
204: {},
|
555
741
|
default: {
|
556
|
-
bodyMapper: Mappers.ErrorResponse
|
557
|
-
}
|
742
|
+
bodyMapper: Mappers.ErrorResponse,
|
743
|
+
},
|
558
744
|
},
|
559
745
|
queryParameters: [Parameters.apiVersion],
|
560
746
|
urlParameters: [
|
561
747
|
Parameters.$host,
|
562
748
|
Parameters.subscriptionId,
|
563
749
|
Parameters.resourceGroupName,
|
564
|
-
Parameters.ledgerName
|
750
|
+
Parameters.ledgerName,
|
565
751
|
],
|
566
752
|
headerParameters: [Parameters.accept],
|
567
|
-
serializer
|
753
|
+
serializer,
|
568
754
|
};
|
569
755
|
const createOperationSpec: coreClient.OperationSpec = {
|
570
|
-
path:
|
571
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
756
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
572
757
|
httpMethod: "PUT",
|
573
758
|
responses: {
|
574
759
|
200: {
|
575
|
-
bodyMapper: Mappers.ConfidentialLedger
|
760
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
576
761
|
},
|
577
762
|
201: {
|
578
|
-
bodyMapper: Mappers.ConfidentialLedger
|
763
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
579
764
|
},
|
580
765
|
202: {
|
581
|
-
bodyMapper: Mappers.ConfidentialLedger
|
766
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
582
767
|
},
|
583
768
|
204: {
|
584
|
-
bodyMapper: Mappers.ConfidentialLedger
|
769
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
585
770
|
},
|
586
771
|
default: {
|
587
|
-
bodyMapper: Mappers.ErrorResponse
|
588
|
-
}
|
772
|
+
bodyMapper: Mappers.ErrorResponse,
|
773
|
+
},
|
589
774
|
},
|
590
775
|
requestBody: Parameters.confidentialLedger,
|
591
776
|
queryParameters: [Parameters.apiVersion],
|
@@ -593,32 +778,31 @@ const createOperationSpec: coreClient.OperationSpec = {
|
|
593
778
|
Parameters.$host,
|
594
779
|
Parameters.subscriptionId,
|
595
780
|
Parameters.resourceGroupName,
|
596
|
-
Parameters.ledgerName
|
781
|
+
Parameters.ledgerName,
|
597
782
|
],
|
598
783
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
599
784
|
mediaType: "json",
|
600
|
-
serializer
|
785
|
+
serializer,
|
601
786
|
};
|
602
787
|
const updateOperationSpec: coreClient.OperationSpec = {
|
603
|
-
path:
|
604
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
788
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}",
|
605
789
|
httpMethod: "PATCH",
|
606
790
|
responses: {
|
607
791
|
200: {
|
608
|
-
bodyMapper: Mappers.ConfidentialLedger
|
792
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
609
793
|
},
|
610
794
|
201: {
|
611
|
-
bodyMapper: Mappers.ConfidentialLedger
|
795
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
612
796
|
},
|
613
797
|
202: {
|
614
|
-
bodyMapper: Mappers.ConfidentialLedger
|
798
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
615
799
|
},
|
616
800
|
204: {
|
617
|
-
bodyMapper: Mappers.ConfidentialLedger
|
801
|
+
bodyMapper: Mappers.ConfidentialLedger,
|
618
802
|
},
|
619
803
|
default: {
|
620
|
-
bodyMapper: Mappers.ErrorResponse
|
621
|
-
}
|
804
|
+
bodyMapper: Mappers.ErrorResponse,
|
805
|
+
},
|
622
806
|
},
|
623
807
|
requestBody: Parameters.confidentialLedger,
|
624
808
|
queryParameters: [Parameters.apiVersion],
|
@@ -626,86 +810,148 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
626
810
|
Parameters.$host,
|
627
811
|
Parameters.subscriptionId,
|
628
812
|
Parameters.resourceGroupName,
|
629
|
-
Parameters.ledgerName
|
813
|
+
Parameters.ledgerName,
|
630
814
|
],
|
631
815
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
632
816
|
mediaType: "json",
|
633
|
-
serializer
|
817
|
+
serializer,
|
634
818
|
};
|
635
819
|
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
636
|
-
path:
|
637
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers",
|
820
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers",
|
638
821
|
httpMethod: "GET",
|
639
822
|
responses: {
|
640
823
|
200: {
|
641
|
-
bodyMapper: Mappers.ConfidentialLedgerList
|
824
|
+
bodyMapper: Mappers.ConfidentialLedgerList,
|
642
825
|
},
|
643
826
|
default: {
|
644
|
-
bodyMapper: Mappers.ErrorResponse
|
645
|
-
}
|
827
|
+
bodyMapper: Mappers.ErrorResponse,
|
828
|
+
},
|
646
829
|
},
|
647
830
|
queryParameters: [Parameters.apiVersion, Parameters.filter],
|
648
831
|
urlParameters: [
|
649
832
|
Parameters.$host,
|
650
833
|
Parameters.subscriptionId,
|
651
|
-
Parameters.resourceGroupName
|
834
|
+
Parameters.resourceGroupName,
|
652
835
|
],
|
653
836
|
headerParameters: [Parameters.accept],
|
654
|
-
serializer
|
837
|
+
serializer,
|
655
838
|
};
|
656
839
|
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
657
|
-
path:
|
658
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/ledgers/",
|
840
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.ConfidentialLedger/ledgers/",
|
659
841
|
httpMethod: "GET",
|
660
842
|
responses: {
|
661
843
|
200: {
|
662
|
-
bodyMapper: Mappers.ConfidentialLedgerList
|
844
|
+
bodyMapper: Mappers.ConfidentialLedgerList,
|
663
845
|
},
|
664
846
|
default: {
|
665
|
-
bodyMapper: Mappers.ErrorResponse
|
666
|
-
}
|
847
|
+
bodyMapper: Mappers.ErrorResponse,
|
848
|
+
},
|
667
849
|
},
|
668
850
|
queryParameters: [Parameters.apiVersion, Parameters.filter],
|
669
851
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
670
852
|
headerParameters: [Parameters.accept],
|
671
|
-
serializer
|
853
|
+
serializer,
|
854
|
+
};
|
855
|
+
const backupOperationSpec: coreClient.OperationSpec = {
|
856
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/backup",
|
857
|
+
httpMethod: "POST",
|
858
|
+
responses: {
|
859
|
+
200: {
|
860
|
+
bodyMapper: Mappers.ConfidentialLedgerBackupResponse,
|
861
|
+
},
|
862
|
+
201: {
|
863
|
+
bodyMapper: Mappers.ConfidentialLedgerBackupResponse,
|
864
|
+
},
|
865
|
+
202: {
|
866
|
+
bodyMapper: Mappers.ConfidentialLedgerBackupResponse,
|
867
|
+
},
|
868
|
+
204: {
|
869
|
+
bodyMapper: Mappers.ConfidentialLedgerBackupResponse,
|
870
|
+
},
|
871
|
+
default: {
|
872
|
+
bodyMapper: Mappers.ErrorResponse,
|
873
|
+
},
|
874
|
+
},
|
875
|
+
requestBody: Parameters.confidentialLedger1,
|
876
|
+
queryParameters: [Parameters.apiVersion],
|
877
|
+
urlParameters: [
|
878
|
+
Parameters.$host,
|
879
|
+
Parameters.subscriptionId,
|
880
|
+
Parameters.resourceGroupName,
|
881
|
+
Parameters.ledgerName,
|
882
|
+
],
|
883
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
884
|
+
mediaType: "json",
|
885
|
+
serializer,
|
886
|
+
};
|
887
|
+
const restoreOperationSpec: coreClient.OperationSpec = {
|
888
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConfidentialLedger/ledgers/{ledgerName}/restore",
|
889
|
+
httpMethod: "POST",
|
890
|
+
responses: {
|
891
|
+
200: {
|
892
|
+
bodyMapper: Mappers.ConfidentialLedgerRestoreResponse,
|
893
|
+
},
|
894
|
+
201: {
|
895
|
+
bodyMapper: Mappers.ConfidentialLedgerRestoreResponse,
|
896
|
+
},
|
897
|
+
202: {
|
898
|
+
bodyMapper: Mappers.ConfidentialLedgerRestoreResponse,
|
899
|
+
},
|
900
|
+
204: {
|
901
|
+
bodyMapper: Mappers.ConfidentialLedgerRestoreResponse,
|
902
|
+
},
|
903
|
+
default: {
|
904
|
+
bodyMapper: Mappers.ErrorResponse,
|
905
|
+
},
|
906
|
+
},
|
907
|
+
requestBody: Parameters.confidentialLedger2,
|
908
|
+
queryParameters: [Parameters.apiVersion],
|
909
|
+
urlParameters: [
|
910
|
+
Parameters.$host,
|
911
|
+
Parameters.subscriptionId,
|
912
|
+
Parameters.resourceGroupName,
|
913
|
+
Parameters.ledgerName,
|
914
|
+
],
|
915
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
916
|
+
mediaType: "json",
|
917
|
+
serializer,
|
672
918
|
};
|
673
919
|
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
674
920
|
path: "{nextLink}",
|
675
921
|
httpMethod: "GET",
|
676
922
|
responses: {
|
677
923
|
200: {
|
678
|
-
bodyMapper: Mappers.ConfidentialLedgerList
|
924
|
+
bodyMapper: Mappers.ConfidentialLedgerList,
|
679
925
|
},
|
680
926
|
default: {
|
681
|
-
bodyMapper: Mappers.ErrorResponse
|
682
|
-
}
|
927
|
+
bodyMapper: Mappers.ErrorResponse,
|
928
|
+
},
|
683
929
|
},
|
684
930
|
urlParameters: [
|
685
931
|
Parameters.$host,
|
686
932
|
Parameters.nextLink,
|
687
933
|
Parameters.subscriptionId,
|
688
|
-
Parameters.resourceGroupName
|
934
|
+
Parameters.resourceGroupName,
|
689
935
|
],
|
690
936
|
headerParameters: [Parameters.accept],
|
691
|
-
serializer
|
937
|
+
serializer,
|
692
938
|
};
|
693
939
|
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
694
940
|
path: "{nextLink}",
|
695
941
|
httpMethod: "GET",
|
696
942
|
responses: {
|
697
943
|
200: {
|
698
|
-
bodyMapper: Mappers.ConfidentialLedgerList
|
944
|
+
bodyMapper: Mappers.ConfidentialLedgerList,
|
699
945
|
},
|
700
946
|
default: {
|
701
|
-
bodyMapper: Mappers.ErrorResponse
|
702
|
-
}
|
947
|
+
bodyMapper: Mappers.ErrorResponse,
|
948
|
+
},
|
703
949
|
},
|
704
950
|
urlParameters: [
|
705
951
|
Parameters.$host,
|
706
952
|
Parameters.nextLink,
|
707
|
-
Parameters.subscriptionId
|
953
|
+
Parameters.subscriptionId,
|
708
954
|
],
|
709
955
|
headerParameters: [Parameters.accept],
|
710
|
-
serializer
|
956
|
+
serializer,
|
711
957
|
};
|