@azure/arm-quota 1.0.0-beta.3 → 1.0.0-beta.4
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 +7 -1
- package/LICENSE +1 -1
- package/README.md +11 -0
- package/dist/index.js +93 -42
- 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/quotaCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaCreateOrUpdateSample.js +124 -0
- package/dist-esm/samples-dev/quotaCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/quotaGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaGetSample.js +47 -0
- package/dist-esm/samples-dev/quotaGetSample.js.map +1 -0
- package/dist-esm/samples-dev/quotaListSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaListSample.js +103 -0
- package/dist-esm/samples-dev/quotaListSample.js.map +1 -0
- package/dist-esm/samples-dev/quotaOperationListSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaOperationListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaOperationListSample.js +42 -0
- package/dist-esm/samples-dev/quotaOperationListSample.js.map +1 -0
- package/dist-esm/samples-dev/quotaRequestStatusGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaRequestStatusGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaRequestStatusGetSample.js +64 -0
- package/dist-esm/samples-dev/quotaRequestStatusGetSample.js.map +1 -0
- package/dist-esm/samples-dev/quotaRequestStatusListSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaRequestStatusListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaRequestStatusListSample.js +43 -0
- package/dist-esm/samples-dev/quotaRequestStatusListSample.js.map +1 -0
- package/dist-esm/samples-dev/quotaUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/quotaUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/quotaUpdateSample.js +68 -0
- package/dist-esm/samples-dev/quotaUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/usagesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/usagesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usagesGetSample.js +47 -0
- package/dist-esm/samples-dev/usagesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/usagesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/usagesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usagesListSample.js +103 -0
- package/dist-esm/samples-dev/usagesListSample.js.map +1 -0
- package/dist-esm/src/azureQuotaExtensionAPI.d.ts.map +1 -1
- package/dist-esm/src/azureQuotaExtensionAPI.js +20 -2
- package/dist-esm/src/azureQuotaExtensionAPI.js.map +1 -1
- package/dist-esm/src/operations/quota.d.ts.map +1 -1
- package/dist-esm/src/operations/quota.js +6 -2
- package/dist-esm/src/operations/quota.js.map +1 -1
- package/package.json +40 -14
- package/rollup.config.js +6 -72
- package/src/azureQuotaExtensionAPI.ts +27 -2
- package/src/operations/quota.ts +6 -2
- package/tsconfig.json +19 -5
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ Microsoft Azure Quota Resource Provider
|
|
|
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 { AzureQuotaExtensionAPI } = require("@azure/arm-quota");
|
|
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 AzureQuotaExtensionAPI(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 AzureQuotaExtensionAPI(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,31 @@
|
|
|
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
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
9
31
|
/*
|
|
10
32
|
* Copyright (c) Microsoft Corporation.
|
|
11
33
|
* Licensed under the MIT License.
|
|
@@ -13,13 +35,19 @@ var coreLro = require('@azure/core-lro');
|
|
|
13
35
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
14
36
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
15
37
|
*/
|
|
38
|
+
/** Known values of {@link UsagesTypes} that the service accepts. */
|
|
39
|
+
exports.KnownUsagesTypes = void 0;
|
|
16
40
|
(function (KnownUsagesTypes) {
|
|
17
41
|
KnownUsagesTypes["Individual"] = "Individual";
|
|
18
42
|
KnownUsagesTypes["Combined"] = "Combined";
|
|
19
43
|
})(exports.KnownUsagesTypes || (exports.KnownUsagesTypes = {}));
|
|
44
|
+
/** Known values of {@link LimitType} that the service accepts. */
|
|
45
|
+
exports.KnownLimitType = void 0;
|
|
20
46
|
(function (KnownLimitType) {
|
|
21
47
|
KnownLimitType["LimitValue"] = "LimitValue";
|
|
22
48
|
})(exports.KnownLimitType || (exports.KnownLimitType = {}));
|
|
49
|
+
/** Known values of {@link QuotaRequestState} that the service accepts. */
|
|
50
|
+
exports.KnownQuotaRequestState = void 0;
|
|
23
51
|
(function (KnownQuotaRequestState) {
|
|
24
52
|
KnownQuotaRequestState["Accepted"] = "Accepted";
|
|
25
53
|
KnownQuotaRequestState["Invalid"] = "Invalid";
|
|
@@ -27,6 +55,8 @@ var coreLro = require('@azure/core-lro');
|
|
|
27
55
|
KnownQuotaRequestState["Failed"] = "Failed";
|
|
28
56
|
KnownQuotaRequestState["InProgress"] = "InProgress";
|
|
29
57
|
})(exports.KnownQuotaRequestState || (exports.KnownQuotaRequestState = {}));
|
|
58
|
+
/** Known values of {@link QuotaLimitTypes} that the service accepts. */
|
|
59
|
+
exports.KnownQuotaLimitTypes = void 0;
|
|
30
60
|
(function (KnownQuotaLimitTypes) {
|
|
31
61
|
KnownQuotaLimitTypes["Independent"] = "Independent";
|
|
32
62
|
KnownQuotaLimitTypes["Shared"] = "Shared";
|
|
@@ -1355,7 +1385,7 @@ class UsagesImpl {
|
|
|
1355
1385
|
* @param options The options parameters.
|
|
1356
1386
|
*/
|
|
1357
1387
|
get(resourceName, scope, options) {
|
|
1358
|
-
return this.client.sendOperationRequest({ resourceName, scope, options }, getOperationSpec);
|
|
1388
|
+
return this.client.sendOperationRequest({ resourceName, scope, options }, getOperationSpec$2);
|
|
1359
1389
|
}
|
|
1360
1390
|
/**
|
|
1361
1391
|
* Get a list of current usage for all resources for the scope specified.
|
|
@@ -1367,7 +1397,7 @@ class UsagesImpl {
|
|
|
1367
1397
|
* @param options The options parameters.
|
|
1368
1398
|
*/
|
|
1369
1399
|
_list(scope, options) {
|
|
1370
|
-
return this.client.sendOperationRequest({ scope, options }, listOperationSpec);
|
|
1400
|
+
return this.client.sendOperationRequest({ scope, options }, listOperationSpec$3);
|
|
1371
1401
|
}
|
|
1372
1402
|
/**
|
|
1373
1403
|
* ListNext
|
|
@@ -1380,12 +1410,12 @@ class UsagesImpl {
|
|
|
1380
1410
|
* @param options The options parameters.
|
|
1381
1411
|
*/
|
|
1382
1412
|
_listNext(scope, nextLink, options) {
|
|
1383
|
-
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec);
|
|
1413
|
+
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec$3);
|
|
1384
1414
|
}
|
|
1385
1415
|
}
|
|
1386
1416
|
// Operation Specifications
|
|
1387
|
-
const serializer =
|
|
1388
|
-
const getOperationSpec = {
|
|
1417
|
+
const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1418
|
+
const getOperationSpec$2 = {
|
|
1389
1419
|
path: "/{scope}/providers/Microsoft.Quota/usages/{resourceName}",
|
|
1390
1420
|
httpMethod: "GET",
|
|
1391
1421
|
responses: {
|
|
@@ -1400,9 +1430,9 @@ const getOperationSpec = {
|
|
|
1400
1430
|
queryParameters: [apiVersion],
|
|
1401
1431
|
urlParameters: [$host, resourceName, scope],
|
|
1402
1432
|
headerParameters: [accept],
|
|
1403
|
-
serializer
|
|
1433
|
+
serializer: serializer$3
|
|
1404
1434
|
};
|
|
1405
|
-
const listOperationSpec = {
|
|
1435
|
+
const listOperationSpec$3 = {
|
|
1406
1436
|
path: "/{scope}/providers/Microsoft.Quota/usages",
|
|
1407
1437
|
httpMethod: "GET",
|
|
1408
1438
|
responses: {
|
|
@@ -1417,9 +1447,9 @@ const listOperationSpec = {
|
|
|
1417
1447
|
queryParameters: [apiVersion],
|
|
1418
1448
|
urlParameters: [$host, scope],
|
|
1419
1449
|
headerParameters: [accept],
|
|
1420
|
-
serializer
|
|
1450
|
+
serializer: serializer$3
|
|
1421
1451
|
};
|
|
1422
|
-
const listNextOperationSpec = {
|
|
1452
|
+
const listNextOperationSpec$3 = {
|
|
1423
1453
|
path: "{nextLink}",
|
|
1424
1454
|
httpMethod: "GET",
|
|
1425
1455
|
responses: {
|
|
@@ -1434,7 +1464,7 @@ const listNextOperationSpec = {
|
|
|
1434
1464
|
queryParameters: [apiVersion],
|
|
1435
1465
|
urlParameters: [$host, scope, nextLink],
|
|
1436
1466
|
headerParameters: [accept],
|
|
1437
|
-
serializer
|
|
1467
|
+
serializer: serializer$3
|
|
1438
1468
|
};
|
|
1439
1469
|
|
|
1440
1470
|
/*
|
|
@@ -1598,11 +1628,13 @@ class QuotaImpl {
|
|
|
1598
1628
|
};
|
|
1599
1629
|
});
|
|
1600
1630
|
const lro = new LroImpl(sendOperation, { resourceName, scope, createQuotaRequest, options }, createOrUpdateOperationSpec);
|
|
1601
|
-
|
|
1631
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1602
1632
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1603
1633
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1604
1634
|
lroResourceLocationConfig: "location"
|
|
1605
1635
|
});
|
|
1636
|
+
yield poller.poll();
|
|
1637
|
+
return poller;
|
|
1606
1638
|
});
|
|
1607
1639
|
}
|
|
1608
1640
|
/**
|
|
@@ -1675,11 +1707,13 @@ class QuotaImpl {
|
|
|
1675
1707
|
};
|
|
1676
1708
|
});
|
|
1677
1709
|
const lro = new LroImpl(sendOperation, { resourceName, scope, createQuotaRequest, options }, updateOperationSpec);
|
|
1678
|
-
|
|
1710
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1679
1711
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1680
1712
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1681
1713
|
lroResourceLocationConfig: "location"
|
|
1682
1714
|
});
|
|
1715
|
+
yield poller.poll();
|
|
1716
|
+
return poller;
|
|
1683
1717
|
});
|
|
1684
1718
|
}
|
|
1685
1719
|
/**
|
|
@@ -1718,7 +1752,7 @@ class QuotaImpl {
|
|
|
1718
1752
|
* @param options The options parameters.
|
|
1719
1753
|
*/
|
|
1720
1754
|
_list(scope, options) {
|
|
1721
|
-
return this.client.sendOperationRequest({ scope, options }, listOperationSpec$
|
|
1755
|
+
return this.client.sendOperationRequest({ scope, options }, listOperationSpec$2);
|
|
1722
1756
|
}
|
|
1723
1757
|
/**
|
|
1724
1758
|
* ListNext
|
|
@@ -1731,11 +1765,11 @@ class QuotaImpl {
|
|
|
1731
1765
|
* @param options The options parameters.
|
|
1732
1766
|
*/
|
|
1733
1767
|
_listNext(scope, nextLink, options) {
|
|
1734
|
-
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec$
|
|
1768
|
+
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec$2);
|
|
1735
1769
|
}
|
|
1736
1770
|
}
|
|
1737
1771
|
// Operation Specifications
|
|
1738
|
-
const serializer$
|
|
1772
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1739
1773
|
const getOperationSpec$1 = {
|
|
1740
1774
|
path: "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}",
|
|
1741
1775
|
httpMethod: "GET",
|
|
@@ -1751,7 +1785,7 @@ const getOperationSpec$1 = {
|
|
|
1751
1785
|
queryParameters: [apiVersion],
|
|
1752
1786
|
urlParameters: [$host, resourceName, scope],
|
|
1753
1787
|
headerParameters: [accept],
|
|
1754
|
-
serializer: serializer$
|
|
1788
|
+
serializer: serializer$2
|
|
1755
1789
|
};
|
|
1756
1790
|
const createOrUpdateOperationSpec = {
|
|
1757
1791
|
path: "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}",
|
|
@@ -1778,7 +1812,7 @@ const createOrUpdateOperationSpec = {
|
|
|
1778
1812
|
urlParameters: [$host, resourceName, scope],
|
|
1779
1813
|
headerParameters: [accept, contentType],
|
|
1780
1814
|
mediaType: "json",
|
|
1781
|
-
serializer: serializer$
|
|
1815
|
+
serializer: serializer$2
|
|
1782
1816
|
};
|
|
1783
1817
|
const updateOperationSpec = {
|
|
1784
1818
|
path: "/{scope}/providers/Microsoft.Quota/quotas/{resourceName}",
|
|
@@ -1805,9 +1839,9 @@ const updateOperationSpec = {
|
|
|
1805
1839
|
urlParameters: [$host, resourceName, scope],
|
|
1806
1840
|
headerParameters: [accept, contentType],
|
|
1807
1841
|
mediaType: "json",
|
|
1808
|
-
serializer: serializer$
|
|
1842
|
+
serializer: serializer$2
|
|
1809
1843
|
};
|
|
1810
|
-
const listOperationSpec$
|
|
1844
|
+
const listOperationSpec$2 = {
|
|
1811
1845
|
path: "/{scope}/providers/Microsoft.Quota/quotas",
|
|
1812
1846
|
httpMethod: "GET",
|
|
1813
1847
|
responses: {
|
|
@@ -1822,9 +1856,9 @@ const listOperationSpec$1 = {
|
|
|
1822
1856
|
queryParameters: [apiVersion],
|
|
1823
1857
|
urlParameters: [$host, scope],
|
|
1824
1858
|
headerParameters: [accept],
|
|
1825
|
-
serializer: serializer$
|
|
1859
|
+
serializer: serializer$2
|
|
1826
1860
|
};
|
|
1827
|
-
const listNextOperationSpec$
|
|
1861
|
+
const listNextOperationSpec$2 = {
|
|
1828
1862
|
path: "{nextLink}",
|
|
1829
1863
|
httpMethod: "GET",
|
|
1830
1864
|
responses: {
|
|
@@ -1839,7 +1873,7 @@ const listNextOperationSpec$1 = {
|
|
|
1839
1873
|
queryParameters: [apiVersion],
|
|
1840
1874
|
urlParameters: [$host, scope, nextLink],
|
|
1841
1875
|
headerParameters: [accept],
|
|
1842
|
-
serializer: serializer$
|
|
1876
|
+
serializer: serializer$2
|
|
1843
1877
|
};
|
|
1844
1878
|
|
|
1845
1879
|
/*
|
|
@@ -1926,7 +1960,7 @@ class QuotaRequestStatusImpl {
|
|
|
1926
1960
|
* @param options The options parameters.
|
|
1927
1961
|
*/
|
|
1928
1962
|
get(id, scope, options) {
|
|
1929
|
-
return this.client.sendOperationRequest({ id, scope, options }, getOperationSpec
|
|
1963
|
+
return this.client.sendOperationRequest({ id, scope, options }, getOperationSpec);
|
|
1930
1964
|
}
|
|
1931
1965
|
/**
|
|
1932
1966
|
* For the specified scope, get the current quota requests for a one year period ending at the time is
|
|
@@ -1939,7 +1973,7 @@ class QuotaRequestStatusImpl {
|
|
|
1939
1973
|
* @param options The options parameters.
|
|
1940
1974
|
*/
|
|
1941
1975
|
_list(scope, options) {
|
|
1942
|
-
return this.client.sendOperationRequest({ scope, options }, listOperationSpec$
|
|
1976
|
+
return this.client.sendOperationRequest({ scope, options }, listOperationSpec$1);
|
|
1943
1977
|
}
|
|
1944
1978
|
/**
|
|
1945
1979
|
* ListNext
|
|
@@ -1952,12 +1986,12 @@ class QuotaRequestStatusImpl {
|
|
|
1952
1986
|
* @param options The options parameters.
|
|
1953
1987
|
*/
|
|
1954
1988
|
_listNext(scope, nextLink, options) {
|
|
1955
|
-
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec$
|
|
1989
|
+
return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec$1);
|
|
1956
1990
|
}
|
|
1957
1991
|
}
|
|
1958
1992
|
// Operation Specifications
|
|
1959
|
-
const serializer$
|
|
1960
|
-
const getOperationSpec
|
|
1993
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1994
|
+
const getOperationSpec = {
|
|
1961
1995
|
path: "/{scope}/providers/Microsoft.Quota/quotaRequests/{id}",
|
|
1962
1996
|
httpMethod: "GET",
|
|
1963
1997
|
responses: {
|
|
@@ -1971,9 +2005,9 @@ const getOperationSpec$2 = {
|
|
|
1971
2005
|
queryParameters: [apiVersion],
|
|
1972
2006
|
urlParameters: [$host, scope, id],
|
|
1973
2007
|
headerParameters: [accept],
|
|
1974
|
-
serializer: serializer$
|
|
2008
|
+
serializer: serializer$1
|
|
1975
2009
|
};
|
|
1976
|
-
const listOperationSpec$
|
|
2010
|
+
const listOperationSpec$1 = {
|
|
1977
2011
|
path: "/{scope}/providers/Microsoft.Quota/quotaRequests",
|
|
1978
2012
|
httpMethod: "GET",
|
|
1979
2013
|
responses: {
|
|
@@ -1992,9 +2026,9 @@ const listOperationSpec$2 = {
|
|
|
1992
2026
|
],
|
|
1993
2027
|
urlParameters: [$host, scope],
|
|
1994
2028
|
headerParameters: [accept],
|
|
1995
|
-
serializer: serializer$
|
|
2029
|
+
serializer: serializer$1
|
|
1996
2030
|
};
|
|
1997
|
-
const listNextOperationSpec$
|
|
2031
|
+
const listNextOperationSpec$1 = {
|
|
1998
2032
|
path: "{nextLink}",
|
|
1999
2033
|
httpMethod: "GET",
|
|
2000
2034
|
responses: {
|
|
@@ -2013,7 +2047,7 @@ const listNextOperationSpec$2 = {
|
|
|
2013
2047
|
],
|
|
2014
2048
|
urlParameters: [$host, scope, nextLink],
|
|
2015
2049
|
headerParameters: [accept],
|
|
2016
|
-
serializer: serializer$
|
|
2050
|
+
serializer: serializer$1
|
|
2017
2051
|
};
|
|
2018
2052
|
|
|
2019
2053
|
/*
|
|
@@ -2086,7 +2120,7 @@ class QuotaOperationImpl {
|
|
|
2086
2120
|
* @param options The options parameters.
|
|
2087
2121
|
*/
|
|
2088
2122
|
_list(options) {
|
|
2089
|
-
return this.client.sendOperationRequest({ options }, listOperationSpec
|
|
2123
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
2090
2124
|
}
|
|
2091
2125
|
/**
|
|
2092
2126
|
* ListNext
|
|
@@ -2094,12 +2128,12 @@ class QuotaOperationImpl {
|
|
|
2094
2128
|
* @param options The options parameters.
|
|
2095
2129
|
*/
|
|
2096
2130
|
_listNext(nextLink, options) {
|
|
2097
|
-
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec
|
|
2131
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
|
2098
2132
|
}
|
|
2099
2133
|
}
|
|
2100
2134
|
// Operation Specifications
|
|
2101
|
-
const serializer
|
|
2102
|
-
const listOperationSpec
|
|
2135
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
2136
|
+
const listOperationSpec = {
|
|
2103
2137
|
path: "/providers/Microsoft.Quota/operations",
|
|
2104
2138
|
httpMethod: "GET",
|
|
2105
2139
|
responses: {
|
|
@@ -2113,9 +2147,9 @@ const listOperationSpec$3 = {
|
|
|
2113
2147
|
queryParameters: [apiVersion],
|
|
2114
2148
|
urlParameters: [$host],
|
|
2115
2149
|
headerParameters: [accept],
|
|
2116
|
-
serializer
|
|
2150
|
+
serializer
|
|
2117
2151
|
};
|
|
2118
|
-
const listNextOperationSpec
|
|
2152
|
+
const listNextOperationSpec = {
|
|
2119
2153
|
path: "{nextLink}",
|
|
2120
2154
|
httpMethod: "GET",
|
|
2121
2155
|
responses: {
|
|
@@ -2129,7 +2163,7 @@ const listNextOperationSpec$3 = {
|
|
|
2129
2163
|
queryParameters: [apiVersion],
|
|
2130
2164
|
urlParameters: [$host, nextLink],
|
|
2131
2165
|
headerParameters: [accept],
|
|
2132
|
-
serializer
|
|
2166
|
+
serializer
|
|
2133
2167
|
};
|
|
2134
2168
|
|
|
2135
2169
|
/*
|
|
@@ -2139,13 +2173,14 @@ const listNextOperationSpec$3 = {
|
|
|
2139
2173
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2140
2174
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2141
2175
|
*/
|
|
2142
|
-
class AzureQuotaExtensionAPI extends
|
|
2176
|
+
class AzureQuotaExtensionAPI extends coreClient__namespace.ServiceClient {
|
|
2143
2177
|
/**
|
|
2144
2178
|
* Initializes a new instance of the AzureQuotaExtensionAPI class.
|
|
2145
2179
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
2146
2180
|
* @param options The parameter options
|
|
2147
2181
|
*/
|
|
2148
2182
|
constructor(credentials, options) {
|
|
2183
|
+
var _a, _b;
|
|
2149
2184
|
if (credentials === undefined) {
|
|
2150
2185
|
throw new Error("'credentials' cannot be null");
|
|
2151
2186
|
}
|
|
@@ -2157,7 +2192,7 @@ class AzureQuotaExtensionAPI extends coreClient.ServiceClient {
|
|
|
2157
2192
|
requestContentType: "application/json; charset=utf-8",
|
|
2158
2193
|
credential: credentials
|
|
2159
2194
|
};
|
|
2160
|
-
const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.
|
|
2195
|
+
const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.4`;
|
|
2161
2196
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2162
2197
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2163
2198
|
: `${packageDetails}`;
|
|
@@ -2166,8 +2201,24 @@ class AzureQuotaExtensionAPI extends coreClient.ServiceClient {
|
|
|
2166
2201
|
}
|
|
2167
2202
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2168
2203
|
userAgentPrefix
|
|
2169
|
-
}, baseUri: options.endpoint
|
|
2204
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
2170
2205
|
super(optionsWithDefaults);
|
|
2206
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
2207
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
2208
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
2209
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
2210
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
2211
|
+
this.pipeline.removePolicy({
|
|
2212
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
2213
|
+
});
|
|
2214
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
2215
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
2216
|
+
challengeCallbacks: {
|
|
2217
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
2218
|
+
}
|
|
2219
|
+
}));
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2171
2222
|
// Assigning values to Constant parameters
|
|
2172
2223
|
this.$host = options.$host || "https://management.azure.com";
|
|
2173
2224
|
this.apiVersion = options.apiVersion || "2021-03-15-preview";
|