@azure/arm-resourcehealth 3.1.1-alpha.20230127.1 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -10
- package/LICENSE +1 -1
- package/dist/index.js +161 -86
- 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/availabilityStatusesGetByResourceSample.js +10 -2
- package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js +10 -3
- package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js +9 -2
- package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js.map +1 -1
- package/dist-esm/samples-dev/availabilityStatusesListSample.js +10 -2
- package/dist-esm/samples-dev/availabilityStatusesListSample.js.map +1 -1
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js +10 -2
- package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js.map +1 -1
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js +10 -2
- package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js.map +1 -1
- package/dist-esm/samples-dev/childResourcesListSample.js +10 -2
- package/dist-esm/samples-dev/childResourcesListSample.js.map +1 -1
- package/dist-esm/samples-dev/emergingIssuesGetSample.js +10 -2
- package/dist-esm/samples-dev/emergingIssuesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/emergingIssuesListSample.js +10 -2
- package/dist-esm/samples-dev/emergingIssuesListSample.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/microsoftResourceHealth.d.ts.map +1 -1
- package/dist-esm/src/microsoftResourceHealth.js +20 -18
- package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +0 -20
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityStatuses.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityStatuses.js +55 -36
- package/dist-esm/src/operations/availabilityStatuses.js.map +1 -1
- package/dist-esm/src/operations/childAvailabilityStatuses.d.ts.map +1 -1
- package/dist-esm/src/operations/childAvailabilityStatuses.js +19 -12
- package/dist-esm/src/operations/childAvailabilityStatuses.js.map +1 -1
- package/dist-esm/src/operations/childResources.d.ts.map +1 -1
- package/dist-esm/src/operations/childResources.js +19 -12
- package/dist-esm/src/operations/childResources.js.map +1 -1
- package/dist-esm/src/operations/emergingIssues.d.ts.map +1 -1
- package/dist-esm/src/operations/emergingIssues.js +19 -8
- package/dist-esm/src/operations/emergingIssues.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 +7 -5
- package/review/arm-resourcehealth.api.md +3 -10
- package/src/index.ts +1 -0
- package/src/microsoftResourceHealth.ts +26 -20
- package/src/models/index.ts +5 -30
- package/src/operations/availabilityStatuses.ts +66 -40
- package/src/operations/childAvailabilityStatuses.ts +22 -14
- package/src/operations/childResources.ts +21 -13
- package/src/operations/emergingIssues.ts +22 -10
- package/src/pagingHelper.ts +39 -0
- package/types/arm-resourcehealth.d.ts +9 -20
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,15 +1,21 @@
|
|
1
1
|
# Release History
|
2
|
+
|
3
|
+
## 3.2.0 (2023-02-01)
|
4
|
+
|
5
|
+
**Features**
|
2
6
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
- Interface AvailabilityStatusesListByResourceGroupNextOptionalParams no longer has parameter expand
|
8
|
+
- Interface AvailabilityStatusesListByResourceGroupNextOptionalParams no longer has parameter filter
|
9
|
+
- Interface AvailabilityStatusesListBySubscriptionIdNextOptionalParams no longer has parameter expand
|
10
|
+
- Interface AvailabilityStatusesListBySubscriptionIdNextOptionalParams no longer has parameter filter
|
11
|
+
- Interface AvailabilityStatusesListNextOptionalParams no longer has parameter expand
|
12
|
+
- Interface AvailabilityStatusesListNextOptionalParams no longer has parameter filter
|
13
|
+
- Interface ChildAvailabilityStatusesListNextOptionalParams no longer has parameter expand
|
14
|
+
- Interface ChildAvailabilityStatusesListNextOptionalParams no longer has parameter filter
|
15
|
+
- Interface ChildResourcesListNextOptionalParams no longer has parameter expand
|
16
|
+
- Interface ChildResourcesListNextOptionalParams no longer has parameter filter
|
17
|
+
|
18
|
+
|
13
19
|
## 3.1.0 (2022-07-14)
|
14
20
|
|
15
21
|
**Features**
|
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.
|
@@ -902,20 +934,31 @@ class AvailabilityStatusesImpl {
|
|
902
934
|
[Symbol.asyncIterator]() {
|
903
935
|
return this;
|
904
936
|
},
|
905
|
-
byPage: () => {
|
906
|
-
|
937
|
+
byPage: (settings) => {
|
938
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
939
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
940
|
+
}
|
941
|
+
return this.listBySubscriptionIdPagingPage(options, settings);
|
907
942
|
}
|
908
943
|
};
|
909
944
|
}
|
910
|
-
listBySubscriptionIdPagingPage(options) {
|
945
|
+
listBySubscriptionIdPagingPage(options, settings) {
|
911
946
|
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionIdPagingPage_1() {
|
912
|
-
let result
|
913
|
-
|
914
|
-
|
947
|
+
let result;
|
948
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
949
|
+
if (!continuationToken) {
|
950
|
+
result = yield tslib.__await(this._listBySubscriptionId(options));
|
951
|
+
let page = result.value || [];
|
952
|
+
continuationToken = result.nextLink;
|
953
|
+
setContinuationToken(page, continuationToken);
|
954
|
+
yield yield tslib.__await(page);
|
955
|
+
}
|
915
956
|
while (continuationToken) {
|
916
957
|
result = yield tslib.__await(this._listBySubscriptionIdNext(continuationToken, options));
|
917
958
|
continuationToken = result.nextLink;
|
918
|
-
|
959
|
+
let page = result.value || [];
|
960
|
+
setContinuationToken(page, continuationToken);
|
961
|
+
yield yield tslib.__await(page);
|
919
962
|
}
|
920
963
|
});
|
921
964
|
}
|
@@ -952,20 +995,31 @@ class AvailabilityStatusesImpl {
|
|
952
995
|
[Symbol.asyncIterator]() {
|
953
996
|
return this;
|
954
997
|
},
|
955
|
-
byPage: () => {
|
956
|
-
|
998
|
+
byPage: (settings) => {
|
999
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1000
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1001
|
+
}
|
1002
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
957
1003
|
}
|
958
1004
|
};
|
959
1005
|
}
|
960
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
1006
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
961
1007
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
962
|
-
let result
|
963
|
-
|
964
|
-
|
1008
|
+
let result;
|
1009
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1010
|
+
if (!continuationToken) {
|
1011
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
1012
|
+
let page = result.value || [];
|
1013
|
+
continuationToken = result.nextLink;
|
1014
|
+
setContinuationToken(page, continuationToken);
|
1015
|
+
yield yield tslib.__await(page);
|
1016
|
+
}
|
965
1017
|
while (continuationToken) {
|
966
1018
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
967
1019
|
continuationToken = result.nextLink;
|
968
|
-
|
1020
|
+
let page = result.value || [];
|
1021
|
+
setContinuationToken(page, continuationToken);
|
1022
|
+
yield yield tslib.__await(page);
|
969
1023
|
}
|
970
1024
|
});
|
971
1025
|
}
|
@@ -1006,20 +1060,31 @@ class AvailabilityStatusesImpl {
|
|
1006
1060
|
[Symbol.asyncIterator]() {
|
1007
1061
|
return this;
|
1008
1062
|
},
|
1009
|
-
byPage: () => {
|
1010
|
-
|
1063
|
+
byPage: (settings) => {
|
1064
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1065
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1066
|
+
}
|
1067
|
+
return this.listPagingPage(resourceUri, options, settings);
|
1011
1068
|
}
|
1012
1069
|
};
|
1013
1070
|
}
|
1014
|
-
listPagingPage(resourceUri, options) {
|
1071
|
+
listPagingPage(resourceUri, options, settings) {
|
1015
1072
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1016
|
-
let result
|
1017
|
-
|
1018
|
-
|
1073
|
+
let result;
|
1074
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1075
|
+
if (!continuationToken) {
|
1076
|
+
result = yield tslib.__await(this._list(resourceUri, options));
|
1077
|
+
let page = result.value || [];
|
1078
|
+
continuationToken = result.nextLink;
|
1079
|
+
setContinuationToken(page, continuationToken);
|
1080
|
+
yield yield tslib.__await(page);
|
1081
|
+
}
|
1019
1082
|
while (continuationToken) {
|
1020
1083
|
result = yield tslib.__await(this._listNext(resourceUri, continuationToken, options));
|
1021
1084
|
continuationToken = result.nextLink;
|
1022
|
-
|
1085
|
+
let page = result.value || [];
|
1086
|
+
setContinuationToken(page, continuationToken);
|
1087
|
+
yield yield tslib.__await(page);
|
1023
1088
|
}
|
1024
1089
|
});
|
1025
1090
|
}
|
@@ -1211,11 +1276,6 @@ const listBySubscriptionIdNextOperationSpec = {
|
|
1211
1276
|
bodyMapper: ErrorResponse
|
1212
1277
|
}
|
1213
1278
|
},
|
1214
|
-
queryParameters: [
|
1215
|
-
apiVersion,
|
1216
|
-
filter,
|
1217
|
-
expand
|
1218
|
-
],
|
1219
1279
|
urlParameters: [
|
1220
1280
|
$host,
|
1221
1281
|
subscriptionId,
|
@@ -1235,11 +1295,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
1235
1295
|
bodyMapper: ErrorResponse
|
1236
1296
|
}
|
1237
1297
|
},
|
1238
|
-
queryParameters: [
|
1239
|
-
apiVersion,
|
1240
|
-
filter,
|
1241
|
-
expand
|
1242
|
-
],
|
1243
1298
|
urlParameters: [
|
1244
1299
|
$host,
|
1245
1300
|
subscriptionId,
|
@@ -1260,11 +1315,6 @@ const listNextOperationSpec$3 = {
|
|
1260
1315
|
bodyMapper: ErrorResponse
|
1261
1316
|
}
|
1262
1317
|
},
|
1263
|
-
queryParameters: [
|
1264
|
-
apiVersion,
|
1265
|
-
filter,
|
1266
|
-
expand
|
1267
|
-
],
|
1268
1318
|
urlParameters: [
|
1269
1319
|
$host,
|
1270
1320
|
resourceUri,
|
@@ -1308,20 +1358,31 @@ class ChildAvailabilityStatusesImpl {
|
|
1308
1358
|
[Symbol.asyncIterator]() {
|
1309
1359
|
return this;
|
1310
1360
|
},
|
1311
|
-
byPage: () => {
|
1312
|
-
|
1361
|
+
byPage: (settings) => {
|
1362
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1363
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1364
|
+
}
|
1365
|
+
return this.listPagingPage(resourceUri, options, settings);
|
1313
1366
|
}
|
1314
1367
|
};
|
1315
1368
|
}
|
1316
|
-
listPagingPage(resourceUri, options) {
|
1369
|
+
listPagingPage(resourceUri, options, settings) {
|
1317
1370
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1318
|
-
let result
|
1319
|
-
|
1320
|
-
|
1371
|
+
let result;
|
1372
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1373
|
+
if (!continuationToken) {
|
1374
|
+
result = yield tslib.__await(this._list(resourceUri, options));
|
1375
|
+
let page = result.value || [];
|
1376
|
+
continuationToken = result.nextLink;
|
1377
|
+
setContinuationToken(page, continuationToken);
|
1378
|
+
yield yield tslib.__await(page);
|
1379
|
+
}
|
1321
1380
|
while (continuationToken) {
|
1322
1381
|
result = yield tslib.__await(this._listNext(resourceUri, continuationToken, options));
|
1323
1382
|
continuationToken = result.nextLink;
|
1324
|
-
|
1383
|
+
let page = result.value || [];
|
1384
|
+
setContinuationToken(page, continuationToken);
|
1385
|
+
yield yield tslib.__await(page);
|
1325
1386
|
}
|
1326
1387
|
});
|
1327
1388
|
}
|
@@ -1429,11 +1490,6 @@ const listNextOperationSpec$2 = {
|
|
1429
1490
|
bodyMapper: ErrorResponse
|
1430
1491
|
}
|
1431
1492
|
},
|
1432
|
-
queryParameters: [
|
1433
|
-
apiVersion,
|
1434
|
-
filter,
|
1435
|
-
expand
|
1436
|
-
],
|
1437
1493
|
urlParameters: [
|
1438
1494
|
$host,
|
1439
1495
|
resourceUri,
|
@@ -1477,20 +1533,31 @@ class ChildResourcesImpl {
|
|
1477
1533
|
[Symbol.asyncIterator]() {
|
1478
1534
|
return this;
|
1479
1535
|
},
|
1480
|
-
byPage: () => {
|
1481
|
-
|
1536
|
+
byPage: (settings) => {
|
1537
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1538
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1539
|
+
}
|
1540
|
+
return this.listPagingPage(resourceUri, options, settings);
|
1482
1541
|
}
|
1483
1542
|
};
|
1484
1543
|
}
|
1485
|
-
listPagingPage(resourceUri, options) {
|
1544
|
+
listPagingPage(resourceUri, options, settings) {
|
1486
1545
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1487
|
-
let result
|
1488
|
-
|
1489
|
-
|
1546
|
+
let result;
|
1547
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1548
|
+
if (!continuationToken) {
|
1549
|
+
result = yield tslib.__await(this._list(resourceUri, options));
|
1550
|
+
let page = result.value || [];
|
1551
|
+
continuationToken = result.nextLink;
|
1552
|
+
setContinuationToken(page, continuationToken);
|
1553
|
+
yield yield tslib.__await(page);
|
1554
|
+
}
|
1490
1555
|
while (continuationToken) {
|
1491
1556
|
result = yield tslib.__await(this._listNext(resourceUri, continuationToken, options));
|
1492
1557
|
continuationToken = result.nextLink;
|
1493
|
-
|
1558
|
+
let page = result.value || [];
|
1559
|
+
setContinuationToken(page, continuationToken);
|
1560
|
+
yield yield tslib.__await(page);
|
1494
1561
|
}
|
1495
1562
|
});
|
1496
1563
|
}
|
@@ -1568,11 +1635,6 @@ const listNextOperationSpec$1 = {
|
|
1568
1635
|
bodyMapper: ErrorResponse
|
1569
1636
|
}
|
1570
1637
|
},
|
1571
|
-
queryParameters: [
|
1572
|
-
apiVersion,
|
1573
|
-
filter,
|
1574
|
-
expand
|
1575
|
-
],
|
1576
1638
|
urlParameters: [
|
1577
1639
|
$host,
|
1578
1640
|
resourceUri,
|
@@ -1655,20 +1717,31 @@ class EmergingIssuesImpl {
|
|
1655
1717
|
[Symbol.asyncIterator]() {
|
1656
1718
|
return this;
|
1657
1719
|
},
|
1658
|
-
byPage: () => {
|
1659
|
-
|
1720
|
+
byPage: (settings) => {
|
1721
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1722
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1723
|
+
}
|
1724
|
+
return this.listPagingPage(options, settings);
|
1660
1725
|
}
|
1661
1726
|
};
|
1662
1727
|
}
|
1663
|
-
listPagingPage(options) {
|
1728
|
+
listPagingPage(options, settings) {
|
1664
1729
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1665
|
-
let result
|
1666
|
-
|
1667
|
-
|
1730
|
+
let result;
|
1731
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1732
|
+
if (!continuationToken) {
|
1733
|
+
result = yield tslib.__await(this._list(options));
|
1734
|
+
let page = result.value || [];
|
1735
|
+
continuationToken = result.nextLink;
|
1736
|
+
setContinuationToken(page, continuationToken);
|
1737
|
+
yield yield tslib.__await(page);
|
1738
|
+
}
|
1668
1739
|
while (continuationToken) {
|
1669
1740
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
1670
1741
|
continuationToken = result.nextLink;
|
1671
|
-
|
1742
|
+
let page = result.value || [];
|
1743
|
+
setContinuationToken(page, continuationToken);
|
1744
|
+
yield yield tslib.__await(page);
|
1672
1745
|
}
|
1673
1746
|
});
|
1674
1747
|
}
|
@@ -1758,7 +1831,6 @@ const listNextOperationSpec = {
|
|
1758
1831
|
bodyMapper: ErrorResponse
|
1759
1832
|
}
|
1760
1833
|
},
|
1761
|
-
queryParameters: [apiVersion],
|
1762
1834
|
urlParameters: [$host, nextLink],
|
1763
1835
|
headerParameters: [accept],
|
1764
1836
|
serializer
|
@@ -1780,7 +1852,7 @@ class MicrosoftResourceHealth extends coreClient__namespace.ServiceClient {
|
|
1780
1852
|
* @param options The parameter options
|
1781
1853
|
*/
|
1782
1854
|
constructor(credentials, subscriptionId, options) {
|
1783
|
-
var _a, _b;
|
1855
|
+
var _a, _b, _c;
|
1784
1856
|
if (credentials === undefined) {
|
1785
1857
|
throw new Error("'credentials' cannot be null");
|
1786
1858
|
}
|
@@ -1795,32 +1867,34 @@ class MicrosoftResourceHealth extends coreClient__namespace.ServiceClient {
|
|
1795
1867
|
requestContentType: "application/json; charset=utf-8",
|
1796
1868
|
credential: credentials
|
1797
1869
|
};
|
1798
|
-
const packageDetails = `azsdk-js-arm-resourcehealth/3.
|
1870
|
+
const packageDetails = `azsdk-js-arm-resourcehealth/3.2.0`;
|
1799
1871
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
1800
1872
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
1801
1873
|
: `${packageDetails}`;
|
1802
|
-
if (!options.credentialScopes) {
|
1803
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
1804
|
-
}
|
1805
1874
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
1806
1875
|
userAgentPrefix
|
1807
|
-
},
|
1876
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
1808
1877
|
super(optionsWithDefaults);
|
1878
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
1809
1879
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
1810
1880
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
1811
|
-
|
1881
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
1812
1882
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1883
|
+
}
|
1884
|
+
if (!options ||
|
1885
|
+
!options.pipeline ||
|
1886
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
1887
|
+
!bearerTokenAuthenticationPolicyFound) {
|
1888
|
+
this.pipeline.removePolicy({
|
1889
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
1890
|
+
});
|
1891
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
1892
|
+
credential: credentials,
|
1893
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
1894
|
+
challengeCallbacks: {
|
1895
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
1896
|
+
}
|
1897
|
+
}));
|
1824
1898
|
}
|
1825
1899
|
// Parameter assignments
|
1826
1900
|
this.subscriptionId = subscriptionId;
|
@@ -1864,4 +1938,5 @@ class MicrosoftResourceHealth extends coreClient__namespace.ServiceClient {
|
|
1864
1938
|
}
|
1865
1939
|
|
1866
1940
|
exports.MicrosoftResourceHealth = MicrosoftResourceHealth;
|
1941
|
+
exports.getContinuationToken = getContinuationToken;
|
1867
1942
|
//# sourceMappingURL=index.js.map
|