@azure/arm-datadog 2.1.1 → 3.0.1-alpha.20220120.1
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 +21 -0
- package/LICENSE +21 -0
- package/README.md +69 -80
- package/dist/index.js +3359 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/microsoftDatadogClient.d.ts +22 -0
- package/dist-esm/src/microsoftDatadogClient.d.ts.map +1 -0
- package/dist-esm/src/microsoftDatadogClient.js +55 -0
- package/dist-esm/src/microsoftDatadogClient.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +790 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +69 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +42 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +551 -600
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +18 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +145 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/marketplaceAgreements.d.ts +37 -0
- package/dist-esm/src/operations/marketplaceAgreements.d.ts.map +1 -0
- package/dist-esm/src/operations/marketplaceAgreements.js +149 -0
- package/dist-esm/src/operations/marketplaceAgreements.js.map +1 -0
- package/dist-esm/src/operations/monitors.d.ts +220 -0
- package/dist-esm/src/operations/monitors.d.ts.map +1 -0
- package/dist-esm/src/operations/monitors.js +1035 -0
- package/dist-esm/src/operations/monitors.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/singleSignOnConfigurations.d.ts +63 -0
- package/dist-esm/src/operations/singleSignOnConfigurations.d.ts.map +1 -0
- package/dist-esm/src/operations/singleSignOnConfigurations.js +256 -0
- package/dist-esm/src/operations/singleSignOnConfigurations.js.map +1 -0
- package/dist-esm/src/operations/tagRules.d.ts +54 -0
- package/dist-esm/src/operations/tagRules.d.ts.map +1 -0
- package/dist-esm/src/operations/tagRules.js +203 -0
- package/dist-esm/src/operations/tagRules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/marketplaceAgreements.d.ts +16 -0
- package/dist-esm/src/operationsInterfaces/marketplaceAgreements.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/marketplaceAgreements.js} +2 -9
- package/dist-esm/src/operationsInterfaces/marketplaceAgreements.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/monitors.d.ts +116 -0
- package/dist-esm/src/operationsInterfaces/monitors.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/monitors.js} +2 -1
- package/dist-esm/src/operationsInterfaces/monitors.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/operations.js} +2 -2
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.d.ts +38 -0
- package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.js +9 -0
- package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/tagRules.d.ts +29 -0
- package/dist-esm/src/operationsInterfaces/tagRules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/tagRules.js +9 -0
- package/dist-esm/src/operationsInterfaces/tagRules.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +65 -22
- package/review/arm-datadog.api.md +746 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/microsoftDatadogClient.ts +80 -40
- package/src/models/index.ts +650 -1297
- package/src/models/mappers.ts +561 -609
- package/src/models/parameters.ts +104 -34
- package/src/operations/index.ts +1 -2
- package/src/operations/marketplaceAgreements.ts +110 -116
- package/src/operations/monitors.ts +960 -819
- package/src/operations/operations.ts +87 -75
- package/src/operations/singleSignOnConfigurations.ts +247 -166
- package/src/operations/tagRules.ts +169 -171
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/marketplaceAgreements.ts +34 -0
- package/src/operationsInterfaces/monitors.ts +220 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/singleSignOnConfigurations.ts +78 -0
- package/src/operationsInterfaces/tagRules.ts +59 -0
- package/tsconfig.json +3 -3
- package/types/arm-datadog.d.ts +1130 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-datadog.js +0 -2855
- package/dist/arm-datadog.js.map +0 -1
- package/dist/arm-datadog.min.js +0 -1
- package/dist/arm-datadog.min.js.map +0 -1
- package/esm/microsoftDatadogClient.d.ts +0 -28
- package/esm/microsoftDatadogClient.d.ts.map +0 -1
- package/esm/microsoftDatadogClient.js +0 -41
- package/esm/microsoftDatadogClient.js.map +0 -1
- package/esm/microsoftDatadogClientContext.d.ts +0 -22
- package/esm/microsoftDatadogClientContext.d.ts.map +0 -1
- package/esm/microsoftDatadogClientContext.js +0 -61
- package/esm/microsoftDatadogClientContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -1422
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -44
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/marketplaceAgreementsMappers.d.ts +0 -2
- package/esm/models/marketplaceAgreementsMappers.d.ts.map +0 -1
- package/esm/models/marketplaceAgreementsMappers.js +0 -9
- package/esm/models/marketplaceAgreementsMappers.js.map +0 -1
- package/esm/models/monitorsMappers.d.ts +0 -2
- package/esm/models/monitorsMappers.d.ts.map +0 -1
- package/esm/models/monitorsMappers.js +0 -9
- package/esm/models/monitorsMappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -10
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -101
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/singleSignOnConfigurationsMappers.d.ts +0 -2
- package/esm/models/singleSignOnConfigurationsMappers.d.ts.map +0 -1
- package/esm/models/singleSignOnConfigurationsMappers.js +0 -9
- package/esm/models/singleSignOnConfigurationsMappers.js.map +0 -1
- package/esm/models/tagRulesMappers.d.ts +0 -2
- package/esm/models/tagRulesMappers.d.ts.map +0 -1
- package/esm/models/tagRulesMappers.js +0 -9
- package/esm/models/tagRulesMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/marketplaceAgreements.d.ts +0 -61
- package/esm/operations/marketplaceAgreements.d.ts.map +0 -1
- package/esm/operations/marketplaceAgreements.js +0 -116
- package/esm/operations/marketplaceAgreements.js.map +0 -1
- package/esm/operations/monitors.d.ts +0 -373
- package/esm/operations/monitors.d.ts.map +0 -1
- package/esm/operations/monitors.js +0 -533
- package/esm/operations/monitors.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -79
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/singleSignOnConfigurations.d.ts +0 -95
- package/esm/operations/singleSignOnConfigurations.d.ts.map +0 -1
- package/esm/operations/singleSignOnConfigurations.js +0 -182
- package/esm/operations/singleSignOnConfigurations.js.map +0 -1
- package/esm/operations/tagRules.d.ts +0 -100
- package/esm/operations/tagRules.d.ts.map +0 -1
- package/esm/operations/tagRules.js +0 -159
- package/esm/operations/tagRules.js.map +0 -1
- package/src/microsoftDatadogClientContext.ts +0 -74
- package/src/models/marketplaceAgreementsMappers.ts +0 -31
- package/src/models/monitorsMappers.ts +0 -45
- package/src/models/singleSignOnConfigurationsMappers.ts +0 -31
- package/src/models/tagRulesMappers.ts +0 -31
package/rollup.config.js
CHANGED
@@ -1,37 +1,188 @@
|
|
1
|
-
|
2
|
-
import nodeResolve from "rollup-plugin-node-resolve";
|
3
|
-
import sourcemaps from "rollup-plugin-sourcemaps";
|
4
|
-
|
5
|
-
/**
|
6
|
-
* @type {rollup.RollupFileOptions}
|
7
|
-
*/
|
8
|
-
const config = {
|
9
|
-
input: "./esm/microsoftDatadogClient.js",
|
10
|
-
external: [
|
11
|
-
"@azure/ms-rest-js",
|
12
|
-
"@azure/ms-rest-azure-js"
|
13
|
-
],
|
14
|
-
output: {
|
15
|
-
file: "./dist/arm-datadog.js",
|
16
|
-
format: "umd",
|
17
|
-
name: "Azure.ArmDatadog",
|
18
|
-
sourcemap: true,
|
19
|
-
globals: {
|
20
|
-
"@azure/ms-rest-js": "msRest",
|
21
|
-
"@azure/ms-rest-azure-js": "msRestAzure"
|
22
|
-
},
|
23
|
-
banner: `/*
|
1
|
+
/*
|
24
2
|
* Copyright (c) Microsoft Corporation.
|
25
3
|
* Licensed under the MIT License.
|
26
4
|
*
|
27
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
28
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
7
|
+
*/
|
8
|
+
|
9
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
10
|
+
import cjs from "@rollup/plugin-commonjs";
|
11
|
+
import sourcemaps from "rollup-plugin-sourcemaps";
|
12
|
+
import multiEntry from "@rollup/plugin-multi-entry";
|
13
|
+
import json from "@rollup/plugin-json";
|
14
|
+
|
15
|
+
import nodeBuiltins from "builtin-modules";
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
19
|
+
*
|
20
|
+
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
21
|
+
* __exportStar downleveled helper function to declare its exports which confuses
|
22
|
+
* rollup's automatic discovery mechanism.
|
23
|
+
*
|
24
|
+
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
25
|
+
*/
|
26
|
+
export function openTelemetryCommonJs() {
|
27
|
+
const namedExports = {};
|
28
|
+
|
29
|
+
for (const key of [
|
30
|
+
"@opentelemetry/api",
|
31
|
+
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
32
|
+
]) {
|
33
|
+
namedExports[key] = [
|
34
|
+
"SpanKind",
|
35
|
+
"TraceFlags",
|
36
|
+
"getSpan",
|
37
|
+
"setSpan",
|
38
|
+
"SpanStatusCode",
|
39
|
+
"getSpanContext",
|
40
|
+
"setSpanContext"
|
41
|
+
];
|
42
|
+
}
|
43
|
+
|
44
|
+
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
45
|
+
|
46
|
+
for (const version of releasedOpenTelemetryVersions) {
|
47
|
+
namedExports[
|
48
|
+
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
49
|
+
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
50
|
+
] = [
|
51
|
+
"SpanKind",
|
52
|
+
"TraceFlags",
|
53
|
+
"getSpan",
|
54
|
+
"setSpan",
|
55
|
+
"StatusCode",
|
56
|
+
"CanonicalCode",
|
57
|
+
"getSpanContext",
|
58
|
+
"setSpanContext"
|
59
|
+
];
|
60
|
+
}
|
61
|
+
|
62
|
+
return namedExports;
|
63
|
+
}
|
64
|
+
|
65
|
+
// #region Warning Handler
|
66
|
+
|
67
|
+
/**
|
68
|
+
* A function that can determine whether a rollupwarning should be ignored. If
|
69
|
+
* the function returns `true`, then the warning will not be displayed.
|
70
|
+
*/
|
71
|
+
|
72
|
+
function ignoreNiseSinonEvalWarnings(warning) {
|
73
|
+
return (
|
74
|
+
warning.code === "EVAL" &&
|
75
|
+
warning.id &&
|
76
|
+
(warning.id.includes("node_modules/nise") ||
|
77
|
+
warning.id.includes("node_modules/sinon")) === true
|
78
|
+
);
|
79
|
+
}
|
80
|
+
|
81
|
+
function ignoreChaiCircularDependencyWarnings(warning) {
|
82
|
+
return (
|
83
|
+
warning.code === "CIRCULAR_DEPENDENCY" &&
|
84
|
+
warning.importer && warning.importer.includes("node_modules/chai") === true
|
85
|
+
);
|
86
|
+
}
|
87
|
+
|
88
|
+
const warningInhibitors = [
|
89
|
+
ignoreChaiCircularDependencyWarnings,
|
90
|
+
ignoreNiseSinonEvalWarnings
|
91
|
+
];
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Construct a warning handler for the shared rollup configuration
|
95
|
+
* that ignores certain warnings that are not relevant to testing.
|
96
|
+
*/
|
97
|
+
function makeOnWarnForTesting() {
|
98
|
+
return (warning, warn) => {
|
99
|
+
// If every inhibitor returns false (i.e. no inhibitors), then show the warning
|
100
|
+
if (warningInhibitors.every((inhib) => !inhib(warning))) {
|
101
|
+
warn(warning);
|
102
|
+
}
|
103
|
+
};
|
104
|
+
}
|
105
|
+
|
106
|
+
// #endregion
|
107
|
+
|
108
|
+
function makeBrowserTestConfig() {
|
109
|
+
const config = {
|
110
|
+
input: {
|
111
|
+
include: ["dist-esm/test/**/*.spec.js"],
|
112
|
+
exclude: ["dist-esm/test/**/node/**"]
|
113
|
+
},
|
114
|
+
output: {
|
115
|
+
file: `dist-test/index.browser.js`,
|
116
|
+
format: "umd",
|
117
|
+
sourcemap: true
|
118
|
+
},
|
119
|
+
preserveSymlinks: false,
|
120
|
+
plugins: [
|
121
|
+
multiEntry({ exports: false }),
|
122
|
+
nodeResolve({
|
123
|
+
mainFields: ["module", "browser"]
|
124
|
+
}),
|
125
|
+
cjs({
|
126
|
+
namedExports: {
|
127
|
+
// Chai's strange internal architecture makes it impossible to statically
|
128
|
+
// analyze its exports.
|
129
|
+
chai: [
|
130
|
+
"version",
|
131
|
+
"use",
|
132
|
+
"util",
|
133
|
+
"config",
|
134
|
+
"expect",
|
135
|
+
"should",
|
136
|
+
"assert"
|
137
|
+
],
|
138
|
+
...openTelemetryCommonJs()
|
139
|
+
}
|
140
|
+
}),
|
141
|
+
json(),
|
142
|
+
sourcemaps()
|
143
|
+
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
144
|
+
],
|
145
|
+
onwarn: makeOnWarnForTesting(),
|
146
|
+
// Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
|
147
|
+
// rollup started respecting the "sideEffects" field in package.json. Since
|
148
|
+
// our package.json sets "sideEffects=false", this also applies to test
|
149
|
+
// code, which causes all tests to be removed by tree-shaking.
|
150
|
+
treeshake: false
|
151
|
+
};
|
152
|
+
|
153
|
+
return config;
|
154
|
+
}
|
155
|
+
|
156
|
+
const defaultConfigurationOptions = {
|
157
|
+
disableBrowserBundle: false
|
35
158
|
};
|
36
159
|
|
37
|
-
export
|
160
|
+
export function makeConfig(pkg, options) {
|
161
|
+
options = {
|
162
|
+
...defaultConfigurationOptions,
|
163
|
+
...(options || {})
|
164
|
+
};
|
165
|
+
|
166
|
+
const baseConfig = {
|
167
|
+
// Use the package's module field if it has one
|
168
|
+
input: pkg["module"] || "dist-esm/src/index.js",
|
169
|
+
external: [
|
170
|
+
...nodeBuiltins,
|
171
|
+
...Object.keys(pkg.dependencies),
|
172
|
+
...Object.keys(pkg.devDependencies)
|
173
|
+
],
|
174
|
+
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
175
|
+
preserveSymlinks: false,
|
176
|
+
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
177
|
+
};
|
178
|
+
|
179
|
+
const config = [baseConfig];
|
180
|
+
|
181
|
+
if (!options.disableBrowserBundle) {
|
182
|
+
config.push(makeBrowserTestConfig());
|
183
|
+
}
|
184
|
+
|
185
|
+
return config;
|
186
|
+
}
|
187
|
+
|
188
|
+
export default makeConfig(require("./package.json"));
|
package/src/index.ts
ADDED
@@ -0,0 +1,12 @@
|
|
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
|
+
|
9
|
+
/// <reference lib="esnext.asynciterable" />
|
10
|
+
export * from "./models";
|
11
|
+
export { MicrosoftDatadogClient } from "./microsoftDatadogClient";
|
12
|
+
export * from "./operationsInterfaces";
|
package/src/lroImpl.ts
ADDED
@@ -0,0 +1,34 @@
|
|
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
|
+
|
9
|
+
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
10
|
+
|
11
|
+
export class LroImpl<T> implements LongRunningOperation<T> {
|
12
|
+
constructor(
|
13
|
+
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
|
14
|
+
private args: Record<string, unknown>,
|
15
|
+
private spec: {
|
16
|
+
readonly requestBody?: unknown;
|
17
|
+
readonly path?: string;
|
18
|
+
readonly httpMethod: string;
|
19
|
+
} & Record<string, any>,
|
20
|
+
public requestPath: string = spec.path!,
|
21
|
+
public requestMethod: string = spec.httpMethod
|
22
|
+
) {}
|
23
|
+
public async sendInitialRequest(): Promise<LroResponse<T>> {
|
24
|
+
return this.sendOperationFn(this.args, this.spec);
|
25
|
+
}
|
26
|
+
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
|
27
|
+
const { requestBody, ...restSpec } = this.spec;
|
28
|
+
return this.sendOperationFn(this.args, {
|
29
|
+
...restSpec,
|
30
|
+
path,
|
31
|
+
httpMethod: "GET"
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
@@ -3,53 +3,93 @@
|
|
3
3
|
* Licensed under the MIT License.
|
4
4
|
*
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
7
|
-
* regenerated.
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
7
|
*/
|
9
8
|
|
10
|
-
import * as
|
11
|
-
import
|
12
|
-
import
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
import * as coreClient from "@azure/core-client";
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
11
|
+
import {
|
12
|
+
MarketplaceAgreementsImpl,
|
13
|
+
MonitorsImpl,
|
14
|
+
OperationsImpl,
|
15
|
+
TagRulesImpl,
|
16
|
+
SingleSignOnConfigurationsImpl
|
17
|
+
} from "./operations";
|
18
|
+
import {
|
19
|
+
MarketplaceAgreements,
|
20
|
+
Monitors,
|
21
|
+
Operations,
|
22
|
+
TagRules,
|
23
|
+
SingleSignOnConfigurations
|
24
|
+
} from "./operationsInterfaces";
|
25
|
+
import { MicrosoftDatadogClientOptionalParams } from "./models";
|
16
26
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
monitors: operations.Monitors;
|
22
|
-
operations: operations.Operations;
|
23
|
-
tagRules: operations.TagRules;
|
24
|
-
singleSignOnConfigurations: operations.SingleSignOnConfigurations;
|
27
|
+
export class MicrosoftDatadogClient extends coreClient.ServiceClient {
|
28
|
+
$host: string;
|
29
|
+
subscriptionId: string;
|
30
|
+
apiVersion: string;
|
25
31
|
|
26
32
|
/**
|
27
33
|
* Initializes a new instance of the MicrosoftDatadogClient class.
|
28
|
-
* @param credentials
|
29
|
-
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
|
30
|
-
* more information about these credentials, see
|
31
|
-
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
32
|
-
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
33
|
-
* @azure/ms-rest-browserauth are also supported.
|
34
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
34
35
|
* @param subscriptionId The ID of the target subscription.
|
35
|
-
* @param
|
36
|
+
* @param options The parameter options
|
36
37
|
*/
|
37
|
-
constructor(
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
38
|
+
constructor(
|
39
|
+
credentials: coreAuth.TokenCredential,
|
40
|
+
subscriptionId: string,
|
41
|
+
options?: MicrosoftDatadogClientOptionalParams
|
42
|
+
) {
|
43
|
+
if (credentials === undefined) {
|
44
|
+
throw new Error("'credentials' cannot be null");
|
45
|
+
}
|
46
|
+
if (subscriptionId === undefined) {
|
47
|
+
throw new Error("'subscriptionId' cannot be null");
|
48
|
+
}
|
49
|
+
|
50
|
+
// Initializing default values for options
|
51
|
+
if (!options) {
|
52
|
+
options = {};
|
53
|
+
}
|
54
|
+
const defaults: MicrosoftDatadogClientOptionalParams = {
|
55
|
+
requestContentType: "application/json; charset=utf-8",
|
56
|
+
credential: credentials
|
57
|
+
};
|
46
58
|
|
47
|
-
|
59
|
+
const packageDetails = `azsdk-js-arm-datadog/3.0.0`;
|
60
|
+
const userAgentPrefix =
|
61
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
62
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
63
|
+
: `${packageDetails}`;
|
48
64
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
65
|
+
if (!options.credentialScopes) {
|
66
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
67
|
+
}
|
68
|
+
const optionsWithDefaults = {
|
69
|
+
...defaults,
|
70
|
+
...options,
|
71
|
+
userAgentOptions: {
|
72
|
+
userAgentPrefix
|
73
|
+
},
|
74
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
75
|
+
};
|
76
|
+
super(optionsWithDefaults);
|
77
|
+
// Parameter assignments
|
78
|
+
this.subscriptionId = subscriptionId;
|
79
|
+
|
80
|
+
// Assigning values to Constant parameters
|
81
|
+
this.$host = options.$host || "https://management.azure.com";
|
82
|
+
this.apiVersion = options.apiVersion || "2021-03-01";
|
83
|
+
this.marketplaceAgreements = new MarketplaceAgreementsImpl(this);
|
84
|
+
this.monitors = new MonitorsImpl(this);
|
85
|
+
this.operations = new OperationsImpl(this);
|
86
|
+
this.tagRules = new TagRulesImpl(this);
|
87
|
+
this.singleSignOnConfigurations = new SingleSignOnConfigurationsImpl(this);
|
88
|
+
}
|
89
|
+
|
90
|
+
marketplaceAgreements: MarketplaceAgreements;
|
91
|
+
monitors: Monitors;
|
92
|
+
operations: Operations;
|
93
|
+
tagRules: TagRules;
|
94
|
+
singleSignOnConfigurations: SingleSignOnConfigurations;
|
95
|
+
}
|