@azure/arm-domainservices 3.2.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +69 -80
- package/dist/index.js +2502 -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/domainServicesResourceProvider.d.ts +22 -0
- package/dist-esm/src/domainServicesResourceProvider.d.ts.map +1 -0
- package/dist-esm/src/domainServicesResourceProvider.js +55 -0
- package/dist-esm/src/domainServicesResourceProvider.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +768 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +98 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +27 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1015 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +13 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +117 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/domainServiceOperations.d.ts +32 -0
- package/dist-esm/src/operations/domainServiceOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/domainServiceOperations.js +120 -0
- package/dist-esm/src/operations/domainServiceOperations.js.map +1 -0
- package/dist-esm/src/operations/domainServices.d.ts +127 -0
- package/dist-esm/src/operations/domainServices.d.ts.map +1 -0
- package/dist-esm/src/operations/domainServices.js +520 -0
- package/dist-esm/src/operations/domainServices.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +5 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +12 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/ouContainerOperationGrp.d.ts +111 -0
- package/dist-esm/src/operations/ouContainerOperationGrp.d.ts.map +1 -0
- package/dist-esm/src/operations/ouContainerOperationGrp.js +441 -0
- package/dist-esm/src/operations/ouContainerOperationGrp.js.map +1 -0
- package/dist-esm/src/operations/ouContainerOperations.d.ts +32 -0
- package/dist-esm/src/operations/ouContainerOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/ouContainerOperations.js +120 -0
- package/dist-esm/src/operations/ouContainerOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/domainServiceOperations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/domainServiceOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/domainServiceOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/domainServiceOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/domainServices.d.ts +87 -0
- package/dist-esm/src/operationsInterfaces/domainServices.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/domainServices.js +9 -0
- package/dist-esm/src/operationsInterfaces/domainServices.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.d.ts +84 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.js +9 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperationGrp.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/ouContainerOperations.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 +68 -33
- package/review/arm-domainservices.api.md +591 -0
- package/rollup.config.js +184 -27
- package/src/domainServicesResourceProvider.ts +92 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +689 -557
- package/src/models/mappers.ts +760 -217
- package/src/models/parameters.ts +87 -29
- package/src/operations/domainServiceOperations.ts +87 -73
- package/src/operations/domainServices.ts +519 -342
- package/src/operations/index.ts +5 -5
- package/src/operations/ouContainerOperationGrp.ts +632 -0
- package/src/operations/ouContainerOperations.ts +137 -0
- package/src/operationsInterfaces/domainServiceOperations.ts +25 -0
- package/src/operationsInterfaces/domainServices.ts +154 -0
- package/src/operationsInterfaces/index.ts +12 -0
- package/src/operationsInterfaces/ouContainerOperationGrp.ts +157 -0
- package/src/operationsInterfaces/ouContainerOperations.ts +25 -0
- package/tsconfig.json +4 -4
- package/types/arm-domainservices.d.ts +1062 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-domainservices.js +0 -1233
- package/dist/arm-domainservices.js.map +0 -1
- package/dist/arm-domainservices.min.js +0 -1
- package/dist/arm-domainservices.min.js.map +0 -1
- package/esm/domainservicesManagementClient.d.ts +0 -26
- package/esm/domainservicesManagementClient.d.ts.map +0 -1
- package/esm/domainservicesManagementClient.js +0 -40
- package/esm/domainservicesManagementClient.js.map +0 -1
- package/esm/domainservicesManagementClientContext.d.ts +0 -23
- package/esm/domainservicesManagementClientContext.d.ts.map +0 -1
- package/esm/domainservicesManagementClientContext.js +0 -62
- package/esm/domainservicesManagementClientContext.js.map +0 -1
- package/esm/models/domainServiceOperationsMappers.d.ts +0 -2
- package/esm/models/domainServiceOperationsMappers.d.ts.map +0 -1
- package/esm/models/domainServiceOperationsMappers.js +0 -11
- package/esm/models/domainServiceOperationsMappers.js.map +0 -1
- package/esm/models/domainServicesMappers.d.ts +0 -2
- package/esm/models/domainServicesMappers.d.ts.map +0 -1
- package/esm/models/domainServicesMappers.js +0 -11
- package/esm/models/domainServicesMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -693
- 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/mappers.d.ts +0 -15
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -498
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -8
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -76
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/domainServiceOperations.d.ts +0 -46
- package/esm/operations/domainServiceOperations.d.ts.map +0 -1
- package/esm/operations/domainServiceOperations.js +0 -77
- package/esm/operations/domainServiceOperations.js.map +0 -1
- package/esm/operations/domainServices.d.ts +0 -189
- package/esm/operations/domainServices.d.ts.map +0 -1
- package/esm/operations/domainServices.js +0 -356
- package/esm/operations/domainServices.js.map +0 -1
- package/esm/operations/index.d.ts +0 -3
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -12
- package/esm/operations/index.js.map +0 -1
- package/src/domainservicesManagementClient.ts +0 -51
- package/src/domainservicesManagementClientContext.ts +0 -69
- package/src/models/domainServiceOperationsMappers.ts +0 -17
- package/src/models/domainServicesMappers.ts +0 -23
package/src/operations/index.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
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 "./domainServiceOperations";
|
12
10
|
export * from "./domainServices";
|
11
|
+
export * from "./ouContainerOperations";
|
12
|
+
export * from "./ouContainerOperationGrp";
|
@@ -0,0 +1,632 @@
|
|
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 { OuContainerOperationGrp } 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 { DomainServicesResourceProvider } from "../domainServicesResourceProvider";
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
16
|
+
import { LroImpl } from "../lroImpl";
|
17
|
+
import {
|
18
|
+
OuContainer,
|
19
|
+
OuContainerListNextOptionalParams,
|
20
|
+
OuContainerListOptionalParams,
|
21
|
+
OuContainerListResponse,
|
22
|
+
OuContainerGetOptionalParams,
|
23
|
+
OuContainerGetResponse,
|
24
|
+
ContainerAccount,
|
25
|
+
OuContainerCreateOptionalParams,
|
26
|
+
OuContainerCreateResponse,
|
27
|
+
OuContainerDeleteOptionalParams,
|
28
|
+
OuContainerUpdateOptionalParams,
|
29
|
+
OuContainerUpdateResponse,
|
30
|
+
OuContainerListNextResponse
|
31
|
+
} from "../models";
|
32
|
+
|
33
|
+
/// <reference lib="esnext.asynciterable" />
|
34
|
+
/** Class containing OuContainerOperationGrp operations. */
|
35
|
+
export class OuContainerOperationGrpImpl implements OuContainerOperationGrp {
|
36
|
+
private readonly client: DomainServicesResourceProvider;
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Initialize a new instance of the class OuContainerOperationGrp class.
|
40
|
+
* @param client Reference to the service client
|
41
|
+
*/
|
42
|
+
constructor(client: DomainServicesResourceProvider) {
|
43
|
+
this.client = client;
|
44
|
+
}
|
45
|
+
|
46
|
+
/**
|
47
|
+
* The List of OuContainers in DomainService instance.
|
48
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
49
|
+
* case insensitive.
|
50
|
+
* @param domainServiceName The name of the domain service.
|
51
|
+
* @param options The options parameters.
|
52
|
+
*/
|
53
|
+
public list(
|
54
|
+
resourceGroupName: string,
|
55
|
+
domainServiceName: string,
|
56
|
+
options?: OuContainerListOptionalParams
|
57
|
+
): PagedAsyncIterableIterator<OuContainer> {
|
58
|
+
const iter = this.listPagingAll(
|
59
|
+
resourceGroupName,
|
60
|
+
domainServiceName,
|
61
|
+
options
|
62
|
+
);
|
63
|
+
return {
|
64
|
+
next() {
|
65
|
+
return iter.next();
|
66
|
+
},
|
67
|
+
[Symbol.asyncIterator]() {
|
68
|
+
return this;
|
69
|
+
},
|
70
|
+
byPage: () => {
|
71
|
+
return this.listPagingPage(
|
72
|
+
resourceGroupName,
|
73
|
+
domainServiceName,
|
74
|
+
options
|
75
|
+
);
|
76
|
+
}
|
77
|
+
};
|
78
|
+
}
|
79
|
+
|
80
|
+
private async *listPagingPage(
|
81
|
+
resourceGroupName: string,
|
82
|
+
domainServiceName: string,
|
83
|
+
options?: OuContainerListOptionalParams
|
84
|
+
): AsyncIterableIterator<OuContainer[]> {
|
85
|
+
let result = await this._list(
|
86
|
+
resourceGroupName,
|
87
|
+
domainServiceName,
|
88
|
+
options
|
89
|
+
);
|
90
|
+
yield result.value || [];
|
91
|
+
let continuationToken = result.nextLink;
|
92
|
+
while (continuationToken) {
|
93
|
+
result = await this._listNext(
|
94
|
+
resourceGroupName,
|
95
|
+
domainServiceName,
|
96
|
+
continuationToken,
|
97
|
+
options
|
98
|
+
);
|
99
|
+
continuationToken = result.nextLink;
|
100
|
+
yield result.value || [];
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
private async *listPagingAll(
|
105
|
+
resourceGroupName: string,
|
106
|
+
domainServiceName: string,
|
107
|
+
options?: OuContainerListOptionalParams
|
108
|
+
): AsyncIterableIterator<OuContainer> {
|
109
|
+
for await (const page of this.listPagingPage(
|
110
|
+
resourceGroupName,
|
111
|
+
domainServiceName,
|
112
|
+
options
|
113
|
+
)) {
|
114
|
+
yield* page;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
/**
|
119
|
+
* The List of OuContainers in DomainService instance.
|
120
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
121
|
+
* case insensitive.
|
122
|
+
* @param domainServiceName The name of the domain service.
|
123
|
+
* @param options The options parameters.
|
124
|
+
*/
|
125
|
+
private _list(
|
126
|
+
resourceGroupName: string,
|
127
|
+
domainServiceName: string,
|
128
|
+
options?: OuContainerListOptionalParams
|
129
|
+
): Promise<OuContainerListResponse> {
|
130
|
+
return this.client.sendOperationRequest(
|
131
|
+
{ resourceGroupName, domainServiceName, options },
|
132
|
+
listOperationSpec
|
133
|
+
);
|
134
|
+
}
|
135
|
+
|
136
|
+
/**
|
137
|
+
* Get OuContainer in DomainService instance.
|
138
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
139
|
+
* case insensitive.
|
140
|
+
* @param domainServiceName The name of the domain service.
|
141
|
+
* @param ouContainerName The name of the OuContainer.
|
142
|
+
* @param options The options parameters.
|
143
|
+
*/
|
144
|
+
get(
|
145
|
+
resourceGroupName: string,
|
146
|
+
domainServiceName: string,
|
147
|
+
ouContainerName: string,
|
148
|
+
options?: OuContainerGetOptionalParams
|
149
|
+
): Promise<OuContainerGetResponse> {
|
150
|
+
return this.client.sendOperationRequest(
|
151
|
+
{ resourceGroupName, domainServiceName, ouContainerName, options },
|
152
|
+
getOperationSpec
|
153
|
+
);
|
154
|
+
}
|
155
|
+
|
156
|
+
/**
|
157
|
+
* The Create OuContainer operation creates a new OuContainer under the specified Domain Service
|
158
|
+
* instance.
|
159
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
160
|
+
* case insensitive.
|
161
|
+
* @param domainServiceName The name of the domain service.
|
162
|
+
* @param ouContainerName The name of the OuContainer.
|
163
|
+
* @param containerAccount Container Account Description.
|
164
|
+
* @param options The options parameters.
|
165
|
+
*/
|
166
|
+
async beginCreate(
|
167
|
+
resourceGroupName: string,
|
168
|
+
domainServiceName: string,
|
169
|
+
ouContainerName: string,
|
170
|
+
containerAccount: ContainerAccount,
|
171
|
+
options?: OuContainerCreateOptionalParams
|
172
|
+
): Promise<
|
173
|
+
PollerLike<
|
174
|
+
PollOperationState<OuContainerCreateResponse>,
|
175
|
+
OuContainerCreateResponse
|
176
|
+
>
|
177
|
+
> {
|
178
|
+
const directSendOperation = async (
|
179
|
+
args: coreClient.OperationArguments,
|
180
|
+
spec: coreClient.OperationSpec
|
181
|
+
): Promise<OuContainerCreateResponse> => {
|
182
|
+
return this.client.sendOperationRequest(args, spec);
|
183
|
+
};
|
184
|
+
const sendOperation = async (
|
185
|
+
args: coreClient.OperationArguments,
|
186
|
+
spec: coreClient.OperationSpec
|
187
|
+
) => {
|
188
|
+
let currentRawResponse:
|
189
|
+
| coreClient.FullOperationResponse
|
190
|
+
| undefined = undefined;
|
191
|
+
const providedCallback = args.options?.onResponse;
|
192
|
+
const callback: coreClient.RawResponseCallback = (
|
193
|
+
rawResponse: coreClient.FullOperationResponse,
|
194
|
+
flatResponse: unknown
|
195
|
+
) => {
|
196
|
+
currentRawResponse = rawResponse;
|
197
|
+
providedCallback?.(rawResponse, flatResponse);
|
198
|
+
};
|
199
|
+
const updatedArgs = {
|
200
|
+
...args,
|
201
|
+
options: {
|
202
|
+
...args.options,
|
203
|
+
onResponse: callback
|
204
|
+
}
|
205
|
+
};
|
206
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
207
|
+
return {
|
208
|
+
flatResponse,
|
209
|
+
rawResponse: {
|
210
|
+
statusCode: currentRawResponse!.status,
|
211
|
+
body: currentRawResponse!.parsedBody,
|
212
|
+
headers: currentRawResponse!.headers.toJSON()
|
213
|
+
}
|
214
|
+
};
|
215
|
+
};
|
216
|
+
|
217
|
+
const lro = new LroImpl(
|
218
|
+
sendOperation,
|
219
|
+
{
|
220
|
+
resourceGroupName,
|
221
|
+
domainServiceName,
|
222
|
+
ouContainerName,
|
223
|
+
containerAccount,
|
224
|
+
options
|
225
|
+
},
|
226
|
+
createOperationSpec
|
227
|
+
);
|
228
|
+
return new LroEngine(lro, {
|
229
|
+
resumeFrom: options?.resumeFrom,
|
230
|
+
intervalInMs: options?.updateIntervalInMs
|
231
|
+
});
|
232
|
+
}
|
233
|
+
|
234
|
+
/**
|
235
|
+
* The Create OuContainer operation creates a new OuContainer under the specified Domain Service
|
236
|
+
* instance.
|
237
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
238
|
+
* case insensitive.
|
239
|
+
* @param domainServiceName The name of the domain service.
|
240
|
+
* @param ouContainerName The name of the OuContainer.
|
241
|
+
* @param containerAccount Container Account Description.
|
242
|
+
* @param options The options parameters.
|
243
|
+
*/
|
244
|
+
async beginCreateAndWait(
|
245
|
+
resourceGroupName: string,
|
246
|
+
domainServiceName: string,
|
247
|
+
ouContainerName: string,
|
248
|
+
containerAccount: ContainerAccount,
|
249
|
+
options?: OuContainerCreateOptionalParams
|
250
|
+
): Promise<OuContainerCreateResponse> {
|
251
|
+
const poller = await this.beginCreate(
|
252
|
+
resourceGroupName,
|
253
|
+
domainServiceName,
|
254
|
+
ouContainerName,
|
255
|
+
containerAccount,
|
256
|
+
options
|
257
|
+
);
|
258
|
+
return poller.pollUntilDone();
|
259
|
+
}
|
260
|
+
|
261
|
+
/**
|
262
|
+
* The Delete OuContainer operation deletes specified OuContainer.
|
263
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
264
|
+
* case insensitive.
|
265
|
+
* @param domainServiceName The name of the domain service.
|
266
|
+
* @param ouContainerName The name of the OuContainer.
|
267
|
+
* @param options The options parameters.
|
268
|
+
*/
|
269
|
+
async beginDelete(
|
270
|
+
resourceGroupName: string,
|
271
|
+
domainServiceName: string,
|
272
|
+
ouContainerName: string,
|
273
|
+
options?: OuContainerDeleteOptionalParams
|
274
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
275
|
+
const directSendOperation = async (
|
276
|
+
args: coreClient.OperationArguments,
|
277
|
+
spec: coreClient.OperationSpec
|
278
|
+
): Promise<void> => {
|
279
|
+
return this.client.sendOperationRequest(args, spec);
|
280
|
+
};
|
281
|
+
const sendOperation = async (
|
282
|
+
args: coreClient.OperationArguments,
|
283
|
+
spec: coreClient.OperationSpec
|
284
|
+
) => {
|
285
|
+
let currentRawResponse:
|
286
|
+
| coreClient.FullOperationResponse
|
287
|
+
| undefined = undefined;
|
288
|
+
const providedCallback = args.options?.onResponse;
|
289
|
+
const callback: coreClient.RawResponseCallback = (
|
290
|
+
rawResponse: coreClient.FullOperationResponse,
|
291
|
+
flatResponse: unknown
|
292
|
+
) => {
|
293
|
+
currentRawResponse = rawResponse;
|
294
|
+
providedCallback?.(rawResponse, flatResponse);
|
295
|
+
};
|
296
|
+
const updatedArgs = {
|
297
|
+
...args,
|
298
|
+
options: {
|
299
|
+
...args.options,
|
300
|
+
onResponse: callback
|
301
|
+
}
|
302
|
+
};
|
303
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
304
|
+
return {
|
305
|
+
flatResponse,
|
306
|
+
rawResponse: {
|
307
|
+
statusCode: currentRawResponse!.status,
|
308
|
+
body: currentRawResponse!.parsedBody,
|
309
|
+
headers: currentRawResponse!.headers.toJSON()
|
310
|
+
}
|
311
|
+
};
|
312
|
+
};
|
313
|
+
|
314
|
+
const lro = new LroImpl(
|
315
|
+
sendOperation,
|
316
|
+
{ resourceGroupName, domainServiceName, ouContainerName, options },
|
317
|
+
deleteOperationSpec
|
318
|
+
);
|
319
|
+
return new LroEngine(lro, {
|
320
|
+
resumeFrom: options?.resumeFrom,
|
321
|
+
intervalInMs: options?.updateIntervalInMs
|
322
|
+
});
|
323
|
+
}
|
324
|
+
|
325
|
+
/**
|
326
|
+
* The Delete OuContainer operation deletes specified OuContainer.
|
327
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
328
|
+
* case insensitive.
|
329
|
+
* @param domainServiceName The name of the domain service.
|
330
|
+
* @param ouContainerName The name of the OuContainer.
|
331
|
+
* @param options The options parameters.
|
332
|
+
*/
|
333
|
+
async beginDeleteAndWait(
|
334
|
+
resourceGroupName: string,
|
335
|
+
domainServiceName: string,
|
336
|
+
ouContainerName: string,
|
337
|
+
options?: OuContainerDeleteOptionalParams
|
338
|
+
): Promise<void> {
|
339
|
+
const poller = await this.beginDelete(
|
340
|
+
resourceGroupName,
|
341
|
+
domainServiceName,
|
342
|
+
ouContainerName,
|
343
|
+
options
|
344
|
+
);
|
345
|
+
return poller.pollUntilDone();
|
346
|
+
}
|
347
|
+
|
348
|
+
/**
|
349
|
+
* The Update OuContainer operation can be used to update the existing OuContainers.
|
350
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
351
|
+
* case insensitive.
|
352
|
+
* @param domainServiceName The name of the domain service.
|
353
|
+
* @param ouContainerName The name of the OuContainer.
|
354
|
+
* @param containerAccount Container Account Description.
|
355
|
+
* @param options The options parameters.
|
356
|
+
*/
|
357
|
+
async beginUpdate(
|
358
|
+
resourceGroupName: string,
|
359
|
+
domainServiceName: string,
|
360
|
+
ouContainerName: string,
|
361
|
+
containerAccount: ContainerAccount,
|
362
|
+
options?: OuContainerUpdateOptionalParams
|
363
|
+
): Promise<
|
364
|
+
PollerLike<
|
365
|
+
PollOperationState<OuContainerUpdateResponse>,
|
366
|
+
OuContainerUpdateResponse
|
367
|
+
>
|
368
|
+
> {
|
369
|
+
const directSendOperation = async (
|
370
|
+
args: coreClient.OperationArguments,
|
371
|
+
spec: coreClient.OperationSpec
|
372
|
+
): Promise<OuContainerUpdateResponse> => {
|
373
|
+
return this.client.sendOperationRequest(args, spec);
|
374
|
+
};
|
375
|
+
const sendOperation = async (
|
376
|
+
args: coreClient.OperationArguments,
|
377
|
+
spec: coreClient.OperationSpec
|
378
|
+
) => {
|
379
|
+
let currentRawResponse:
|
380
|
+
| coreClient.FullOperationResponse
|
381
|
+
| undefined = undefined;
|
382
|
+
const providedCallback = args.options?.onResponse;
|
383
|
+
const callback: coreClient.RawResponseCallback = (
|
384
|
+
rawResponse: coreClient.FullOperationResponse,
|
385
|
+
flatResponse: unknown
|
386
|
+
) => {
|
387
|
+
currentRawResponse = rawResponse;
|
388
|
+
providedCallback?.(rawResponse, flatResponse);
|
389
|
+
};
|
390
|
+
const updatedArgs = {
|
391
|
+
...args,
|
392
|
+
options: {
|
393
|
+
...args.options,
|
394
|
+
onResponse: callback
|
395
|
+
}
|
396
|
+
};
|
397
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
398
|
+
return {
|
399
|
+
flatResponse,
|
400
|
+
rawResponse: {
|
401
|
+
statusCode: currentRawResponse!.status,
|
402
|
+
body: currentRawResponse!.parsedBody,
|
403
|
+
headers: currentRawResponse!.headers.toJSON()
|
404
|
+
}
|
405
|
+
};
|
406
|
+
};
|
407
|
+
|
408
|
+
const lro = new LroImpl(
|
409
|
+
sendOperation,
|
410
|
+
{
|
411
|
+
resourceGroupName,
|
412
|
+
domainServiceName,
|
413
|
+
ouContainerName,
|
414
|
+
containerAccount,
|
415
|
+
options
|
416
|
+
},
|
417
|
+
updateOperationSpec
|
418
|
+
);
|
419
|
+
return new LroEngine(lro, {
|
420
|
+
resumeFrom: options?.resumeFrom,
|
421
|
+
intervalInMs: options?.updateIntervalInMs
|
422
|
+
});
|
423
|
+
}
|
424
|
+
|
425
|
+
/**
|
426
|
+
* The Update OuContainer operation can be used to update the existing OuContainers.
|
427
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
428
|
+
* case insensitive.
|
429
|
+
* @param domainServiceName The name of the domain service.
|
430
|
+
* @param ouContainerName The name of the OuContainer.
|
431
|
+
* @param containerAccount Container Account Description.
|
432
|
+
* @param options The options parameters.
|
433
|
+
*/
|
434
|
+
async beginUpdateAndWait(
|
435
|
+
resourceGroupName: string,
|
436
|
+
domainServiceName: string,
|
437
|
+
ouContainerName: string,
|
438
|
+
containerAccount: ContainerAccount,
|
439
|
+
options?: OuContainerUpdateOptionalParams
|
440
|
+
): Promise<OuContainerUpdateResponse> {
|
441
|
+
const poller = await this.beginUpdate(
|
442
|
+
resourceGroupName,
|
443
|
+
domainServiceName,
|
444
|
+
ouContainerName,
|
445
|
+
containerAccount,
|
446
|
+
options
|
447
|
+
);
|
448
|
+
return poller.pollUntilDone();
|
449
|
+
}
|
450
|
+
|
451
|
+
/**
|
452
|
+
* ListNext
|
453
|
+
* @param resourceGroupName The name of the resource group within the user's subscription. The name is
|
454
|
+
* case insensitive.
|
455
|
+
* @param domainServiceName The name of the domain service.
|
456
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
457
|
+
* @param options The options parameters.
|
458
|
+
*/
|
459
|
+
private _listNext(
|
460
|
+
resourceGroupName: string,
|
461
|
+
domainServiceName: string,
|
462
|
+
nextLink: string,
|
463
|
+
options?: OuContainerListNextOptionalParams
|
464
|
+
): Promise<OuContainerListNextResponse> {
|
465
|
+
return this.client.sendOperationRequest(
|
466
|
+
{ resourceGroupName, domainServiceName, nextLink, options },
|
467
|
+
listNextOperationSpec
|
468
|
+
);
|
469
|
+
}
|
470
|
+
}
|
471
|
+
// Operation Specifications
|
472
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
473
|
+
|
474
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
475
|
+
path:
|
476
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer",
|
477
|
+
httpMethod: "GET",
|
478
|
+
responses: {
|
479
|
+
200: {
|
480
|
+
bodyMapper: Mappers.OuContainerListResult
|
481
|
+
},
|
482
|
+
default: {
|
483
|
+
bodyMapper: Mappers.CloudError
|
484
|
+
}
|
485
|
+
},
|
486
|
+
queryParameters: [Parameters.apiVersion],
|
487
|
+
urlParameters: [
|
488
|
+
Parameters.$host,
|
489
|
+
Parameters.subscriptionId,
|
490
|
+
Parameters.resourceGroupName,
|
491
|
+
Parameters.domainServiceName
|
492
|
+
],
|
493
|
+
headerParameters: [Parameters.accept],
|
494
|
+
serializer
|
495
|
+
};
|
496
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
497
|
+
path:
|
498
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
|
499
|
+
httpMethod: "GET",
|
500
|
+
responses: {
|
501
|
+
200: {
|
502
|
+
bodyMapper: Mappers.OuContainer
|
503
|
+
},
|
504
|
+
default: {
|
505
|
+
bodyMapper: Mappers.CloudError
|
506
|
+
}
|
507
|
+
},
|
508
|
+
queryParameters: [Parameters.apiVersion],
|
509
|
+
urlParameters: [
|
510
|
+
Parameters.$host,
|
511
|
+
Parameters.subscriptionId,
|
512
|
+
Parameters.resourceGroupName,
|
513
|
+
Parameters.domainServiceName,
|
514
|
+
Parameters.ouContainerName
|
515
|
+
],
|
516
|
+
headerParameters: [Parameters.accept],
|
517
|
+
serializer
|
518
|
+
};
|
519
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
520
|
+
path:
|
521
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
|
522
|
+
httpMethod: "PUT",
|
523
|
+
responses: {
|
524
|
+
200: {
|
525
|
+
bodyMapper: Mappers.OuContainer
|
526
|
+
},
|
527
|
+
201: {
|
528
|
+
bodyMapper: Mappers.OuContainer
|
529
|
+
},
|
530
|
+
202: {
|
531
|
+
bodyMapper: Mappers.OuContainer
|
532
|
+
},
|
533
|
+
204: {
|
534
|
+
bodyMapper: Mappers.OuContainer
|
535
|
+
},
|
536
|
+
default: {
|
537
|
+
bodyMapper: Mappers.CloudError
|
538
|
+
}
|
539
|
+
},
|
540
|
+
requestBody: Parameters.containerAccount,
|
541
|
+
queryParameters: [Parameters.apiVersion],
|
542
|
+
urlParameters: [
|
543
|
+
Parameters.$host,
|
544
|
+
Parameters.subscriptionId,
|
545
|
+
Parameters.resourceGroupName,
|
546
|
+
Parameters.domainServiceName,
|
547
|
+
Parameters.ouContainerName
|
548
|
+
],
|
549
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
550
|
+
mediaType: "json",
|
551
|
+
serializer
|
552
|
+
};
|
553
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
554
|
+
path:
|
555
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
|
556
|
+
httpMethod: "DELETE",
|
557
|
+
responses: {
|
558
|
+
200: {},
|
559
|
+
201: {},
|
560
|
+
202: {},
|
561
|
+
204: {},
|
562
|
+
default: {
|
563
|
+
bodyMapper: Mappers.CloudError
|
564
|
+
}
|
565
|
+
},
|
566
|
+
queryParameters: [Parameters.apiVersion],
|
567
|
+
urlParameters: [
|
568
|
+
Parameters.$host,
|
569
|
+
Parameters.subscriptionId,
|
570
|
+
Parameters.resourceGroupName,
|
571
|
+
Parameters.domainServiceName,
|
572
|
+
Parameters.ouContainerName
|
573
|
+
],
|
574
|
+
headerParameters: [Parameters.accept],
|
575
|
+
serializer
|
576
|
+
};
|
577
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
578
|
+
path:
|
579
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Aad/domainServices/{domainServiceName}/ouContainer/{ouContainerName}",
|
580
|
+
httpMethod: "PATCH",
|
581
|
+
responses: {
|
582
|
+
200: {
|
583
|
+
bodyMapper: Mappers.OuContainer
|
584
|
+
},
|
585
|
+
201: {
|
586
|
+
bodyMapper: Mappers.OuContainer
|
587
|
+
},
|
588
|
+
202: {
|
589
|
+
bodyMapper: Mappers.OuContainer
|
590
|
+
},
|
591
|
+
204: {
|
592
|
+
bodyMapper: Mappers.OuContainer
|
593
|
+
},
|
594
|
+
default: {
|
595
|
+
bodyMapper: Mappers.CloudError
|
596
|
+
}
|
597
|
+
},
|
598
|
+
requestBody: Parameters.containerAccount,
|
599
|
+
queryParameters: [Parameters.apiVersion],
|
600
|
+
urlParameters: [
|
601
|
+
Parameters.$host,
|
602
|
+
Parameters.subscriptionId,
|
603
|
+
Parameters.resourceGroupName,
|
604
|
+
Parameters.domainServiceName,
|
605
|
+
Parameters.ouContainerName
|
606
|
+
],
|
607
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
608
|
+
mediaType: "json",
|
609
|
+
serializer
|
610
|
+
};
|
611
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
612
|
+
path: "{nextLink}",
|
613
|
+
httpMethod: "GET",
|
614
|
+
responses: {
|
615
|
+
200: {
|
616
|
+
bodyMapper: Mappers.OuContainerListResult
|
617
|
+
},
|
618
|
+
default: {
|
619
|
+
bodyMapper: Mappers.CloudError
|
620
|
+
}
|
621
|
+
},
|
622
|
+
queryParameters: [Parameters.apiVersion],
|
623
|
+
urlParameters: [
|
624
|
+
Parameters.$host,
|
625
|
+
Parameters.nextLink,
|
626
|
+
Parameters.subscriptionId,
|
627
|
+
Parameters.resourceGroupName,
|
628
|
+
Parameters.domainServiceName
|
629
|
+
],
|
630
|
+
headerParameters: [Parameters.accept],
|
631
|
+
serializer
|
632
|
+
};
|