@azure/arm-commitmentplans 2.0.0-beta.1 → 2.0.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 +2 -2
- package/README.md +11 -0
- package/dist/index.js +81 -36
- 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/src/azureMLCommitmentPlansManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureMLCommitmentPlansManagementClient.js +20 -2
- package/dist-esm/src/azureMLCommitmentPlansManagementClient.js.map +1 -1
- package/package.json +24 -14
- package/rollup.config.js +6 -72
- package/src/azureMLCommitmentPlansManagementClient.ts +27 -2
- package/tsconfig.json +18 -5
- package/types/tsdoc-metadata.json +1 -1
- package/LICENSE.txt +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 2.0.0-beta.
|
|
3
|
+
## 2.0.0-beta.2 (2022-04-24)
|
|
4
4
|
|
|
5
|
-
The package of @azure/arm-commitmentplans is using our next generation design principles since version 2.0.0-beta.
|
|
5
|
+
The package of @azure/arm-commitmentplans is using our next generation design principles since version 2.0.0-beta.2, which contains breaking changes.
|
|
6
6
|
|
|
7
7
|
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ These APIs allow end users to operate on Azure Machine Learning Commitment Plans
|
|
|
16
16
|
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
19
21
|
### Prerequisites
|
|
20
22
|
|
|
21
23
|
- An [Azure subscription][azure_sub].
|
|
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|
|
49
51
|
```javascript
|
|
50
52
|
const { AzureMLCommitmentPlansManagementClient } = require("@azure/arm-commitmentplans");
|
|
51
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
|
+
|
|
52
56
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
53
57
|
const client = new AzureMLCommitmentPlansManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
|
|
59
|
+
// For client-side applications running in the browser, use this code instead:
|
|
60
|
+
// const credential = new InteractiveBrowserCredential({
|
|
61
|
+
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
+
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
+
// });
|
|
64
|
+
// const client = new AzureMLCommitmentPlansManagementClient(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var coreClient = require('@azure/core-client');
|
|
6
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
6
7
|
var tslib = require('tslib');
|
|
7
8
|
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
29
|
+
|
|
8
30
|
/*
|
|
9
31
|
* Copyright (c) Microsoft Corporation.
|
|
10
32
|
* Licensed under the MIT License.
|
|
@@ -12,15 +34,21 @@ var tslib = require('tslib');
|
|
|
12
34
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
13
35
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
14
36
|
*/
|
|
37
|
+
/** Known values of {@link SkuCapacityScaleType} that the service accepts. */
|
|
38
|
+
exports.KnownSkuCapacityScaleType = void 0;
|
|
15
39
|
(function (KnownSkuCapacityScaleType) {
|
|
16
40
|
KnownSkuCapacityScaleType["Automatic"] = "Automatic";
|
|
17
41
|
KnownSkuCapacityScaleType["Manual"] = "Manual";
|
|
18
42
|
KnownSkuCapacityScaleType["None"] = "None";
|
|
19
43
|
})(exports.KnownSkuCapacityScaleType || (exports.KnownSkuCapacityScaleType = {}));
|
|
44
|
+
/** Known values of {@link ResourceSkuRestrictionsType} that the service accepts. */
|
|
45
|
+
exports.KnownResourceSkuRestrictionsType = void 0;
|
|
20
46
|
(function (KnownResourceSkuRestrictionsType) {
|
|
21
47
|
KnownResourceSkuRestrictionsType["Location"] = "location";
|
|
22
48
|
KnownResourceSkuRestrictionsType["Zone"] = "zone";
|
|
23
49
|
})(exports.KnownResourceSkuRestrictionsType || (exports.KnownResourceSkuRestrictionsType = {}));
|
|
50
|
+
/** Known values of {@link ResourceSkuRestrictionsReasonCode} that the service accepts. */
|
|
51
|
+
exports.KnownResourceSkuRestrictionsReasonCode = void 0;
|
|
24
52
|
(function (KnownResourceSkuRestrictionsReasonCode) {
|
|
25
53
|
KnownResourceSkuRestrictionsReasonCode["QuotaId"] = "QuotaId";
|
|
26
54
|
KnownResourceSkuRestrictionsReasonCode["NotAvailableForSubscription"] = "NotAvailableForSubscription";
|
|
@@ -981,12 +1009,12 @@ class OperationsImpl {
|
|
|
981
1009
|
* @param options The options parameters.
|
|
982
1010
|
*/
|
|
983
1011
|
_list(options) {
|
|
984
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
1012
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$4);
|
|
985
1013
|
}
|
|
986
1014
|
}
|
|
987
1015
|
// Operation Specifications
|
|
988
|
-
const serializer =
|
|
989
|
-
const listOperationSpec = {
|
|
1016
|
+
const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1017
|
+
const listOperationSpec$4 = {
|
|
990
1018
|
path: "/providers/Microsoft.MachineLearning/operations",
|
|
991
1019
|
httpMethod: "GET",
|
|
992
1020
|
responses: {
|
|
@@ -997,7 +1025,7 @@ const listOperationSpec = {
|
|
|
997
1025
|
queryParameters: [apiVersion],
|
|
998
1026
|
urlParameters: [$host],
|
|
999
1027
|
headerParameters: [accept],
|
|
1000
|
-
serializer
|
|
1028
|
+
serializer: serializer$4
|
|
1001
1029
|
};
|
|
1002
1030
|
|
|
1003
1031
|
/*
|
|
@@ -1064,12 +1092,12 @@ class SkusImpl {
|
|
|
1064
1092
|
* @param options The options parameters.
|
|
1065
1093
|
*/
|
|
1066
1094
|
_list(options) {
|
|
1067
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec$
|
|
1095
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$3);
|
|
1068
1096
|
}
|
|
1069
1097
|
}
|
|
1070
1098
|
// Operation Specifications
|
|
1071
|
-
const serializer$
|
|
1072
|
-
const listOperationSpec$
|
|
1099
|
+
const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1100
|
+
const listOperationSpec$3 = {
|
|
1073
1101
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/skus",
|
|
1074
1102
|
httpMethod: "GET",
|
|
1075
1103
|
responses: {
|
|
@@ -1080,7 +1108,7 @@ const listOperationSpec$1 = {
|
|
|
1080
1108
|
queryParameters: [apiVersion],
|
|
1081
1109
|
urlParameters: [$host, subscriptionId],
|
|
1082
1110
|
headerParameters: [accept],
|
|
1083
|
-
serializer: serializer$
|
|
1111
|
+
serializer: serializer$3
|
|
1084
1112
|
};
|
|
1085
1113
|
|
|
1086
1114
|
/*
|
|
@@ -1163,7 +1191,7 @@ class CommitmentAssociationsImpl {
|
|
|
1163
1191
|
commitmentPlanName,
|
|
1164
1192
|
commitmentAssociationName,
|
|
1165
1193
|
options
|
|
1166
|
-
}, getOperationSpec);
|
|
1194
|
+
}, getOperationSpec$1);
|
|
1167
1195
|
}
|
|
1168
1196
|
/**
|
|
1169
1197
|
* Get all commitment associations for a parent commitment plan.
|
|
@@ -1199,12 +1227,12 @@ class CommitmentAssociationsImpl {
|
|
|
1199
1227
|
* @param options The options parameters.
|
|
1200
1228
|
*/
|
|
1201
1229
|
_listNext(resourceGroupName, commitmentPlanName, nextLink, options) {
|
|
1202
|
-
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, nextLink, options }, listNextOperationSpec);
|
|
1230
|
+
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, nextLink, options }, listNextOperationSpec$2);
|
|
1203
1231
|
}
|
|
1204
1232
|
}
|
|
1205
1233
|
// Operation Specifications
|
|
1206
|
-
const serializer$2 =
|
|
1207
|
-
const getOperationSpec = {
|
|
1234
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1235
|
+
const getOperationSpec$1 = {
|
|
1208
1236
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/commitmentAssociations/{commitmentAssociationName}",
|
|
1209
1237
|
httpMethod: "GET",
|
|
1210
1238
|
responses: {
|
|
@@ -1262,7 +1290,7 @@ const moveOperationSpec = {
|
|
|
1262
1290
|
mediaType: "json",
|
|
1263
1291
|
serializer: serializer$2
|
|
1264
1292
|
};
|
|
1265
|
-
const listNextOperationSpec = {
|
|
1293
|
+
const listNextOperationSpec$2 = {
|
|
1266
1294
|
path: "{nextLink}",
|
|
1267
1295
|
httpMethod: "GET",
|
|
1268
1296
|
responses: {
|
|
@@ -1403,7 +1431,7 @@ class CommitmentPlansImpl {
|
|
|
1403
1431
|
* @param options The options parameters.
|
|
1404
1432
|
*/
|
|
1405
1433
|
get(resourceGroupName, commitmentPlanName, options) {
|
|
1406
|
-
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, getOperationSpec
|
|
1434
|
+
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, getOperationSpec);
|
|
1407
1435
|
}
|
|
1408
1436
|
/**
|
|
1409
1437
|
* Create a new Azure ML commitment plan resource or updates an existing one.
|
|
@@ -1440,7 +1468,7 @@ class CommitmentPlansImpl {
|
|
|
1440
1468
|
* @param options The options parameters.
|
|
1441
1469
|
*/
|
|
1442
1470
|
_list(options) {
|
|
1443
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec$
|
|
1471
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$1);
|
|
1444
1472
|
}
|
|
1445
1473
|
/**
|
|
1446
1474
|
* Retrieve all Azure ML commitment plans in a resource group.
|
|
@@ -1469,8 +1497,8 @@ class CommitmentPlansImpl {
|
|
|
1469
1497
|
}
|
|
1470
1498
|
}
|
|
1471
1499
|
// Operation Specifications
|
|
1472
|
-
const serializer$
|
|
1473
|
-
const getOperationSpec
|
|
1500
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1501
|
+
const getOperationSpec = {
|
|
1474
1502
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}",
|
|
1475
1503
|
httpMethod: "GET",
|
|
1476
1504
|
responses: {
|
|
@@ -1486,7 +1514,7 @@ const getOperationSpec$1 = {
|
|
|
1486
1514
|
commitmentPlanName
|
|
1487
1515
|
],
|
|
1488
1516
|
headerParameters: [accept],
|
|
1489
|
-
serializer: serializer$
|
|
1517
|
+
serializer: serializer$1
|
|
1490
1518
|
};
|
|
1491
1519
|
const createOrUpdateOperationSpec = {
|
|
1492
1520
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}",
|
|
@@ -1509,7 +1537,7 @@ const createOrUpdateOperationSpec = {
|
|
|
1509
1537
|
],
|
|
1510
1538
|
headerParameters: [accept, contentType],
|
|
1511
1539
|
mediaType: "json",
|
|
1512
|
-
serializer: serializer$
|
|
1540
|
+
serializer: serializer$1
|
|
1513
1541
|
};
|
|
1514
1542
|
const removeOperationSpec = {
|
|
1515
1543
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}",
|
|
@@ -1522,7 +1550,7 @@ const removeOperationSpec = {
|
|
|
1522
1550
|
resourceGroupName,
|
|
1523
1551
|
commitmentPlanName
|
|
1524
1552
|
],
|
|
1525
|
-
serializer: serializer$
|
|
1553
|
+
serializer: serializer$1
|
|
1526
1554
|
};
|
|
1527
1555
|
const patchOperationSpec = {
|
|
1528
1556
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}",
|
|
@@ -1542,9 +1570,9 @@ const patchOperationSpec = {
|
|
|
1542
1570
|
],
|
|
1543
1571
|
headerParameters: [accept, contentType],
|
|
1544
1572
|
mediaType: "json",
|
|
1545
|
-
serializer: serializer$
|
|
1573
|
+
serializer: serializer$1
|
|
1546
1574
|
};
|
|
1547
|
-
const listOperationSpec$
|
|
1575
|
+
const listOperationSpec$1 = {
|
|
1548
1576
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearning/commitmentPlans",
|
|
1549
1577
|
httpMethod: "GET",
|
|
1550
1578
|
responses: {
|
|
@@ -1555,7 +1583,7 @@ const listOperationSpec$3 = {
|
|
|
1555
1583
|
queryParameters: [apiVersion, skipToken],
|
|
1556
1584
|
urlParameters: [$host, subscriptionId],
|
|
1557
1585
|
headerParameters: [accept],
|
|
1558
|
-
serializer: serializer$
|
|
1586
|
+
serializer: serializer$1
|
|
1559
1587
|
};
|
|
1560
1588
|
const listInResourceGroupOperationSpec = {
|
|
1561
1589
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans",
|
|
@@ -1572,7 +1600,7 @@ const listInResourceGroupOperationSpec = {
|
|
|
1572
1600
|
resourceGroupName
|
|
1573
1601
|
],
|
|
1574
1602
|
headerParameters: [accept],
|
|
1575
|
-
serializer: serializer$
|
|
1603
|
+
serializer: serializer$1
|
|
1576
1604
|
};
|
|
1577
1605
|
const listNextOperationSpec$1 = {
|
|
1578
1606
|
path: "{nextLink}",
|
|
@@ -1589,7 +1617,7 @@ const listNextOperationSpec$1 = {
|
|
|
1589
1617
|
nextLink
|
|
1590
1618
|
],
|
|
1591
1619
|
headerParameters: [accept],
|
|
1592
|
-
serializer: serializer$
|
|
1620
|
+
serializer: serializer$1
|
|
1593
1621
|
};
|
|
1594
1622
|
const listInResourceGroupNextOperationSpec = {
|
|
1595
1623
|
path: "{nextLink}",
|
|
@@ -1607,7 +1635,7 @@ const listInResourceGroupNextOperationSpec = {
|
|
|
1607
1635
|
nextLink
|
|
1608
1636
|
],
|
|
1609
1637
|
headerParameters: [accept],
|
|
1610
|
-
serializer: serializer$
|
|
1638
|
+
serializer: serializer$1
|
|
1611
1639
|
};
|
|
1612
1640
|
|
|
1613
1641
|
/*
|
|
@@ -1684,7 +1712,7 @@ class UsageHistoryImpl {
|
|
|
1684
1712
|
* @param options The options parameters.
|
|
1685
1713
|
*/
|
|
1686
1714
|
_list(resourceGroupName, commitmentPlanName, options) {
|
|
1687
|
-
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, listOperationSpec
|
|
1715
|
+
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, options }, listOperationSpec);
|
|
1688
1716
|
}
|
|
1689
1717
|
/**
|
|
1690
1718
|
* ListNext
|
|
@@ -1694,12 +1722,12 @@ class UsageHistoryImpl {
|
|
|
1694
1722
|
* @param options The options parameters.
|
|
1695
1723
|
*/
|
|
1696
1724
|
_listNext(resourceGroupName, commitmentPlanName, nextLink, options) {
|
|
1697
|
-
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, nextLink, options }, listNextOperationSpec
|
|
1725
|
+
return this.client.sendOperationRequest({ resourceGroupName, commitmentPlanName, nextLink, options }, listNextOperationSpec);
|
|
1698
1726
|
}
|
|
1699
1727
|
}
|
|
1700
1728
|
// Operation Specifications
|
|
1701
|
-
const serializer
|
|
1702
|
-
const listOperationSpec
|
|
1729
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1730
|
+
const listOperationSpec = {
|
|
1703
1731
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/commitmentPlans/{commitmentPlanName}/usageHistory",
|
|
1704
1732
|
httpMethod: "GET",
|
|
1705
1733
|
responses: {
|
|
@@ -1715,9 +1743,9 @@ const listOperationSpec$4 = {
|
|
|
1715
1743
|
commitmentPlanName
|
|
1716
1744
|
],
|
|
1717
1745
|
headerParameters: [accept],
|
|
1718
|
-
serializer
|
|
1746
|
+
serializer
|
|
1719
1747
|
};
|
|
1720
|
-
const listNextOperationSpec
|
|
1748
|
+
const listNextOperationSpec = {
|
|
1721
1749
|
path: "{nextLink}",
|
|
1722
1750
|
httpMethod: "GET",
|
|
1723
1751
|
responses: {
|
|
@@ -1734,7 +1762,7 @@ const listNextOperationSpec$2 = {
|
|
|
1734
1762
|
nextLink
|
|
1735
1763
|
],
|
|
1736
1764
|
headerParameters: [accept],
|
|
1737
|
-
serializer
|
|
1765
|
+
serializer
|
|
1738
1766
|
};
|
|
1739
1767
|
|
|
1740
1768
|
/*
|
|
@@ -1744,7 +1772,7 @@ const listNextOperationSpec$2 = {
|
|
|
1744
1772
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1745
1773
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1746
1774
|
*/
|
|
1747
|
-
class AzureMLCommitmentPlansManagementClient extends
|
|
1775
|
+
class AzureMLCommitmentPlansManagementClient extends coreClient__namespace.ServiceClient {
|
|
1748
1776
|
/**
|
|
1749
1777
|
* Initializes a new instance of the AzureMLCommitmentPlansManagementClient class.
|
|
1750
1778
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -1752,6 +1780,7 @@ class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceClient {
|
|
|
1752
1780
|
* @param options The parameter options
|
|
1753
1781
|
*/
|
|
1754
1782
|
constructor(credentials, subscriptionId, options) {
|
|
1783
|
+
var _a, _b;
|
|
1755
1784
|
if (credentials === undefined) {
|
|
1756
1785
|
throw new Error("'credentials' cannot be null");
|
|
1757
1786
|
}
|
|
@@ -1766,7 +1795,7 @@ class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceClient {
|
|
|
1766
1795
|
requestContentType: "application/json; charset=utf-8",
|
|
1767
1796
|
credential: credentials
|
|
1768
1797
|
};
|
|
1769
|
-
const packageDetails = `azsdk-js-arm-commitmentplans/2.0.0-beta.
|
|
1798
|
+
const packageDetails = `azsdk-js-arm-commitmentplans/2.0.0-beta.2`;
|
|
1770
1799
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1771
1800
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1772
1801
|
: `${packageDetails}`;
|
|
@@ -1775,8 +1804,24 @@ class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceClient {
|
|
|
1775
1804
|
}
|
|
1776
1805
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1777
1806
|
userAgentPrefix
|
|
1778
|
-
}, baseUri: options.endpoint
|
|
1807
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1779
1808
|
super(optionsWithDefaults);
|
|
1809
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1810
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1811
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1812
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1813
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
1814
|
+
this.pipeline.removePolicy({
|
|
1815
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1816
|
+
});
|
|
1817
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1818
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
1819
|
+
challengeCallbacks: {
|
|
1820
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1821
|
+
}
|
|
1822
|
+
}));
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1780
1825
|
// Parameter assignments
|
|
1781
1826
|
this.subscriptionId = subscriptionId;
|
|
1782
1827
|
// Assigning values to Constant parameters
|