@azure/arm-msi 2.1.0-alpha.20230127.1 → 2.1.0-alpha.20230202.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -13
- package/LICENSE +1 -1
- package/dist/index.js +142 -65
- 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/federatedIdentityCredentialsCreateOrUpdateSample.js +10 -3
- package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.js +10 -3
- package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.js +10 -3
- package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.js +10 -3
- package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +10 -2
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/systemAssignedIdentitiesGetByScopeSample.js +10 -2
- package/dist-esm/samples-dev/systemAssignedIdentitiesGetByScopeSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesCreateOrUpdateSample.js +10 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesDeleteSample.js +10 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesGetSample.js +10 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.js +11 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListByResourceGroupSample.js +10 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListBySubscriptionSample.js +9 -2
- package/dist-esm/samples-dev/userAssignedIdentitiesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesUpdateSample.js +10 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesUpdateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/managedServiceIdentityClient.d.ts.map +1 -1
- package/dist-esm/src/managedServiceIdentityClient.js +19 -14
- package/dist-esm/src/managedServiceIdentityClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +0 -14
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/federatedIdentityCredentials.d.ts.map +1 -1
- package/dist-esm/src/operations/federatedIdentityCredentials.js +19 -12
- package/dist-esm/src/operations/federatedIdentityCredentials.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/userAssignedIdentities.d.ts.map +1 -1
- package/dist-esm/src/operations/userAssignedIdentities.js +55 -31
- package/dist-esm/src/operations/userAssignedIdentities.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/package.json +6 -4
- package/review/arm-msi.api.md +3 -7
- package/src/index.ts +1 -0
- package/src/managedServiceIdentityClient.ts +25 -16
- package/src/models/index.ts +2 -18
- package/src/operations/federatedIdentityCredentials.ts +26 -13
- package/src/operations/operations.ts +21 -9
- package/src/operations/userAssignedIdentities.ts +70 -38
- package/src/pagingHelper.ts +39 -0
- package/types/arm-msi.d.ts +9 -14
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,16 +1,6 @@
|
|
1
1
|
# Release History
|
2
|
-
|
3
|
-
## 2.1.0-beta.3 (
|
4
|
-
|
5
|
-
### Features Added
|
6
|
-
|
7
|
-
### Breaking Changes
|
8
|
-
|
9
|
-
### Bugs Fixed
|
10
|
-
|
11
|
-
### Other Changes
|
12
|
-
|
13
|
-
## 2.1.0-beta.2 (2022-06-27)
|
2
|
+
|
3
|
+
## 2.1.0-beta.3 (2023-01-29)
|
14
4
|
|
15
5
|
**Features**
|
16
6
|
|
@@ -38,7 +28,7 @@
|
|
38
28
|
- Added Type Alias FederatedIdentityCredentialsListResponse
|
39
29
|
- Added Type Alias UserAssignedIdentitiesListAssociatedResourcesNextResponse
|
40
30
|
- Added Type Alias UserAssignedIdentitiesListAssociatedResourcesResponse
|
41
|
-
-
|
31
|
+
- Added function getContinuationToken
|
42
32
|
|
43
33
|
|
44
34
|
## 2.0.0 (2021-12-17)
|
package/LICENSE
CHANGED
package/dist/index.js
CHANGED
@@ -27,6 +27,38 @@ function _interopNamespace(e) {
|
|
27
27
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
28
28
|
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
29
29
|
|
30
|
+
/*
|
31
|
+
* Copyright (c) Microsoft Corporation.
|
32
|
+
* Licensed under the MIT License.
|
33
|
+
*
|
34
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
35
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
36
|
+
*/
|
37
|
+
const pageMap = new WeakMap();
|
38
|
+
/**
|
39
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
40
|
+
* returns a continuation token that can be used to begin paging from
|
41
|
+
* that point later.
|
42
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
43
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
44
|
+
*/
|
45
|
+
function getContinuationToken(page) {
|
46
|
+
var _a;
|
47
|
+
if (typeof page !== "object" || page === null) {
|
48
|
+
return undefined;
|
49
|
+
}
|
50
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
51
|
+
}
|
52
|
+
function setContinuationToken(page, continuationToken) {
|
53
|
+
var _a;
|
54
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
55
|
+
return;
|
56
|
+
}
|
57
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
58
|
+
pageInfo.continuationToken = continuationToken;
|
59
|
+
pageMap.set(page, pageInfo);
|
60
|
+
}
|
61
|
+
|
30
62
|
/*
|
31
63
|
* Copyright (c) Microsoft Corporation.
|
32
64
|
* Licensed under the MIT License.
|
@@ -762,20 +794,31 @@ class OperationsImpl {
|
|
762
794
|
[Symbol.asyncIterator]() {
|
763
795
|
return this;
|
764
796
|
},
|
765
|
-
byPage: () => {
|
766
|
-
|
797
|
+
byPage: (settings) => {
|
798
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
799
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
800
|
+
}
|
801
|
+
return this.listPagingPage(options, settings);
|
767
802
|
}
|
768
803
|
};
|
769
804
|
}
|
770
|
-
listPagingPage(options) {
|
805
|
+
listPagingPage(options, settings) {
|
771
806
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
772
|
-
let result
|
773
|
-
|
774
|
-
|
807
|
+
let result;
|
808
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
809
|
+
if (!continuationToken) {
|
810
|
+
result = yield tslib.__await(this._list(options));
|
811
|
+
let page = result.value || [];
|
812
|
+
continuationToken = result.nextLink;
|
813
|
+
setContinuationToken(page, continuationToken);
|
814
|
+
yield yield tslib.__await(page);
|
815
|
+
}
|
775
816
|
while (continuationToken) {
|
776
817
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
777
818
|
continuationToken = result.nextLink;
|
778
|
-
|
819
|
+
let page = result.value || [];
|
820
|
+
setContinuationToken(page, continuationToken);
|
821
|
+
yield yield tslib.__await(page);
|
779
822
|
}
|
780
823
|
});
|
781
824
|
}
|
@@ -842,7 +885,6 @@ const listNextOperationSpec$1 = {
|
|
842
885
|
bodyMapper: CloudError
|
843
886
|
}
|
844
887
|
},
|
845
|
-
queryParameters: [apiVersion],
|
846
888
|
urlParameters: [$host, nextLink],
|
847
889
|
headerParameters: [accept],
|
848
890
|
serializer: serializer$2
|
@@ -878,20 +920,31 @@ class UserAssignedIdentitiesImpl {
|
|
878
920
|
[Symbol.asyncIterator]() {
|
879
921
|
return this;
|
880
922
|
},
|
881
|
-
byPage: () => {
|
882
|
-
|
923
|
+
byPage: (settings) => {
|
924
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
925
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
926
|
+
}
|
927
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
883
928
|
}
|
884
929
|
};
|
885
930
|
}
|
886
|
-
listBySubscriptionPagingPage(options) {
|
931
|
+
listBySubscriptionPagingPage(options, settings) {
|
887
932
|
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
888
|
-
let result
|
889
|
-
|
890
|
-
|
933
|
+
let result;
|
934
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
935
|
+
if (!continuationToken) {
|
936
|
+
result = yield tslib.__await(this._listBySubscription(options));
|
937
|
+
let page = result.value || [];
|
938
|
+
continuationToken = result.nextLink;
|
939
|
+
setContinuationToken(page, continuationToken);
|
940
|
+
yield yield tslib.__await(page);
|
941
|
+
}
|
891
942
|
while (continuationToken) {
|
892
943
|
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
893
944
|
continuationToken = result.nextLink;
|
894
|
-
|
945
|
+
let page = result.value || [];
|
946
|
+
setContinuationToken(page, continuationToken);
|
947
|
+
yield yield tslib.__await(page);
|
895
948
|
}
|
896
949
|
});
|
897
950
|
}
|
@@ -927,20 +980,31 @@ class UserAssignedIdentitiesImpl {
|
|
927
980
|
[Symbol.asyncIterator]() {
|
928
981
|
return this;
|
929
982
|
},
|
930
|
-
byPage: () => {
|
931
|
-
|
983
|
+
byPage: (settings) => {
|
984
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
985
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
986
|
+
}
|
987
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
932
988
|
}
|
933
989
|
};
|
934
990
|
}
|
935
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
991
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
936
992
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
937
|
-
let result
|
938
|
-
|
939
|
-
|
993
|
+
let result;
|
994
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
995
|
+
if (!continuationToken) {
|
996
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
997
|
+
let page = result.value || [];
|
998
|
+
continuationToken = result.nextLink;
|
999
|
+
setContinuationToken(page, continuationToken);
|
1000
|
+
yield yield tslib.__await(page);
|
1001
|
+
}
|
940
1002
|
while (continuationToken) {
|
941
1003
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
942
1004
|
continuationToken = result.nextLink;
|
943
|
-
|
1005
|
+
let page = result.value || [];
|
1006
|
+
setContinuationToken(page, continuationToken);
|
1007
|
+
yield yield tslib.__await(page);
|
944
1008
|
}
|
945
1009
|
});
|
946
1010
|
}
|
@@ -977,20 +1041,31 @@ class UserAssignedIdentitiesImpl {
|
|
977
1041
|
[Symbol.asyncIterator]() {
|
978
1042
|
return this;
|
979
1043
|
},
|
980
|
-
byPage: () => {
|
981
|
-
|
1044
|
+
byPage: (settings) => {
|
1045
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1046
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1047
|
+
}
|
1048
|
+
return this.listAssociatedResourcesPagingPage(resourceGroupName, resourceName, options, settings);
|
982
1049
|
}
|
983
1050
|
};
|
984
1051
|
}
|
985
|
-
listAssociatedResourcesPagingPage(resourceGroupName, resourceName, options) {
|
1052
|
+
listAssociatedResourcesPagingPage(resourceGroupName, resourceName, options, settings) {
|
986
1053
|
return tslib.__asyncGenerator(this, arguments, function* listAssociatedResourcesPagingPage_1() {
|
987
|
-
let result
|
988
|
-
|
989
|
-
|
1054
|
+
let result;
|
1055
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1056
|
+
if (!continuationToken) {
|
1057
|
+
result = yield tslib.__await(this._listAssociatedResources(resourceGroupName, resourceName, options));
|
1058
|
+
let page = result.value || [];
|
1059
|
+
continuationToken = result.nextLink;
|
1060
|
+
setContinuationToken(page, continuationToken);
|
1061
|
+
yield yield tslib.__await(page);
|
1062
|
+
}
|
990
1063
|
while (continuationToken) {
|
991
1064
|
result = yield tslib.__await(this._listAssociatedResourcesNext(resourceGroupName, resourceName, continuationToken, options));
|
992
1065
|
continuationToken = result.nextLink;
|
993
|
-
|
1066
|
+
let page = result.value || [];
|
1067
|
+
setContinuationToken(page, continuationToken);
|
1068
|
+
yield yield tslib.__await(page);
|
994
1069
|
}
|
995
1070
|
});
|
996
1071
|
}
|
@@ -1270,7 +1345,6 @@ const listBySubscriptionNextOperationSpec = {
|
|
1270
1345
|
bodyMapper: CloudError
|
1271
1346
|
}
|
1272
1347
|
},
|
1273
|
-
queryParameters: [apiVersion],
|
1274
1348
|
urlParameters: [
|
1275
1349
|
$host,
|
1276
1350
|
nextLink,
|
@@ -1290,7 +1364,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
1290
1364
|
bodyMapper: CloudError
|
1291
1365
|
}
|
1292
1366
|
},
|
1293
|
-
queryParameters: [apiVersion],
|
1294
1367
|
urlParameters: [
|
1295
1368
|
$host,
|
1296
1369
|
nextLink,
|
@@ -1311,14 +1384,6 @@ const listAssociatedResourcesNextOperationSpec = {
|
|
1311
1384
|
bodyMapper: CloudError
|
1312
1385
|
}
|
1313
1386
|
},
|
1314
|
-
queryParameters: [
|
1315
|
-
apiVersion,
|
1316
|
-
filter,
|
1317
|
-
orderby,
|
1318
|
-
top,
|
1319
|
-
skip,
|
1320
|
-
skiptoken
|
1321
|
-
],
|
1322
1387
|
urlParameters: [
|
1323
1388
|
$host,
|
1324
1389
|
nextLink,
|
@@ -1362,20 +1427,31 @@ class FederatedIdentityCredentialsImpl {
|
|
1362
1427
|
[Symbol.asyncIterator]() {
|
1363
1428
|
return this;
|
1364
1429
|
},
|
1365
|
-
byPage: () => {
|
1366
|
-
|
1430
|
+
byPage: (settings) => {
|
1431
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1432
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1433
|
+
}
|
1434
|
+
return this.listPagingPage(resourceGroupName, resourceName, options, settings);
|
1367
1435
|
}
|
1368
1436
|
};
|
1369
1437
|
}
|
1370
|
-
listPagingPage(resourceGroupName, resourceName, options) {
|
1438
|
+
listPagingPage(resourceGroupName, resourceName, options, settings) {
|
1371
1439
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1372
|
-
let result
|
1373
|
-
|
1374
|
-
|
1440
|
+
let result;
|
1441
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1442
|
+
if (!continuationToken) {
|
1443
|
+
result = yield tslib.__await(this._list(resourceGroupName, resourceName, options));
|
1444
|
+
let page = result.value || [];
|
1445
|
+
continuationToken = result.nextLink;
|
1446
|
+
setContinuationToken(page, continuationToken);
|
1447
|
+
yield yield tslib.__await(page);
|
1448
|
+
}
|
1375
1449
|
while (continuationToken) {
|
1376
1450
|
result = yield tslib.__await(this._listNext(resourceGroupName, resourceName, continuationToken, options));
|
1377
1451
|
continuationToken = result.nextLink;
|
1378
|
-
|
1452
|
+
let page = result.value || [];
|
1453
|
+
setContinuationToken(page, continuationToken);
|
1454
|
+
yield yield tslib.__await(page);
|
1379
1455
|
}
|
1380
1456
|
});
|
1381
1457
|
}
|
@@ -1575,11 +1651,6 @@ const listNextOperationSpec = {
|
|
1575
1651
|
bodyMapper: CloudError
|
1576
1652
|
}
|
1577
1653
|
},
|
1578
|
-
queryParameters: [
|
1579
|
-
apiVersion,
|
1580
|
-
top,
|
1581
|
-
skiptoken
|
1582
|
-
],
|
1583
1654
|
urlParameters: [
|
1584
1655
|
$host,
|
1585
1656
|
nextLink,
|
@@ -1606,7 +1677,7 @@ class ManagedServiceIdentityClient extends coreClient__namespace.ServiceClient {
|
|
1606
1677
|
* @param options The parameter options
|
1607
1678
|
*/
|
1608
1679
|
constructor(credentials, subscriptionId, options) {
|
1609
|
-
var _a, _b;
|
1680
|
+
var _a, _b, _c;
|
1610
1681
|
if (credentials === undefined) {
|
1611
1682
|
throw new Error("'credentials' cannot be null");
|
1612
1683
|
}
|
@@ -1627,23 +1698,28 @@ class ManagedServiceIdentityClient extends coreClient__namespace.ServiceClient {
|
|
1627
1698
|
: `${packageDetails}`;
|
1628
1699
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
1629
1700
|
userAgentPrefix
|
1630
|
-
},
|
1701
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
1631
1702
|
super(optionsWithDefaults);
|
1703
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
1632
1704
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
1633
1705
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
1634
|
-
|
1706
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
1635
1707
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1708
|
+
}
|
1709
|
+
if (!options ||
|
1710
|
+
!options.pipeline ||
|
1711
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
1712
|
+
!bearerTokenAuthenticationPolicyFound) {
|
1713
|
+
this.pipeline.removePolicy({
|
1714
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
1715
|
+
});
|
1716
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
1717
|
+
credential: credentials,
|
1718
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
1719
|
+
challengeCallbacks: {
|
1720
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
1721
|
+
}
|
1722
|
+
}));
|
1647
1723
|
}
|
1648
1724
|
// Parameter assignments
|
1649
1725
|
this.subscriptionId = subscriptionId;
|
@@ -1686,4 +1762,5 @@ class ManagedServiceIdentityClient extends coreClient__namespace.ServiceClient {
|
|
1686
1762
|
}
|
1687
1763
|
|
1688
1764
|
exports.ManagedServiceIdentityClient = ManagedServiceIdentityClient;
|
1765
|
+
exports.getContinuationToken = getContinuationToken;
|
1689
1766
|
//# sourceMappingURL=index.js.map
|