@azure/keyvault-admin 4.2.0-alpha.20211217.2 → 4.2.0-alpha.20220204.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/dist/index.js +110 -92
- package/dist/index.js.map +1 -1
- package/dist-esm/keyvault-admin/src/accessControlClient.js +9 -13
- package/dist-esm/keyvault-admin/src/accessControlClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/accessControlModels.js +1 -1
- package/dist-esm/keyvault-admin/src/accessControlModels.js.map +1 -1
- package/dist-esm/keyvault-admin/src/backupClient.js +4 -4
- package/dist-esm/keyvault-admin/src/backupClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/challengeAuthenticationCallbacks.js +5 -5
- package/dist-esm/keyvault-admin/src/challengeAuthenticationCallbacks.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/backup/operation.js +4 -4
- package/dist-esm/keyvault-admin/src/lro/backup/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/backup/poller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/backup/poller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/keyVaultAdminPoller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/keyVaultAdminPoller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/restore/operation.js +5 -5
- package/dist-esm/keyvault-admin/src/lro/restore/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/restore/poller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/restore/poller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/operation.js +4 -4
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/poller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/poller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/mappings.js +7 -7
- package/dist-esm/keyvault-admin/src/mappings.js.map +1 -1
- package/dist-esm/keyvault-admin/src/tracingHelpers.js +3 -3
- package/dist-esm/keyvault-admin/src/tracingHelpers.js.map +1 -1
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js +3 -3
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js +1 -1
- package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js.map +1 -1
- package/dist-esm/keyvault-common/src/tracingHelpers.js +3 -3
- package/dist-esm/keyvault-common/src/tracingHelpers.js.map +1 -1
- package/package.json +7 -11
- package/types/keyvault-admin.d.ts +34 -6
package/dist/index.js
CHANGED
|
@@ -5,13 +5,31 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var coreClient = require('@azure/core-client');
|
|
7
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
8
|
-
require('@azure/core-http');
|
|
9
|
-
require('url');
|
|
10
8
|
var coreTracing = require('@azure/core-tracing');
|
|
11
9
|
var logger$1 = require('@azure/logger');
|
|
12
10
|
var uuid = require('uuid');
|
|
13
11
|
var coreLro = require('@azure/core-lro');
|
|
14
12
|
|
|
13
|
+
function _interopNamespace(e) {
|
|
14
|
+
if (e && e.__esModule) return e;
|
|
15
|
+
var n = Object.create(null);
|
|
16
|
+
if (e) {
|
|
17
|
+
Object.keys(e).forEach(function (k) {
|
|
18
|
+
if (k !== 'default') {
|
|
19
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return e[k]; }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
n["default"] = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
32
|
+
|
|
15
33
|
// Copyright (c) Microsoft Corporation.
|
|
16
34
|
// Licensed under the MIT license.
|
|
17
35
|
/**
|
|
@@ -907,7 +925,7 @@ class RoleDefinitionsImpl {
|
|
|
907
925
|
* @param options The options parameters.
|
|
908
926
|
*/
|
|
909
927
|
delete(vaultBaseUrl, scope, roleDefinitionName, options) {
|
|
910
|
-
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleDefinitionName, options }, deleteOperationSpec);
|
|
928
|
+
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleDefinitionName, options }, deleteOperationSpec$1);
|
|
911
929
|
}
|
|
912
930
|
/**
|
|
913
931
|
* Creates or updates a custom role definition.
|
|
@@ -929,7 +947,7 @@ class RoleDefinitionsImpl {
|
|
|
929
947
|
* @param options The options parameters.
|
|
930
948
|
*/
|
|
931
949
|
get(vaultBaseUrl, scope, roleDefinitionName, options) {
|
|
932
|
-
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleDefinitionName, options }, getOperationSpec);
|
|
950
|
+
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleDefinitionName, options }, getOperationSpec$1);
|
|
933
951
|
}
|
|
934
952
|
/**
|
|
935
953
|
* Get all role definitions that are applicable at scope and above.
|
|
@@ -952,8 +970,8 @@ class RoleDefinitionsImpl {
|
|
|
952
970
|
}
|
|
953
971
|
}
|
|
954
972
|
// Operation Specifications
|
|
955
|
-
const serializer =
|
|
956
|
-
const deleteOperationSpec = {
|
|
973
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
974
|
+
const deleteOperationSpec$1 = {
|
|
957
975
|
path: "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}",
|
|
958
976
|
httpMethod: "DELETE",
|
|
959
977
|
responses: {
|
|
@@ -970,7 +988,7 @@ const deleteOperationSpec = {
|
|
|
970
988
|
roleDefinitionName
|
|
971
989
|
],
|
|
972
990
|
headerParameters: [accept],
|
|
973
|
-
serializer
|
|
991
|
+
serializer: serializer$2
|
|
974
992
|
};
|
|
975
993
|
const createOrUpdateOperationSpec = {
|
|
976
994
|
path: "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}",
|
|
@@ -992,9 +1010,9 @@ const createOrUpdateOperationSpec = {
|
|
|
992
1010
|
],
|
|
993
1011
|
headerParameters: [accept, contentType],
|
|
994
1012
|
mediaType: "json",
|
|
995
|
-
serializer
|
|
1013
|
+
serializer: serializer$2
|
|
996
1014
|
};
|
|
997
|
-
const getOperationSpec = {
|
|
1015
|
+
const getOperationSpec$1 = {
|
|
998
1016
|
path: "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}",
|
|
999
1017
|
httpMethod: "GET",
|
|
1000
1018
|
responses: {
|
|
@@ -1012,7 +1030,7 @@ const getOperationSpec = {
|
|
|
1012
1030
|
roleDefinitionName
|
|
1013
1031
|
],
|
|
1014
1032
|
headerParameters: [accept],
|
|
1015
|
-
serializer
|
|
1033
|
+
serializer: serializer$2
|
|
1016
1034
|
};
|
|
1017
1035
|
const listOperationSpec = {
|
|
1018
1036
|
path: "/{scope}/providers/Microsoft.Authorization/roleDefinitions",
|
|
@@ -1028,7 +1046,7 @@ const listOperationSpec = {
|
|
|
1028
1046
|
queryParameters: [apiVersion, filter],
|
|
1029
1047
|
urlParameters: [vaultBaseUrl, scope],
|
|
1030
1048
|
headerParameters: [accept],
|
|
1031
|
-
serializer
|
|
1049
|
+
serializer: serializer$2
|
|
1032
1050
|
};
|
|
1033
1051
|
const listNextOperationSpec = {
|
|
1034
1052
|
path: "{nextLink}",
|
|
@@ -1048,7 +1066,7 @@ const listNextOperationSpec = {
|
|
|
1048
1066
|
nextLink
|
|
1049
1067
|
],
|
|
1050
1068
|
headerParameters: [accept],
|
|
1051
|
-
serializer
|
|
1069
|
+
serializer: serializer$2
|
|
1052
1070
|
};
|
|
1053
1071
|
|
|
1054
1072
|
/*
|
|
@@ -1075,7 +1093,7 @@ class RoleAssignmentsImpl {
|
|
|
1075
1093
|
* @param options The options parameters.
|
|
1076
1094
|
*/
|
|
1077
1095
|
delete(vaultBaseUrl, scope, roleAssignmentName, options) {
|
|
1078
|
-
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleAssignmentName, options }, deleteOperationSpec
|
|
1096
|
+
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleAssignmentName, options }, deleteOperationSpec);
|
|
1079
1097
|
}
|
|
1080
1098
|
/**
|
|
1081
1099
|
* Creates a role assignment.
|
|
@@ -1096,7 +1114,7 @@ class RoleAssignmentsImpl {
|
|
|
1096
1114
|
* @param options The options parameters.
|
|
1097
1115
|
*/
|
|
1098
1116
|
get(vaultBaseUrl, scope, roleAssignmentName, options) {
|
|
1099
|
-
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleAssignmentName, options }, getOperationSpec
|
|
1117
|
+
return this.client.sendOperationRequest({ vaultBaseUrl, scope, roleAssignmentName, options }, getOperationSpec);
|
|
1100
1118
|
}
|
|
1101
1119
|
/**
|
|
1102
1120
|
* Gets role assignments for a scope.
|
|
@@ -1119,8 +1137,8 @@ class RoleAssignmentsImpl {
|
|
|
1119
1137
|
}
|
|
1120
1138
|
}
|
|
1121
1139
|
// Operation Specifications
|
|
1122
|
-
const serializer$1 =
|
|
1123
|
-
const deleteOperationSpec
|
|
1140
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1141
|
+
const deleteOperationSpec = {
|
|
1124
1142
|
path: "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}",
|
|
1125
1143
|
httpMethod: "DELETE",
|
|
1126
1144
|
responses: {
|
|
@@ -1161,7 +1179,7 @@ const createOperationSpec = {
|
|
|
1161
1179
|
mediaType: "json",
|
|
1162
1180
|
serializer: serializer$1
|
|
1163
1181
|
};
|
|
1164
|
-
const getOperationSpec
|
|
1182
|
+
const getOperationSpec = {
|
|
1165
1183
|
path: "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}",
|
|
1166
1184
|
httpMethod: "GET",
|
|
1167
1185
|
responses: {
|
|
@@ -1225,7 +1243,7 @@ const listForScopeNextOperationSpec = {
|
|
|
1225
1243
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1226
1244
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1227
1245
|
*/
|
|
1228
|
-
class KeyVaultClientContext extends
|
|
1246
|
+
class KeyVaultClientContext extends coreClient__namespace.ServiceClient {
|
|
1229
1247
|
/**
|
|
1230
1248
|
* Initializes a new instance of the KeyVaultClientContext class.
|
|
1231
1249
|
* @param apiVersion Api Version
|
|
@@ -1320,7 +1338,7 @@ class KeyVaultClient extends KeyVaultClientContext {
|
|
|
1320
1338
|
}
|
|
1321
1339
|
}
|
|
1322
1340
|
// Operation Specifications
|
|
1323
|
-
const serializer
|
|
1341
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1324
1342
|
const fullBackupOperationSpec = {
|
|
1325
1343
|
path: "/backup",
|
|
1326
1344
|
httpMethod: "POST",
|
|
@@ -1338,7 +1356,7 @@ const fullBackupOperationSpec = {
|
|
|
1338
1356
|
urlParameters: [vaultBaseUrl],
|
|
1339
1357
|
headerParameters: [accept, contentType],
|
|
1340
1358
|
mediaType: "json",
|
|
1341
|
-
serializer
|
|
1359
|
+
serializer
|
|
1342
1360
|
};
|
|
1343
1361
|
const fullBackupStatusOperationSpec = {
|
|
1344
1362
|
path: "/backup/{jobId}/pending",
|
|
@@ -1354,7 +1372,7 @@ const fullBackupStatusOperationSpec = {
|
|
|
1354
1372
|
queryParameters: [apiVersion],
|
|
1355
1373
|
urlParameters: [vaultBaseUrl, jobId],
|
|
1356
1374
|
headerParameters: [accept],
|
|
1357
|
-
serializer
|
|
1375
|
+
serializer
|
|
1358
1376
|
};
|
|
1359
1377
|
const fullRestoreOperationOperationSpec = {
|
|
1360
1378
|
path: "/restore",
|
|
@@ -1373,7 +1391,7 @@ const fullRestoreOperationOperationSpec = {
|
|
|
1373
1391
|
urlParameters: [vaultBaseUrl],
|
|
1374
1392
|
headerParameters: [accept, contentType],
|
|
1375
1393
|
mediaType: "json",
|
|
1376
|
-
serializer
|
|
1394
|
+
serializer
|
|
1377
1395
|
};
|
|
1378
1396
|
const restoreStatusOperationSpec = {
|
|
1379
1397
|
path: "/restore/{jobId}/pending",
|
|
@@ -1389,7 +1407,7 @@ const restoreStatusOperationSpec = {
|
|
|
1389
1407
|
queryParameters: [apiVersion],
|
|
1390
1408
|
urlParameters: [vaultBaseUrl, jobId],
|
|
1391
1409
|
headerParameters: [accept],
|
|
1392
|
-
serializer
|
|
1410
|
+
serializer
|
|
1393
1411
|
};
|
|
1394
1412
|
const selectiveKeyRestoreOperationOperationSpec = {
|
|
1395
1413
|
path: "/keys/{keyName}/restore",
|
|
@@ -1408,7 +1426,7 @@ const selectiveKeyRestoreOperationOperationSpec = {
|
|
|
1408
1426
|
urlParameters: [vaultBaseUrl, keyName],
|
|
1409
1427
|
headerParameters: [accept, contentType],
|
|
1410
1428
|
mediaType: "json",
|
|
1411
|
-
serializer
|
|
1429
|
+
serializer
|
|
1412
1430
|
};
|
|
1413
1431
|
|
|
1414
1432
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -1423,7 +1441,7 @@ const validParsedWWWAuthenticateProperties = [
|
|
|
1423
1441
|
"authorization_url",
|
|
1424
1442
|
"resource",
|
|
1425
1443
|
"scope",
|
|
1426
|
-
"tenantId"
|
|
1444
|
+
"tenantId",
|
|
1427
1445
|
];
|
|
1428
1446
|
/**
|
|
1429
1447
|
* Parses an WWW-Authenticate response.
|
|
@@ -1484,9 +1502,9 @@ function createChallengeCallbacks() {
|
|
|
1484
1502
|
return {
|
|
1485
1503
|
abortSignal: request.abortSignal,
|
|
1486
1504
|
requestOptions: {
|
|
1487
|
-
timeout: request.timeout
|
|
1505
|
+
timeout: request.timeout,
|
|
1488
1506
|
},
|
|
1489
|
-
tracingOptions: request.tracingOptions
|
|
1507
|
+
tracingOptions: request.tracingOptions,
|
|
1490
1508
|
};
|
|
1491
1509
|
}
|
|
1492
1510
|
async function authorizeRequest(options) {
|
|
@@ -1496,7 +1514,7 @@ function createChallengeCallbacks() {
|
|
|
1496
1514
|
case "none":
|
|
1497
1515
|
challengeState = {
|
|
1498
1516
|
status: "started",
|
|
1499
|
-
originalBody: request.body
|
|
1517
|
+
originalBody: request.body,
|
|
1500
1518
|
};
|
|
1501
1519
|
request.body = null;
|
|
1502
1520
|
break;
|
|
@@ -1532,13 +1550,13 @@ function createChallengeCallbacks() {
|
|
|
1532
1550
|
}
|
|
1533
1551
|
options.request.headers.set("Authorization", `Bearer ${accessToken.token}`);
|
|
1534
1552
|
challengeState = {
|
|
1535
|
-
status: "complete"
|
|
1553
|
+
status: "complete",
|
|
1536
1554
|
};
|
|
1537
1555
|
return true;
|
|
1538
1556
|
}
|
|
1539
1557
|
return {
|
|
1540
1558
|
authorizeRequest,
|
|
1541
|
-
authorizeRequestOnChallenge
|
|
1559
|
+
authorizeRequestOnChallenge,
|
|
1542
1560
|
};
|
|
1543
1561
|
}
|
|
1544
1562
|
|
|
@@ -1555,7 +1573,7 @@ function createChallengeCallbacks() {
|
|
|
1555
1573
|
function createTraceFunction(prefix) {
|
|
1556
1574
|
const createSpan = coreTracing.createSpanFunction({
|
|
1557
1575
|
namespace: "Microsoft.KeyVault",
|
|
1558
|
-
packagePrefix: prefix
|
|
1576
|
+
packagePrefix: prefix,
|
|
1559
1577
|
});
|
|
1560
1578
|
return async function (operationName, options, cb) {
|
|
1561
1579
|
const { updatedOptions, span } = createSpan(operationName, options);
|
|
@@ -1565,14 +1583,14 @@ function createTraceFunction(prefix) {
|
|
|
1565
1583
|
const result = await cb(updatedOptions, span);
|
|
1566
1584
|
// otel 0.16+ needs this or else the code ends up being set as UNSET
|
|
1567
1585
|
span.setStatus({
|
|
1568
|
-
code: coreTracing.SpanStatusCode.OK
|
|
1586
|
+
code: coreTracing.SpanStatusCode.OK,
|
|
1569
1587
|
});
|
|
1570
1588
|
return result;
|
|
1571
1589
|
}
|
|
1572
1590
|
catch (err) {
|
|
1573
1591
|
span.setStatus({
|
|
1574
1592
|
code: coreTracing.SpanStatusCode.ERROR,
|
|
1575
|
-
message: err.message
|
|
1593
|
+
message: err.message,
|
|
1576
1594
|
});
|
|
1577
1595
|
throw err;
|
|
1578
1596
|
}
|
|
@@ -1602,10 +1620,10 @@ const mappings = {
|
|
|
1602
1620
|
properties: {
|
|
1603
1621
|
scope: scope,
|
|
1604
1622
|
roleDefinitionId: roleDefinitionId,
|
|
1605
|
-
principalId: principalId
|
|
1606
|
-
}
|
|
1623
|
+
principalId: principalId,
|
|
1624
|
+
},
|
|
1607
1625
|
};
|
|
1608
|
-
}
|
|
1626
|
+
},
|
|
1609
1627
|
},
|
|
1610
1628
|
roleDefinition: {
|
|
1611
1629
|
generatedToPublic(roleDefinition) {
|
|
@@ -1618,9 +1636,9 @@ const mappings = {
|
|
|
1618
1636
|
description: description,
|
|
1619
1637
|
roleType: roleType,
|
|
1620
1638
|
permissions: permissions,
|
|
1621
|
-
assignableScopes: assignableScopes
|
|
1639
|
+
assignableScopes: assignableScopes,
|
|
1622
1640
|
};
|
|
1623
|
-
}
|
|
1641
|
+
},
|
|
1624
1642
|
},
|
|
1625
1643
|
folderUriParts(folderUri) {
|
|
1626
1644
|
const uriParts = folderUri.split("/");
|
|
@@ -1631,13 +1649,13 @@ const mappings = {
|
|
|
1631
1649
|
}
|
|
1632
1650
|
return {
|
|
1633
1651
|
folderName,
|
|
1634
|
-
folderUri: storageUri
|
|
1652
|
+
folderUri: storageUri,
|
|
1635
1653
|
};
|
|
1636
|
-
}
|
|
1654
|
+
},
|
|
1637
1655
|
};
|
|
1638
1656
|
|
|
1639
1657
|
// Copyright (c) Microsoft Corporation.
|
|
1640
|
-
const withTrace = createTraceFunction("Azure.KeyVault.Admin.KeyVaultAccessControlClient");
|
|
1658
|
+
const withTrace$3 = createTraceFunction("Azure.KeyVault.Admin.KeyVaultAccessControlClient");
|
|
1641
1659
|
/**
|
|
1642
1660
|
* The KeyVaultAccessControlClient provides methods to manage
|
|
1643
1661
|
* access control and role assignments in any given Azure Key Vault instance.
|
|
@@ -1669,14 +1687,14 @@ class KeyVaultAccessControlClient {
|
|
|
1669
1687
|
additionalAllowedHeaderNames: [
|
|
1670
1688
|
"x-ms-keyvault-region",
|
|
1671
1689
|
"x-ms-keyvault-network-info",
|
|
1672
|
-
"x-ms-keyvault-service-version"
|
|
1673
|
-
]
|
|
1690
|
+
"x-ms-keyvault-service-version",
|
|
1691
|
+
],
|
|
1674
1692
|
} });
|
|
1675
1693
|
this.client = new KeyVaultClient(serviceVersion, clientOptions);
|
|
1676
1694
|
this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
1677
1695
|
credential,
|
|
1678
1696
|
scopes: authenticationScopes,
|
|
1679
|
-
challengeCallbacks: createChallengeCallbacks()
|
|
1697
|
+
challengeCallbacks: createChallengeCallbacks(),
|
|
1680
1698
|
}));
|
|
1681
1699
|
}
|
|
1682
1700
|
/**
|
|
@@ -1697,12 +1715,12 @@ class KeyVaultAccessControlClient {
|
|
|
1697
1715
|
* @param options - The optional parameters.
|
|
1698
1716
|
*/
|
|
1699
1717
|
createRoleAssignment(roleScope, name, roleDefinitionId, principalId, options = {}) {
|
|
1700
|
-
return withTrace("createRoleAssignment", options, async (updatedOptions) => {
|
|
1718
|
+
return withTrace$3("createRoleAssignment", options, async (updatedOptions) => {
|
|
1701
1719
|
const response = await this.client.roleAssignments.create(this.vaultUrl, roleScope, name, {
|
|
1702
1720
|
properties: {
|
|
1703
1721
|
roleDefinitionId,
|
|
1704
|
-
principalId
|
|
1705
|
-
}
|
|
1722
|
+
principalId,
|
|
1723
|
+
},
|
|
1706
1724
|
}, updatedOptions);
|
|
1707
1725
|
return mappings.roleAssignment.generatedToPublic(response);
|
|
1708
1726
|
});
|
|
@@ -1722,7 +1740,7 @@ class KeyVaultAccessControlClient {
|
|
|
1722
1740
|
* @param options - The optional parameters.
|
|
1723
1741
|
*/
|
|
1724
1742
|
deleteRoleAssignment(roleScope, name, options = {}) {
|
|
1725
|
-
return withTrace("deleteRoleAssignment", options, async (updatedOptions) => {
|
|
1743
|
+
return withTrace$3("deleteRoleAssignment", options, async (updatedOptions) => {
|
|
1726
1744
|
await this.client.roleAssignments.delete(this.vaultUrl, roleScope, name, updatedOptions);
|
|
1727
1745
|
});
|
|
1728
1746
|
}
|
|
@@ -1742,13 +1760,12 @@ class KeyVaultAccessControlClient {
|
|
|
1742
1760
|
* @param options - The optional parameters.
|
|
1743
1761
|
*/
|
|
1744
1762
|
getRoleAssignment(roleScope, name, options = {}) {
|
|
1745
|
-
return withTrace("getRoleAssignment", options, async (updatedOptions) => {
|
|
1763
|
+
return withTrace$3("getRoleAssignment", options, async (updatedOptions) => {
|
|
1746
1764
|
const response = await this.client.roleAssignments.get(this.vaultUrl, roleScope, name, updatedOptions);
|
|
1747
1765
|
return mappings.roleAssignment.generatedToPublic(response);
|
|
1748
1766
|
});
|
|
1749
1767
|
}
|
|
1750
1768
|
/**
|
|
1751
|
-
* @internal
|
|
1752
1769
|
* Deals with the pagination of {@link listRoleAssignments}.
|
|
1753
1770
|
* @param roleScope - The scope of the role assignments.
|
|
1754
1771
|
* @param continuationState - An object that indicates the position of the paginated request.
|
|
@@ -1758,7 +1775,7 @@ class KeyVaultAccessControlClient {
|
|
|
1758
1775
|
return tslib.__asyncGenerator(this, arguments, function* listRoleAssignmentsPage_1() {
|
|
1759
1776
|
if (!continuationState.continuationToken) {
|
|
1760
1777
|
const optionsComplete = options || {};
|
|
1761
|
-
const currentSetResponse = yield tslib.__await(withTrace("listRoleAssignments", optionsComplete, async (updatedOptions) => {
|
|
1778
|
+
const currentSetResponse = yield tslib.__await(withTrace$3("listRoleAssignments", optionsComplete, async (updatedOptions) => {
|
|
1762
1779
|
return this.client.roleAssignments.listForScope(this.vaultUrl, roleScope, updatedOptions);
|
|
1763
1780
|
}));
|
|
1764
1781
|
continuationState.continuationToken = currentSetResponse.nextLink;
|
|
@@ -1767,7 +1784,7 @@ class KeyVaultAccessControlClient {
|
|
|
1767
1784
|
}
|
|
1768
1785
|
}
|
|
1769
1786
|
while (continuationState.continuationToken) {
|
|
1770
|
-
const currentSetResponse = yield tslib.__await(withTrace("listRoleAssignments", options || {}, async (updatedOptions) => {
|
|
1787
|
+
const currentSetResponse = yield tslib.__await(withTrace$3("listRoleAssignments", options || {}, async (updatedOptions) => {
|
|
1771
1788
|
return this.client.roleAssignments.listForScopeNext(this.vaultUrl, roleScope, continuationState.continuationToken, updatedOptions);
|
|
1772
1789
|
}));
|
|
1773
1790
|
continuationState.continuationToken = currentSetResponse.nextLink;
|
|
@@ -1781,7 +1798,6 @@ class KeyVaultAccessControlClient {
|
|
|
1781
1798
|
});
|
|
1782
1799
|
}
|
|
1783
1800
|
/**
|
|
1784
|
-
* @internal
|
|
1785
1801
|
* Deals with the iteration of all the available results of {@link listRoleAssignments}.
|
|
1786
1802
|
* @param roleScope - The scope of the role assignments.
|
|
1787
1803
|
* @param options - Common options for the iterative endpoints.
|
|
@@ -1827,11 +1843,10 @@ class KeyVaultAccessControlClient {
|
|
|
1827
1843
|
[Symbol.asyncIterator]() {
|
|
1828
1844
|
return this;
|
|
1829
1845
|
},
|
|
1830
|
-
byPage: (settings = {}) => this.listRoleAssignmentsPage(roleScope, settings, options)
|
|
1846
|
+
byPage: (settings = {}) => this.listRoleAssignmentsPage(roleScope, settings, options),
|
|
1831
1847
|
};
|
|
1832
1848
|
}
|
|
1833
1849
|
/**
|
|
1834
|
-
* @internal
|
|
1835
1850
|
* Deals with the pagination of {@link listRoleDefinitions}.
|
|
1836
1851
|
* @param roleScope - The scope of the role definition.
|
|
1837
1852
|
* @param continuationState - An object that indicates the position of the paginated request.
|
|
@@ -1841,14 +1856,14 @@ class KeyVaultAccessControlClient {
|
|
|
1841
1856
|
return tslib.__asyncGenerator(this, arguments, function* listRoleDefinitionsPage_1() {
|
|
1842
1857
|
if (!continuationState.continuationToken) {
|
|
1843
1858
|
const optionsComplete = options || {};
|
|
1844
|
-
const currentSetResponse = yield tslib.__await(withTrace("listRoleDefinitions", optionsComplete, (updatedOptions) => this.client.roleDefinitions.list(this.vaultUrl, roleScope, updatedOptions)));
|
|
1859
|
+
const currentSetResponse = yield tslib.__await(withTrace$3("listRoleDefinitions", optionsComplete, (updatedOptions) => this.client.roleDefinitions.list(this.vaultUrl, roleScope, updatedOptions)));
|
|
1845
1860
|
continuationState.continuationToken = currentSetResponse.nextLink;
|
|
1846
1861
|
if (currentSetResponse.value) {
|
|
1847
1862
|
yield yield tslib.__await(currentSetResponse.value.map(mappings.roleDefinition.generatedToPublic, this));
|
|
1848
1863
|
}
|
|
1849
1864
|
}
|
|
1850
1865
|
while (continuationState.continuationToken) {
|
|
1851
|
-
const currentSetResponse = yield tslib.__await(withTrace("listRoleDefinitions", options, (updatedOptions) => this.client.roleDefinitions.listNext(this.vaultUrl, roleScope, continuationState.continuationToken, updatedOptions)));
|
|
1866
|
+
const currentSetResponse = yield tslib.__await(withTrace$3("listRoleDefinitions", options, (updatedOptions) => this.client.roleDefinitions.listNext(this.vaultUrl, roleScope, continuationState.continuationToken, updatedOptions)));
|
|
1852
1867
|
continuationState.continuationToken = currentSetResponse.nextLink;
|
|
1853
1868
|
if (currentSetResponse.value) {
|
|
1854
1869
|
yield yield tslib.__await(currentSetResponse.value.map(mappings.roleDefinition.generatedToPublic, this));
|
|
@@ -1860,7 +1875,6 @@ class KeyVaultAccessControlClient {
|
|
|
1860
1875
|
});
|
|
1861
1876
|
}
|
|
1862
1877
|
/**
|
|
1863
|
-
* @internal
|
|
1864
1878
|
* Deals with the iteration of all the available results of {@link listRoleDefinitions}.
|
|
1865
1879
|
* @param roleScope - The scope of the role definition.
|
|
1866
1880
|
* @param options - Common options for the iterative endpoints.
|
|
@@ -1906,7 +1920,7 @@ class KeyVaultAccessControlClient {
|
|
|
1906
1920
|
[Symbol.asyncIterator]() {
|
|
1907
1921
|
return this;
|
|
1908
1922
|
},
|
|
1909
|
-
byPage: (settings = {}) => this.listRoleDefinitionsPage(roleScope, settings, options)
|
|
1923
|
+
byPage: (settings = {}) => this.listRoleDefinitionsPage(roleScope, settings, options),
|
|
1910
1924
|
};
|
|
1911
1925
|
}
|
|
1912
1926
|
/**
|
|
@@ -1923,7 +1937,7 @@ class KeyVaultAccessControlClient {
|
|
|
1923
1937
|
* @param options - The optional parameters.
|
|
1924
1938
|
*/
|
|
1925
1939
|
getRoleDefinition(roleScope, name, options = {}) {
|
|
1926
|
-
return withTrace("getRoleDefinition", options, async (updatedOptions) => {
|
|
1940
|
+
return withTrace$3("getRoleDefinition", options, async (updatedOptions) => {
|
|
1927
1941
|
const response = await this.client.roleDefinitions.get(this.vaultUrl, roleScope, name, updatedOptions);
|
|
1928
1942
|
return mappings.roleDefinition.generatedToPublic(response);
|
|
1929
1943
|
});
|
|
@@ -1946,15 +1960,15 @@ class KeyVaultAccessControlClient {
|
|
|
1946
1960
|
* @param options - The optional parameters.
|
|
1947
1961
|
*/
|
|
1948
1962
|
setRoleDefinition(roleScope, options = {}) {
|
|
1949
|
-
return withTrace("setRoleDefinition", options, async (updatedOptions) => {
|
|
1963
|
+
return withTrace$3("setRoleDefinition", options, async (updatedOptions) => {
|
|
1950
1964
|
const response = await this.client.roleDefinitions.createOrUpdate(this.vaultUrl, roleScope, options.roleDefinitionName || uuid.v4(), {
|
|
1951
1965
|
properties: {
|
|
1952
1966
|
description: options.description,
|
|
1953
1967
|
permissions: options.permissions,
|
|
1954
1968
|
assignableScopes: [roleScope],
|
|
1955
1969
|
roleName: options.roleName,
|
|
1956
|
-
roleType: "CustomRole"
|
|
1957
|
-
}
|
|
1970
|
+
roleType: "CustomRole",
|
|
1971
|
+
},
|
|
1958
1972
|
}, updatedOptions);
|
|
1959
1973
|
return mappings.roleDefinition.generatedToPublic(response);
|
|
1960
1974
|
});
|
|
@@ -1973,7 +1987,7 @@ class KeyVaultAccessControlClient {
|
|
|
1973
1987
|
* @param options - The optional parameters.
|
|
1974
1988
|
*/
|
|
1975
1989
|
deleteRoleDefinition(roleScope, name, options = {}) {
|
|
1976
|
-
return withTrace("deleteRoleDefinition", options, async (updatedOptions) => {
|
|
1990
|
+
return withTrace$3("deleteRoleDefinition", options, async (updatedOptions) => {
|
|
1977
1991
|
await this.client.roleDefinitions.delete(this.vaultUrl, roleScope, name, updatedOptions);
|
|
1978
1992
|
});
|
|
1979
1993
|
}
|
|
@@ -2000,6 +2014,8 @@ var KnownRoleType;
|
|
|
2000
2014
|
/** Custom role. */
|
|
2001
2015
|
KnownRoleType["CustomRole"] = "CustomRole";
|
|
2002
2016
|
})(KnownRoleType || (KnownRoleType = {}));
|
|
2017
|
+
/** Known values of {@link DataAction} that the service accepts. */
|
|
2018
|
+
exports.KnownKeyVaultDataAction = void 0;
|
|
2003
2019
|
(function (KnownDataAction) {
|
|
2004
2020
|
/** Read HSM key metadata. */
|
|
2005
2021
|
KnownDataAction["ReadHsmKey"] = "Microsoft.KeyVault/managedHsm/keys/read/action";
|
|
@@ -2070,6 +2086,8 @@ var KnownRoleType;
|
|
|
2070
2086
|
/** Generate random numbers. */
|
|
2071
2087
|
KnownDataAction["RandomNumbersGenerate"] = "Microsoft.KeyVault/managedHsm/rng/action";
|
|
2072
2088
|
})(exports.KnownKeyVaultDataAction || (exports.KnownKeyVaultDataAction = {}));
|
|
2089
|
+
/** Known values of {@link RoleScope} that the service accepts. */
|
|
2090
|
+
exports.KnownKeyVaultRoleScope = void 0;
|
|
2073
2091
|
(function (KnownRoleScope) {
|
|
2074
2092
|
/** Global scope */
|
|
2075
2093
|
KnownRoleScope["Global"] = "/";
|
|
@@ -2097,7 +2115,7 @@ function cleanState(state) {
|
|
|
2097
2115
|
isCancelled: state.isCancelled,
|
|
2098
2116
|
isCompleted: state.isCompleted,
|
|
2099
2117
|
error: state.error,
|
|
2100
|
-
result: state.result
|
|
2118
|
+
result: state.result,
|
|
2101
2119
|
};
|
|
2102
2120
|
}
|
|
2103
2121
|
/**
|
|
@@ -2149,7 +2167,7 @@ class KeyVaultAdminPollOperation {
|
|
|
2149
2167
|
*/
|
|
2150
2168
|
toString() {
|
|
2151
2169
|
return JSON.stringify({
|
|
2152
|
-
state: cleanState(this.state)
|
|
2170
|
+
state: cleanState(this.state),
|
|
2153
2171
|
});
|
|
2154
2172
|
}
|
|
2155
2173
|
}
|
|
@@ -2158,7 +2176,7 @@ class KeyVaultAdminPollOperation {
|
|
|
2158
2176
|
/**
|
|
2159
2177
|
* @internal
|
|
2160
2178
|
*/
|
|
2161
|
-
const withTrace$
|
|
2179
|
+
const withTrace$2 = createTraceFunction("Azure.KeyVault.Admin.KeyVaultBackupPoller");
|
|
2162
2180
|
/**
|
|
2163
2181
|
* The backup Key Vault's poll operation.
|
|
2164
2182
|
*/
|
|
@@ -2174,13 +2192,13 @@ class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
2174
2192
|
* Tracing the fullBackup operation
|
|
2175
2193
|
*/
|
|
2176
2194
|
fullBackup(options) {
|
|
2177
|
-
return withTrace$
|
|
2195
|
+
return withTrace$2("fullBackup", options, (updatedOptions) => this.client.fullBackup(this.vaultUrl, updatedOptions));
|
|
2178
2196
|
}
|
|
2179
2197
|
/**
|
|
2180
2198
|
* Tracing the fullBackupStatus operation
|
|
2181
2199
|
*/
|
|
2182
2200
|
fullBackupStatus(jobId, options) {
|
|
2183
|
-
return withTrace$
|
|
2201
|
+
return withTrace$2("fullBackupStatus", options, (updatedOptions) => this.client.fullBackupStatus(this.vaultUrl, jobId, updatedOptions));
|
|
2184
2202
|
}
|
|
2185
2203
|
/**
|
|
2186
2204
|
* Reaches to the service and updates the backup's poll operation.
|
|
@@ -2194,7 +2212,7 @@ class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
2194
2212
|
if (!state.isStarted) {
|
|
2195
2213
|
const serviceOperation = await this.fullBackup(Object.assign(Object.assign({}, this.requestOptions), { azureStorageBlobContainerUri: {
|
|
2196
2214
|
storageResourceUri: blobStorageUri,
|
|
2197
|
-
token: sasToken
|
|
2215
|
+
token: sasToken,
|
|
2198
2216
|
} }));
|
|
2199
2217
|
this.mapState(serviceOperation);
|
|
2200
2218
|
}
|
|
@@ -2209,7 +2227,7 @@ class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
2209
2227
|
}
|
|
2210
2228
|
mapState(serviceOperation) {
|
|
2211
2229
|
const state = this.state;
|
|
2212
|
-
const { startTime, jobId, azureStorageBlobContainerUri, endTime, error, status, statusDetails } = serviceOperation;
|
|
2230
|
+
const { startTime, jobId, azureStorageBlobContainerUri, endTime, error, status, statusDetails, } = serviceOperation;
|
|
2213
2231
|
if (!startTime) {
|
|
2214
2232
|
throw new Error(`Missing "startTime" from the full backup operation. Full backup did not start successfully.`);
|
|
2215
2233
|
}
|
|
@@ -2227,7 +2245,7 @@ class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
2227
2245
|
state.result = {
|
|
2228
2246
|
folderUri: azureStorageBlobContainerUri,
|
|
2229
2247
|
startTime,
|
|
2230
|
-
endTime
|
|
2248
|
+
endTime,
|
|
2231
2249
|
};
|
|
2232
2250
|
}
|
|
2233
2251
|
}
|
|
@@ -2239,7 +2257,7 @@ class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
2239
2257
|
*/
|
|
2240
2258
|
class KeyVaultBackupPoller extends KeyVaultAdminPoller {
|
|
2241
2259
|
constructor(options) {
|
|
2242
|
-
const { client, vaultUrl, blobStorageUri, sasToken, requestOptions, intervalInMs = 2000, resumeFrom } = options;
|
|
2260
|
+
const { client, vaultUrl, blobStorageUri, sasToken, requestOptions, intervalInMs = 2000, resumeFrom, } = options;
|
|
2243
2261
|
let state;
|
|
2244
2262
|
if (resumeFrom) {
|
|
2245
2263
|
state = JSON.parse(resumeFrom).state;
|
|
@@ -2255,14 +2273,14 @@ class KeyVaultBackupPoller extends KeyVaultAdminPoller {
|
|
|
2255
2273
|
/**
|
|
2256
2274
|
* @internal
|
|
2257
2275
|
*/
|
|
2258
|
-
const withTrace$
|
|
2276
|
+
const withTrace$1 = createTraceFunction("Azure.KeyVault.Admin.KeyVaultRestorePoller");
|
|
2259
2277
|
/**
|
|
2260
2278
|
* An interface representing a restore Key Vault's poll operation.
|
|
2261
2279
|
*/
|
|
2262
2280
|
class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
2263
2281
|
constructor(state, vaultUrl, client, requestOptions = {}) {
|
|
2264
2282
|
super(state, {
|
|
2265
|
-
cancelMessage: "Cancelling the restoration full Key Vault backup is not supported."
|
|
2283
|
+
cancelMessage: "Cancelling the restoration full Key Vault backup is not supported.",
|
|
2266
2284
|
});
|
|
2267
2285
|
this.state = state;
|
|
2268
2286
|
this.vaultUrl = vaultUrl;
|
|
@@ -2273,13 +2291,13 @@ class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
|
2273
2291
|
* Tracing the fullRestore operation
|
|
2274
2292
|
*/
|
|
2275
2293
|
fullRestore(options) {
|
|
2276
|
-
return withTrace$
|
|
2294
|
+
return withTrace$1("fullRestore", options, (updatedOptions) => this.client.fullRestoreOperation(this.vaultUrl, updatedOptions));
|
|
2277
2295
|
}
|
|
2278
2296
|
/**
|
|
2279
2297
|
* Tracing the restoreStatus operation.
|
|
2280
2298
|
*/
|
|
2281
2299
|
async restoreStatus(jobId, options) {
|
|
2282
|
-
return withTrace$
|
|
2300
|
+
return withTrace$1("restoreStatus", options, (updatedOptions) => this.client.restoreStatus(this.vaultUrl, jobId, updatedOptions));
|
|
2283
2301
|
}
|
|
2284
2302
|
/**
|
|
2285
2303
|
* Reaches to the service and updates the restore poll operation.
|
|
@@ -2295,8 +2313,8 @@ class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
|
2295
2313
|
folderToRestore: folderName,
|
|
2296
2314
|
sasTokenParameters: {
|
|
2297
2315
|
storageResourceUri: folderUri,
|
|
2298
|
-
token: sasToken
|
|
2299
|
-
}
|
|
2316
|
+
token: sasToken,
|
|
2317
|
+
},
|
|
2300
2318
|
} }));
|
|
2301
2319
|
this.mapState(serviceOperation);
|
|
2302
2320
|
}
|
|
@@ -2328,7 +2346,7 @@ class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
|
2328
2346
|
if (state.isCompleted) {
|
|
2329
2347
|
state.result = {
|
|
2330
2348
|
startTime,
|
|
2331
|
-
endTime
|
|
2349
|
+
endTime,
|
|
2332
2350
|
};
|
|
2333
2351
|
}
|
|
2334
2352
|
}
|
|
@@ -2340,7 +2358,7 @@ class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
|
2340
2358
|
*/
|
|
2341
2359
|
class KeyVaultRestorePoller extends KeyVaultAdminPoller {
|
|
2342
2360
|
constructor(options) {
|
|
2343
|
-
const { client, vaultUrl, folderUri, sasToken, folderName, requestOptions, intervalInMs = 2000, resumeFrom } = options;
|
|
2361
|
+
const { client, vaultUrl, folderUri, sasToken, folderName, requestOptions, intervalInMs = 2000, resumeFrom, } = options;
|
|
2344
2362
|
let state;
|
|
2345
2363
|
if (resumeFrom) {
|
|
2346
2364
|
state = JSON.parse(resumeFrom).state;
|
|
@@ -2357,7 +2375,7 @@ class KeyVaultRestorePoller extends KeyVaultAdminPoller {
|
|
|
2357
2375
|
/**
|
|
2358
2376
|
* @internal
|
|
2359
2377
|
*/
|
|
2360
|
-
const withTrace
|
|
2378
|
+
const withTrace = createTraceFunction("Azure.KeyVault.Admin.KeyVaultSelectiveKeyRestorePoller");
|
|
2361
2379
|
/**
|
|
2362
2380
|
* The selective restore Key Vault's poll operation.
|
|
2363
2381
|
*/
|
|
@@ -2373,13 +2391,13 @@ class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollOperatio
|
|
|
2373
2391
|
* Tracing the selectiveRestore operation
|
|
2374
2392
|
*/
|
|
2375
2393
|
selectiveRestore(keyName, options) {
|
|
2376
|
-
return withTrace
|
|
2394
|
+
return withTrace("selectiveRestore", options, (updatedOptions) => this.client.selectiveKeyRestoreOperation(this.vaultUrl, keyName, updatedOptions));
|
|
2377
2395
|
}
|
|
2378
2396
|
/**
|
|
2379
2397
|
* Tracing the restoreStatus operation.
|
|
2380
2398
|
*/
|
|
2381
2399
|
restoreStatus(jobId, options) {
|
|
2382
|
-
return withTrace
|
|
2400
|
+
return withTrace("restoreStatus", options, (updatedOptions) => this.client.restoreStatus(this.vaultUrl, jobId, updatedOptions));
|
|
2383
2401
|
}
|
|
2384
2402
|
/**
|
|
2385
2403
|
* Reaches to the service and updates the selective restore poll operation.
|
|
@@ -2395,8 +2413,8 @@ class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollOperatio
|
|
|
2395
2413
|
folder: folderName,
|
|
2396
2414
|
sasTokenParameters: {
|
|
2397
2415
|
storageResourceUri: folderUri,
|
|
2398
|
-
token: sasToken
|
|
2399
|
-
}
|
|
2416
|
+
token: sasToken,
|
|
2417
|
+
},
|
|
2400
2418
|
} }));
|
|
2401
2419
|
this.mapState(selectiveRestoreOperation);
|
|
2402
2420
|
}
|
|
@@ -2428,7 +2446,7 @@ class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollOperatio
|
|
|
2428
2446
|
if (state.isCompleted) {
|
|
2429
2447
|
state.result = {
|
|
2430
2448
|
startTime,
|
|
2431
|
-
endTime
|
|
2449
|
+
endTime,
|
|
2432
2450
|
};
|
|
2433
2451
|
}
|
|
2434
2452
|
}
|
|
@@ -2440,7 +2458,7 @@ class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollOperatio
|
|
|
2440
2458
|
*/
|
|
2441
2459
|
class KeyVaultSelectiveKeyRestorePoller extends KeyVaultAdminPoller {
|
|
2442
2460
|
constructor(options) {
|
|
2443
|
-
const { client, vaultUrl, keyName, folderUri, sasToken, folderName, requestOptions, intervalInMs = 2000, resumeFrom } = options;
|
|
2461
|
+
const { client, vaultUrl, keyName, folderUri, sasToken, folderName, requestOptions, intervalInMs = 2000, resumeFrom, } = options;
|
|
2444
2462
|
let state;
|
|
2445
2463
|
if (resumeFrom) {
|
|
2446
2464
|
state = JSON.parse(resumeFrom).state;
|
|
@@ -2485,14 +2503,14 @@ class KeyVaultBackupClient {
|
|
|
2485
2503
|
additionalAllowedHeaderNames: [
|
|
2486
2504
|
"x-ms-keyvault-region",
|
|
2487
2505
|
"x-ms-keyvault-network-info",
|
|
2488
|
-
"x-ms-keyvault-service-version"
|
|
2489
|
-
]
|
|
2506
|
+
"x-ms-keyvault-service-version",
|
|
2507
|
+
],
|
|
2490
2508
|
} });
|
|
2491
2509
|
this.client = new KeyVaultClient(apiVersion, clientOptions);
|
|
2492
2510
|
this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
2493
2511
|
credential,
|
|
2494
2512
|
scopes: authenticationScopes,
|
|
2495
|
-
challengeCallbacks: createChallengeCallbacks()
|
|
2513
|
+
challengeCallbacks: createChallengeCallbacks(),
|
|
2496
2514
|
}));
|
|
2497
2515
|
}
|
|
2498
2516
|
/**
|
|
@@ -2534,7 +2552,7 @@ class KeyVaultBackupClient {
|
|
|
2534
2552
|
vaultUrl: this.vaultUrl,
|
|
2535
2553
|
intervalInMs: options.intervalInMs,
|
|
2536
2554
|
resumeFrom: options.resumeFrom,
|
|
2537
|
-
requestOptions: options
|
|
2555
|
+
requestOptions: options,
|
|
2538
2556
|
});
|
|
2539
2557
|
// This will initialize the poller's operation (the generation of the backup).
|
|
2540
2558
|
await poller.poll();
|