@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/src/models/parameters.ts
CHANGED
|
@@ -1,146 +1,188 @@
|
|
|
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
|
|
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";
|
|
12
20
|
|
|
13
|
-
export const
|
|
14
|
-
parameterPath: "
|
|
21
|
+
export const accept: OperationParameter = {
|
|
22
|
+
parameterPath: "accept",
|
|
15
23
|
mapper: {
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
defaultValue: "application/json",
|
|
25
|
+
isConstant: true,
|
|
26
|
+
serializedName: "Accept",
|
|
18
27
|
type: {
|
|
19
28
|
name: "String"
|
|
20
29
|
}
|
|
21
30
|
}
|
|
22
31
|
};
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
|
|
33
|
+
export const $host: OperationURLParameter = {
|
|
34
|
+
parameterPath: "$host",
|
|
25
35
|
mapper: {
|
|
36
|
+
serializedName: "$host",
|
|
26
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,
|
|
27
50
|
serializedName: "api-version",
|
|
28
51
|
type: {
|
|
29
52
|
name: "String"
|
|
30
53
|
}
|
|
31
54
|
}
|
|
32
55
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"cacheControl"
|
|
37
|
-
],
|
|
56
|
+
|
|
57
|
+
export const cacheControl: OperationParameter = {
|
|
58
|
+
parameterPath: ["options", "cacheControl"],
|
|
38
59
|
mapper: {
|
|
60
|
+
defaultValue: "no-cache",
|
|
39
61
|
serializedName: "Cache-Control",
|
|
40
|
-
defaultValue: 'no-cache',
|
|
41
62
|
type: {
|
|
42
63
|
name: "String"
|
|
43
64
|
}
|
|
44
65
|
}
|
|
45
66
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"expand"
|
|
50
|
-
],
|
|
67
|
+
|
|
68
|
+
export const skiptoken: OperationQueryParameter = {
|
|
69
|
+
parameterPath: ["options", "skiptoken"],
|
|
51
70
|
mapper: {
|
|
52
|
-
serializedName: "$
|
|
71
|
+
serializedName: "$skiptoken",
|
|
53
72
|
type: {
|
|
54
73
|
name: "String"
|
|
55
74
|
}
|
|
56
75
|
}
|
|
57
76
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"filter"
|
|
62
|
-
],
|
|
77
|
+
|
|
78
|
+
export const groupId: OperationURLParameter = {
|
|
79
|
+
parameterPath: "groupId",
|
|
63
80
|
mapper: {
|
|
64
|
-
serializedName: "
|
|
81
|
+
serializedName: "groupId",
|
|
82
|
+
required: true,
|
|
65
83
|
type: {
|
|
66
84
|
name: "String"
|
|
67
85
|
}
|
|
68
86
|
}
|
|
69
87
|
};
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
|
|
89
|
+
export const expand: OperationQueryParameter = {
|
|
90
|
+
parameterPath: ["options", "expand"],
|
|
72
91
|
mapper: {
|
|
73
|
-
|
|
74
|
-
serializedName: "groupId",
|
|
92
|
+
serializedName: "$expand",
|
|
75
93
|
type: {
|
|
76
94
|
name: "String"
|
|
77
95
|
}
|
|
78
96
|
}
|
|
79
97
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"groupName"
|
|
84
|
-
],
|
|
98
|
+
|
|
99
|
+
export const recurse: OperationQueryParameter = {
|
|
100
|
+
parameterPath: ["options", "recurse"],
|
|
85
101
|
mapper: {
|
|
86
|
-
serializedName: "
|
|
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",
|
|
87
113
|
type: {
|
|
88
114
|
name: "String"
|
|
89
115
|
}
|
|
90
116
|
}
|
|
91
117
|
};
|
|
92
|
-
|
|
93
|
-
|
|
118
|
+
|
|
119
|
+
export const contentType: OperationParameter = {
|
|
120
|
+
parameterPath: ["options", "contentType"],
|
|
94
121
|
mapper: {
|
|
95
|
-
|
|
96
|
-
|
|
122
|
+
defaultValue: "application/json",
|
|
123
|
+
isConstant: true,
|
|
124
|
+
serializedName: "Content-Type",
|
|
97
125
|
type: {
|
|
98
126
|
name: "String"
|
|
99
127
|
}
|
|
100
|
-
}
|
|
101
|
-
skipEncoding: true
|
|
128
|
+
}
|
|
102
129
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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"],
|
|
108
143
|
mapper: {
|
|
109
|
-
serializedName: "$
|
|
144
|
+
serializedName: "$top",
|
|
110
145
|
type: {
|
|
111
|
-
name: "
|
|
146
|
+
name: "Number"
|
|
112
147
|
}
|
|
113
148
|
}
|
|
114
149
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"search"
|
|
119
|
-
],
|
|
150
|
+
|
|
151
|
+
export const nextLink: OperationURLParameter = {
|
|
152
|
+
parameterPath: "nextLink",
|
|
120
153
|
mapper: {
|
|
121
|
-
serializedName: "
|
|
154
|
+
serializedName: "nextLink",
|
|
155
|
+
required: true,
|
|
122
156
|
type: {
|
|
123
157
|
name: "String"
|
|
124
158
|
}
|
|
125
|
-
}
|
|
159
|
+
},
|
|
160
|
+
skipEncoding: true
|
|
126
161
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"select"
|
|
131
|
-
],
|
|
162
|
+
|
|
163
|
+
export const subscriptionId: OperationURLParameter = {
|
|
164
|
+
parameterPath: "subscriptionId",
|
|
132
165
|
mapper: {
|
|
133
|
-
serializedName: "
|
|
166
|
+
serializedName: "subscriptionId",
|
|
167
|
+
required: true,
|
|
134
168
|
type: {
|
|
135
169
|
name: "String"
|
|
136
170
|
}
|
|
137
171
|
}
|
|
138
172
|
};
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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"],
|
|
144
186
|
mapper: {
|
|
145
187
|
serializedName: "$skip",
|
|
146
188
|
type: {
|
|
@@ -148,47 +190,41 @@ export const skip: msRest.OperationQueryParameter = {
|
|
|
148
190
|
}
|
|
149
191
|
}
|
|
150
192
|
};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"skiptoken"
|
|
155
|
-
],
|
|
193
|
+
|
|
194
|
+
export const select: OperationQueryParameter = {
|
|
195
|
+
parameterPath: ["options", "select"],
|
|
156
196
|
mapper: {
|
|
157
|
-
serializedName: "$
|
|
197
|
+
serializedName: "$select",
|
|
158
198
|
type: {
|
|
159
199
|
name: "String"
|
|
160
200
|
}
|
|
161
201
|
}
|
|
162
202
|
};
|
|
163
|
-
|
|
164
|
-
|
|
203
|
+
|
|
204
|
+
export const search: OperationQueryParameter = {
|
|
205
|
+
parameterPath: ["options", "search"],
|
|
165
206
|
mapper: {
|
|
166
|
-
|
|
167
|
-
serializedName: "subscriptionId",
|
|
207
|
+
serializedName: "$search",
|
|
168
208
|
type: {
|
|
169
209
|
name: "String"
|
|
170
210
|
}
|
|
171
211
|
}
|
|
172
212
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"top"
|
|
177
|
-
],
|
|
213
|
+
|
|
214
|
+
export const view: OperationQueryParameter = {
|
|
215
|
+
parameterPath: ["options", "view"],
|
|
178
216
|
mapper: {
|
|
179
|
-
serializedName: "$
|
|
217
|
+
serializedName: "$view",
|
|
180
218
|
type: {
|
|
181
|
-
name: "
|
|
219
|
+
name: "String"
|
|
182
220
|
}
|
|
183
221
|
}
|
|
184
222
|
};
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
"view"
|
|
189
|
-
],
|
|
223
|
+
|
|
224
|
+
export const groupName: OperationQueryParameter = {
|
|
225
|
+
parameterPath: ["options", "groupName"],
|
|
190
226
|
mapper: {
|
|
191
|
-
serializedName: "
|
|
227
|
+
serializedName: "groupName",
|
|
192
228
|
type: {
|
|
193
229
|
name: "String"
|
|
194
230
|
}
|
|
@@ -1,26 +1,33 @@
|
|
|
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
|
|
12
|
-
import
|
|
13
|
-
import * as
|
|
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";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
14
|
import { ManagementGroupsAPIContext } from "../managementGroupsAPIContext";
|
|
15
|
+
import {
|
|
16
|
+
EntityInfo,
|
|
17
|
+
EntitiesListNextOptionalParams,
|
|
18
|
+
EntitiesListOptionalParams,
|
|
19
|
+
EntitiesListResponse,
|
|
20
|
+
EntitiesListNextResponse
|
|
21
|
+
} from "../models";
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing Entities operations. */
|
|
25
|
+
export class EntitiesImpl implements Entities {
|
|
19
26
|
private readonly client: ManagementGroupsAPIContext;
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
29
|
+
* Initialize a new instance of the class Entities class.
|
|
30
|
+
* @param client Reference to the service client
|
|
24
31
|
*/
|
|
25
32
|
constructor(client: ManagementGroupsAPIContext) {
|
|
26
33
|
this.client = client;
|
|
@@ -28,99 +35,105 @@ export class Entities {
|
|
|
28
35
|
|
|
29
36
|
/**
|
|
30
37
|
* List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
|
|
31
|
-
*
|
|
32
|
-
* @
|
|
38
|
+
*
|
|
39
|
+
* @param options The options parameters.
|
|
33
40
|
*/
|
|
34
|
-
list(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
list(options?: Models.EntitiesListOptionalParams | msRest.ServiceCallback<Models.EntityListResult>, callback?: msRest.ServiceCallback<Models.EntityListResult>): Promise<Models.EntitiesListResponse> {
|
|
45
|
-
return this.client.sendOperationRequest(
|
|
46
|
-
{
|
|
47
|
-
options
|
|
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;
|
|
48
51
|
},
|
|
49
|
-
|
|
50
|
-
|
|
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
|
+
}
|
|
51
77
|
}
|
|
52
78
|
|
|
53
79
|
/**
|
|
54
80
|
* List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
|
|
55
|
-
*
|
|
56
|
-
* @param
|
|
57
|
-
* @returns Promise<Models.EntitiesListNextResponse>
|
|
58
|
-
*/
|
|
59
|
-
listNext(nextPageLink: string, options?: Models.EntitiesListNextOptionalParams): Promise<Models.EntitiesListNextResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
62
|
-
* @param callback The callback
|
|
81
|
+
*
|
|
82
|
+
* @param options The options parameters.
|
|
63
83
|
*/
|
|
64
|
-
|
|
84
|
+
private _list(
|
|
85
|
+
options?: EntitiesListOptionalParams
|
|
86
|
+
): Promise<EntitiesListResponse> {
|
|
87
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
88
|
+
}
|
|
89
|
+
|
|
65
90
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
91
|
+
* ListNext
|
|
92
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
93
|
+
* @param options The options parameters.
|
|
69
94
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
95
|
+
private _listNext(
|
|
96
|
+
nextLink: string,
|
|
97
|
+
options?: EntitiesListNextOptionalParams
|
|
98
|
+
): Promise<EntitiesListNextResponse> {
|
|
72
99
|
return this.client.sendOperationRequest(
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
listNextOperationSpec,
|
|
78
|
-
callback) as Promise<Models.EntitiesListNextResponse>;
|
|
100
|
+
{ nextLink, options },
|
|
101
|
+
listNextOperationSpec
|
|
102
|
+
);
|
|
79
103
|
}
|
|
80
104
|
}
|
|
81
|
-
|
|
82
105
|
// Operation Specifications
|
|
83
|
-
const serializer =
|
|
84
|
-
|
|
106
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
107
|
+
|
|
108
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
109
|
+
path: "/providers/Microsoft.Management/getEntities",
|
|
85
110
|
httpMethod: "POST",
|
|
86
|
-
|
|
111
|
+
responses: {
|
|
112
|
+
200: {
|
|
113
|
+
bodyMapper: Mappers.EntityListResult
|
|
114
|
+
},
|
|
115
|
+
default: {
|
|
116
|
+
bodyMapper: Mappers.ErrorResponse
|
|
117
|
+
}
|
|
118
|
+
},
|
|
87
119
|
queryParameters: [
|
|
88
120
|
Parameters.apiVersion,
|
|
89
121
|
Parameters.skiptoken,
|
|
90
|
-
Parameters.
|
|
122
|
+
Parameters.filter,
|
|
91
123
|
Parameters.top,
|
|
124
|
+
Parameters.skip,
|
|
92
125
|
Parameters.select,
|
|
93
126
|
Parameters.search,
|
|
94
|
-
Parameters.filter,
|
|
95
127
|
Parameters.view,
|
|
96
128
|
Parameters.groupName
|
|
97
129
|
],
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Parameters.acceptLanguage
|
|
101
|
-
],
|
|
102
|
-
responses: {
|
|
103
|
-
200: {
|
|
104
|
-
bodyMapper: Mappers.EntityListResult
|
|
105
|
-
},
|
|
106
|
-
default: {
|
|
107
|
-
bodyMapper: Mappers.ErrorResponse
|
|
108
|
-
}
|
|
109
|
-
},
|
|
130
|
+
urlParameters: [Parameters.$host],
|
|
131
|
+
headerParameters: [Parameters.accept, Parameters.cacheControl],
|
|
110
132
|
serializer
|
|
111
133
|
};
|
|
112
|
-
|
|
113
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
114
|
-
httpMethod: "POST",
|
|
115
|
-
baseUrl: "https://management.azure.com",
|
|
134
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
116
135
|
path: "{nextLink}",
|
|
117
|
-
|
|
118
|
-
Parameters.nextPageLink
|
|
119
|
-
],
|
|
120
|
-
headerParameters: [
|
|
121
|
-
Parameters.cacheControl,
|
|
122
|
-
Parameters.acceptLanguage
|
|
123
|
-
],
|
|
136
|
+
httpMethod: "GET",
|
|
124
137
|
responses: {
|
|
125
138
|
200: {
|
|
126
139
|
bodyMapper: Mappers.EntityListResult
|
|
@@ -129,5 +142,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
129
142
|
bodyMapper: Mappers.ErrorResponse
|
|
130
143
|
}
|
|
131
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],
|
|
132
158
|
serializer
|
|
133
159
|
};
|