@azure/arm-managementgroups 1.2.0 → 2.0.0-alpha.20211215.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 +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +72 -83
- package/dist/index.js +2881 -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 +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -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/managementGroupsAPI.d.ts +34 -0
- package/dist-esm/src/managementGroupsAPI.d.ts.map +1 -0
- package/dist-esm/src/managementGroupsAPI.js +102 -0
- package/dist-esm/src/managementGroupsAPI.js.map +1 -0
- package/dist-esm/src/managementGroupsAPIContext.d.ts +14 -0
- package/dist-esm/src/managementGroupsAPIContext.d.ts.map +1 -0
- package/dist-esm/src/managementGroupsAPIContext.js +43 -0
- package/dist-esm/src/managementGroupsAPIContext.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +956 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +46 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +39 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +776 -396
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +24 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +200 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/entities.d.ts +34 -0
- package/dist-esm/src/operations/entities.d.ts.map +1 -0
- package/dist-esm/src/operations/entities.js +142 -0
- package/dist-esm/src/operations/entities.js.map +1 -0
- package/dist-esm/src/operations/hierarchySettingsOperations.d.ts +52 -0
- package/dist-esm/src/operations/hierarchySettingsOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/hierarchySettingsOperations.js +154 -0
- package/dist-esm/src/operations/hierarchySettingsOperations.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +4 -5
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/managementGroupSubscriptions.d.ts +62 -0
- package/dist-esm/src/operations/managementGroupSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/managementGroupSubscriptions.js +215 -0
- package/dist-esm/src/operations/managementGroupSubscriptions.js.map +1 -0
- package/dist-esm/src/operations/managementGroups.d.ts +109 -0
- package/dist-esm/src/operations/managementGroups.d.ts.map +1 -0
- package/dist-esm/src/operations/managementGroups.js +462 -0
- package/dist-esm/src/operations/managementGroups.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/operationsInterfaces/entities.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/entities.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/entities.js +9 -0
- package/dist-esm/src/operationsInterfaces/entities.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.d.ts +44 -0
- package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.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/managementGroupSubscriptions.d.ts +37 -0
- package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.js +9 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.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/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.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 +69 -24
- package/review/arm-managementgroups.api.md +667 -0
- package/rollup.config.js +184 -27
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/managementGroupsAPI.ts +93 -130
- package/src/managementGroupsAPIContext.ts +45 -45
- package/src/models/index.ts +801 -1185
- package/src/models/mappers.ts +792 -400
- package/src/models/parameters.ts +130 -94
- package/src/operations/entities.ts +105 -79
- package/src/operations/hierarchySettingsOperations.ts +214 -0
- package/src/operations/index.ts +4 -5
- package/src/operations/managementGroupSubscriptions.ts +226 -72
- package/src/operations/managementGroups.ts +449 -222
- package/src/operations/operations.ts +84 -70
- package/src/operationsInterfaces/entities.ts +23 -0
- package/src/operationsInterfaces/hierarchySettingsOperations.ts +80 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/managementGroupSubscriptions.ts +69 -0
- package/src/operationsInterfaces/managementGroups.ts +131 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/tsconfig.json +4 -4
- package/types/arm-managementgroups.d.ts +1266 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-managementgroups.js +0 -2017
- package/dist/arm-managementgroups.js.map +0 -1
- package/dist/arm-managementgroups.min.js +0 -1
- package/dist/arm-managementgroups.min.js.map +0 -1
- package/esm/managementGroupsAPI.d.ts +0 -74
- package/esm/managementGroupsAPI.d.ts.map +0 -1
- package/esm/managementGroupsAPI.js +0 -120
- package/esm/managementGroupsAPI.js.map +0 -1
- package/esm/managementGroupsAPIContext.d.ts +0 -20
- package/esm/managementGroupsAPIContext.d.ts.map +0 -1
- package/esm/managementGroupsAPIContext.js +0 -56
- package/esm/managementGroupsAPIContext.js.map +0 -1
- package/esm/models/entitiesMappers.d.ts +0 -2
- package/esm/models/entitiesMappers.d.ts.map +0 -1
- package/esm/models/entitiesMappers.js +0 -11
- package/esm/models/entitiesMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1390
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/managementGroupSubscriptionsMappers.d.ts +0 -2
- package/esm/models/managementGroupSubscriptionsMappers.d.ts.map +0 -1
- package/esm/models/managementGroupSubscriptionsMappers.js +0 -11
- package/esm/models/managementGroupSubscriptionsMappers.js.map +0 -1
- package/esm/models/managementGroupsMappers.d.ts +0 -2
- package/esm/models/managementGroupsMappers.d.ts.map +0 -1
- package/esm/models/managementGroupsMappers.js +0 -11
- package/esm/models/managementGroupsMappers.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -28
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.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 +0 -11
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -18
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -194
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/entities.d.ts +0 -46
- package/esm/operations/entities.d.ts.map +0 -1
- package/esm/operations/entities.js +0 -87
- package/esm/operations/entities.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/managementGroupSubscriptions.d.ts +0 -55
- package/esm/operations/managementGroupSubscriptions.d.ts.map +0 -1
- package/esm/operations/managementGroupSubscriptions.js +0 -85
- package/esm/operations/managementGroupSubscriptions.js.map +0 -1
- package/esm/operations/managementGroups.d.ts +0 -120
- package/esm/operations/managementGroups.d.ts.map +0 -1
- package/esm/operations/managementGroups.js +0 -252
- package/esm/operations/managementGroups.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 -77
- package/esm/operations/operations.js.map +0 -1
- package/src/models/entitiesMappers.ts +0 -18
- package/src/models/managementGroupSubscriptionsMappers.ts +0 -15
- package/src/models/managementGroupsMappers.ts +0 -29
- package/src/models/operationsMappers.ts +0 -18
package/rollup.config.js
CHANGED
|
@@ -1,31 +1,188 @@
|
|
|
1
|
-
|
|
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 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
|
+
|
|
2
93
|
/**
|
|
3
|
-
*
|
|
94
|
+
* Construct a warning handler for the shared rollup configuration
|
|
95
|
+
* that ignores certain warnings that are not relevant to testing.
|
|
4
96
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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/**"]
|
|
16
113
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
30
158
|
};
|
|
31
|
-
|
|
159
|
+
|
|
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,13 @@
|
|
|
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 { ManagementGroupsAPI } from "./managementGroupsAPI";
|
|
12
|
+
export { ManagementGroupsAPIContext } from "./managementGroupsAPIContext";
|
|
13
|
+
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
|
+
}
|
|
@@ -1,142 +1,116 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import * as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
|
11
|
+
import {
|
|
12
|
+
ManagementGroupsImpl,
|
|
13
|
+
ManagementGroupSubscriptionsImpl,
|
|
14
|
+
HierarchySettingsOperationsImpl,
|
|
15
|
+
OperationsImpl,
|
|
16
|
+
EntitiesImpl
|
|
17
|
+
} from "./operations";
|
|
18
|
+
import {
|
|
19
|
+
ManagementGroups,
|
|
20
|
+
ManagementGroupSubscriptions,
|
|
21
|
+
HierarchySettingsOperations,
|
|
22
|
+
Operations,
|
|
23
|
+
Entities
|
|
24
|
+
} from "./operationsInterfaces";
|
|
15
25
|
import * as Parameters from "./models/parameters";
|
|
16
|
-
import * as
|
|
26
|
+
import * as Mappers from "./models/mappers";
|
|
17
27
|
import { ManagementGroupsAPIContext } from "./managementGroupsAPIContext";
|
|
28
|
+
import {
|
|
29
|
+
ManagementGroupsAPIOptionalParams,
|
|
30
|
+
CheckNameAvailabilityRequest,
|
|
31
|
+
CheckNameAvailabilityOptionalParams,
|
|
32
|
+
CheckNameAvailabilityResponse,
|
|
33
|
+
StartTenantBackfillOptionalParams,
|
|
34
|
+
StartTenantBackfillResponse,
|
|
35
|
+
TenantBackfillStatusOptionalParams,
|
|
36
|
+
TenantBackfillStatusResponse
|
|
37
|
+
} from "./models";
|
|
18
38
|
|
|
19
|
-
|
|
20
|
-
class ManagementGroupsAPI extends ManagementGroupsAPIContext {
|
|
21
|
-
// Operation groups
|
|
22
|
-
managementGroups: operations.ManagementGroups;
|
|
23
|
-
managementGroupSubscriptions: operations.ManagementGroupSubscriptions;
|
|
24
|
-
operations: operations.Operations;
|
|
25
|
-
entities: operations.Entities;
|
|
26
|
-
|
|
39
|
+
export class ManagementGroupsAPI extends ManagementGroupsAPIContext {
|
|
27
40
|
/**
|
|
28
41
|
* Initializes a new instance of the ManagementGroupsAPI class.
|
|
29
|
-
* @param credentials
|
|
30
|
-
*
|
|
31
|
-
* more information about these credentials, see
|
|
32
|
-
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
|
33
|
-
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
|
34
|
-
* @azure/ms-rest-browserauth are also supported.
|
|
35
|
-
* @param [options] The parameter options
|
|
42
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
43
|
+
* @param options The parameter options
|
|
36
44
|
*/
|
|
37
|
-
constructor(
|
|
45
|
+
constructor(
|
|
46
|
+
credentials: coreAuth.TokenCredential,
|
|
47
|
+
options?: ManagementGroupsAPIOptionalParams
|
|
48
|
+
) {
|
|
38
49
|
super(credentials, options);
|
|
39
|
-
this.managementGroups = new
|
|
40
|
-
this.managementGroupSubscriptions = new
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
this.managementGroups = new ManagementGroupsImpl(this);
|
|
51
|
+
this.managementGroupSubscriptions = new ManagementGroupSubscriptionsImpl(
|
|
52
|
+
this
|
|
53
|
+
);
|
|
54
|
+
this.hierarchySettingsOperations = new HierarchySettingsOperationsImpl(
|
|
55
|
+
this
|
|
56
|
+
);
|
|
57
|
+
this.operations = new OperationsImpl(this);
|
|
58
|
+
this.entities = new EntitiesImpl(this);
|
|
43
59
|
}
|
|
44
60
|
|
|
45
61
|
/**
|
|
46
62
|
* Checks if the specified management group name is valid and unique
|
|
47
63
|
* @param checkNameAvailabilityRequest Management group name availability check parameters.
|
|
48
|
-
* @param
|
|
49
|
-
* @returns Promise<Models.CheckNameAvailabilityResponse>
|
|
50
|
-
*/
|
|
51
|
-
checkNameAvailability(checkNameAvailabilityRequest: Models.CheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase): Promise<Models.CheckNameAvailabilityResponse>;
|
|
52
|
-
/**
|
|
53
|
-
* @param checkNameAvailabilityRequest Management group name availability check parameters.
|
|
54
|
-
* @param callback The callback
|
|
64
|
+
* @param options The options parameters.
|
|
55
65
|
*/
|
|
56
|
-
checkNameAvailability(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
* @param callback The callback
|
|
61
|
-
*/
|
|
62
|
-
checkNameAvailability(checkNameAvailabilityRequest: Models.CheckNameAvailabilityRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CheckNameAvailabilityResult>): void;
|
|
63
|
-
checkNameAvailability(checkNameAvailabilityRequest: Models.CheckNameAvailabilityRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CheckNameAvailabilityResult>, callback?: msRest.ServiceCallback<Models.CheckNameAvailabilityResult>): Promise<Models.CheckNameAvailabilityResponse> {
|
|
66
|
+
checkNameAvailability(
|
|
67
|
+
checkNameAvailabilityRequest: CheckNameAvailabilityRequest,
|
|
68
|
+
options?: CheckNameAvailabilityOptionalParams
|
|
69
|
+
): Promise<CheckNameAvailabilityResponse> {
|
|
64
70
|
return this.sendOperationRequest(
|
|
65
|
-
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
checkNameAvailabilityOperationSpec,
|
|
70
|
-
callback) as Promise<Models.CheckNameAvailabilityResponse>;
|
|
71
|
+
{ checkNameAvailabilityRequest, options },
|
|
72
|
+
checkNameAvailabilityOperationSpec
|
|
73
|
+
);
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
/**
|
|
74
77
|
* Starts backfilling subscriptions for the Tenant.
|
|
75
|
-
* @param
|
|
76
|
-
* @returns Promise<Models.StartTenantBackfillResponse>
|
|
77
|
-
*/
|
|
78
|
-
startTenantBackfill(options?: msRest.RequestOptionsBase): Promise<Models.StartTenantBackfillResponse>;
|
|
79
|
-
/**
|
|
80
|
-
* @param callback The callback
|
|
81
|
-
*/
|
|
82
|
-
startTenantBackfill(callback: msRest.ServiceCallback<Models.TenantBackfillStatusResult>): void;
|
|
83
|
-
/**
|
|
84
|
-
* @param options The optional parameters
|
|
85
|
-
* @param callback The callback
|
|
78
|
+
* @param options The options parameters.
|
|
86
79
|
*/
|
|
87
|
-
startTenantBackfill(
|
|
88
|
-
|
|
80
|
+
startTenantBackfill(
|
|
81
|
+
options?: StartTenantBackfillOptionalParams
|
|
82
|
+
): Promise<StartTenantBackfillResponse> {
|
|
89
83
|
return this.sendOperationRequest(
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
startTenantBackfillOperationSpec,
|
|
94
|
-
callback) as Promise<Models.StartTenantBackfillResponse>;
|
|
84
|
+
{ options },
|
|
85
|
+
startTenantBackfillOperationSpec
|
|
86
|
+
);
|
|
95
87
|
}
|
|
96
88
|
|
|
97
89
|
/**
|
|
98
90
|
* Gets tenant backfill status
|
|
99
|
-
* @param
|
|
100
|
-
* @returns Promise<Models.TenantBackfillStatusResponse>
|
|
91
|
+
* @param options The options parameters.
|
|
101
92
|
*/
|
|
102
|
-
tenantBackfillStatus(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
*/
|
|
106
|
-
tenantBackfillStatus(callback: msRest.ServiceCallback<Models.TenantBackfillStatusResult>): void;
|
|
107
|
-
/**
|
|
108
|
-
* @param options The optional parameters
|
|
109
|
-
* @param callback The callback
|
|
110
|
-
*/
|
|
111
|
-
tenantBackfillStatus(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.TenantBackfillStatusResult>): void;
|
|
112
|
-
tenantBackfillStatus(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.TenantBackfillStatusResult>, callback?: msRest.ServiceCallback<Models.TenantBackfillStatusResult>): Promise<Models.TenantBackfillStatusResponse> {
|
|
93
|
+
tenantBackfillStatus(
|
|
94
|
+
options?: TenantBackfillStatusOptionalParams
|
|
95
|
+
): Promise<TenantBackfillStatusResponse> {
|
|
113
96
|
return this.sendOperationRequest(
|
|
114
|
-
{
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
tenantBackfillStatusOperationSpec,
|
|
118
|
-
callback) as Promise<Models.TenantBackfillStatusResponse>;
|
|
97
|
+
{ options },
|
|
98
|
+
tenantBackfillStatusOperationSpec
|
|
99
|
+
);
|
|
119
100
|
}
|
|
120
|
-
}
|
|
121
101
|
|
|
102
|
+
managementGroups: ManagementGroups;
|
|
103
|
+
managementGroupSubscriptions: ManagementGroupSubscriptions;
|
|
104
|
+
hierarchySettingsOperations: HierarchySettingsOperations;
|
|
105
|
+
operations: Operations;
|
|
106
|
+
entities: Entities;
|
|
107
|
+
}
|
|
122
108
|
// Operation Specifications
|
|
123
|
-
const serializer =
|
|
124
|
-
|
|
109
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
110
|
+
|
|
111
|
+
const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {
|
|
112
|
+
path: "/providers/Microsoft.Management/checkNameAvailability",
|
|
125
113
|
httpMethod: "POST",
|
|
126
|
-
path: "providers/Microsoft.Management/checkNameAvailability",
|
|
127
|
-
queryParameters: [
|
|
128
|
-
Parameters.apiVersion
|
|
129
|
-
],
|
|
130
|
-
headerParameters: [
|
|
131
|
-
Parameters.acceptLanguage
|
|
132
|
-
],
|
|
133
|
-
requestBody: {
|
|
134
|
-
parameterPath: "checkNameAvailabilityRequest",
|
|
135
|
-
mapper: {
|
|
136
|
-
...Mappers.CheckNameAvailabilityRequest,
|
|
137
|
-
required: true
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
114
|
responses: {
|
|
141
115
|
200: {
|
|
142
116
|
bodyMapper: Mappers.CheckNameAvailabilityResult
|
|
@@ -145,18 +119,16 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = {
|
|
|
145
119
|
bodyMapper: Mappers.ErrorResponse
|
|
146
120
|
}
|
|
147
121
|
},
|
|
122
|
+
requestBody: Parameters.checkNameAvailabilityRequest,
|
|
123
|
+
queryParameters: [Parameters.apiVersion],
|
|
124
|
+
urlParameters: [Parameters.$host],
|
|
125
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
126
|
+
mediaType: "json",
|
|
148
127
|
serializer
|
|
149
128
|
};
|
|
150
|
-
|
|
151
|
-
|
|
129
|
+
const startTenantBackfillOperationSpec: coreClient.OperationSpec = {
|
|
130
|
+
path: "/providers/Microsoft.Management/startTenantBackfill",
|
|
152
131
|
httpMethod: "POST",
|
|
153
|
-
path: "providers/Microsoft.Management/startTenantBackfill",
|
|
154
|
-
queryParameters: [
|
|
155
|
-
Parameters.apiVersion
|
|
156
|
-
],
|
|
157
|
-
headerParameters: [
|
|
158
|
-
Parameters.acceptLanguage
|
|
159
|
-
],
|
|
160
132
|
responses: {
|
|
161
133
|
200: {
|
|
162
134
|
bodyMapper: Mappers.TenantBackfillStatusResult
|
|
@@ -165,18 +137,14 @@ const startTenantBackfillOperationSpec: msRest.OperationSpec = {
|
|
|
165
137
|
bodyMapper: Mappers.ErrorResponse
|
|
166
138
|
}
|
|
167
139
|
},
|
|
140
|
+
queryParameters: [Parameters.apiVersion],
|
|
141
|
+
urlParameters: [Parameters.$host],
|
|
142
|
+
headerParameters: [Parameters.accept],
|
|
168
143
|
serializer
|
|
169
144
|
};
|
|
170
|
-
|
|
171
|
-
|
|
145
|
+
const tenantBackfillStatusOperationSpec: coreClient.OperationSpec = {
|
|
146
|
+
path: "/providers/Microsoft.Management/tenantBackfillStatus",
|
|
172
147
|
httpMethod: "POST",
|
|
173
|
-
path: "providers/Microsoft.Management/tenantBackfillStatus",
|
|
174
|
-
queryParameters: [
|
|
175
|
-
Parameters.apiVersion
|
|
176
|
-
],
|
|
177
|
-
headerParameters: [
|
|
178
|
-
Parameters.acceptLanguage
|
|
179
|
-
],
|
|
180
148
|
responses: {
|
|
181
149
|
200: {
|
|
182
150
|
bodyMapper: Mappers.TenantBackfillStatusResult
|
|
@@ -185,13 +153,8 @@ const tenantBackfillStatusOperationSpec: msRest.OperationSpec = {
|
|
|
185
153
|
bodyMapper: Mappers.ErrorResponse
|
|
186
154
|
}
|
|
187
155
|
},
|
|
156
|
+
queryParameters: [Parameters.apiVersion],
|
|
157
|
+
urlParameters: [Parameters.$host],
|
|
158
|
+
headerParameters: [Parameters.accept],
|
|
188
159
|
serializer
|
|
189
160
|
};
|
|
190
|
-
|
|
191
|
-
export {
|
|
192
|
-
ManagementGroupsAPI,
|
|
193
|
-
ManagementGroupsAPIContext,
|
|
194
|
-
Models as ManagementGroupsAPIModels,
|
|
195
|
-
Mappers as ManagementGroupsAPIMappers
|
|
196
|
-
};
|
|
197
|
-
export * from "./operations";
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import {
|
|
14
|
-
import * as msRestAzure from "@azure/ms-rest-azure-js";
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
|
11
|
+
import { ManagementGroupsAPIOptionalParams } from "./models";
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export class ManagementGroupsAPIContext extends msRestAzure.AzureServiceClient {
|
|
20
|
-
credentials: msRest.ServiceClientCredentials | TokenCredential;
|
|
21
|
-
apiVersion?: string;
|
|
13
|
+
export class ManagementGroupsAPIContext extends coreClient.ServiceClient {
|
|
14
|
+
$host: string;
|
|
15
|
+
apiVersion: string;
|
|
22
16
|
|
|
23
17
|
/**
|
|
24
|
-
* Initializes a new instance of the
|
|
25
|
-
* @param credentials
|
|
26
|
-
*
|
|
27
|
-
* more information about these credentials, see
|
|
28
|
-
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
|
29
|
-
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
|
30
|
-
* @azure/ms-rest-browserauth are also supported.
|
|
31
|
-
* @param [options] The parameter options
|
|
18
|
+
* Initializes a new instance of the ManagementGroupsAPIContext class.
|
|
19
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
20
|
+
* @param options The parameter options
|
|
32
21
|
*/
|
|
33
|
-
constructor(
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
constructor(
|
|
23
|
+
credentials: coreAuth.TokenCredential,
|
|
24
|
+
options?: ManagementGroupsAPIOptionalParams
|
|
25
|
+
) {
|
|
26
|
+
if (credentials === undefined) {
|
|
27
|
+
throw new Error("'credentials' cannot be null");
|
|
36
28
|
}
|
|
37
29
|
|
|
30
|
+
// Initializing default values for options
|
|
38
31
|
if (!options) {
|
|
39
32
|
options = {};
|
|
40
33
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
|
|
56
|
-
this.acceptLanguage = options.acceptLanguage;
|
|
57
|
-
}
|
|
58
|
-
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
|
|
59
|
-
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
|
|
34
|
+
const defaults: ManagementGroupsAPIOptionalParams = {
|
|
35
|
+
requestContentType: "application/json; charset=utf-8",
|
|
36
|
+
credential: credentials
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const packageDetails = `azsdk-js-arm-managementgroups/2.0.0-beta.1`;
|
|
40
|
+
const userAgentPrefix =
|
|
41
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
42
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
43
|
+
: `${packageDetails}`;
|
|
44
|
+
|
|
45
|
+
if (!options.credentialScopes) {
|
|
46
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
60
47
|
}
|
|
48
|
+
const optionsWithDefaults = {
|
|
49
|
+
...defaults,
|
|
50
|
+
...options,
|
|
51
|
+
userAgentOptions: {
|
|
52
|
+
userAgentPrefix
|
|
53
|
+
},
|
|
54
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
|
55
|
+
};
|
|
56
|
+
super(optionsWithDefaults);
|
|
57
|
+
|
|
58
|
+
// Assigning values to Constant parameters
|
|
59
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
60
|
+
this.apiVersion = options.apiVersion || "2021-04-01";
|
|
61
61
|
}
|
|
62
62
|
}
|