@azure/arm-imagebuilder 1.0.0
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 +5 -0
- package/LICENSE +21 -0
- package/README.md +98 -0
- package/dist/index.js +2270 -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/imageBuilderClient.d.ts +20 -0
- package/dist-esm/src/imageBuilderClient.d.ts.map +1 -0
- package/dist-esm/src/imageBuilderClient.js +53 -0
- package/dist-esm/src/imageBuilderClient.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 +562 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +37 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +53 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1092 -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 +118 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +10 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/virtualMachineImageTemplates.d.ts +167 -0
- package/dist-esm/src/operations/virtualMachineImageTemplates.d.ts.map +1 -0
- package/dist-esm/src/operations/virtualMachineImageTemplates.js +791 -0
- package/dist-esm/src/operations/virtualMachineImageTemplates.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +10 -0
- package/dist-esm/src/operationsInterfaces/index.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/src/operationsInterfaces/virtualMachineImageTemplates.d.ts +114 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.js +9 -0
- package/dist-esm/src/operationsInterfaces/virtualMachineImageTemplates.js.map +1 -0
- package/dist-esm/test/imagebuilder_examples.d.ts +4 -0
- package/dist-esm/test/imagebuilder_examples.d.ts.map +1 -0
- package/dist-esm/test/imagebuilder_examples.js +201 -0
- package/dist-esm/test/imagebuilder_examples.js.map +1 -0
- package/package.json +95 -0
- package/review/arm-imagebuilder.api.md +509 -0
- package/rollup.config.js +188 -0
- package/src/imageBuilderClient.ts +83 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +668 -0
- package/src/models/mappers.ts +1214 -0
- package/src/models/parameters.ts +137 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/operations.ts +137 -0
- package/src/operations/virtualMachineImageTemplates.ts +1085 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/virtualMachineImageTemplates.ts +213 -0
- package/tsconfig.json +19 -0
- package/types/arm-imagebuilder.d.ts +779 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,1085 @@
|
|
|
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 { VirtualMachineImageTemplates } 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 { ImageBuilderClient } from "../imageBuilderClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
ImageTemplate,
|
|
19
|
+
VirtualMachineImageTemplatesListNextOptionalParams,
|
|
20
|
+
VirtualMachineImageTemplatesListOptionalParams,
|
|
21
|
+
VirtualMachineImageTemplatesListByResourceGroupNextOptionalParams,
|
|
22
|
+
VirtualMachineImageTemplatesListByResourceGroupOptionalParams,
|
|
23
|
+
RunOutput,
|
|
24
|
+
VirtualMachineImageTemplatesListRunOutputsNextOptionalParams,
|
|
25
|
+
VirtualMachineImageTemplatesListRunOutputsOptionalParams,
|
|
26
|
+
VirtualMachineImageTemplatesListResponse,
|
|
27
|
+
VirtualMachineImageTemplatesListByResourceGroupResponse,
|
|
28
|
+
VirtualMachineImageTemplatesCreateOrUpdateOptionalParams,
|
|
29
|
+
VirtualMachineImageTemplatesCreateOrUpdateResponse,
|
|
30
|
+
ImageTemplateUpdateParameters,
|
|
31
|
+
VirtualMachineImageTemplatesUpdateOptionalParams,
|
|
32
|
+
VirtualMachineImageTemplatesUpdateResponse,
|
|
33
|
+
VirtualMachineImageTemplatesGetOptionalParams,
|
|
34
|
+
VirtualMachineImageTemplatesGetResponse,
|
|
35
|
+
VirtualMachineImageTemplatesDeleteOptionalParams,
|
|
36
|
+
VirtualMachineImageTemplatesRunOptionalParams,
|
|
37
|
+
VirtualMachineImageTemplatesCancelOptionalParams,
|
|
38
|
+
VirtualMachineImageTemplatesListRunOutputsResponse,
|
|
39
|
+
VirtualMachineImageTemplatesGetRunOutputOptionalParams,
|
|
40
|
+
VirtualMachineImageTemplatesGetRunOutputResponse,
|
|
41
|
+
VirtualMachineImageTemplatesListNextResponse,
|
|
42
|
+
VirtualMachineImageTemplatesListByResourceGroupNextResponse,
|
|
43
|
+
VirtualMachineImageTemplatesListRunOutputsNextResponse
|
|
44
|
+
} from "../models";
|
|
45
|
+
|
|
46
|
+
/// <reference lib="esnext.asynciterable" />
|
|
47
|
+
/** Class containing VirtualMachineImageTemplates operations. */
|
|
48
|
+
export class VirtualMachineImageTemplatesImpl
|
|
49
|
+
implements VirtualMachineImageTemplates {
|
|
50
|
+
private readonly client: ImageBuilderClient;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initialize a new instance of the class VirtualMachineImageTemplates class.
|
|
54
|
+
* @param client Reference to the service client
|
|
55
|
+
*/
|
|
56
|
+
constructor(client: ImageBuilderClient) {
|
|
57
|
+
this.client = client;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Gets information about the VM image templates associated with the subscription.
|
|
62
|
+
* @param options The options parameters.
|
|
63
|
+
*/
|
|
64
|
+
public list(
|
|
65
|
+
options?: VirtualMachineImageTemplatesListOptionalParams
|
|
66
|
+
): PagedAsyncIterableIterator<ImageTemplate> {
|
|
67
|
+
const iter = this.listPagingAll(options);
|
|
68
|
+
return {
|
|
69
|
+
next() {
|
|
70
|
+
return iter.next();
|
|
71
|
+
},
|
|
72
|
+
[Symbol.asyncIterator]() {
|
|
73
|
+
return this;
|
|
74
|
+
},
|
|
75
|
+
byPage: () => {
|
|
76
|
+
return this.listPagingPage(options);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private async *listPagingPage(
|
|
82
|
+
options?: VirtualMachineImageTemplatesListOptionalParams
|
|
83
|
+
): AsyncIterableIterator<ImageTemplate[]> {
|
|
84
|
+
let result = await this._list(options);
|
|
85
|
+
yield result.value || [];
|
|
86
|
+
let continuationToken = result.nextLink;
|
|
87
|
+
while (continuationToken) {
|
|
88
|
+
result = await this._listNext(continuationToken, options);
|
|
89
|
+
continuationToken = result.nextLink;
|
|
90
|
+
yield result.value || [];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private async *listPagingAll(
|
|
95
|
+
options?: VirtualMachineImageTemplatesListOptionalParams
|
|
96
|
+
): AsyncIterableIterator<ImageTemplate> {
|
|
97
|
+
for await (const page of this.listPagingPage(options)) {
|
|
98
|
+
yield* page;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Gets information about the VM image templates associated with the specified resource group.
|
|
104
|
+
* @param resourceGroupName The name of the resource group.
|
|
105
|
+
* @param options The options parameters.
|
|
106
|
+
*/
|
|
107
|
+
public listByResourceGroup(
|
|
108
|
+
resourceGroupName: string,
|
|
109
|
+
options?: VirtualMachineImageTemplatesListByResourceGroupOptionalParams
|
|
110
|
+
): PagedAsyncIterableIterator<ImageTemplate> {
|
|
111
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
112
|
+
return {
|
|
113
|
+
next() {
|
|
114
|
+
return iter.next();
|
|
115
|
+
},
|
|
116
|
+
[Symbol.asyncIterator]() {
|
|
117
|
+
return this;
|
|
118
|
+
},
|
|
119
|
+
byPage: () => {
|
|
120
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private async *listByResourceGroupPagingPage(
|
|
126
|
+
resourceGroupName: string,
|
|
127
|
+
options?: VirtualMachineImageTemplatesListByResourceGroupOptionalParams
|
|
128
|
+
): AsyncIterableIterator<ImageTemplate[]> {
|
|
129
|
+
let result = await this._listByResourceGroup(resourceGroupName, options);
|
|
130
|
+
yield result.value || [];
|
|
131
|
+
let continuationToken = result.nextLink;
|
|
132
|
+
while (continuationToken) {
|
|
133
|
+
result = await this._listByResourceGroupNext(
|
|
134
|
+
resourceGroupName,
|
|
135
|
+
continuationToken,
|
|
136
|
+
options
|
|
137
|
+
);
|
|
138
|
+
continuationToken = result.nextLink;
|
|
139
|
+
yield result.value || [];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
private async *listByResourceGroupPagingAll(
|
|
144
|
+
resourceGroupName: string,
|
|
145
|
+
options?: VirtualMachineImageTemplatesListByResourceGroupOptionalParams
|
|
146
|
+
): AsyncIterableIterator<ImageTemplate> {
|
|
147
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
148
|
+
resourceGroupName,
|
|
149
|
+
options
|
|
150
|
+
)) {
|
|
151
|
+
yield* page;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* List all run outputs for the specified Image Template resource
|
|
157
|
+
* @param resourceGroupName The name of the resource group.
|
|
158
|
+
* @param imageTemplateName The name of the image Template
|
|
159
|
+
* @param options The options parameters.
|
|
160
|
+
*/
|
|
161
|
+
public listRunOutputs(
|
|
162
|
+
resourceGroupName: string,
|
|
163
|
+
imageTemplateName: string,
|
|
164
|
+
options?: VirtualMachineImageTemplatesListRunOutputsOptionalParams
|
|
165
|
+
): PagedAsyncIterableIterator<RunOutput> {
|
|
166
|
+
const iter = this.listRunOutputsPagingAll(
|
|
167
|
+
resourceGroupName,
|
|
168
|
+
imageTemplateName,
|
|
169
|
+
options
|
|
170
|
+
);
|
|
171
|
+
return {
|
|
172
|
+
next() {
|
|
173
|
+
return iter.next();
|
|
174
|
+
},
|
|
175
|
+
[Symbol.asyncIterator]() {
|
|
176
|
+
return this;
|
|
177
|
+
},
|
|
178
|
+
byPage: () => {
|
|
179
|
+
return this.listRunOutputsPagingPage(
|
|
180
|
+
resourceGroupName,
|
|
181
|
+
imageTemplateName,
|
|
182
|
+
options
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
private async *listRunOutputsPagingPage(
|
|
189
|
+
resourceGroupName: string,
|
|
190
|
+
imageTemplateName: string,
|
|
191
|
+
options?: VirtualMachineImageTemplatesListRunOutputsOptionalParams
|
|
192
|
+
): AsyncIterableIterator<RunOutput[]> {
|
|
193
|
+
let result = await this._listRunOutputs(
|
|
194
|
+
resourceGroupName,
|
|
195
|
+
imageTemplateName,
|
|
196
|
+
options
|
|
197
|
+
);
|
|
198
|
+
yield result.value || [];
|
|
199
|
+
let continuationToken = result.nextLink;
|
|
200
|
+
while (continuationToken) {
|
|
201
|
+
result = await this._listRunOutputsNext(
|
|
202
|
+
resourceGroupName,
|
|
203
|
+
imageTemplateName,
|
|
204
|
+
continuationToken,
|
|
205
|
+
options
|
|
206
|
+
);
|
|
207
|
+
continuationToken = result.nextLink;
|
|
208
|
+
yield result.value || [];
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
private async *listRunOutputsPagingAll(
|
|
213
|
+
resourceGroupName: string,
|
|
214
|
+
imageTemplateName: string,
|
|
215
|
+
options?: VirtualMachineImageTemplatesListRunOutputsOptionalParams
|
|
216
|
+
): AsyncIterableIterator<RunOutput> {
|
|
217
|
+
for await (const page of this.listRunOutputsPagingPage(
|
|
218
|
+
resourceGroupName,
|
|
219
|
+
imageTemplateName,
|
|
220
|
+
options
|
|
221
|
+
)) {
|
|
222
|
+
yield* page;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Gets information about the VM image templates associated with the subscription.
|
|
228
|
+
* @param options The options parameters.
|
|
229
|
+
*/
|
|
230
|
+
private _list(
|
|
231
|
+
options?: VirtualMachineImageTemplatesListOptionalParams
|
|
232
|
+
): Promise<VirtualMachineImageTemplatesListResponse> {
|
|
233
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Gets information about the VM image templates associated with the specified resource group.
|
|
238
|
+
* @param resourceGroupName The name of the resource group.
|
|
239
|
+
* @param options The options parameters.
|
|
240
|
+
*/
|
|
241
|
+
private _listByResourceGroup(
|
|
242
|
+
resourceGroupName: string,
|
|
243
|
+
options?: VirtualMachineImageTemplatesListByResourceGroupOptionalParams
|
|
244
|
+
): Promise<VirtualMachineImageTemplatesListByResourceGroupResponse> {
|
|
245
|
+
return this.client.sendOperationRequest(
|
|
246
|
+
{ resourceGroupName, options },
|
|
247
|
+
listByResourceGroupOperationSpec
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Create or update a virtual machine image template
|
|
253
|
+
* @param resourceGroupName The name of the resource group.
|
|
254
|
+
* @param imageTemplateName The name of the image Template
|
|
255
|
+
* @param parameters Parameters supplied to the CreateImageTemplate operation
|
|
256
|
+
* @param options The options parameters.
|
|
257
|
+
*/
|
|
258
|
+
async beginCreateOrUpdate(
|
|
259
|
+
resourceGroupName: string,
|
|
260
|
+
imageTemplateName: string,
|
|
261
|
+
parameters: ImageTemplate,
|
|
262
|
+
options?: VirtualMachineImageTemplatesCreateOrUpdateOptionalParams
|
|
263
|
+
): Promise<
|
|
264
|
+
PollerLike<
|
|
265
|
+
PollOperationState<VirtualMachineImageTemplatesCreateOrUpdateResponse>,
|
|
266
|
+
VirtualMachineImageTemplatesCreateOrUpdateResponse
|
|
267
|
+
>
|
|
268
|
+
> {
|
|
269
|
+
const directSendOperation = async (
|
|
270
|
+
args: coreClient.OperationArguments,
|
|
271
|
+
spec: coreClient.OperationSpec
|
|
272
|
+
): Promise<VirtualMachineImageTemplatesCreateOrUpdateResponse> => {
|
|
273
|
+
return this.client.sendOperationRequest(args, spec);
|
|
274
|
+
};
|
|
275
|
+
const sendOperation = async (
|
|
276
|
+
args: coreClient.OperationArguments,
|
|
277
|
+
spec: coreClient.OperationSpec
|
|
278
|
+
) => {
|
|
279
|
+
let currentRawResponse:
|
|
280
|
+
| coreClient.FullOperationResponse
|
|
281
|
+
| undefined = undefined;
|
|
282
|
+
const providedCallback = args.options?.onResponse;
|
|
283
|
+
const callback: coreClient.RawResponseCallback = (
|
|
284
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
285
|
+
flatResponse: unknown
|
|
286
|
+
) => {
|
|
287
|
+
currentRawResponse = rawResponse;
|
|
288
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
289
|
+
};
|
|
290
|
+
const updatedArgs = {
|
|
291
|
+
...args,
|
|
292
|
+
options: {
|
|
293
|
+
...args.options,
|
|
294
|
+
onResponse: callback
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
298
|
+
return {
|
|
299
|
+
flatResponse,
|
|
300
|
+
rawResponse: {
|
|
301
|
+
statusCode: currentRawResponse!.status,
|
|
302
|
+
body: currentRawResponse!.parsedBody,
|
|
303
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
const lro = new LroImpl(
|
|
309
|
+
sendOperation,
|
|
310
|
+
{ resourceGroupName, imageTemplateName, parameters, options },
|
|
311
|
+
createOrUpdateOperationSpec
|
|
312
|
+
);
|
|
313
|
+
return new LroEngine(lro, {
|
|
314
|
+
resumeFrom: options?.resumeFrom,
|
|
315
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
316
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Create or update a virtual machine image template
|
|
322
|
+
* @param resourceGroupName The name of the resource group.
|
|
323
|
+
* @param imageTemplateName The name of the image Template
|
|
324
|
+
* @param parameters Parameters supplied to the CreateImageTemplate operation
|
|
325
|
+
* @param options The options parameters.
|
|
326
|
+
*/
|
|
327
|
+
async beginCreateOrUpdateAndWait(
|
|
328
|
+
resourceGroupName: string,
|
|
329
|
+
imageTemplateName: string,
|
|
330
|
+
parameters: ImageTemplate,
|
|
331
|
+
options?: VirtualMachineImageTemplatesCreateOrUpdateOptionalParams
|
|
332
|
+
): Promise<VirtualMachineImageTemplatesCreateOrUpdateResponse> {
|
|
333
|
+
const poller = await this.beginCreateOrUpdate(
|
|
334
|
+
resourceGroupName,
|
|
335
|
+
imageTemplateName,
|
|
336
|
+
parameters,
|
|
337
|
+
options
|
|
338
|
+
);
|
|
339
|
+
return poller.pollUntilDone();
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Update the tags for this Virtual Machine Image Template
|
|
344
|
+
* @param resourceGroupName The name of the resource group.
|
|
345
|
+
* @param imageTemplateName The name of the image Template
|
|
346
|
+
* @param parameters Additional parameters for Image Template update.
|
|
347
|
+
* @param options The options parameters.
|
|
348
|
+
*/
|
|
349
|
+
async beginUpdate(
|
|
350
|
+
resourceGroupName: string,
|
|
351
|
+
imageTemplateName: string,
|
|
352
|
+
parameters: ImageTemplateUpdateParameters,
|
|
353
|
+
options?: VirtualMachineImageTemplatesUpdateOptionalParams
|
|
354
|
+
): Promise<
|
|
355
|
+
PollerLike<
|
|
356
|
+
PollOperationState<VirtualMachineImageTemplatesUpdateResponse>,
|
|
357
|
+
VirtualMachineImageTemplatesUpdateResponse
|
|
358
|
+
>
|
|
359
|
+
> {
|
|
360
|
+
const directSendOperation = async (
|
|
361
|
+
args: coreClient.OperationArguments,
|
|
362
|
+
spec: coreClient.OperationSpec
|
|
363
|
+
): Promise<VirtualMachineImageTemplatesUpdateResponse> => {
|
|
364
|
+
return this.client.sendOperationRequest(args, spec);
|
|
365
|
+
};
|
|
366
|
+
const sendOperation = async (
|
|
367
|
+
args: coreClient.OperationArguments,
|
|
368
|
+
spec: coreClient.OperationSpec
|
|
369
|
+
) => {
|
|
370
|
+
let currentRawResponse:
|
|
371
|
+
| coreClient.FullOperationResponse
|
|
372
|
+
| undefined = undefined;
|
|
373
|
+
const providedCallback = args.options?.onResponse;
|
|
374
|
+
const callback: coreClient.RawResponseCallback = (
|
|
375
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
376
|
+
flatResponse: unknown
|
|
377
|
+
) => {
|
|
378
|
+
currentRawResponse = rawResponse;
|
|
379
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
380
|
+
};
|
|
381
|
+
const updatedArgs = {
|
|
382
|
+
...args,
|
|
383
|
+
options: {
|
|
384
|
+
...args.options,
|
|
385
|
+
onResponse: callback
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
389
|
+
return {
|
|
390
|
+
flatResponse,
|
|
391
|
+
rawResponse: {
|
|
392
|
+
statusCode: currentRawResponse!.status,
|
|
393
|
+
body: currentRawResponse!.parsedBody,
|
|
394
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
const lro = new LroImpl(
|
|
400
|
+
sendOperation,
|
|
401
|
+
{ resourceGroupName, imageTemplateName, parameters, options },
|
|
402
|
+
updateOperationSpec
|
|
403
|
+
);
|
|
404
|
+
return new LroEngine(lro, {
|
|
405
|
+
resumeFrom: options?.resumeFrom,
|
|
406
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
407
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Update the tags for this Virtual Machine Image Template
|
|
413
|
+
* @param resourceGroupName The name of the resource group.
|
|
414
|
+
* @param imageTemplateName The name of the image Template
|
|
415
|
+
* @param parameters Additional parameters for Image Template update.
|
|
416
|
+
* @param options The options parameters.
|
|
417
|
+
*/
|
|
418
|
+
async beginUpdateAndWait(
|
|
419
|
+
resourceGroupName: string,
|
|
420
|
+
imageTemplateName: string,
|
|
421
|
+
parameters: ImageTemplateUpdateParameters,
|
|
422
|
+
options?: VirtualMachineImageTemplatesUpdateOptionalParams
|
|
423
|
+
): Promise<VirtualMachineImageTemplatesUpdateResponse> {
|
|
424
|
+
const poller = await this.beginUpdate(
|
|
425
|
+
resourceGroupName,
|
|
426
|
+
imageTemplateName,
|
|
427
|
+
parameters,
|
|
428
|
+
options
|
|
429
|
+
);
|
|
430
|
+
return poller.pollUntilDone();
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Get information about a virtual machine image template
|
|
435
|
+
* @param resourceGroupName The name of the resource group.
|
|
436
|
+
* @param imageTemplateName The name of the image Template
|
|
437
|
+
* @param options The options parameters.
|
|
438
|
+
*/
|
|
439
|
+
get(
|
|
440
|
+
resourceGroupName: string,
|
|
441
|
+
imageTemplateName: string,
|
|
442
|
+
options?: VirtualMachineImageTemplatesGetOptionalParams
|
|
443
|
+
): Promise<VirtualMachineImageTemplatesGetResponse> {
|
|
444
|
+
return this.client.sendOperationRequest(
|
|
445
|
+
{ resourceGroupName, imageTemplateName, options },
|
|
446
|
+
getOperationSpec
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Delete a virtual machine image template
|
|
452
|
+
* @param resourceGroupName The name of the resource group.
|
|
453
|
+
* @param imageTemplateName The name of the image Template
|
|
454
|
+
* @param options The options parameters.
|
|
455
|
+
*/
|
|
456
|
+
async beginDelete(
|
|
457
|
+
resourceGroupName: string,
|
|
458
|
+
imageTemplateName: string,
|
|
459
|
+
options?: VirtualMachineImageTemplatesDeleteOptionalParams
|
|
460
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
461
|
+
const directSendOperation = async (
|
|
462
|
+
args: coreClient.OperationArguments,
|
|
463
|
+
spec: coreClient.OperationSpec
|
|
464
|
+
): Promise<void> => {
|
|
465
|
+
return this.client.sendOperationRequest(args, spec);
|
|
466
|
+
};
|
|
467
|
+
const sendOperation = async (
|
|
468
|
+
args: coreClient.OperationArguments,
|
|
469
|
+
spec: coreClient.OperationSpec
|
|
470
|
+
) => {
|
|
471
|
+
let currentRawResponse:
|
|
472
|
+
| coreClient.FullOperationResponse
|
|
473
|
+
| undefined = undefined;
|
|
474
|
+
const providedCallback = args.options?.onResponse;
|
|
475
|
+
const callback: coreClient.RawResponseCallback = (
|
|
476
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
477
|
+
flatResponse: unknown
|
|
478
|
+
) => {
|
|
479
|
+
currentRawResponse = rawResponse;
|
|
480
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
481
|
+
};
|
|
482
|
+
const updatedArgs = {
|
|
483
|
+
...args,
|
|
484
|
+
options: {
|
|
485
|
+
...args.options,
|
|
486
|
+
onResponse: callback
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
490
|
+
return {
|
|
491
|
+
flatResponse,
|
|
492
|
+
rawResponse: {
|
|
493
|
+
statusCode: currentRawResponse!.status,
|
|
494
|
+
body: currentRawResponse!.parsedBody,
|
|
495
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
const lro = new LroImpl(
|
|
501
|
+
sendOperation,
|
|
502
|
+
{ resourceGroupName, imageTemplateName, options },
|
|
503
|
+
deleteOperationSpec
|
|
504
|
+
);
|
|
505
|
+
return new LroEngine(lro, {
|
|
506
|
+
resumeFrom: options?.resumeFrom,
|
|
507
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
508
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Delete a virtual machine image template
|
|
514
|
+
* @param resourceGroupName The name of the resource group.
|
|
515
|
+
* @param imageTemplateName The name of the image Template
|
|
516
|
+
* @param options The options parameters.
|
|
517
|
+
*/
|
|
518
|
+
async beginDeleteAndWait(
|
|
519
|
+
resourceGroupName: string,
|
|
520
|
+
imageTemplateName: string,
|
|
521
|
+
options?: VirtualMachineImageTemplatesDeleteOptionalParams
|
|
522
|
+
): Promise<void> {
|
|
523
|
+
const poller = await this.beginDelete(
|
|
524
|
+
resourceGroupName,
|
|
525
|
+
imageTemplateName,
|
|
526
|
+
options
|
|
527
|
+
);
|
|
528
|
+
return poller.pollUntilDone();
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Create artifacts from a existing image template
|
|
533
|
+
* @param resourceGroupName The name of the resource group.
|
|
534
|
+
* @param imageTemplateName The name of the image Template
|
|
535
|
+
* @param options The options parameters.
|
|
536
|
+
*/
|
|
537
|
+
async beginRun(
|
|
538
|
+
resourceGroupName: string,
|
|
539
|
+
imageTemplateName: string,
|
|
540
|
+
options?: VirtualMachineImageTemplatesRunOptionalParams
|
|
541
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
542
|
+
const directSendOperation = async (
|
|
543
|
+
args: coreClient.OperationArguments,
|
|
544
|
+
spec: coreClient.OperationSpec
|
|
545
|
+
): Promise<void> => {
|
|
546
|
+
return this.client.sendOperationRequest(args, spec);
|
|
547
|
+
};
|
|
548
|
+
const sendOperation = async (
|
|
549
|
+
args: coreClient.OperationArguments,
|
|
550
|
+
spec: coreClient.OperationSpec
|
|
551
|
+
) => {
|
|
552
|
+
let currentRawResponse:
|
|
553
|
+
| coreClient.FullOperationResponse
|
|
554
|
+
| undefined = undefined;
|
|
555
|
+
const providedCallback = args.options?.onResponse;
|
|
556
|
+
const callback: coreClient.RawResponseCallback = (
|
|
557
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
558
|
+
flatResponse: unknown
|
|
559
|
+
) => {
|
|
560
|
+
currentRawResponse = rawResponse;
|
|
561
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
562
|
+
};
|
|
563
|
+
const updatedArgs = {
|
|
564
|
+
...args,
|
|
565
|
+
options: {
|
|
566
|
+
...args.options,
|
|
567
|
+
onResponse: callback
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
571
|
+
return {
|
|
572
|
+
flatResponse,
|
|
573
|
+
rawResponse: {
|
|
574
|
+
statusCode: currentRawResponse!.status,
|
|
575
|
+
body: currentRawResponse!.parsedBody,
|
|
576
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
const lro = new LroImpl(
|
|
582
|
+
sendOperation,
|
|
583
|
+
{ resourceGroupName, imageTemplateName, options },
|
|
584
|
+
runOperationSpec
|
|
585
|
+
);
|
|
586
|
+
return new LroEngine(lro, {
|
|
587
|
+
resumeFrom: options?.resumeFrom,
|
|
588
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
589
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Create artifacts from a existing image template
|
|
595
|
+
* @param resourceGroupName The name of the resource group.
|
|
596
|
+
* @param imageTemplateName The name of the image Template
|
|
597
|
+
* @param options The options parameters.
|
|
598
|
+
*/
|
|
599
|
+
async beginRunAndWait(
|
|
600
|
+
resourceGroupName: string,
|
|
601
|
+
imageTemplateName: string,
|
|
602
|
+
options?: VirtualMachineImageTemplatesRunOptionalParams
|
|
603
|
+
): Promise<void> {
|
|
604
|
+
const poller = await this.beginRun(
|
|
605
|
+
resourceGroupName,
|
|
606
|
+
imageTemplateName,
|
|
607
|
+
options
|
|
608
|
+
);
|
|
609
|
+
return poller.pollUntilDone();
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Cancel the long running image build based on the image template
|
|
614
|
+
* @param resourceGroupName The name of the resource group.
|
|
615
|
+
* @param imageTemplateName The name of the image Template
|
|
616
|
+
* @param options The options parameters.
|
|
617
|
+
*/
|
|
618
|
+
async beginCancel(
|
|
619
|
+
resourceGroupName: string,
|
|
620
|
+
imageTemplateName: string,
|
|
621
|
+
options?: VirtualMachineImageTemplatesCancelOptionalParams
|
|
622
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
623
|
+
const directSendOperation = async (
|
|
624
|
+
args: coreClient.OperationArguments,
|
|
625
|
+
spec: coreClient.OperationSpec
|
|
626
|
+
): Promise<void> => {
|
|
627
|
+
return this.client.sendOperationRequest(args, spec);
|
|
628
|
+
};
|
|
629
|
+
const sendOperation = async (
|
|
630
|
+
args: coreClient.OperationArguments,
|
|
631
|
+
spec: coreClient.OperationSpec
|
|
632
|
+
) => {
|
|
633
|
+
let currentRawResponse:
|
|
634
|
+
| coreClient.FullOperationResponse
|
|
635
|
+
| undefined = undefined;
|
|
636
|
+
const providedCallback = args.options?.onResponse;
|
|
637
|
+
const callback: coreClient.RawResponseCallback = (
|
|
638
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
639
|
+
flatResponse: unknown
|
|
640
|
+
) => {
|
|
641
|
+
currentRawResponse = rawResponse;
|
|
642
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
643
|
+
};
|
|
644
|
+
const updatedArgs = {
|
|
645
|
+
...args,
|
|
646
|
+
options: {
|
|
647
|
+
...args.options,
|
|
648
|
+
onResponse: callback
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
652
|
+
return {
|
|
653
|
+
flatResponse,
|
|
654
|
+
rawResponse: {
|
|
655
|
+
statusCode: currentRawResponse!.status,
|
|
656
|
+
body: currentRawResponse!.parsedBody,
|
|
657
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
const lro = new LroImpl(
|
|
663
|
+
sendOperation,
|
|
664
|
+
{ resourceGroupName, imageTemplateName, options },
|
|
665
|
+
cancelOperationSpec
|
|
666
|
+
);
|
|
667
|
+
return new LroEngine(lro, {
|
|
668
|
+
resumeFrom: options?.resumeFrom,
|
|
669
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
670
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Cancel the long running image build based on the image template
|
|
676
|
+
* @param resourceGroupName The name of the resource group.
|
|
677
|
+
* @param imageTemplateName The name of the image Template
|
|
678
|
+
* @param options The options parameters.
|
|
679
|
+
*/
|
|
680
|
+
async beginCancelAndWait(
|
|
681
|
+
resourceGroupName: string,
|
|
682
|
+
imageTemplateName: string,
|
|
683
|
+
options?: VirtualMachineImageTemplatesCancelOptionalParams
|
|
684
|
+
): Promise<void> {
|
|
685
|
+
const poller = await this.beginCancel(
|
|
686
|
+
resourceGroupName,
|
|
687
|
+
imageTemplateName,
|
|
688
|
+
options
|
|
689
|
+
);
|
|
690
|
+
return poller.pollUntilDone();
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* List all run outputs for the specified Image Template resource
|
|
695
|
+
* @param resourceGroupName The name of the resource group.
|
|
696
|
+
* @param imageTemplateName The name of the image Template
|
|
697
|
+
* @param options The options parameters.
|
|
698
|
+
*/
|
|
699
|
+
private _listRunOutputs(
|
|
700
|
+
resourceGroupName: string,
|
|
701
|
+
imageTemplateName: string,
|
|
702
|
+
options?: VirtualMachineImageTemplatesListRunOutputsOptionalParams
|
|
703
|
+
): Promise<VirtualMachineImageTemplatesListRunOutputsResponse> {
|
|
704
|
+
return this.client.sendOperationRequest(
|
|
705
|
+
{ resourceGroupName, imageTemplateName, options },
|
|
706
|
+
listRunOutputsOperationSpec
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* Get the specified run output for the specified image template resource
|
|
712
|
+
* @param resourceGroupName The name of the resource group.
|
|
713
|
+
* @param imageTemplateName The name of the image Template
|
|
714
|
+
* @param runOutputName The name of the run output
|
|
715
|
+
* @param options The options parameters.
|
|
716
|
+
*/
|
|
717
|
+
getRunOutput(
|
|
718
|
+
resourceGroupName: string,
|
|
719
|
+
imageTemplateName: string,
|
|
720
|
+
runOutputName: string,
|
|
721
|
+
options?: VirtualMachineImageTemplatesGetRunOutputOptionalParams
|
|
722
|
+
): Promise<VirtualMachineImageTemplatesGetRunOutputResponse> {
|
|
723
|
+
return this.client.sendOperationRequest(
|
|
724
|
+
{ resourceGroupName, imageTemplateName, runOutputName, options },
|
|
725
|
+
getRunOutputOperationSpec
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* ListNext
|
|
731
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
732
|
+
* @param options The options parameters.
|
|
733
|
+
*/
|
|
734
|
+
private _listNext(
|
|
735
|
+
nextLink: string,
|
|
736
|
+
options?: VirtualMachineImageTemplatesListNextOptionalParams
|
|
737
|
+
): Promise<VirtualMachineImageTemplatesListNextResponse> {
|
|
738
|
+
return this.client.sendOperationRequest(
|
|
739
|
+
{ nextLink, options },
|
|
740
|
+
listNextOperationSpec
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* ListByResourceGroupNext
|
|
746
|
+
* @param resourceGroupName The name of the resource group.
|
|
747
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
748
|
+
* @param options The options parameters.
|
|
749
|
+
*/
|
|
750
|
+
private _listByResourceGroupNext(
|
|
751
|
+
resourceGroupName: string,
|
|
752
|
+
nextLink: string,
|
|
753
|
+
options?: VirtualMachineImageTemplatesListByResourceGroupNextOptionalParams
|
|
754
|
+
): Promise<VirtualMachineImageTemplatesListByResourceGroupNextResponse> {
|
|
755
|
+
return this.client.sendOperationRequest(
|
|
756
|
+
{ resourceGroupName, nextLink, options },
|
|
757
|
+
listByResourceGroupNextOperationSpec
|
|
758
|
+
);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* ListRunOutputsNext
|
|
763
|
+
* @param resourceGroupName The name of the resource group.
|
|
764
|
+
* @param imageTemplateName The name of the image Template
|
|
765
|
+
* @param nextLink The nextLink from the previous successful call to the ListRunOutputs method.
|
|
766
|
+
* @param options The options parameters.
|
|
767
|
+
*/
|
|
768
|
+
private _listRunOutputsNext(
|
|
769
|
+
resourceGroupName: string,
|
|
770
|
+
imageTemplateName: string,
|
|
771
|
+
nextLink: string,
|
|
772
|
+
options?: VirtualMachineImageTemplatesListRunOutputsNextOptionalParams
|
|
773
|
+
): Promise<VirtualMachineImageTemplatesListRunOutputsNextResponse> {
|
|
774
|
+
return this.client.sendOperationRequest(
|
|
775
|
+
{ resourceGroupName, imageTemplateName, nextLink, options },
|
|
776
|
+
listRunOutputsNextOperationSpec
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
// Operation Specifications
|
|
781
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
782
|
+
|
|
783
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
784
|
+
path:
|
|
785
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates",
|
|
786
|
+
httpMethod: "GET",
|
|
787
|
+
responses: {
|
|
788
|
+
200: {
|
|
789
|
+
bodyMapper: Mappers.ImageTemplateListResult
|
|
790
|
+
},
|
|
791
|
+
default: {
|
|
792
|
+
bodyMapper: Mappers.CloudError
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
queryParameters: [Parameters.apiVersion],
|
|
796
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
797
|
+
headerParameters: [Parameters.accept],
|
|
798
|
+
serializer
|
|
799
|
+
};
|
|
800
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
801
|
+
path:
|
|
802
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates",
|
|
803
|
+
httpMethod: "GET",
|
|
804
|
+
responses: {
|
|
805
|
+
200: {
|
|
806
|
+
bodyMapper: Mappers.ImageTemplateListResult
|
|
807
|
+
},
|
|
808
|
+
default: {
|
|
809
|
+
bodyMapper: Mappers.CloudError
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
queryParameters: [Parameters.apiVersion],
|
|
813
|
+
urlParameters: [
|
|
814
|
+
Parameters.$host,
|
|
815
|
+
Parameters.subscriptionId,
|
|
816
|
+
Parameters.resourceGroupName
|
|
817
|
+
],
|
|
818
|
+
headerParameters: [Parameters.accept],
|
|
819
|
+
serializer
|
|
820
|
+
};
|
|
821
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
822
|
+
path:
|
|
823
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
824
|
+
httpMethod: "PUT",
|
|
825
|
+
responses: {
|
|
826
|
+
200: {
|
|
827
|
+
bodyMapper: Mappers.ImageTemplate
|
|
828
|
+
},
|
|
829
|
+
201: {
|
|
830
|
+
bodyMapper: Mappers.ImageTemplate
|
|
831
|
+
},
|
|
832
|
+
202: {
|
|
833
|
+
bodyMapper: Mappers.ImageTemplate
|
|
834
|
+
},
|
|
835
|
+
204: {
|
|
836
|
+
bodyMapper: Mappers.ImageTemplate
|
|
837
|
+
},
|
|
838
|
+
default: {
|
|
839
|
+
bodyMapper: Mappers.CloudError
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
requestBody: Parameters.parameters,
|
|
843
|
+
queryParameters: [Parameters.apiVersion],
|
|
844
|
+
urlParameters: [
|
|
845
|
+
Parameters.$host,
|
|
846
|
+
Parameters.subscriptionId,
|
|
847
|
+
Parameters.resourceGroupName,
|
|
848
|
+
Parameters.imageTemplateName
|
|
849
|
+
],
|
|
850
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
851
|
+
mediaType: "json",
|
|
852
|
+
serializer
|
|
853
|
+
};
|
|
854
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
855
|
+
path:
|
|
856
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
857
|
+
httpMethod: "PATCH",
|
|
858
|
+
responses: {
|
|
859
|
+
200: {
|
|
860
|
+
bodyMapper: Mappers.ImageTemplate
|
|
861
|
+
},
|
|
862
|
+
201: {
|
|
863
|
+
bodyMapper: Mappers.ImageTemplate
|
|
864
|
+
},
|
|
865
|
+
202: {
|
|
866
|
+
bodyMapper: Mappers.ImageTemplate
|
|
867
|
+
},
|
|
868
|
+
204: {
|
|
869
|
+
bodyMapper: Mappers.ImageTemplate
|
|
870
|
+
},
|
|
871
|
+
default: {
|
|
872
|
+
bodyMapper: Mappers.CloudError
|
|
873
|
+
}
|
|
874
|
+
},
|
|
875
|
+
requestBody: Parameters.parameters1,
|
|
876
|
+
queryParameters: [Parameters.apiVersion],
|
|
877
|
+
urlParameters: [
|
|
878
|
+
Parameters.$host,
|
|
879
|
+
Parameters.subscriptionId,
|
|
880
|
+
Parameters.resourceGroupName,
|
|
881
|
+
Parameters.imageTemplateName
|
|
882
|
+
],
|
|
883
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
884
|
+
mediaType: "json",
|
|
885
|
+
serializer
|
|
886
|
+
};
|
|
887
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
888
|
+
path:
|
|
889
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
890
|
+
httpMethod: "GET",
|
|
891
|
+
responses: {
|
|
892
|
+
200: {
|
|
893
|
+
bodyMapper: Mappers.ImageTemplate
|
|
894
|
+
},
|
|
895
|
+
default: {
|
|
896
|
+
bodyMapper: Mappers.CloudError
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
queryParameters: [Parameters.apiVersion],
|
|
900
|
+
urlParameters: [
|
|
901
|
+
Parameters.$host,
|
|
902
|
+
Parameters.subscriptionId,
|
|
903
|
+
Parameters.resourceGroupName,
|
|
904
|
+
Parameters.imageTemplateName
|
|
905
|
+
],
|
|
906
|
+
headerParameters: [Parameters.accept],
|
|
907
|
+
serializer
|
|
908
|
+
};
|
|
909
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
910
|
+
path:
|
|
911
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}",
|
|
912
|
+
httpMethod: "DELETE",
|
|
913
|
+
responses: {
|
|
914
|
+
200: {},
|
|
915
|
+
201: {},
|
|
916
|
+
202: {},
|
|
917
|
+
204: {},
|
|
918
|
+
default: {
|
|
919
|
+
bodyMapper: Mappers.CloudError
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
queryParameters: [Parameters.apiVersion],
|
|
923
|
+
urlParameters: [
|
|
924
|
+
Parameters.$host,
|
|
925
|
+
Parameters.subscriptionId,
|
|
926
|
+
Parameters.resourceGroupName,
|
|
927
|
+
Parameters.imageTemplateName
|
|
928
|
+
],
|
|
929
|
+
headerParameters: [Parameters.accept],
|
|
930
|
+
serializer
|
|
931
|
+
};
|
|
932
|
+
const runOperationSpec: coreClient.OperationSpec = {
|
|
933
|
+
path:
|
|
934
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/run",
|
|
935
|
+
httpMethod: "POST",
|
|
936
|
+
responses: {
|
|
937
|
+
200: {},
|
|
938
|
+
201: {},
|
|
939
|
+
202: {},
|
|
940
|
+
204: {},
|
|
941
|
+
default: {
|
|
942
|
+
bodyMapper: Mappers.CloudError
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
queryParameters: [Parameters.apiVersion],
|
|
946
|
+
urlParameters: [
|
|
947
|
+
Parameters.$host,
|
|
948
|
+
Parameters.subscriptionId,
|
|
949
|
+
Parameters.resourceGroupName,
|
|
950
|
+
Parameters.imageTemplateName
|
|
951
|
+
],
|
|
952
|
+
headerParameters: [Parameters.accept],
|
|
953
|
+
serializer
|
|
954
|
+
};
|
|
955
|
+
const cancelOperationSpec: coreClient.OperationSpec = {
|
|
956
|
+
path:
|
|
957
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/cancel",
|
|
958
|
+
httpMethod: "POST",
|
|
959
|
+
responses: {
|
|
960
|
+
200: {},
|
|
961
|
+
201: {},
|
|
962
|
+
202: {},
|
|
963
|
+
204: {},
|
|
964
|
+
default: {
|
|
965
|
+
bodyMapper: Mappers.CloudError
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
queryParameters: [Parameters.apiVersion],
|
|
969
|
+
urlParameters: [
|
|
970
|
+
Parameters.$host,
|
|
971
|
+
Parameters.subscriptionId,
|
|
972
|
+
Parameters.resourceGroupName,
|
|
973
|
+
Parameters.imageTemplateName
|
|
974
|
+
],
|
|
975
|
+
headerParameters: [Parameters.accept],
|
|
976
|
+
serializer
|
|
977
|
+
};
|
|
978
|
+
const listRunOutputsOperationSpec: coreClient.OperationSpec = {
|
|
979
|
+
path:
|
|
980
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs",
|
|
981
|
+
httpMethod: "GET",
|
|
982
|
+
responses: {
|
|
983
|
+
200: {
|
|
984
|
+
bodyMapper: Mappers.RunOutputCollection
|
|
985
|
+
},
|
|
986
|
+
default: {
|
|
987
|
+
bodyMapper: Mappers.CloudError
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
queryParameters: [Parameters.apiVersion],
|
|
991
|
+
urlParameters: [
|
|
992
|
+
Parameters.$host,
|
|
993
|
+
Parameters.subscriptionId,
|
|
994
|
+
Parameters.resourceGroupName,
|
|
995
|
+
Parameters.imageTemplateName
|
|
996
|
+
],
|
|
997
|
+
headerParameters: [Parameters.accept],
|
|
998
|
+
serializer
|
|
999
|
+
};
|
|
1000
|
+
const getRunOutputOperationSpec: coreClient.OperationSpec = {
|
|
1001
|
+
path:
|
|
1002
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs/{runOutputName}",
|
|
1003
|
+
httpMethod: "GET",
|
|
1004
|
+
responses: {
|
|
1005
|
+
200: {
|
|
1006
|
+
bodyMapper: Mappers.RunOutput
|
|
1007
|
+
},
|
|
1008
|
+
default: {
|
|
1009
|
+
bodyMapper: Mappers.CloudError
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
queryParameters: [Parameters.apiVersion],
|
|
1013
|
+
urlParameters: [
|
|
1014
|
+
Parameters.$host,
|
|
1015
|
+
Parameters.subscriptionId,
|
|
1016
|
+
Parameters.resourceGroupName,
|
|
1017
|
+
Parameters.imageTemplateName,
|
|
1018
|
+
Parameters.runOutputName
|
|
1019
|
+
],
|
|
1020
|
+
headerParameters: [Parameters.accept],
|
|
1021
|
+
serializer
|
|
1022
|
+
};
|
|
1023
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
1024
|
+
path: "{nextLink}",
|
|
1025
|
+
httpMethod: "GET",
|
|
1026
|
+
responses: {
|
|
1027
|
+
200: {
|
|
1028
|
+
bodyMapper: Mappers.ImageTemplateListResult
|
|
1029
|
+
},
|
|
1030
|
+
default: {
|
|
1031
|
+
bodyMapper: Mappers.CloudError
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
queryParameters: [Parameters.apiVersion],
|
|
1035
|
+
urlParameters: [
|
|
1036
|
+
Parameters.$host,
|
|
1037
|
+
Parameters.subscriptionId,
|
|
1038
|
+
Parameters.nextLink
|
|
1039
|
+
],
|
|
1040
|
+
headerParameters: [Parameters.accept],
|
|
1041
|
+
serializer
|
|
1042
|
+
};
|
|
1043
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
1044
|
+
path: "{nextLink}",
|
|
1045
|
+
httpMethod: "GET",
|
|
1046
|
+
responses: {
|
|
1047
|
+
200: {
|
|
1048
|
+
bodyMapper: Mappers.ImageTemplateListResult
|
|
1049
|
+
},
|
|
1050
|
+
default: {
|
|
1051
|
+
bodyMapper: Mappers.CloudError
|
|
1052
|
+
}
|
|
1053
|
+
},
|
|
1054
|
+
queryParameters: [Parameters.apiVersion],
|
|
1055
|
+
urlParameters: [
|
|
1056
|
+
Parameters.$host,
|
|
1057
|
+
Parameters.subscriptionId,
|
|
1058
|
+
Parameters.resourceGroupName,
|
|
1059
|
+
Parameters.nextLink
|
|
1060
|
+
],
|
|
1061
|
+
headerParameters: [Parameters.accept],
|
|
1062
|
+
serializer
|
|
1063
|
+
};
|
|
1064
|
+
const listRunOutputsNextOperationSpec: coreClient.OperationSpec = {
|
|
1065
|
+
path: "{nextLink}",
|
|
1066
|
+
httpMethod: "GET",
|
|
1067
|
+
responses: {
|
|
1068
|
+
200: {
|
|
1069
|
+
bodyMapper: Mappers.RunOutputCollection
|
|
1070
|
+
},
|
|
1071
|
+
default: {
|
|
1072
|
+
bodyMapper: Mappers.CloudError
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
queryParameters: [Parameters.apiVersion],
|
|
1076
|
+
urlParameters: [
|
|
1077
|
+
Parameters.$host,
|
|
1078
|
+
Parameters.subscriptionId,
|
|
1079
|
+
Parameters.resourceGroupName,
|
|
1080
|
+
Parameters.imageTemplateName,
|
|
1081
|
+
Parameters.nextLink
|
|
1082
|
+
],
|
|
1083
|
+
headerParameters: [Parameters.accept],
|
|
1084
|
+
serializer
|
|
1085
|
+
};
|