@azure/arm-datadog 3.0.1 → 3.0.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 +10 -0
- package/README.md +1 -1
- package/dist/index.js +291 -89
- 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/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/microsoftDatadogClient.d.ts +2 -0
- package/dist-esm/src/microsoftDatadogClient.d.ts.map +1 -1
- package/dist-esm/src/microsoftDatadogClient.js +49 -18
- package/dist-esm/src/microsoftDatadogClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +29 -0
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +29 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/operations/marketplaceAgreements.d.ts.map +1 -1
- package/dist-esm/src/operations/marketplaceAgreements.js +19 -7
- package/dist-esm/src/operations/marketplaceAgreements.js.map +1 -1
- package/dist-esm/src/operations/monitors.d.ts.map +1 -1
- package/dist-esm/src/operations/monitors.js +109 -42
- package/dist-esm/src/operations/monitors.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/singleSignOnConfigurations.d.ts.map +1 -1
- package/dist-esm/src/operations/singleSignOnConfigurations.js +19 -7
- package/dist-esm/src/operations/singleSignOnConfigurations.js.map +1 -1
- package/dist-esm/src/operations/tagRules.d.ts.map +1 -1
- package/dist-esm/src/operations/tagRules.js +19 -7
- package/dist-esm/src/operations/tagRules.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-datadog.api.md +3 -29
- package/src/index.ts +1 -0
- package/src/microsoftDatadogClient.ts +60 -20
- package/src/models/index.ts +29 -0
- package/src/operations/marketplaceAgreements.ts +21 -8
- package/src/operations/monitors.ts +138 -61
- package/src/operations/operations.ts +21 -8
- package/src/operations/singleSignOnConfigurations.ts +26 -8
- package/src/operations/tagRules.ts +26 -8
- package/src/pagingHelper.ts +39 -0
- package/types/arm-datadog.d.ts +40 -0
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
## 3.0.2 (2022-11-21)
|
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
|
12
|
+
|
3
13
|
## 3.0.1 (2022-04-18)
|
4
14
|
|
5
15
|
**features**
|
package/README.md
CHANGED
@@ -13,7 +13,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
|
|
13
13
|
|
14
14
|
### Currently supported environments
|
15
15
|
|
16
|
-
- [LTS versions of Node.js](https://
|
16
|
+
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
18
18
|
|
19
19
|
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
package/dist/index.js
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
+
var tslib = require('tslib');
|
5
6
|
var coreClient = require('@azure/core-client');
|
6
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
7
|
-
var tslib = require('tslib');
|
8
8
|
var coreLro = require('@azure/core-lro');
|
9
9
|
|
10
10
|
function _interopNamespace(e) {
|
@@ -28,6 +28,38 @@ function _interopNamespace(e) {
|
|
28
28
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
29
29
|
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
30
30
|
|
31
|
+
/*
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
33
|
+
* Licensed under the MIT License.
|
34
|
+
*
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
37
|
+
*/
|
38
|
+
const pageMap = new WeakMap();
|
39
|
+
/**
|
40
|
+
* Given a result page from a pageable operation, returns a
|
41
|
+
* continuation token that can be used to begin paging from
|
42
|
+
* that point later.
|
43
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
44
|
+
* @returns The continuation token that can be passed into byPage().
|
45
|
+
*/
|
46
|
+
function getContinuationToken(page) {
|
47
|
+
var _a;
|
48
|
+
if (typeof page !== "object" || page === null) {
|
49
|
+
return undefined;
|
50
|
+
}
|
51
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
52
|
+
}
|
53
|
+
function setContinuationToken(page, continuationToken) {
|
54
|
+
var _a;
|
55
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
59
|
+
pageInfo.continuationToken = continuationToken;
|
60
|
+
pageMap.set(page, pageInfo);
|
61
|
+
}
|
62
|
+
|
31
63
|
/*
|
32
64
|
* Copyright (c) Microsoft Corporation.
|
33
65
|
* Licensed under the MIT License.
|
@@ -38,62 +70,91 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
38
70
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
39
71
|
exports.KnownCreatedByType = void 0;
|
40
72
|
(function (KnownCreatedByType) {
|
73
|
+
/** User */
|
41
74
|
KnownCreatedByType["User"] = "User";
|
75
|
+
/** Application */
|
42
76
|
KnownCreatedByType["Application"] = "Application";
|
77
|
+
/** ManagedIdentity */
|
43
78
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
79
|
+
/** Key */
|
44
80
|
KnownCreatedByType["Key"] = "Key";
|
45
81
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
46
82
|
/** Known values of {@link ProvisioningState} that the service accepts. */
|
47
83
|
exports.KnownProvisioningState = void 0;
|
48
84
|
(function (KnownProvisioningState) {
|
85
|
+
/** Accepted */
|
49
86
|
KnownProvisioningState["Accepted"] = "Accepted";
|
87
|
+
/** Creating */
|
50
88
|
KnownProvisioningState["Creating"] = "Creating";
|
89
|
+
/** Updating */
|
51
90
|
KnownProvisioningState["Updating"] = "Updating";
|
91
|
+
/** Deleting */
|
52
92
|
KnownProvisioningState["Deleting"] = "Deleting";
|
93
|
+
/** Succeeded */
|
53
94
|
KnownProvisioningState["Succeeded"] = "Succeeded";
|
95
|
+
/** Failed */
|
54
96
|
KnownProvisioningState["Failed"] = "Failed";
|
97
|
+
/** Canceled */
|
55
98
|
KnownProvisioningState["Canceled"] = "Canceled";
|
99
|
+
/** Deleted */
|
56
100
|
KnownProvisioningState["Deleted"] = "Deleted";
|
101
|
+
/** NotSpecified */
|
57
102
|
KnownProvisioningState["NotSpecified"] = "NotSpecified";
|
58
103
|
})(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
|
59
104
|
/** Known values of {@link MonitoringStatus} that the service accepts. */
|
60
105
|
exports.KnownMonitoringStatus = void 0;
|
61
106
|
(function (KnownMonitoringStatus) {
|
107
|
+
/** Enabled */
|
62
108
|
KnownMonitoringStatus["Enabled"] = "Enabled";
|
109
|
+
/** Disabled */
|
63
110
|
KnownMonitoringStatus["Disabled"] = "Disabled";
|
64
111
|
})(exports.KnownMonitoringStatus || (exports.KnownMonitoringStatus = {}));
|
65
112
|
/** Known values of {@link MarketplaceSubscriptionStatus} that the service accepts. */
|
66
113
|
exports.KnownMarketplaceSubscriptionStatus = void 0;
|
67
114
|
(function (KnownMarketplaceSubscriptionStatus) {
|
115
|
+
/** Provisioning */
|
68
116
|
KnownMarketplaceSubscriptionStatus["Provisioning"] = "Provisioning";
|
117
|
+
/** Active */
|
69
118
|
KnownMarketplaceSubscriptionStatus["Active"] = "Active";
|
119
|
+
/** Suspended */
|
70
120
|
KnownMarketplaceSubscriptionStatus["Suspended"] = "Suspended";
|
121
|
+
/** Unsubscribed */
|
71
122
|
KnownMarketplaceSubscriptionStatus["Unsubscribed"] = "Unsubscribed";
|
72
123
|
})(exports.KnownMarketplaceSubscriptionStatus || (exports.KnownMarketplaceSubscriptionStatus = {}));
|
73
124
|
/** Known values of {@link LiftrResourceCategories} that the service accepts. */
|
74
125
|
exports.KnownLiftrResourceCategories = void 0;
|
75
126
|
(function (KnownLiftrResourceCategories) {
|
127
|
+
/** Unknown */
|
76
128
|
KnownLiftrResourceCategories["Unknown"] = "Unknown";
|
129
|
+
/** MonitorLogs */
|
77
130
|
KnownLiftrResourceCategories["MonitorLogs"] = "MonitorLogs";
|
78
131
|
})(exports.KnownLiftrResourceCategories || (exports.KnownLiftrResourceCategories = {}));
|
79
132
|
/** Known values of {@link ManagedIdentityTypes} that the service accepts. */
|
80
133
|
exports.KnownManagedIdentityTypes = void 0;
|
81
134
|
(function (KnownManagedIdentityTypes) {
|
135
|
+
/** SystemAssigned */
|
82
136
|
KnownManagedIdentityTypes["SystemAssigned"] = "SystemAssigned";
|
137
|
+
/** UserAssigned */
|
83
138
|
KnownManagedIdentityTypes["UserAssigned"] = "UserAssigned";
|
84
139
|
})(exports.KnownManagedIdentityTypes || (exports.KnownManagedIdentityTypes = {}));
|
85
140
|
/** Known values of {@link TagAction} that the service accepts. */
|
86
141
|
exports.KnownTagAction = void 0;
|
87
142
|
(function (KnownTagAction) {
|
143
|
+
/** Include */
|
88
144
|
KnownTagAction["Include"] = "Include";
|
145
|
+
/** Exclude */
|
89
146
|
KnownTagAction["Exclude"] = "Exclude";
|
90
147
|
})(exports.KnownTagAction || (exports.KnownTagAction = {}));
|
91
148
|
/** Known values of {@link SingleSignOnStates} that the service accepts. */
|
92
149
|
exports.KnownSingleSignOnStates = void 0;
|
93
150
|
(function (KnownSingleSignOnStates) {
|
151
|
+
/** Initial */
|
94
152
|
KnownSingleSignOnStates["Initial"] = "Initial";
|
153
|
+
/** Enable */
|
95
154
|
KnownSingleSignOnStates["Enable"] = "Enable";
|
155
|
+
/** Disable */
|
96
156
|
KnownSingleSignOnStates["Disable"] = "Disable";
|
157
|
+
/** Existing */
|
97
158
|
KnownSingleSignOnStates["Existing"] = "Existing";
|
98
159
|
})(exports.KnownSingleSignOnStates || (exports.KnownSingleSignOnStates = {}));
|
99
160
|
|
@@ -1603,20 +1664,31 @@ class MarketplaceAgreementsImpl {
|
|
1603
1664
|
[Symbol.asyncIterator]() {
|
1604
1665
|
return this;
|
1605
1666
|
},
|
1606
|
-
byPage: () => {
|
1607
|
-
|
1667
|
+
byPage: (settings) => {
|
1668
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1669
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1670
|
+
}
|
1671
|
+
return this.listPagingPage(options, settings);
|
1608
1672
|
}
|
1609
1673
|
};
|
1610
1674
|
}
|
1611
|
-
listPagingPage(options) {
|
1675
|
+
listPagingPage(options, settings) {
|
1612
1676
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1613
|
-
let result
|
1614
|
-
|
1615
|
-
|
1677
|
+
let result;
|
1678
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1679
|
+
if (!continuationToken) {
|
1680
|
+
result = yield tslib.__await(this._list(options));
|
1681
|
+
let page = result.value || [];
|
1682
|
+
continuationToken = result.nextLink;
|
1683
|
+
setContinuationToken(page, continuationToken);
|
1684
|
+
yield yield tslib.__await(page);
|
1685
|
+
}
|
1616
1686
|
while (continuationToken) {
|
1617
1687
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
1618
1688
|
continuationToken = result.nextLink;
|
1619
|
-
|
1689
|
+
let page = result.value || [];
|
1690
|
+
setContinuationToken(page, continuationToken);
|
1691
|
+
yield yield tslib.__await(page);
|
1620
1692
|
}
|
1621
1693
|
});
|
1622
1694
|
}
|
@@ -1778,20 +1850,31 @@ class MonitorsImpl {
|
|
1778
1850
|
[Symbol.asyncIterator]() {
|
1779
1851
|
return this;
|
1780
1852
|
},
|
1781
|
-
byPage: () => {
|
1782
|
-
|
1853
|
+
byPage: (settings) => {
|
1854
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1855
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1856
|
+
}
|
1857
|
+
return this.listApiKeysPagingPage(resourceGroupName, monitorName, options, settings);
|
1783
1858
|
}
|
1784
1859
|
};
|
1785
1860
|
}
|
1786
|
-
listApiKeysPagingPage(resourceGroupName, monitorName, options) {
|
1861
|
+
listApiKeysPagingPage(resourceGroupName, monitorName, options, settings) {
|
1787
1862
|
return tslib.__asyncGenerator(this, arguments, function* listApiKeysPagingPage_1() {
|
1788
|
-
let result
|
1789
|
-
|
1790
|
-
|
1863
|
+
let result;
|
1864
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1865
|
+
if (!continuationToken) {
|
1866
|
+
result = yield tslib.__await(this._listApiKeys(resourceGroupName, monitorName, options));
|
1867
|
+
let page = result.value || [];
|
1868
|
+
continuationToken = result.nextLink;
|
1869
|
+
setContinuationToken(page, continuationToken);
|
1870
|
+
yield yield tslib.__await(page);
|
1871
|
+
}
|
1791
1872
|
while (continuationToken) {
|
1792
1873
|
result = yield tslib.__await(this._listApiKeysNext(resourceGroupName, monitorName, continuationToken, options));
|
1793
1874
|
continuationToken = result.nextLink;
|
1794
|
-
|
1875
|
+
let page = result.value || [];
|
1876
|
+
setContinuationToken(page, continuationToken);
|
1877
|
+
yield yield tslib.__await(page);
|
1795
1878
|
}
|
1796
1879
|
});
|
1797
1880
|
}
|
@@ -1828,20 +1911,31 @@ class MonitorsImpl {
|
|
1828
1911
|
[Symbol.asyncIterator]() {
|
1829
1912
|
return this;
|
1830
1913
|
},
|
1831
|
-
byPage: () => {
|
1832
|
-
|
1914
|
+
byPage: (settings) => {
|
1915
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1916
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1917
|
+
}
|
1918
|
+
return this.listHostsPagingPage(resourceGroupName, monitorName, options, settings);
|
1833
1919
|
}
|
1834
1920
|
};
|
1835
1921
|
}
|
1836
|
-
listHostsPagingPage(resourceGroupName, monitorName, options) {
|
1922
|
+
listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
|
1837
1923
|
return tslib.__asyncGenerator(this, arguments, function* listHostsPagingPage_1() {
|
1838
|
-
let result
|
1839
|
-
|
1840
|
-
|
1924
|
+
let result;
|
1925
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1926
|
+
if (!continuationToken) {
|
1927
|
+
result = yield tslib.__await(this._listHosts(resourceGroupName, monitorName, options));
|
1928
|
+
let page = result.value || [];
|
1929
|
+
continuationToken = result.nextLink;
|
1930
|
+
setContinuationToken(page, continuationToken);
|
1931
|
+
yield yield tslib.__await(page);
|
1932
|
+
}
|
1841
1933
|
while (continuationToken) {
|
1842
1934
|
result = yield tslib.__await(this._listHostsNext(resourceGroupName, monitorName, continuationToken, options));
|
1843
1935
|
continuationToken = result.nextLink;
|
1844
|
-
|
1936
|
+
let page = result.value || [];
|
1937
|
+
setContinuationToken(page, continuationToken);
|
1938
|
+
yield yield tslib.__await(page);
|
1845
1939
|
}
|
1846
1940
|
});
|
1847
1941
|
}
|
@@ -1878,20 +1972,31 @@ class MonitorsImpl {
|
|
1878
1972
|
[Symbol.asyncIterator]() {
|
1879
1973
|
return this;
|
1880
1974
|
},
|
1881
|
-
byPage: () => {
|
1882
|
-
|
1975
|
+
byPage: (settings) => {
|
1976
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
1977
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
1978
|
+
}
|
1979
|
+
return this.listLinkedResourcesPagingPage(resourceGroupName, monitorName, options, settings);
|
1883
1980
|
}
|
1884
1981
|
};
|
1885
1982
|
}
|
1886
|
-
listLinkedResourcesPagingPage(resourceGroupName, monitorName, options) {
|
1983
|
+
listLinkedResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
|
1887
1984
|
return tslib.__asyncGenerator(this, arguments, function* listLinkedResourcesPagingPage_1() {
|
1888
|
-
let result
|
1889
|
-
|
1890
|
-
|
1985
|
+
let result;
|
1986
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
1987
|
+
if (!continuationToken) {
|
1988
|
+
result = yield tslib.__await(this._listLinkedResources(resourceGroupName, monitorName, options));
|
1989
|
+
let page = result.value || [];
|
1990
|
+
continuationToken = result.nextLink;
|
1991
|
+
setContinuationToken(page, continuationToken);
|
1992
|
+
yield yield tslib.__await(page);
|
1993
|
+
}
|
1891
1994
|
while (continuationToken) {
|
1892
1995
|
result = yield tslib.__await(this._listLinkedResourcesNext(resourceGroupName, monitorName, continuationToken, options));
|
1893
1996
|
continuationToken = result.nextLink;
|
1894
|
-
|
1997
|
+
let page = result.value || [];
|
1998
|
+
setContinuationToken(page, continuationToken);
|
1999
|
+
yield yield tslib.__await(page);
|
1895
2000
|
}
|
1896
2001
|
});
|
1897
2002
|
}
|
@@ -1928,20 +2033,31 @@ class MonitorsImpl {
|
|
1928
2033
|
[Symbol.asyncIterator]() {
|
1929
2034
|
return this;
|
1930
2035
|
},
|
1931
|
-
byPage: () => {
|
1932
|
-
|
2036
|
+
byPage: (settings) => {
|
2037
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
2038
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
2039
|
+
}
|
2040
|
+
return this.listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings);
|
1933
2041
|
}
|
1934
2042
|
};
|
1935
2043
|
}
|
1936
|
-
listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options) {
|
2044
|
+
listMonitoredResourcesPagingPage(resourceGroupName, monitorName, options, settings) {
|
1937
2045
|
return tslib.__asyncGenerator(this, arguments, function* listMonitoredResourcesPagingPage_1() {
|
1938
|
-
let result
|
1939
|
-
|
1940
|
-
|
2046
|
+
let result;
|
2047
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
2048
|
+
if (!continuationToken) {
|
2049
|
+
result = yield tslib.__await(this._listMonitoredResources(resourceGroupName, monitorName, options));
|
2050
|
+
let page = result.value || [];
|
2051
|
+
continuationToken = result.nextLink;
|
2052
|
+
setContinuationToken(page, continuationToken);
|
2053
|
+
yield yield tslib.__await(page);
|
2054
|
+
}
|
1941
2055
|
while (continuationToken) {
|
1942
2056
|
result = yield tslib.__await(this._listMonitoredResourcesNext(resourceGroupName, monitorName, continuationToken, options));
|
1943
2057
|
continuationToken = result.nextLink;
|
1944
|
-
|
2058
|
+
let page = result.value || [];
|
2059
|
+
setContinuationToken(page, continuationToken);
|
2060
|
+
yield yield tslib.__await(page);
|
1945
2061
|
}
|
1946
2062
|
});
|
1947
2063
|
}
|
@@ -1976,20 +2092,31 @@ class MonitorsImpl {
|
|
1976
2092
|
[Symbol.asyncIterator]() {
|
1977
2093
|
return this;
|
1978
2094
|
},
|
1979
|
-
byPage: () => {
|
1980
|
-
|
2095
|
+
byPage: (settings) => {
|
2096
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
2097
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
2098
|
+
}
|
2099
|
+
return this.listPagingPage(options, settings);
|
1981
2100
|
}
|
1982
2101
|
};
|
1983
2102
|
}
|
1984
|
-
listPagingPage(options) {
|
2103
|
+
listPagingPage(options, settings) {
|
1985
2104
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
1986
|
-
let result
|
1987
|
-
|
1988
|
-
|
2105
|
+
let result;
|
2106
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
2107
|
+
if (!continuationToken) {
|
2108
|
+
result = yield tslib.__await(this._list(options));
|
2109
|
+
let page = result.value || [];
|
2110
|
+
continuationToken = result.nextLink;
|
2111
|
+
setContinuationToken(page, continuationToken);
|
2112
|
+
yield yield tslib.__await(page);
|
2113
|
+
}
|
1989
2114
|
while (continuationToken) {
|
1990
2115
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
1991
2116
|
continuationToken = result.nextLink;
|
1992
|
-
|
2117
|
+
let page = result.value || [];
|
2118
|
+
setContinuationToken(page, continuationToken);
|
2119
|
+
yield yield tslib.__await(page);
|
1993
2120
|
}
|
1994
2121
|
});
|
1995
2122
|
}
|
@@ -2025,20 +2152,31 @@ class MonitorsImpl {
|
|
2025
2152
|
[Symbol.asyncIterator]() {
|
2026
2153
|
return this;
|
2027
2154
|
},
|
2028
|
-
byPage: () => {
|
2029
|
-
|
2155
|
+
byPage: (settings) => {
|
2156
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
2157
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
2158
|
+
}
|
2159
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
2030
2160
|
}
|
2031
2161
|
};
|
2032
2162
|
}
|
2033
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
2163
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
2034
2164
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
2035
|
-
let result
|
2036
|
-
|
2037
|
-
|
2165
|
+
let result;
|
2166
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
2167
|
+
if (!continuationToken) {
|
2168
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
2169
|
+
let page = result.value || [];
|
2170
|
+
continuationToken = result.nextLink;
|
2171
|
+
setContinuationToken(page, continuationToken);
|
2172
|
+
yield yield tslib.__await(page);
|
2173
|
+
}
|
2038
2174
|
while (continuationToken) {
|
2039
2175
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
2040
2176
|
continuationToken = result.nextLink;
|
2041
|
-
|
2177
|
+
let page = result.value || [];
|
2178
|
+
setContinuationToken(page, continuationToken);
|
2179
|
+
yield yield tslib.__await(page);
|
2042
2180
|
}
|
2043
2181
|
});
|
2044
2182
|
}
|
@@ -2811,20 +2949,31 @@ class OperationsImpl {
|
|
2811
2949
|
[Symbol.asyncIterator]() {
|
2812
2950
|
return this;
|
2813
2951
|
},
|
2814
|
-
byPage: () => {
|
2815
|
-
|
2952
|
+
byPage: (settings) => {
|
2953
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
2954
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
2955
|
+
}
|
2956
|
+
return this.listPagingPage(options, settings);
|
2816
2957
|
}
|
2817
2958
|
};
|
2818
2959
|
}
|
2819
|
-
listPagingPage(options) {
|
2960
|
+
listPagingPage(options, settings) {
|
2820
2961
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
2821
|
-
let result
|
2822
|
-
|
2823
|
-
|
2962
|
+
let result;
|
2963
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
2964
|
+
if (!continuationToken) {
|
2965
|
+
result = yield tslib.__await(this._list(options));
|
2966
|
+
let page = result.value || [];
|
2967
|
+
continuationToken = result.nextLink;
|
2968
|
+
setContinuationToken(page, continuationToken);
|
2969
|
+
yield yield tslib.__await(page);
|
2970
|
+
}
|
2824
2971
|
while (continuationToken) {
|
2825
2972
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
2826
2973
|
continuationToken = result.nextLink;
|
2827
|
-
|
2974
|
+
let page = result.value || [];
|
2975
|
+
setContinuationToken(page, continuationToken);
|
2976
|
+
yield yield tslib.__await(page);
|
2828
2977
|
}
|
2829
2978
|
});
|
2830
2979
|
}
|
@@ -2929,20 +3078,31 @@ class TagRulesImpl {
|
|
2929
3078
|
[Symbol.asyncIterator]() {
|
2930
3079
|
return this;
|
2931
3080
|
},
|
2932
|
-
byPage: () => {
|
2933
|
-
|
3081
|
+
byPage: (settings) => {
|
3082
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
3083
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
3084
|
+
}
|
3085
|
+
return this.listPagingPage(resourceGroupName, monitorName, options, settings);
|
2934
3086
|
}
|
2935
3087
|
};
|
2936
3088
|
}
|
2937
|
-
listPagingPage(resourceGroupName, monitorName, options) {
|
3089
|
+
listPagingPage(resourceGroupName, monitorName, options, settings) {
|
2938
3090
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
2939
|
-
let result
|
2940
|
-
|
2941
|
-
|
3091
|
+
let result;
|
3092
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
3093
|
+
if (!continuationToken) {
|
3094
|
+
result = yield tslib.__await(this._list(resourceGroupName, monitorName, options));
|
3095
|
+
let page = result.value || [];
|
3096
|
+
continuationToken = result.nextLink;
|
3097
|
+
setContinuationToken(page, continuationToken);
|
3098
|
+
yield yield tslib.__await(page);
|
3099
|
+
}
|
2942
3100
|
while (continuationToken) {
|
2943
3101
|
result = yield tslib.__await(this._listNext(resourceGroupName, monitorName, continuationToken, options));
|
2944
3102
|
continuationToken = result.nextLink;
|
2945
|
-
|
3103
|
+
let page = result.value || [];
|
3104
|
+
setContinuationToken(page, continuationToken);
|
3105
|
+
yield yield tslib.__await(page);
|
2946
3106
|
}
|
2947
3107
|
});
|
2948
3108
|
}
|
@@ -3128,20 +3288,31 @@ class SingleSignOnConfigurationsImpl {
|
|
3128
3288
|
[Symbol.asyncIterator]() {
|
3129
3289
|
return this;
|
3130
3290
|
},
|
3131
|
-
byPage: () => {
|
3132
|
-
|
3291
|
+
byPage: (settings) => {
|
3292
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
3293
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
3294
|
+
}
|
3295
|
+
return this.listPagingPage(resourceGroupName, monitorName, options, settings);
|
3133
3296
|
}
|
3134
3297
|
};
|
3135
3298
|
}
|
3136
|
-
listPagingPage(resourceGroupName, monitorName, options) {
|
3299
|
+
listPagingPage(resourceGroupName, monitorName, options, settings) {
|
3137
3300
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
3138
|
-
let result
|
3139
|
-
|
3140
|
-
|
3301
|
+
let result;
|
3302
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
3303
|
+
if (!continuationToken) {
|
3304
|
+
result = yield tslib.__await(this._list(resourceGroupName, monitorName, options));
|
3305
|
+
let page = result.value || [];
|
3306
|
+
continuationToken = result.nextLink;
|
3307
|
+
setContinuationToken(page, continuationToken);
|
3308
|
+
yield yield tslib.__await(page);
|
3309
|
+
}
|
3141
3310
|
while (continuationToken) {
|
3142
3311
|
result = yield tslib.__await(this._listNext(resourceGroupName, monitorName, continuationToken, options));
|
3143
3312
|
continuationToken = result.nextLink;
|
3144
|
-
|
3313
|
+
let page = result.value || [];
|
3314
|
+
setContinuationToken(page, continuationToken);
|
3315
|
+
yield yield tslib.__await(page);
|
3145
3316
|
}
|
3146
3317
|
});
|
3147
3318
|
}
|
@@ -3363,7 +3534,7 @@ class MicrosoftDatadogClient extends coreClient__namespace.ServiceClient {
|
|
3363
3534
|
* @param options The parameter options
|
3364
3535
|
*/
|
3365
3536
|
constructor(credentials, subscriptionId, options) {
|
3366
|
-
var _a, _b;
|
3537
|
+
var _a, _b, _c;
|
3367
3538
|
if (credentials === undefined) {
|
3368
3539
|
throw new Error("'credentials' cannot be null");
|
3369
3540
|
}
|
@@ -3378,32 +3549,34 @@ class MicrosoftDatadogClient extends coreClient__namespace.ServiceClient {
|
|
3378
3549
|
requestContentType: "application/json; charset=utf-8",
|
3379
3550
|
credential: credentials
|
3380
3551
|
};
|
3381
|
-
const packageDetails = `azsdk-js-arm-datadog/3.0.
|
3552
|
+
const packageDetails = `azsdk-js-arm-datadog/3.0.2`;
|
3382
3553
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
3383
3554
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
3384
3555
|
: `${packageDetails}`;
|
3385
|
-
if (!options.credentialScopes) {
|
3386
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
3387
|
-
}
|
3388
3556
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
3389
3557
|
userAgentPrefix
|
3390
|
-
},
|
3558
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
3391
3559
|
super(optionsWithDefaults);
|
3560
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
3392
3561
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
3393
3562
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
3394
|
-
|
3563
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
3395
3564
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
|
3401
|
-
|
3402
|
-
|
3403
|
-
|
3404
|
-
|
3405
|
-
|
3406
|
-
|
3565
|
+
}
|
3566
|
+
if (!options ||
|
3567
|
+
!options.pipeline ||
|
3568
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
3569
|
+
!bearerTokenAuthenticationPolicyFound) {
|
3570
|
+
this.pipeline.removePolicy({
|
3571
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
3572
|
+
});
|
3573
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
3574
|
+
credential: credentials,
|
3575
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
3576
|
+
challengeCallbacks: {
|
3577
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
3578
|
+
}
|
3579
|
+
}));
|
3407
3580
|
}
|
3408
3581
|
// Parameter assignments
|
3409
3582
|
this.subscriptionId = subscriptionId;
|
@@ -3415,8 +3588,37 @@ class MicrosoftDatadogClient extends coreClient__namespace.ServiceClient {
|
|
3415
3588
|
this.operations = new OperationsImpl(this);
|
3416
3589
|
this.tagRules = new TagRulesImpl(this);
|
3417
3590
|
this.singleSignOnConfigurations = new SingleSignOnConfigurationsImpl(this);
|
3591
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
3592
|
+
}
|
3593
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
3594
|
+
addCustomApiVersionPolicy(apiVersion) {
|
3595
|
+
if (!apiVersion) {
|
3596
|
+
return;
|
3597
|
+
}
|
3598
|
+
const apiVersionPolicy = {
|
3599
|
+
name: "CustomApiVersionPolicy",
|
3600
|
+
sendRequest(request, next) {
|
3601
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
3602
|
+
const param = request.url.split("?");
|
3603
|
+
if (param.length > 1) {
|
3604
|
+
const newParams = param[1].split("&").map((item) => {
|
3605
|
+
if (item.indexOf("api-version") > -1) {
|
3606
|
+
return "api-version=" + apiVersion;
|
3607
|
+
}
|
3608
|
+
else {
|
3609
|
+
return item;
|
3610
|
+
}
|
3611
|
+
});
|
3612
|
+
request.url = param[0] + "?" + newParams.join("&");
|
3613
|
+
}
|
3614
|
+
return next(request);
|
3615
|
+
});
|
3616
|
+
}
|
3617
|
+
};
|
3618
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
3418
3619
|
}
|
3419
3620
|
}
|
3420
3621
|
|
3421
3622
|
exports.MicrosoftDatadogClient = MicrosoftDatadogClient;
|
3623
|
+
exports.getContinuationToken = getContinuationToken;
|
3422
3624
|
//# sourceMappingURL=index.js.map
|