@azure/arm-managementgroups 1.1.0 → 2.0.0-alpha.20211214.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 +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +78 -77
- 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 +71 -25
- 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 +160 -0
- package/src/managementGroupsAPIContext.ts +62 -0
- package/src/models/index.ts +1082 -0
- package/{lib → src}/models/mappers.ts +792 -400
- package/src/models/parameters.ts +232 -0
- package/src/operations/entities.ts +159 -0
- package/src/operations/hierarchySettingsOperations.ts +214 -0
- package/{lib → src}/operations/index.ts +4 -5
- package/src/operations/managementGroupSubscriptions.ts +294 -0
- package/src/operations/managementGroups.ts +592 -0
- package/src/operations/operations.ts +137 -0
- 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 -2007
- 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 -68
- package/esm/managementGroupsAPI.d.ts.map +0 -1
- package/esm/managementGroupsAPI.js +0 -115
- package/esm/managementGroupsAPI.js.map +0 -1
- package/esm/managementGroupsAPIContext.d.ts +0 -14
- package/esm/managementGroupsAPIContext.d.ts.map +0 -1
- package/esm/managementGroupsAPIContext.js +0 -51
- 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/lib/managementGroupsAPI.ts +0 -191
- package/lib/managementGroupsAPIContext.ts +0 -56
- package/lib/models/entitiesMappers.ts +0 -18
- package/lib/models/index.ts +0 -1466
- package/lib/models/managementGroupSubscriptionsMappers.ts +0 -15
- package/lib/models/managementGroupsMappers.ts +0 -29
- package/lib/models/operationsMappers.ts +0 -18
- package/lib/models/parameters.ts +0 -196
- package/lib/operations/entities.ts +0 -133
- package/lib/operations/managementGroupSubscriptions.ts +0 -140
- package/lib/operations/managementGroups.ts +0 -365
- package/lib/operations/operations.ts +0 -123
|
@@ -0,0 +1,232 @@
|
|
|
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 {
|
|
10
|
+
OperationParameter,
|
|
11
|
+
OperationURLParameter,
|
|
12
|
+
OperationQueryParameter
|
|
13
|
+
} from "@azure/core-client";
|
|
14
|
+
import {
|
|
15
|
+
CreateManagementGroupRequest as CreateManagementGroupRequestMapper,
|
|
16
|
+
PatchManagementGroupRequest as PatchManagementGroupRequestMapper,
|
|
17
|
+
CreateOrUpdateSettingsRequest as CreateOrUpdateSettingsRequestMapper,
|
|
18
|
+
CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper
|
|
19
|
+
} from "../models/mappers";
|
|
20
|
+
|
|
21
|
+
export const accept: OperationParameter = {
|
|
22
|
+
parameterPath: "accept",
|
|
23
|
+
mapper: {
|
|
24
|
+
defaultValue: "application/json",
|
|
25
|
+
isConstant: true,
|
|
26
|
+
serializedName: "Accept",
|
|
27
|
+
type: {
|
|
28
|
+
name: "String"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const $host: OperationURLParameter = {
|
|
34
|
+
parameterPath: "$host",
|
|
35
|
+
mapper: {
|
|
36
|
+
serializedName: "$host",
|
|
37
|
+
required: true,
|
|
38
|
+
type: {
|
|
39
|
+
name: "String"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
skipEncoding: true
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const apiVersion: OperationQueryParameter = {
|
|
46
|
+
parameterPath: "apiVersion",
|
|
47
|
+
mapper: {
|
|
48
|
+
defaultValue: "2021-04-01",
|
|
49
|
+
isConstant: true,
|
|
50
|
+
serializedName: "api-version",
|
|
51
|
+
type: {
|
|
52
|
+
name: "String"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const cacheControl: OperationParameter = {
|
|
58
|
+
parameterPath: ["options", "cacheControl"],
|
|
59
|
+
mapper: {
|
|
60
|
+
defaultValue: "no-cache",
|
|
61
|
+
serializedName: "Cache-Control",
|
|
62
|
+
type: {
|
|
63
|
+
name: "String"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const skiptoken: OperationQueryParameter = {
|
|
69
|
+
parameterPath: ["options", "skiptoken"],
|
|
70
|
+
mapper: {
|
|
71
|
+
serializedName: "$skiptoken",
|
|
72
|
+
type: {
|
|
73
|
+
name: "String"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const groupId: OperationURLParameter = {
|
|
79
|
+
parameterPath: "groupId",
|
|
80
|
+
mapper: {
|
|
81
|
+
serializedName: "groupId",
|
|
82
|
+
required: true,
|
|
83
|
+
type: {
|
|
84
|
+
name: "String"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const expand: OperationQueryParameter = {
|
|
90
|
+
parameterPath: ["options", "expand"],
|
|
91
|
+
mapper: {
|
|
92
|
+
serializedName: "$expand",
|
|
93
|
+
type: {
|
|
94
|
+
name: "String"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const recurse: OperationQueryParameter = {
|
|
100
|
+
parameterPath: ["options", "recurse"],
|
|
101
|
+
mapper: {
|
|
102
|
+
serializedName: "$recurse",
|
|
103
|
+
type: {
|
|
104
|
+
name: "Boolean"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const filter: OperationQueryParameter = {
|
|
110
|
+
parameterPath: ["options", "filter"],
|
|
111
|
+
mapper: {
|
|
112
|
+
serializedName: "$filter",
|
|
113
|
+
type: {
|
|
114
|
+
name: "String"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const contentType: OperationParameter = {
|
|
120
|
+
parameterPath: ["options", "contentType"],
|
|
121
|
+
mapper: {
|
|
122
|
+
defaultValue: "application/json",
|
|
123
|
+
isConstant: true,
|
|
124
|
+
serializedName: "Content-Type",
|
|
125
|
+
type: {
|
|
126
|
+
name: "String"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
export const createManagementGroupRequest: OperationParameter = {
|
|
132
|
+
parameterPath: "createManagementGroupRequest",
|
|
133
|
+
mapper: CreateManagementGroupRequestMapper
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const patchGroupRequest: OperationParameter = {
|
|
137
|
+
parameterPath: "patchGroupRequest",
|
|
138
|
+
mapper: PatchManagementGroupRequestMapper
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const top: OperationQueryParameter = {
|
|
142
|
+
parameterPath: ["options", "top"],
|
|
143
|
+
mapper: {
|
|
144
|
+
serializedName: "$top",
|
|
145
|
+
type: {
|
|
146
|
+
name: "Number"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const nextLink: OperationURLParameter = {
|
|
152
|
+
parameterPath: "nextLink",
|
|
153
|
+
mapper: {
|
|
154
|
+
serializedName: "nextLink",
|
|
155
|
+
required: true,
|
|
156
|
+
type: {
|
|
157
|
+
name: "String"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
skipEncoding: true
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const subscriptionId: OperationURLParameter = {
|
|
164
|
+
parameterPath: "subscriptionId",
|
|
165
|
+
mapper: {
|
|
166
|
+
serializedName: "subscriptionId",
|
|
167
|
+
required: true,
|
|
168
|
+
type: {
|
|
169
|
+
name: "String"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const createTenantSettingsRequest: OperationParameter = {
|
|
175
|
+
parameterPath: "createTenantSettingsRequest",
|
|
176
|
+
mapper: CreateOrUpdateSettingsRequestMapper
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export const checkNameAvailabilityRequest: OperationParameter = {
|
|
180
|
+
parameterPath: "checkNameAvailabilityRequest",
|
|
181
|
+
mapper: CheckNameAvailabilityRequestMapper
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export const skip: OperationQueryParameter = {
|
|
185
|
+
parameterPath: ["options", "skip"],
|
|
186
|
+
mapper: {
|
|
187
|
+
serializedName: "$skip",
|
|
188
|
+
type: {
|
|
189
|
+
name: "Number"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
export const select: OperationQueryParameter = {
|
|
195
|
+
parameterPath: ["options", "select"],
|
|
196
|
+
mapper: {
|
|
197
|
+
serializedName: "$select",
|
|
198
|
+
type: {
|
|
199
|
+
name: "String"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export const search: OperationQueryParameter = {
|
|
205
|
+
parameterPath: ["options", "search"],
|
|
206
|
+
mapper: {
|
|
207
|
+
serializedName: "$search",
|
|
208
|
+
type: {
|
|
209
|
+
name: "String"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export const view: OperationQueryParameter = {
|
|
215
|
+
parameterPath: ["options", "view"],
|
|
216
|
+
mapper: {
|
|
217
|
+
serializedName: "$view",
|
|
218
|
+
type: {
|
|
219
|
+
name: "String"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export const groupName: OperationQueryParameter = {
|
|
225
|
+
parameterPath: ["options", "groupName"],
|
|
226
|
+
mapper: {
|
|
227
|
+
serializedName: "groupName",
|
|
228
|
+
type: {
|
|
229
|
+
name: "String"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
@@ -0,0 +1,159 @@
|
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Entities } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { ManagementGroupsAPIContext } from "../managementGroupsAPIContext";
|
|
15
|
+
import {
|
|
16
|
+
EntityInfo,
|
|
17
|
+
EntitiesListNextOptionalParams,
|
|
18
|
+
EntitiesListOptionalParams,
|
|
19
|
+
EntitiesListResponse,
|
|
20
|
+
EntitiesListNextResponse
|
|
21
|
+
} from "../models";
|
|
22
|
+
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing Entities operations. */
|
|
25
|
+
export class EntitiesImpl implements Entities {
|
|
26
|
+
private readonly client: ManagementGroupsAPIContext;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initialize a new instance of the class Entities class.
|
|
30
|
+
* @param client Reference to the service client
|
|
31
|
+
*/
|
|
32
|
+
constructor(client: ManagementGroupsAPIContext) {
|
|
33
|
+
this.client = client;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
|
|
38
|
+
*
|
|
39
|
+
* @param options The options parameters.
|
|
40
|
+
*/
|
|
41
|
+
public list(
|
|
42
|
+
options?: EntitiesListOptionalParams
|
|
43
|
+
): PagedAsyncIterableIterator<EntityInfo> {
|
|
44
|
+
const iter = this.listPagingAll(options);
|
|
45
|
+
return {
|
|
46
|
+
next() {
|
|
47
|
+
return iter.next();
|
|
48
|
+
},
|
|
49
|
+
[Symbol.asyncIterator]() {
|
|
50
|
+
return this;
|
|
51
|
+
},
|
|
52
|
+
byPage: () => {
|
|
53
|
+
return this.listPagingPage(options);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private async *listPagingPage(
|
|
59
|
+
options?: EntitiesListOptionalParams
|
|
60
|
+
): AsyncIterableIterator<EntityInfo[]> {
|
|
61
|
+
let result = await this._list(options);
|
|
62
|
+
yield result.value || [];
|
|
63
|
+
let continuationToken = result.nextLink;
|
|
64
|
+
while (continuationToken) {
|
|
65
|
+
result = await this._listNext(continuationToken, options);
|
|
66
|
+
continuationToken = result.nextLink;
|
|
67
|
+
yield result.value || [];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private async *listPagingAll(
|
|
72
|
+
options?: EntitiesListOptionalParams
|
|
73
|
+
): AsyncIterableIterator<EntityInfo> {
|
|
74
|
+
for await (const page of this.listPagingPage(options)) {
|
|
75
|
+
yield* page;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
|
|
81
|
+
*
|
|
82
|
+
* @param options The options parameters.
|
|
83
|
+
*/
|
|
84
|
+
private _list(
|
|
85
|
+
options?: EntitiesListOptionalParams
|
|
86
|
+
): Promise<EntitiesListResponse> {
|
|
87
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* ListNext
|
|
92
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
93
|
+
* @param options The options parameters.
|
|
94
|
+
*/
|
|
95
|
+
private _listNext(
|
|
96
|
+
nextLink: string,
|
|
97
|
+
options?: EntitiesListNextOptionalParams
|
|
98
|
+
): Promise<EntitiesListNextResponse> {
|
|
99
|
+
return this.client.sendOperationRequest(
|
|
100
|
+
{ nextLink, options },
|
|
101
|
+
listNextOperationSpec
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// Operation Specifications
|
|
106
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
107
|
+
|
|
108
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
109
|
+
path: "/providers/Microsoft.Management/getEntities",
|
|
110
|
+
httpMethod: "POST",
|
|
111
|
+
responses: {
|
|
112
|
+
200: {
|
|
113
|
+
bodyMapper: Mappers.EntityListResult
|
|
114
|
+
},
|
|
115
|
+
default: {
|
|
116
|
+
bodyMapper: Mappers.ErrorResponse
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
queryParameters: [
|
|
120
|
+
Parameters.apiVersion,
|
|
121
|
+
Parameters.skiptoken,
|
|
122
|
+
Parameters.filter,
|
|
123
|
+
Parameters.top,
|
|
124
|
+
Parameters.skip,
|
|
125
|
+
Parameters.select,
|
|
126
|
+
Parameters.search,
|
|
127
|
+
Parameters.view,
|
|
128
|
+
Parameters.groupName
|
|
129
|
+
],
|
|
130
|
+
urlParameters: [Parameters.$host],
|
|
131
|
+
headerParameters: [Parameters.accept, Parameters.cacheControl],
|
|
132
|
+
serializer
|
|
133
|
+
};
|
|
134
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
135
|
+
path: "{nextLink}",
|
|
136
|
+
httpMethod: "GET",
|
|
137
|
+
responses: {
|
|
138
|
+
200: {
|
|
139
|
+
bodyMapper: Mappers.EntityListResult
|
|
140
|
+
},
|
|
141
|
+
default: {
|
|
142
|
+
bodyMapper: Mappers.ErrorResponse
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
queryParameters: [
|
|
146
|
+
Parameters.apiVersion,
|
|
147
|
+
Parameters.skiptoken,
|
|
148
|
+
Parameters.filter,
|
|
149
|
+
Parameters.top,
|
|
150
|
+
Parameters.skip,
|
|
151
|
+
Parameters.select,
|
|
152
|
+
Parameters.search,
|
|
153
|
+
Parameters.view,
|
|
154
|
+
Parameters.groupName
|
|
155
|
+
],
|
|
156
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
157
|
+
headerParameters: [Parameters.accept, Parameters.cacheControl],
|
|
158
|
+
serializer
|
|
159
|
+
};
|
|
@@ -0,0 +1,214 @@
|
|
|
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 { HierarchySettingsOperations } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { ManagementGroupsAPIContext } from "../managementGroupsAPIContext";
|
|
14
|
+
import {
|
|
15
|
+
HierarchySettingsListOptionalParams,
|
|
16
|
+
HierarchySettingsListResponse,
|
|
17
|
+
HierarchySettingsGetOptionalParams,
|
|
18
|
+
HierarchySettingsGetResponse,
|
|
19
|
+
CreateOrUpdateSettingsRequest,
|
|
20
|
+
HierarchySettingsCreateOrUpdateOptionalParams,
|
|
21
|
+
HierarchySettingsCreateOrUpdateResponse,
|
|
22
|
+
HierarchySettingsUpdateOptionalParams,
|
|
23
|
+
HierarchySettingsUpdateResponse,
|
|
24
|
+
HierarchySettingsDeleteOptionalParams
|
|
25
|
+
} from "../models";
|
|
26
|
+
|
|
27
|
+
/** Class containing HierarchySettingsOperations operations. */
|
|
28
|
+
export class HierarchySettingsOperationsImpl
|
|
29
|
+
implements HierarchySettingsOperations {
|
|
30
|
+
private readonly client: ManagementGroupsAPIContext;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Initialize a new instance of the class HierarchySettingsOperations class.
|
|
34
|
+
* @param client Reference to the service client
|
|
35
|
+
*/
|
|
36
|
+
constructor(client: ManagementGroupsAPIContext) {
|
|
37
|
+
this.client = client;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on
|
|
42
|
+
* the root Management Group of the hierarchy.
|
|
43
|
+
*
|
|
44
|
+
* @param groupId Management Group ID.
|
|
45
|
+
* @param options The options parameters.
|
|
46
|
+
*/
|
|
47
|
+
list(
|
|
48
|
+
groupId: string,
|
|
49
|
+
options?: HierarchySettingsListOptionalParams
|
|
50
|
+
): Promise<HierarchySettingsListResponse> {
|
|
51
|
+
return this.client.sendOperationRequest(
|
|
52
|
+
{ groupId, options },
|
|
53
|
+
listOperationSpec
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the
|
|
59
|
+
* root Management Group of the hierarchy.
|
|
60
|
+
*
|
|
61
|
+
* @param groupId Management Group ID.
|
|
62
|
+
* @param options The options parameters.
|
|
63
|
+
*/
|
|
64
|
+
get(
|
|
65
|
+
groupId: string,
|
|
66
|
+
options?: HierarchySettingsGetOptionalParams
|
|
67
|
+
): Promise<HierarchySettingsGetResponse> {
|
|
68
|
+
return this.client.sendOperationRequest(
|
|
69
|
+
{ groupId, options },
|
|
70
|
+
getOperationSpec
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Creates or updates the hierarchy settings defined at the Management Group level.
|
|
76
|
+
*
|
|
77
|
+
* @param groupId Management Group ID.
|
|
78
|
+
* @param createTenantSettingsRequest Tenant level settings request parameter.
|
|
79
|
+
* @param options The options parameters.
|
|
80
|
+
*/
|
|
81
|
+
createOrUpdate(
|
|
82
|
+
groupId: string,
|
|
83
|
+
createTenantSettingsRequest: CreateOrUpdateSettingsRequest,
|
|
84
|
+
options?: HierarchySettingsCreateOrUpdateOptionalParams
|
|
85
|
+
): Promise<HierarchySettingsCreateOrUpdateResponse> {
|
|
86
|
+
return this.client.sendOperationRequest(
|
|
87
|
+
{ groupId, createTenantSettingsRequest, options },
|
|
88
|
+
createOrUpdateOperationSpec
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Updates the hierarchy settings defined at the Management Group level.
|
|
94
|
+
*
|
|
95
|
+
* @param groupId Management Group ID.
|
|
96
|
+
* @param createTenantSettingsRequest Tenant level settings request parameter.
|
|
97
|
+
* @param options The options parameters.
|
|
98
|
+
*/
|
|
99
|
+
update(
|
|
100
|
+
groupId: string,
|
|
101
|
+
createTenantSettingsRequest: CreateOrUpdateSettingsRequest,
|
|
102
|
+
options?: HierarchySettingsUpdateOptionalParams
|
|
103
|
+
): Promise<HierarchySettingsUpdateResponse> {
|
|
104
|
+
return this.client.sendOperationRequest(
|
|
105
|
+
{ groupId, createTenantSettingsRequest, options },
|
|
106
|
+
updateOperationSpec
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Deletes the hierarchy settings defined at the Management Group level.
|
|
112
|
+
*
|
|
113
|
+
* @param groupId Management Group ID.
|
|
114
|
+
* @param options The options parameters.
|
|
115
|
+
*/
|
|
116
|
+
delete(
|
|
117
|
+
groupId: string,
|
|
118
|
+
options?: HierarchySettingsDeleteOptionalParams
|
|
119
|
+
): Promise<void> {
|
|
120
|
+
return this.client.sendOperationRequest(
|
|
121
|
+
{ groupId, options },
|
|
122
|
+
deleteOperationSpec
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Operation Specifications
|
|
127
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
128
|
+
|
|
129
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
130
|
+
path: "/providers/Microsoft.Management/managementGroups/{groupId}/settings",
|
|
131
|
+
httpMethod: "GET",
|
|
132
|
+
responses: {
|
|
133
|
+
200: {
|
|
134
|
+
bodyMapper: Mappers.HierarchySettingsList
|
|
135
|
+
},
|
|
136
|
+
default: {
|
|
137
|
+
bodyMapper: Mappers.ErrorResponse
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
queryParameters: [Parameters.apiVersion],
|
|
141
|
+
urlParameters: [Parameters.$host, Parameters.groupId],
|
|
142
|
+
headerParameters: [Parameters.accept],
|
|
143
|
+
serializer
|
|
144
|
+
};
|
|
145
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
146
|
+
path:
|
|
147
|
+
"/providers/Microsoft.Management/managementGroups/{groupId}/settings/default",
|
|
148
|
+
httpMethod: "GET",
|
|
149
|
+
responses: {
|
|
150
|
+
200: {
|
|
151
|
+
bodyMapper: Mappers.HierarchySettings
|
|
152
|
+
},
|
|
153
|
+
default: {
|
|
154
|
+
bodyMapper: Mappers.ErrorResponse
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
queryParameters: [Parameters.apiVersion],
|
|
158
|
+
urlParameters: [Parameters.$host, Parameters.groupId],
|
|
159
|
+
headerParameters: [Parameters.accept],
|
|
160
|
+
serializer
|
|
161
|
+
};
|
|
162
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
163
|
+
path:
|
|
164
|
+
"/providers/Microsoft.Management/managementGroups/{groupId}/settings/default",
|
|
165
|
+
httpMethod: "PUT",
|
|
166
|
+
responses: {
|
|
167
|
+
200: {
|
|
168
|
+
bodyMapper: Mappers.HierarchySettings
|
|
169
|
+
},
|
|
170
|
+
default: {
|
|
171
|
+
bodyMapper: Mappers.ErrorResponse
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
requestBody: Parameters.createTenantSettingsRequest,
|
|
175
|
+
queryParameters: [Parameters.apiVersion],
|
|
176
|
+
urlParameters: [Parameters.$host, Parameters.groupId],
|
|
177
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
178
|
+
mediaType: "json",
|
|
179
|
+
serializer
|
|
180
|
+
};
|
|
181
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
182
|
+
path:
|
|
183
|
+
"/providers/Microsoft.Management/managementGroups/{groupId}/settings/default",
|
|
184
|
+
httpMethod: "PATCH",
|
|
185
|
+
responses: {
|
|
186
|
+
200: {
|
|
187
|
+
bodyMapper: Mappers.HierarchySettings
|
|
188
|
+
},
|
|
189
|
+
default: {
|
|
190
|
+
bodyMapper: Mappers.ErrorResponse
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
requestBody: Parameters.createTenantSettingsRequest,
|
|
194
|
+
queryParameters: [Parameters.apiVersion],
|
|
195
|
+
urlParameters: [Parameters.$host, Parameters.groupId],
|
|
196
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
197
|
+
mediaType: "json",
|
|
198
|
+
serializer
|
|
199
|
+
};
|
|
200
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
201
|
+
path:
|
|
202
|
+
"/providers/Microsoft.Management/managementGroups/{groupId}/settings/default",
|
|
203
|
+
httpMethod: "DELETE",
|
|
204
|
+
responses: {
|
|
205
|
+
200: {},
|
|
206
|
+
default: {
|
|
207
|
+
bodyMapper: Mappers.ErrorResponse
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
queryParameters: [Parameters.apiVersion],
|
|
211
|
+
urlParameters: [Parameters.$host, Parameters.groupId],
|
|
212
|
+
headerParameters: [Parameters.accept],
|
|
213
|
+
serializer
|
|
214
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
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
9
|
export * from "./managementGroups";
|
|
12
10
|
export * from "./managementGroupSubscriptions";
|
|
11
|
+
export * from "./hierarchySettingsOperations";
|
|
13
12
|
export * from "./operations";
|
|
14
13
|
export * from "./entities";
|