@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
@@ -0,0 +1,32 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
3
|
+
* Licensed under the MIT License.
|
4
|
+
*
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
|
+
*/
|
8
|
+
const pageMap = new WeakMap();
|
9
|
+
/**
|
10
|
+
* Given a result page from a pageable operation, returns a
|
11
|
+
* continuation token that can be used to begin paging from
|
12
|
+
* that point later.
|
13
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
14
|
+
* @returns The continuation token that can be passed into byPage().
|
15
|
+
*/
|
16
|
+
export function getContinuationToken(page) {
|
17
|
+
var _a;
|
18
|
+
if (typeof page !== "object" || page === null) {
|
19
|
+
return undefined;
|
20
|
+
}
|
21
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
22
|
+
}
|
23
|
+
export function setContinuationToken(page, continuationToken) {
|
24
|
+
var _a;
|
25
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
26
|
+
return;
|
27
|
+
}
|
28
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
29
|
+
pageInfo.continuationToken = continuationToken;
|
30
|
+
pageMap.set(page, pageInfo);
|
31
|
+
}
|
32
|
+
//# sourceMappingURL=pagingHelper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACnE,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
|
@@ -6,24 +6,22 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
import { __awaiter } from "tslib";
|
9
|
-
import {
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
(recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
|
19
|
-
],
|
20
|
-
queryParametersToSkip: []
|
9
|
+
import { Recorder } from "@azure-tools/test-recorder";
|
10
|
+
const replaceableVariables = {
|
11
|
+
AZURE_CLIENT_ID: "azure_client_id",
|
12
|
+
AZURE_CLIENT_SECRET: "azure_client_secret",
|
13
|
+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
14
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
15
|
+
};
|
16
|
+
const recorderOptions = {
|
17
|
+
envSetupForPlayback: replaceableVariables
|
21
18
|
};
|
22
19
|
describe("My test", () => {
|
23
20
|
let recorder;
|
24
21
|
beforeEach(function () {
|
25
22
|
return __awaiter(this, void 0, void 0, function* () {
|
26
|
-
recorder =
|
23
|
+
recorder = new Recorder(this.currentTest);
|
24
|
+
yield recorder.start(recorderOptions);
|
27
25
|
});
|
28
26
|
});
|
29
27
|
afterEach(function () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -3,15 +3,15 @@
|
|
3
3
|
"sdk-type": "mgmt",
|
4
4
|
"author": "Microsoft Corporation",
|
5
5
|
"description": "A generated SDK for MicrosoftDatadogClient.",
|
6
|
-
"version": "3.0.
|
6
|
+
"version": "3.0.2",
|
7
7
|
"engines": {
|
8
|
-
"node": ">=
|
8
|
+
"node": ">=14.0.0"
|
9
9
|
},
|
10
10
|
"dependencies": {
|
11
11
|
"@azure/core-lro": "^2.2.0",
|
12
12
|
"@azure/abort-controller": "^1.0.0",
|
13
13
|
"@azure/core-paging": "^1.2.0",
|
14
|
-
"@azure/core-client": "^1.
|
14
|
+
"@azure/core-client": "^1.6.1",
|
15
15
|
"@azure/core-auth": "^1.3.0",
|
16
16
|
"@azure/core-rest-pipeline": "^1.8.0",
|
17
17
|
"tslib": "^2.2.0"
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"module": "./dist-esm/src/index.js",
|
29
29
|
"types": "./types/arm-datadog.d.ts",
|
30
30
|
"devDependencies": {
|
31
|
-
"@microsoft/api-extractor": "^7.
|
31
|
+
"@microsoft/api-extractor": "^7.31.1",
|
32
32
|
"@rollup/plugin-commonjs": "^21.0.1",
|
33
33
|
"@rollup/plugin-json": "^4.1.0",
|
34
34
|
"@rollup/plugin-multi-entry": "^4.1.0",
|
@@ -36,13 +36,18 @@
|
|
36
36
|
"mkdirp": "^1.0.4",
|
37
37
|
"rollup": "^2.66.1",
|
38
38
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
39
|
-
"typescript": "~4.
|
39
|
+
"typescript": "~4.8.0",
|
40
40
|
"uglify-js": "^3.4.9",
|
41
41
|
"rimraf": "^3.0.0",
|
42
42
|
"@azure/identity": "^2.0.1",
|
43
|
-
"@azure-tools/test-recorder": "^
|
43
|
+
"@azure-tools/test-recorder": "^2.0.0",
|
44
|
+
"@azure-tools/test-credential": "^1.0.0",
|
44
45
|
"mocha": "^7.1.1",
|
45
|
-
"
|
46
|
+
"@types/chai": "^4.2.8",
|
47
|
+
"chai": "^4.2.0",
|
48
|
+
"cross-env": "^7.0.2",
|
49
|
+
"@types/node": "^14.0.0",
|
50
|
+
"@azure/dev-tool": "^1.0.0"
|
46
51
|
},
|
47
52
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datadog/arm-datadog",
|
48
53
|
"repository": {
|
@@ -93,9 +98,8 @@
|
|
93
98
|
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
94
99
|
"unit-test:browser": "echo skipped",
|
95
100
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
96
|
-
"integration-test:node": "
|
97
|
-
"integration-test:browser": "echo skipped"
|
98
|
-
"docs": "echo skipped"
|
101
|
+
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
102
|
+
"integration-test:browser": "echo skipped"
|
99
103
|
},
|
100
104
|
"sideEffects": false,
|
101
105
|
"//metadata": {
|
@@ -115,4 +119,4 @@
|
|
115
119
|
"disableDocsMs": true,
|
116
120
|
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datadog?view=azure-node-preview"
|
117
121
|
}
|
118
|
-
}
|
122
|
+
}
|
@@ -193,6 +193,9 @@ export interface FilteringTag {
|
|
193
193
|
value?: string;
|
194
194
|
}
|
195
195
|
|
196
|
+
// @public
|
197
|
+
export function getContinuationToken(page: unknown): string | undefined;
|
198
|
+
|
196
199
|
// @public (undocumented)
|
197
200
|
export interface IdentityProperties {
|
198
201
|
readonly principalId?: string;
|
@@ -202,91 +205,62 @@ export interface IdentityProperties {
|
|
202
205
|
|
203
206
|
// @public
|
204
207
|
export enum KnownCreatedByType {
|
205
|
-
// (undocumented)
|
206
208
|
Application = "Application",
|
207
|
-
// (undocumented)
|
208
209
|
Key = "Key",
|
209
|
-
// (undocumented)
|
210
210
|
ManagedIdentity = "ManagedIdentity",
|
211
|
-
// (undocumented)
|
212
211
|
User = "User"
|
213
212
|
}
|
214
213
|
|
215
214
|
// @public
|
216
215
|
export enum KnownLiftrResourceCategories {
|
217
|
-
// (undocumented)
|
218
216
|
MonitorLogs = "MonitorLogs",
|
219
|
-
// (undocumented)
|
220
217
|
Unknown = "Unknown"
|
221
218
|
}
|
222
219
|
|
223
220
|
// @public
|
224
221
|
export enum KnownManagedIdentityTypes {
|
225
|
-
// (undocumented)
|
226
222
|
SystemAssigned = "SystemAssigned",
|
227
|
-
// (undocumented)
|
228
223
|
UserAssigned = "UserAssigned"
|
229
224
|
}
|
230
225
|
|
231
226
|
// @public
|
232
227
|
export enum KnownMarketplaceSubscriptionStatus {
|
233
|
-
// (undocumented)
|
234
228
|
Active = "Active",
|
235
|
-
// (undocumented)
|
236
229
|
Provisioning = "Provisioning",
|
237
|
-
// (undocumented)
|
238
230
|
Suspended = "Suspended",
|
239
|
-
// (undocumented)
|
240
231
|
Unsubscribed = "Unsubscribed"
|
241
232
|
}
|
242
233
|
|
243
234
|
// @public
|
244
235
|
export enum KnownMonitoringStatus {
|
245
|
-
// (undocumented)
|
246
236
|
Disabled = "Disabled",
|
247
|
-
// (undocumented)
|
248
237
|
Enabled = "Enabled"
|
249
238
|
}
|
250
239
|
|
251
240
|
// @public
|
252
241
|
export enum KnownProvisioningState {
|
253
|
-
// (undocumented)
|
254
242
|
Accepted = "Accepted",
|
255
|
-
// (undocumented)
|
256
243
|
Canceled = "Canceled",
|
257
|
-
// (undocumented)
|
258
244
|
Creating = "Creating",
|
259
|
-
// (undocumented)
|
260
245
|
Deleted = "Deleted",
|
261
|
-
// (undocumented)
|
262
246
|
Deleting = "Deleting",
|
263
|
-
// (undocumented)
|
264
247
|
Failed = "Failed",
|
265
|
-
// (undocumented)
|
266
248
|
NotSpecified = "NotSpecified",
|
267
|
-
// (undocumented)
|
268
249
|
Succeeded = "Succeeded",
|
269
|
-
// (undocumented)
|
270
250
|
Updating = "Updating"
|
271
251
|
}
|
272
252
|
|
273
253
|
// @public
|
274
254
|
export enum KnownSingleSignOnStates {
|
275
|
-
// (undocumented)
|
276
255
|
Disable = "Disable",
|
277
|
-
// (undocumented)
|
278
256
|
Enable = "Enable",
|
279
|
-
// (undocumented)
|
280
257
|
Existing = "Existing",
|
281
|
-
// (undocumented)
|
282
258
|
Initial = "Initial"
|
283
259
|
}
|
284
260
|
|
285
261
|
// @public
|
286
262
|
export enum KnownTagAction {
|
287
|
-
// (undocumented)
|
288
263
|
Exclude = "Exclude",
|
289
|
-
// (undocumented)
|
290
264
|
Include = "Include"
|
291
265
|
}
|
292
266
|
|
package/src/index.ts
CHANGED
@@ -8,6 +8,11 @@
|
|
8
8
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
10
10
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
11
|
+
import {
|
12
|
+
PipelineRequest,
|
13
|
+
PipelineResponse,
|
14
|
+
SendRequest
|
15
|
+
} from "@azure/core-rest-pipeline";
|
11
16
|
import * as coreAuth from "@azure/core-auth";
|
12
17
|
import {
|
13
18
|
MarketplaceAgreementsImpl,
|
@@ -57,47 +62,53 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
|
|
57
62
|
credential: credentials
|
58
63
|
};
|
59
64
|
|
60
|
-
const packageDetails = `azsdk-js-arm-datadog/3.0.
|
65
|
+
const packageDetails = `azsdk-js-arm-datadog/3.0.2`;
|
61
66
|
const userAgentPrefix =
|
62
67
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
63
68
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
64
69
|
: `${packageDetails}`;
|
65
70
|
|
66
|
-
if (!options.credentialScopes) {
|
67
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
68
|
-
}
|
69
71
|
const optionsWithDefaults = {
|
70
72
|
...defaults,
|
71
73
|
...options,
|
72
74
|
userAgentOptions: {
|
73
75
|
userAgentPrefix
|
74
76
|
},
|
75
|
-
|
77
|
+
endpoint:
|
76
78
|
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
77
79
|
};
|
78
80
|
super(optionsWithDefaults);
|
79
81
|
|
82
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
80
83
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
81
84
|
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
82
|
-
|
85
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
83
86
|
(pipelinePolicy) =>
|
84
87
|
pipelinePolicy.name ===
|
85
88
|
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
86
89
|
);
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
90
|
+
}
|
91
|
+
if (
|
92
|
+
!options ||
|
93
|
+
!options.pipeline ||
|
94
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
95
|
+
!bearerTokenAuthenticationPolicyFound
|
96
|
+
) {
|
97
|
+
this.pipeline.removePolicy({
|
98
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
99
|
+
});
|
100
|
+
this.pipeline.addPolicy(
|
101
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
102
|
+
credential: credentials,
|
103
|
+
scopes:
|
104
|
+
optionsWithDefaults.credentialScopes ??
|
105
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
106
|
+
challengeCallbacks: {
|
107
|
+
authorizeRequestOnChallenge:
|
108
|
+
coreClient.authorizeRequestOnClaimChallenge
|
109
|
+
}
|
110
|
+
})
|
111
|
+
);
|
101
112
|
}
|
102
113
|
// Parameter assignments
|
103
114
|
this.subscriptionId = subscriptionId;
|
@@ -110,6 +121,35 @@ export class MicrosoftDatadogClient extends coreClient.ServiceClient {
|
|
110
121
|
this.operations = new OperationsImpl(this);
|
111
122
|
this.tagRules = new TagRulesImpl(this);
|
112
123
|
this.singleSignOnConfigurations = new SingleSignOnConfigurationsImpl(this);
|
124
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
125
|
+
}
|
126
|
+
|
127
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
128
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
129
|
+
if (!apiVersion) {
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
const apiVersionPolicy = {
|
133
|
+
name: "CustomApiVersionPolicy",
|
134
|
+
async sendRequest(
|
135
|
+
request: PipelineRequest,
|
136
|
+
next: SendRequest
|
137
|
+
): Promise<PipelineResponse> {
|
138
|
+
const param = request.url.split("?");
|
139
|
+
if (param.length > 1) {
|
140
|
+
const newParams = param[1].split("&").map((item) => {
|
141
|
+
if (item.indexOf("api-version") > -1) {
|
142
|
+
return "api-version=" + apiVersion;
|
143
|
+
} else {
|
144
|
+
return item;
|
145
|
+
}
|
146
|
+
});
|
147
|
+
request.url = param[0] + "?" + newParams.join("&");
|
148
|
+
}
|
149
|
+
return next(request);
|
150
|
+
}
|
151
|
+
};
|
152
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
113
153
|
}
|
114
154
|
|
115
155
|
marketplaceAgreements: MarketplaceAgreements;
|
package/src/models/index.ts
CHANGED
@@ -507,9 +507,13 @@ export interface DatadogSingleSignOnProperties {
|
|
507
507
|
|
508
508
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
509
509
|
export enum KnownCreatedByType {
|
510
|
+
/** User */
|
510
511
|
User = "User",
|
512
|
+
/** Application */
|
511
513
|
Application = "Application",
|
514
|
+
/** ManagedIdentity */
|
512
515
|
ManagedIdentity = "ManagedIdentity",
|
516
|
+
/** Key */
|
513
517
|
Key = "Key"
|
514
518
|
}
|
515
519
|
|
@@ -527,14 +531,23 @@ export type CreatedByType = string;
|
|
527
531
|
|
528
532
|
/** Known values of {@link ProvisioningState} that the service accepts. */
|
529
533
|
export enum KnownProvisioningState {
|
534
|
+
/** Accepted */
|
530
535
|
Accepted = "Accepted",
|
536
|
+
/** Creating */
|
531
537
|
Creating = "Creating",
|
538
|
+
/** Updating */
|
532
539
|
Updating = "Updating",
|
540
|
+
/** Deleting */
|
533
541
|
Deleting = "Deleting",
|
542
|
+
/** Succeeded */
|
534
543
|
Succeeded = "Succeeded",
|
544
|
+
/** Failed */
|
535
545
|
Failed = "Failed",
|
546
|
+
/** Canceled */
|
536
547
|
Canceled = "Canceled",
|
548
|
+
/** Deleted */
|
537
549
|
Deleted = "Deleted",
|
550
|
+
/** NotSpecified */
|
538
551
|
NotSpecified = "NotSpecified"
|
539
552
|
}
|
540
553
|
|
@@ -557,7 +570,9 @@ export type ProvisioningState = string;
|
|
557
570
|
|
558
571
|
/** Known values of {@link MonitoringStatus} that the service accepts. */
|
559
572
|
export enum KnownMonitoringStatus {
|
573
|
+
/** Enabled */
|
560
574
|
Enabled = "Enabled",
|
575
|
+
/** Disabled */
|
561
576
|
Disabled = "Disabled"
|
562
577
|
}
|
563
578
|
|
@@ -573,9 +588,13 @@ export type MonitoringStatus = string;
|
|
573
588
|
|
574
589
|
/** Known values of {@link MarketplaceSubscriptionStatus} that the service accepts. */
|
575
590
|
export enum KnownMarketplaceSubscriptionStatus {
|
591
|
+
/** Provisioning */
|
576
592
|
Provisioning = "Provisioning",
|
593
|
+
/** Active */
|
577
594
|
Active = "Active",
|
595
|
+
/** Suspended */
|
578
596
|
Suspended = "Suspended",
|
597
|
+
/** Unsubscribed */
|
579
598
|
Unsubscribed = "Unsubscribed"
|
580
599
|
}
|
581
600
|
|
@@ -593,7 +612,9 @@ export type MarketplaceSubscriptionStatus = string;
|
|
593
612
|
|
594
613
|
/** Known values of {@link LiftrResourceCategories} that the service accepts. */
|
595
614
|
export enum KnownLiftrResourceCategories {
|
615
|
+
/** Unknown */
|
596
616
|
Unknown = "Unknown",
|
617
|
+
/** MonitorLogs */
|
597
618
|
MonitorLogs = "MonitorLogs"
|
598
619
|
}
|
599
620
|
|
@@ -609,7 +630,9 @@ export type LiftrResourceCategories = string;
|
|
609
630
|
|
610
631
|
/** Known values of {@link ManagedIdentityTypes} that the service accepts. */
|
611
632
|
export enum KnownManagedIdentityTypes {
|
633
|
+
/** SystemAssigned */
|
612
634
|
SystemAssigned = "SystemAssigned",
|
635
|
+
/** UserAssigned */
|
613
636
|
UserAssigned = "UserAssigned"
|
614
637
|
}
|
615
638
|
|
@@ -625,7 +648,9 @@ export type ManagedIdentityTypes = string;
|
|
625
648
|
|
626
649
|
/** Known values of {@link TagAction} that the service accepts. */
|
627
650
|
export enum KnownTagAction {
|
651
|
+
/** Include */
|
628
652
|
Include = "Include",
|
653
|
+
/** Exclude */
|
629
654
|
Exclude = "Exclude"
|
630
655
|
}
|
631
656
|
|
@@ -641,9 +666,13 @@ export type TagAction = string;
|
|
641
666
|
|
642
667
|
/** Known values of {@link SingleSignOnStates} that the service accepts. */
|
643
668
|
export enum KnownSingleSignOnStates {
|
669
|
+
/** Initial */
|
644
670
|
Initial = "Initial",
|
671
|
+
/** Enable */
|
645
672
|
Enable = "Enable",
|
673
|
+
/** Disable */
|
646
674
|
Disable = "Disable",
|
675
|
+
/** Existing */
|
647
676
|
Existing = "Existing"
|
648
677
|
}
|
649
678
|
|
@@ -6,7 +6,8 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
10
11
|
import { MarketplaceAgreements } from "../operationsInterfaces";
|
11
12
|
import * as coreClient from "@azure/core-client";
|
12
13
|
import * as Mappers from "../models/mappers";
|
@@ -50,22 +51,34 @@ export class MarketplaceAgreementsImpl implements MarketplaceAgreements {
|
|
50
51
|
[Symbol.asyncIterator]() {
|
51
52
|
return this;
|
52
53
|
},
|
53
|
-
byPage: () => {
|
54
|
-
|
54
|
+
byPage: (settings?: PageSettings) => {
|
55
|
+
if (settings?.maxPageSize) {
|
56
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
57
|
+
}
|
58
|
+
return this.listPagingPage(options, settings);
|
55
59
|
}
|
56
60
|
};
|
57
61
|
}
|
58
62
|
|
59
63
|
private async *listPagingPage(
|
60
|
-
options?: MarketplaceAgreementsListOptionalParams
|
64
|
+
options?: MarketplaceAgreementsListOptionalParams,
|
65
|
+
settings?: PageSettings
|
61
66
|
): AsyncIterableIterator<DatadogAgreementResource[]> {
|
62
|
-
let result
|
63
|
-
|
64
|
-
|
67
|
+
let result: MarketplaceAgreementsListResponse;
|
68
|
+
let continuationToken = settings?.continuationToken;
|
69
|
+
if (!continuationToken) {
|
70
|
+
result = await this._list(options);
|
71
|
+
let page = result.value || [];
|
72
|
+
continuationToken = result.nextLink;
|
73
|
+
setContinuationToken(page, continuationToken);
|
74
|
+
yield page;
|
75
|
+
}
|
65
76
|
while (continuationToken) {
|
66
77
|
result = await this._listNext(continuationToken, options);
|
67
78
|
continuationToken = result.nextLink;
|
68
|
-
|
79
|
+
let page = result.value || [];
|
80
|
+
setContinuationToken(page, continuationToken);
|
81
|
+
yield page;
|
69
82
|
}
|
70
83
|
}
|
71
84
|
|