@azure/arm-azurestack 3.0.0-beta.4 → 3.0.0-beta.5
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 +10 -0
- package/dist/index.js +237 -56
- 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/azureStackManagementClient.d.ts +2 -0
- package/dist-esm/src/azureStackManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureStackManagementClient.js +54 -6
- package/dist-esm/src/azureStackManagementClient.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/models/index.d.ts +35 -11
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +23 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/customerSubscriptions.d.ts.map +1 -1
- package/dist-esm/src/operations/customerSubscriptions.js +19 -7
- package/dist-esm/src/operations/customerSubscriptions.js.map +1 -1
- package/dist-esm/src/operations/linkedSubscriptions.d.ts.map +1 -1
- package/dist-esm/src/operations/linkedSubscriptions.js +37 -14
- package/dist-esm/src/operations/linkedSubscriptions.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -7
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/products.d.ts.map +1 -1
- package/dist-esm/src/operations/products.js +19 -7
- package/dist-esm/src/operations/products.js.map +1 -1
- package/dist-esm/src/operations/registrations.d.ts.map +1 -1
- package/dist-esm/src/operations/registrations.js +37 -14
- package/dist-esm/src/operations/registrations.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/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +15 -11
- package/review/arm-azurestack.api.md +33 -52
- package/src/azureStackManagementClient.ts +69 -5
- package/src/index.ts +1 -0
- package/src/models/index.ts +36 -12
- package/src/operations/customerSubscriptions.ts +26 -8
- package/src/operations/linkedSubscriptions.ts +45 -16
- package/src/operations/operations.ts +21 -8
- package/src/operations/products.ts +26 -8
- package/src/operations/registrations.ts +41 -16
- package/src/pagingHelper.ts +39 -0
- package/types/arm-azurestack.d.ts +46 -11
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
# Release History
|
|
2
|
+
|
|
3
|
+
## 3.0.0-beta.5 (2022-11-16)
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
6
|
+
|
|
7
|
+
- Exposes `getContinuationToken` helper function to extract continuation token
|
|
8
|
+
|
|
9
|
+
**Bugs Fixed**
|
|
10
|
+
|
|
11
|
+
- A series of small bug fixs relevant to authentication and apiVersion policy
|
|
2
12
|
|
|
3
13
|
## 3.0.0-beta.4 (2022-10-08)
|
|
4
14
|
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreClient = require('@azure/core-client');
|
|
6
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
8
|
|
|
8
9
|
function _interopNamespace(e) {
|
|
9
10
|
if (e && e.__esModule) return e;
|
|
@@ -24,6 +25,39 @@ function _interopNamespace(e) {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
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 a result page from a pageable operation, returns a
|
|
40
|
+
* continuation token that can be used to begin paging from
|
|
41
|
+
* that point later.
|
|
42
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
43
|
+
* @returns The continuation token that can be passed into byPage().
|
|
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
|
+
}
|
|
27
61
|
|
|
28
62
|
/*
|
|
29
63
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -35,48 +69,71 @@ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
|
35
69
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
36
70
|
exports.KnownCreatedByType = void 0;
|
|
37
71
|
(function (KnownCreatedByType) {
|
|
72
|
+
/** User */
|
|
38
73
|
KnownCreatedByType["User"] = "User";
|
|
74
|
+
/** Application */
|
|
39
75
|
KnownCreatedByType["Application"] = "Application";
|
|
76
|
+
/** ManagedIdentity */
|
|
40
77
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
78
|
+
/** Key */
|
|
41
79
|
KnownCreatedByType["Key"] = "Key";
|
|
42
80
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
43
81
|
/** Known values of {@link CompatibilityIssue} that the service accepts. */
|
|
44
82
|
exports.KnownCompatibilityIssue = void 0;
|
|
45
83
|
(function (KnownCompatibilityIssue) {
|
|
84
|
+
/** HigherDeviceVersionRequired */
|
|
46
85
|
KnownCompatibilityIssue["HigherDeviceVersionRequired"] = "HigherDeviceVersionRequired";
|
|
86
|
+
/** LowerDeviceVersionRequired */
|
|
47
87
|
KnownCompatibilityIssue["LowerDeviceVersionRequired"] = "LowerDeviceVersionRequired";
|
|
88
|
+
/** CapacityBillingModelRequired */
|
|
48
89
|
KnownCompatibilityIssue["CapacityBillingModelRequired"] = "CapacityBillingModelRequired";
|
|
90
|
+
/** PayAsYouGoBillingModelRequired */
|
|
49
91
|
KnownCompatibilityIssue["PayAsYouGoBillingModelRequired"] = "PayAsYouGoBillingModelRequired";
|
|
92
|
+
/** DevelopmentBillingModelRequired */
|
|
50
93
|
KnownCompatibilityIssue["DevelopmentBillingModelRequired"] = "DevelopmentBillingModelRequired";
|
|
94
|
+
/** AzureADIdentitySystemRequired */
|
|
51
95
|
KnownCompatibilityIssue["AzureADIdentitySystemRequired"] = "AzureADIdentitySystemRequired";
|
|
96
|
+
/** AdfsIdentitySystemRequired */
|
|
52
97
|
KnownCompatibilityIssue["AdfsIdentitySystemRequired"] = "ADFSIdentitySystemRequired";
|
|
98
|
+
/** ConnectionToInternetRequired */
|
|
53
99
|
KnownCompatibilityIssue["ConnectionToInternetRequired"] = "ConnectionToInternetRequired";
|
|
100
|
+
/** ConnectionToAzureRequired */
|
|
54
101
|
KnownCompatibilityIssue["ConnectionToAzureRequired"] = "ConnectionToAzureRequired";
|
|
102
|
+
/** DisconnectedEnvironmentRequired */
|
|
55
103
|
KnownCompatibilityIssue["DisconnectedEnvironmentRequired"] = "DisconnectedEnvironmentRequired";
|
|
56
104
|
})(exports.KnownCompatibilityIssue || (exports.KnownCompatibilityIssue = {}));
|
|
57
105
|
/** Known values of {@link ComputeRole} that the service accepts. */
|
|
58
106
|
exports.KnownComputeRole = void 0;
|
|
59
107
|
(function (KnownComputeRole) {
|
|
108
|
+
/** None */
|
|
60
109
|
KnownComputeRole["None"] = "None";
|
|
110
|
+
/** IaaS */
|
|
61
111
|
KnownComputeRole["IaaS"] = "IaaS";
|
|
112
|
+
/** PaaS */
|
|
62
113
|
KnownComputeRole["PaaS"] = "PaaS";
|
|
63
114
|
})(exports.KnownComputeRole || (exports.KnownComputeRole = {}));
|
|
64
115
|
/** Known values of {@link OperatingSystem} that the service accepts. */
|
|
65
116
|
exports.KnownOperatingSystem = void 0;
|
|
66
117
|
(function (KnownOperatingSystem) {
|
|
118
|
+
/** None */
|
|
67
119
|
KnownOperatingSystem["None"] = "None";
|
|
120
|
+
/** Windows */
|
|
68
121
|
KnownOperatingSystem["Windows"] = "Windows";
|
|
122
|
+
/** Linux */
|
|
69
123
|
KnownOperatingSystem["Linux"] = "Linux";
|
|
70
124
|
})(exports.KnownOperatingSystem || (exports.KnownOperatingSystem = {}));
|
|
71
125
|
/** Known values of {@link Category} that the service accepts. */
|
|
72
126
|
exports.KnownCategory = void 0;
|
|
73
127
|
(function (KnownCategory) {
|
|
128
|
+
/** AzureAD */
|
|
74
129
|
KnownCategory["AzureAD"] = "AzureAD";
|
|
130
|
+
/** Adfs */
|
|
75
131
|
KnownCategory["Adfs"] = "ADFS";
|
|
76
132
|
})(exports.KnownCategory || (exports.KnownCategory = {}));
|
|
77
133
|
/** Known values of {@link Location} that the service accepts. */
|
|
78
134
|
exports.KnownLocation = void 0;
|
|
79
135
|
(function (KnownLocation) {
|
|
136
|
+
/** Global */
|
|
80
137
|
KnownLocation["Global"] = "global";
|
|
81
138
|
})(exports.KnownLocation || (exports.KnownLocation = {}));
|
|
82
139
|
|
|
@@ -1517,20 +1574,31 @@ class OperationsImpl {
|
|
|
1517
1574
|
[Symbol.asyncIterator]() {
|
|
1518
1575
|
return this;
|
|
1519
1576
|
},
|
|
1520
|
-
byPage: () => {
|
|
1521
|
-
|
|
1577
|
+
byPage: (settings) => {
|
|
1578
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1579
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1580
|
+
}
|
|
1581
|
+
return this.listPagingPage(options, settings);
|
|
1522
1582
|
}
|
|
1523
1583
|
};
|
|
1524
1584
|
}
|
|
1525
|
-
listPagingPage(options) {
|
|
1585
|
+
listPagingPage(options, settings) {
|
|
1526
1586
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1527
|
-
let result
|
|
1528
|
-
|
|
1529
|
-
|
|
1587
|
+
let result;
|
|
1588
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1589
|
+
if (!continuationToken) {
|
|
1590
|
+
result = yield tslib.__await(this._list(options));
|
|
1591
|
+
let page = result.value || [];
|
|
1592
|
+
continuationToken = result.nextLink;
|
|
1593
|
+
setContinuationToken(page, continuationToken);
|
|
1594
|
+
yield yield tslib.__await(page);
|
|
1595
|
+
}
|
|
1530
1596
|
while (continuationToken) {
|
|
1531
1597
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1532
1598
|
continuationToken = result.nextLink;
|
|
1533
|
-
|
|
1599
|
+
let page = result.value || [];
|
|
1600
|
+
setContinuationToken(page, continuationToken);
|
|
1601
|
+
yield yield tslib.__await(page);
|
|
1534
1602
|
}
|
|
1535
1603
|
});
|
|
1536
1604
|
}
|
|
@@ -1702,20 +1770,31 @@ class CustomerSubscriptionsImpl {
|
|
|
1702
1770
|
[Symbol.asyncIterator]() {
|
|
1703
1771
|
return this;
|
|
1704
1772
|
},
|
|
1705
|
-
byPage: () => {
|
|
1706
|
-
|
|
1773
|
+
byPage: (settings) => {
|
|
1774
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1775
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1776
|
+
}
|
|
1777
|
+
return this.listPagingPage(resourceGroup, registrationName, options, settings);
|
|
1707
1778
|
}
|
|
1708
1779
|
};
|
|
1709
1780
|
}
|
|
1710
|
-
listPagingPage(resourceGroup, registrationName, options) {
|
|
1781
|
+
listPagingPage(resourceGroup, registrationName, options, settings) {
|
|
1711
1782
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1712
|
-
let result
|
|
1713
|
-
|
|
1714
|
-
|
|
1783
|
+
let result;
|
|
1784
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1785
|
+
if (!continuationToken) {
|
|
1786
|
+
result = yield tslib.__await(this._list(resourceGroup, registrationName, options));
|
|
1787
|
+
let page = result.value || [];
|
|
1788
|
+
continuationToken = result.nextLink;
|
|
1789
|
+
setContinuationToken(page, continuationToken);
|
|
1790
|
+
yield yield tslib.__await(page);
|
|
1791
|
+
}
|
|
1715
1792
|
while (continuationToken) {
|
|
1716
1793
|
result = yield tslib.__await(this._listNext(resourceGroup, registrationName, continuationToken, options));
|
|
1717
1794
|
continuationToken = result.nextLink;
|
|
1718
|
-
|
|
1795
|
+
let page = result.value || [];
|
|
1796
|
+
setContinuationToken(page, continuationToken);
|
|
1797
|
+
yield yield tslib.__await(page);
|
|
1719
1798
|
}
|
|
1720
1799
|
});
|
|
1721
1800
|
}
|
|
@@ -1939,20 +2018,31 @@ class ProductsImpl {
|
|
|
1939
2018
|
[Symbol.asyncIterator]() {
|
|
1940
2019
|
return this;
|
|
1941
2020
|
},
|
|
1942
|
-
byPage: () => {
|
|
1943
|
-
|
|
2021
|
+
byPage: (settings) => {
|
|
2022
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2023
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2024
|
+
}
|
|
2025
|
+
return this.listPagingPage(resourceGroup, registrationName, options, settings);
|
|
1944
2026
|
}
|
|
1945
2027
|
};
|
|
1946
2028
|
}
|
|
1947
|
-
listPagingPage(resourceGroup, registrationName, options) {
|
|
2029
|
+
listPagingPage(resourceGroup, registrationName, options, settings) {
|
|
1948
2030
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1949
|
-
let result
|
|
1950
|
-
|
|
1951
|
-
|
|
2031
|
+
let result;
|
|
2032
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2033
|
+
if (!continuationToken) {
|
|
2034
|
+
result = yield tslib.__await(this._list(resourceGroup, registrationName, options));
|
|
2035
|
+
let page = result.value || [];
|
|
2036
|
+
continuationToken = result.nextLink;
|
|
2037
|
+
setContinuationToken(page, continuationToken);
|
|
2038
|
+
yield yield tslib.__await(page);
|
|
2039
|
+
}
|
|
1952
2040
|
while (continuationToken) {
|
|
1953
2041
|
result = yield tslib.__await(this._listNext(resourceGroup, registrationName, continuationToken, options));
|
|
1954
2042
|
continuationToken = result.nextLink;
|
|
1955
|
-
|
|
2043
|
+
let page = result.value || [];
|
|
2044
|
+
setContinuationToken(page, continuationToken);
|
|
2045
|
+
yield yield tslib.__await(page);
|
|
1956
2046
|
}
|
|
1957
2047
|
});
|
|
1958
2048
|
}
|
|
@@ -2237,20 +2327,31 @@ class RegistrationsImpl {
|
|
|
2237
2327
|
[Symbol.asyncIterator]() {
|
|
2238
2328
|
return this;
|
|
2239
2329
|
},
|
|
2240
|
-
byPage: () => {
|
|
2241
|
-
|
|
2330
|
+
byPage: (settings) => {
|
|
2331
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2332
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2333
|
+
}
|
|
2334
|
+
return this.listPagingPage(resourceGroup, options, settings);
|
|
2242
2335
|
}
|
|
2243
2336
|
};
|
|
2244
2337
|
}
|
|
2245
|
-
listPagingPage(resourceGroup, options) {
|
|
2338
|
+
listPagingPage(resourceGroup, options, settings) {
|
|
2246
2339
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
2247
|
-
let result
|
|
2248
|
-
|
|
2249
|
-
|
|
2340
|
+
let result;
|
|
2341
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2342
|
+
if (!continuationToken) {
|
|
2343
|
+
result = yield tslib.__await(this._list(resourceGroup, options));
|
|
2344
|
+
let page = result.value || [];
|
|
2345
|
+
continuationToken = result.nextLink;
|
|
2346
|
+
setContinuationToken(page, continuationToken);
|
|
2347
|
+
yield yield tslib.__await(page);
|
|
2348
|
+
}
|
|
2250
2349
|
while (continuationToken) {
|
|
2251
2350
|
result = yield tslib.__await(this._listNext(resourceGroup, continuationToken, options));
|
|
2252
2351
|
continuationToken = result.nextLink;
|
|
2253
|
-
|
|
2352
|
+
let page = result.value || [];
|
|
2353
|
+
setContinuationToken(page, continuationToken);
|
|
2354
|
+
yield yield tslib.__await(page);
|
|
2254
2355
|
}
|
|
2255
2356
|
});
|
|
2256
2357
|
}
|
|
@@ -2285,20 +2386,31 @@ class RegistrationsImpl {
|
|
|
2285
2386
|
[Symbol.asyncIterator]() {
|
|
2286
2387
|
return this;
|
|
2287
2388
|
},
|
|
2288
|
-
byPage: () => {
|
|
2289
|
-
|
|
2389
|
+
byPage: (settings) => {
|
|
2390
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2391
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2392
|
+
}
|
|
2393
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
2290
2394
|
}
|
|
2291
2395
|
};
|
|
2292
2396
|
}
|
|
2293
|
-
listBySubscriptionPagingPage(options) {
|
|
2397
|
+
listBySubscriptionPagingPage(options, settings) {
|
|
2294
2398
|
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
2295
|
-
let result
|
|
2296
|
-
|
|
2297
|
-
|
|
2399
|
+
let result;
|
|
2400
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2401
|
+
if (!continuationToken) {
|
|
2402
|
+
result = yield tslib.__await(this._listBySubscription(options));
|
|
2403
|
+
let page = result.value || [];
|
|
2404
|
+
continuationToken = result.nextLink;
|
|
2405
|
+
setContinuationToken(page, continuationToken);
|
|
2406
|
+
yield yield tslib.__await(page);
|
|
2407
|
+
}
|
|
2298
2408
|
while (continuationToken) {
|
|
2299
2409
|
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
2300
2410
|
continuationToken = result.nextLink;
|
|
2301
|
-
|
|
2411
|
+
let page = result.value || [];
|
|
2412
|
+
setContinuationToken(page, continuationToken);
|
|
2413
|
+
yield yield tslib.__await(page);
|
|
2302
2414
|
}
|
|
2303
2415
|
});
|
|
2304
2416
|
}
|
|
@@ -2649,20 +2761,31 @@ class LinkedSubscriptionsImpl {
|
|
|
2649
2761
|
[Symbol.asyncIterator]() {
|
|
2650
2762
|
return this;
|
|
2651
2763
|
},
|
|
2652
|
-
byPage: () => {
|
|
2653
|
-
|
|
2764
|
+
byPage: (settings) => {
|
|
2765
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2766
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2767
|
+
}
|
|
2768
|
+
return this.listByResourceGroupPagingPage(resourceGroup, options, settings);
|
|
2654
2769
|
}
|
|
2655
2770
|
};
|
|
2656
2771
|
}
|
|
2657
|
-
listByResourceGroupPagingPage(resourceGroup, options) {
|
|
2772
|
+
listByResourceGroupPagingPage(resourceGroup, options, settings) {
|
|
2658
2773
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
2659
|
-
let result
|
|
2660
|
-
|
|
2661
|
-
|
|
2774
|
+
let result;
|
|
2775
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2776
|
+
if (!continuationToken) {
|
|
2777
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroup, options));
|
|
2778
|
+
let page = result.value || [];
|
|
2779
|
+
continuationToken = result.nextLink;
|
|
2780
|
+
setContinuationToken(page, continuationToken);
|
|
2781
|
+
yield yield tslib.__await(page);
|
|
2782
|
+
}
|
|
2662
2783
|
while (continuationToken) {
|
|
2663
2784
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroup, continuationToken, options));
|
|
2664
2785
|
continuationToken = result.nextLink;
|
|
2665
|
-
|
|
2786
|
+
let page = result.value || [];
|
|
2787
|
+
setContinuationToken(page, continuationToken);
|
|
2788
|
+
yield yield tslib.__await(page);
|
|
2666
2789
|
}
|
|
2667
2790
|
});
|
|
2668
2791
|
}
|
|
@@ -2697,20 +2820,31 @@ class LinkedSubscriptionsImpl {
|
|
|
2697
2820
|
[Symbol.asyncIterator]() {
|
|
2698
2821
|
return this;
|
|
2699
2822
|
},
|
|
2700
|
-
byPage: () => {
|
|
2701
|
-
|
|
2823
|
+
byPage: (settings) => {
|
|
2824
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
2825
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
2826
|
+
}
|
|
2827
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
2702
2828
|
}
|
|
2703
2829
|
};
|
|
2704
2830
|
}
|
|
2705
|
-
listBySubscriptionPagingPage(options) {
|
|
2831
|
+
listBySubscriptionPagingPage(options, settings) {
|
|
2706
2832
|
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
2707
|
-
let result
|
|
2708
|
-
|
|
2709
|
-
|
|
2833
|
+
let result;
|
|
2834
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
2835
|
+
if (!continuationToken) {
|
|
2836
|
+
result = yield tslib.__await(this._listBySubscription(options));
|
|
2837
|
+
let page = result.value || [];
|
|
2838
|
+
continuationToken = result.nextLink;
|
|
2839
|
+
setContinuationToken(page, continuationToken);
|
|
2840
|
+
yield yield tslib.__await(page);
|
|
2841
|
+
}
|
|
2710
2842
|
while (continuationToken) {
|
|
2711
2843
|
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
2712
2844
|
continuationToken = result.nextLink;
|
|
2713
|
-
|
|
2845
|
+
let page = result.value || [];
|
|
2846
|
+
setContinuationToken(page, continuationToken);
|
|
2847
|
+
yield yield tslib.__await(page);
|
|
2714
2848
|
}
|
|
2715
2849
|
});
|
|
2716
2850
|
}
|
|
@@ -2989,7 +3123,7 @@ class AzureStackManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
2989
3123
|
* @param options The parameter options
|
|
2990
3124
|
*/
|
|
2991
3125
|
constructor(credentials, subscriptionId, options) {
|
|
2992
|
-
var _a, _b;
|
|
3126
|
+
var _a, _b, _c;
|
|
2993
3127
|
if (credentials === undefined) {
|
|
2994
3128
|
throw new Error("'credentials' cannot be null");
|
|
2995
3129
|
}
|
|
@@ -3004,17 +3138,35 @@ class AzureStackManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
3004
3138
|
requestContentType: "application/json; charset=utf-8",
|
|
3005
3139
|
credential: credentials
|
|
3006
3140
|
};
|
|
3007
|
-
const packageDetails = `azsdk-js-arm-azurestack/3.0.0-beta.
|
|
3141
|
+
const packageDetails = `azsdk-js-arm-azurestack/3.0.0-beta.5`;
|
|
3008
3142
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
3009
3143
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
3010
3144
|
: `${packageDetails}`;
|
|
3011
|
-
if (!options.credentialScopes) {
|
|
3012
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
3013
|
-
}
|
|
3014
3145
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
3015
3146
|
userAgentPrefix
|
|
3016
|
-
},
|
|
3147
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
3017
3148
|
super(optionsWithDefaults);
|
|
3149
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
3150
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
3151
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
3152
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
3153
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
3154
|
+
}
|
|
3155
|
+
if (!options ||
|
|
3156
|
+
!options.pipeline ||
|
|
3157
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
3158
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
3159
|
+
this.pipeline.removePolicy({
|
|
3160
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
3161
|
+
});
|
|
3162
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
3163
|
+
credential: credentials,
|
|
3164
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
3165
|
+
challengeCallbacks: {
|
|
3166
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
3167
|
+
}
|
|
3168
|
+
}));
|
|
3169
|
+
}
|
|
3018
3170
|
// Parameter assignments
|
|
3019
3171
|
this.subscriptionId = subscriptionId;
|
|
3020
3172
|
// Assigning values to Constant parameters
|
|
@@ -3026,8 +3178,37 @@ class AzureStackManagementClient extends coreClient__namespace.ServiceClient {
|
|
|
3026
3178
|
this.products = new ProductsImpl(this);
|
|
3027
3179
|
this.registrations = new RegistrationsImpl(this);
|
|
3028
3180
|
this.linkedSubscriptions = new LinkedSubscriptionsImpl(this);
|
|
3181
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
3182
|
+
}
|
|
3183
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
3184
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
3185
|
+
if (!apiVersion) {
|
|
3186
|
+
return;
|
|
3187
|
+
}
|
|
3188
|
+
const apiVersionPolicy = {
|
|
3189
|
+
name: "CustomApiVersionPolicy",
|
|
3190
|
+
sendRequest(request, next) {
|
|
3191
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3192
|
+
const param = request.url.split("?");
|
|
3193
|
+
if (param.length > 1) {
|
|
3194
|
+
const newParams = param[1].split("&").map((item) => {
|
|
3195
|
+
if (item.indexOf("api-version") > -1) {
|
|
3196
|
+
return "api-version=" + apiVersion;
|
|
3197
|
+
}
|
|
3198
|
+
else {
|
|
3199
|
+
return item;
|
|
3200
|
+
}
|
|
3201
|
+
});
|
|
3202
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
3203
|
+
}
|
|
3204
|
+
return next(request);
|
|
3205
|
+
});
|
|
3206
|
+
}
|
|
3207
|
+
};
|
|
3208
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
3029
3209
|
}
|
|
3030
3210
|
}
|
|
3031
3211
|
|
|
3032
3212
|
exports.AzureStackManagementClient = AzureStackManagementClient;
|
|
3213
|
+
exports.getContinuationToken = getContinuationToken;
|
|
3033
3214
|
//# sourceMappingURL=index.js.map
|