@azure/arm-templatespecs 1.0.0 → 2.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.txt → LICENSE} +1 -1
- package/README.md +70 -84
- package/dist/index.js +1285 -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 +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/models/index.d.ts +306 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +22 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +15 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +196 -227
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +16 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +144 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/templateSpecVersions.d.ts +72 -0
- package/dist-esm/src/operations/templateSpecVersions.d.ts.map +1 -0
- package/dist-esm/src/operations/templateSpecVersions.js +279 -0
- package/dist-esm/src/operations/templateSpecVersions.js.map +1 -0
- package/dist-esm/src/operations/templateSpecs.d.ts +82 -0
- package/dist-esm/src/operations/templateSpecs.d.ts.map +1 -0
- package/dist-esm/src/operations/templateSpecs.js +358 -0
- package/dist-esm/src/operations/templateSpecs.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/templateSpecVersions.d.ts +47 -0
- package/dist-esm/src/operationsInterfaces/templateSpecVersions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/templateSpecVersions.js +9 -0
- package/dist-esm/src/operationsInterfaces/templateSpecVersions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/templateSpecs.d.ts +46 -0
- package/dist-esm/src/operationsInterfaces/templateSpecs.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/templateSpecs.js} +2 -1
- package/dist-esm/src/operationsInterfaces/templateSpecs.js.map +1 -0
- package/dist-esm/src/templateSpecsClient.d.ts +19 -0
- package/dist-esm/src/templateSpecsClient.d.ts.map +1 -0
- package/dist-esm/src/templateSpecsClient.js +52 -0
- package/dist-esm/src/templateSpecsClient.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 +63 -32
- package/review/arm-templatespecs.api.md +280 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +12 -0
- package/src/models/index.ts +233 -494
- package/src/models/mappers.ts +208 -239
- package/src/models/parameters.ts +104 -45
- package/src/operations/index.ts +1 -2
- package/src/operations/templateSpecVersions.ts +222 -254
- package/src/operations/templateSpecs.ts +276 -315
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/templateSpecVersions.ts +91 -0
- package/src/operationsInterfaces/templateSpecs.ts +88 -0
- package/src/templateSpecsClient.ts +62 -34
- package/tsconfig.json +3 -3
- package/types/arm-templatespecs.d.ts +457 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-templatespecs.js +0 -1294
- package/dist/arm-templatespecs.js.map +0 -1
- package/dist/arm-templatespecs.min.js +0 -1
- package/dist/arm-templatespecs.min.js.map +0 -1
- package/esm/models/index.d.ts +0 -571
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -17
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -10
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -107
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/templateSpecVersionsMappers.d.ts +0 -2
- package/esm/models/templateSpecVersionsMappers.d.ts.map +0 -1
- package/esm/models/templateSpecVersionsMappers.js +0 -9
- package/esm/models/templateSpecVersionsMappers.js.map +0 -1
- package/esm/models/templateSpecsMappers.d.ts +0 -2
- package/esm/models/templateSpecsMappers.d.ts.map +0 -1
- package/esm/models/templateSpecsMappers.js +0 -9
- package/esm/models/templateSpecsMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/templateSpecVersions.d.ts +0 -152
- package/esm/operations/templateSpecVersions.d.ts.map +0 -1
- package/esm/operations/templateSpecVersions.js +0 -233
- package/esm/operations/templateSpecVersions.js.map +0 -1
- package/esm/operations/templateSpecs.d.ts +0 -170
- package/esm/operations/templateSpecs.d.ts.map +0 -1
- package/esm/operations/templateSpecs.js +0 -284
- package/esm/operations/templateSpecs.js.map +0 -1
- package/esm/templateSpecsClient.d.ts +0 -25
- package/esm/templateSpecsClient.d.ts.map +0 -1
- package/esm/templateSpecsClient.js +0 -38
- package/esm/templateSpecsClient.js.map +0 -1
- package/esm/templateSpecsClientContext.d.ts +0 -22
- package/esm/templateSpecsClientContext.d.ts.map +0 -1
- package/esm/templateSpecsClientContext.js +0 -60
- package/esm/templateSpecsClientContext.js.map +0 -1
- package/src/models/templateSpecVersionsMappers.ts +0 -23
- package/src/models/templateSpecsMappers.ts +0 -23
- package/src/templateSpecsClientContext.ts +0 -67
package/dist/index.js
ADDED
@@ -0,0 +1,1285 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var coreClient = require('@azure/core-client');
|
6
|
+
var tslib = require('tslib');
|
7
|
+
|
8
|
+
/*
|
9
|
+
* Copyright (c) Microsoft Corporation.
|
10
|
+
* Licensed under the MIT License.
|
11
|
+
*
|
12
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
13
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
14
|
+
*/
|
15
|
+
(function (KnownCreatedByType) {
|
16
|
+
KnownCreatedByType["User"] = "User";
|
17
|
+
KnownCreatedByType["Application"] = "Application";
|
18
|
+
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
19
|
+
KnownCreatedByType["Key"] = "Key";
|
20
|
+
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
21
|
+
(function (KnownTemplateSpecExpandKind) {
|
22
|
+
/** Includes version information with the Template Spec. */
|
23
|
+
KnownTemplateSpecExpandKind["Versions"] = "versions";
|
24
|
+
})(exports.KnownTemplateSpecExpandKind || (exports.KnownTemplateSpecExpandKind = {}));
|
25
|
+
|
26
|
+
/*
|
27
|
+
* Copyright (c) Microsoft Corporation.
|
28
|
+
* Licensed under the MIT License.
|
29
|
+
*
|
30
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
31
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
32
|
+
*/
|
33
|
+
const TemplateSpecVersionInfo = {
|
34
|
+
type: {
|
35
|
+
name: "Composite",
|
36
|
+
className: "TemplateSpecVersionInfo",
|
37
|
+
modelProperties: {
|
38
|
+
description: {
|
39
|
+
serializedName: "description",
|
40
|
+
readOnly: true,
|
41
|
+
type: {
|
42
|
+
name: "String"
|
43
|
+
}
|
44
|
+
},
|
45
|
+
timeCreated: {
|
46
|
+
serializedName: "timeCreated",
|
47
|
+
readOnly: true,
|
48
|
+
type: {
|
49
|
+
name: "DateTime"
|
50
|
+
}
|
51
|
+
},
|
52
|
+
timeModified: {
|
53
|
+
serializedName: "timeModified",
|
54
|
+
readOnly: true,
|
55
|
+
type: {
|
56
|
+
name: "DateTime"
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
};
|
62
|
+
const AzureResourceBase = {
|
63
|
+
type: {
|
64
|
+
name: "Composite",
|
65
|
+
className: "AzureResourceBase",
|
66
|
+
modelProperties: {
|
67
|
+
id: {
|
68
|
+
serializedName: "id",
|
69
|
+
readOnly: true,
|
70
|
+
type: {
|
71
|
+
name: "String"
|
72
|
+
}
|
73
|
+
},
|
74
|
+
name: {
|
75
|
+
serializedName: "name",
|
76
|
+
readOnly: true,
|
77
|
+
type: {
|
78
|
+
name: "String"
|
79
|
+
}
|
80
|
+
},
|
81
|
+
type: {
|
82
|
+
serializedName: "type",
|
83
|
+
readOnly: true,
|
84
|
+
type: {
|
85
|
+
name: "String"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
systemData: {
|
89
|
+
serializedName: "systemData",
|
90
|
+
type: {
|
91
|
+
name: "Composite",
|
92
|
+
className: "SystemData"
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
};
|
98
|
+
const SystemData = {
|
99
|
+
type: {
|
100
|
+
name: "Composite",
|
101
|
+
className: "SystemData",
|
102
|
+
modelProperties: {
|
103
|
+
createdBy: {
|
104
|
+
serializedName: "createdBy",
|
105
|
+
type: {
|
106
|
+
name: "String"
|
107
|
+
}
|
108
|
+
},
|
109
|
+
createdByType: {
|
110
|
+
serializedName: "createdByType",
|
111
|
+
type: {
|
112
|
+
name: "String"
|
113
|
+
}
|
114
|
+
},
|
115
|
+
createdAt: {
|
116
|
+
serializedName: "createdAt",
|
117
|
+
type: {
|
118
|
+
name: "DateTime"
|
119
|
+
}
|
120
|
+
},
|
121
|
+
lastModifiedBy: {
|
122
|
+
serializedName: "lastModifiedBy",
|
123
|
+
type: {
|
124
|
+
name: "String"
|
125
|
+
}
|
126
|
+
},
|
127
|
+
lastModifiedByType: {
|
128
|
+
serializedName: "lastModifiedByType",
|
129
|
+
type: {
|
130
|
+
name: "String"
|
131
|
+
}
|
132
|
+
},
|
133
|
+
lastModifiedAt: {
|
134
|
+
serializedName: "lastModifiedAt",
|
135
|
+
type: {
|
136
|
+
name: "DateTime"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}
|
141
|
+
};
|
142
|
+
const TemplateSpecsError = {
|
143
|
+
type: {
|
144
|
+
name: "Composite",
|
145
|
+
className: "TemplateSpecsError",
|
146
|
+
modelProperties: {
|
147
|
+
error: {
|
148
|
+
serializedName: "error",
|
149
|
+
type: {
|
150
|
+
name: "Composite",
|
151
|
+
className: "ErrorResponse"
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
};
|
157
|
+
const ErrorResponse = {
|
158
|
+
type: {
|
159
|
+
name: "Composite",
|
160
|
+
className: "ErrorResponse",
|
161
|
+
modelProperties: {
|
162
|
+
code: {
|
163
|
+
serializedName: "code",
|
164
|
+
readOnly: true,
|
165
|
+
type: {
|
166
|
+
name: "String"
|
167
|
+
}
|
168
|
+
},
|
169
|
+
message: {
|
170
|
+
serializedName: "message",
|
171
|
+
readOnly: true,
|
172
|
+
type: {
|
173
|
+
name: "String"
|
174
|
+
}
|
175
|
+
},
|
176
|
+
target: {
|
177
|
+
serializedName: "target",
|
178
|
+
readOnly: true,
|
179
|
+
type: {
|
180
|
+
name: "String"
|
181
|
+
}
|
182
|
+
},
|
183
|
+
details: {
|
184
|
+
serializedName: "details",
|
185
|
+
readOnly: true,
|
186
|
+
type: {
|
187
|
+
name: "Sequence",
|
188
|
+
element: {
|
189
|
+
type: {
|
190
|
+
name: "Composite",
|
191
|
+
className: "ErrorResponse"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
},
|
196
|
+
additionalInfo: {
|
197
|
+
serializedName: "additionalInfo",
|
198
|
+
readOnly: true,
|
199
|
+
type: {
|
200
|
+
name: "Sequence",
|
201
|
+
element: {
|
202
|
+
type: {
|
203
|
+
name: "Composite",
|
204
|
+
className: "ErrorAdditionalInfo"
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
};
|
212
|
+
const ErrorAdditionalInfo = {
|
213
|
+
type: {
|
214
|
+
name: "Composite",
|
215
|
+
className: "ErrorAdditionalInfo",
|
216
|
+
modelProperties: {
|
217
|
+
type: {
|
218
|
+
serializedName: "type",
|
219
|
+
readOnly: true,
|
220
|
+
type: {
|
221
|
+
name: "String"
|
222
|
+
}
|
223
|
+
},
|
224
|
+
info: {
|
225
|
+
serializedName: "info",
|
226
|
+
readOnly: true,
|
227
|
+
type: {
|
228
|
+
name: "Dictionary",
|
229
|
+
value: { type: { name: "any" } }
|
230
|
+
}
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
234
|
+
};
|
235
|
+
const TemplateSpecsListResult = {
|
236
|
+
type: {
|
237
|
+
name: "Composite",
|
238
|
+
className: "TemplateSpecsListResult",
|
239
|
+
modelProperties: {
|
240
|
+
value: {
|
241
|
+
serializedName: "value",
|
242
|
+
type: {
|
243
|
+
name: "Sequence",
|
244
|
+
element: {
|
245
|
+
type: {
|
246
|
+
name: "Composite",
|
247
|
+
className: "TemplateSpec"
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
},
|
252
|
+
nextLink: {
|
253
|
+
serializedName: "nextLink",
|
254
|
+
readOnly: true,
|
255
|
+
type: {
|
256
|
+
name: "String"
|
257
|
+
}
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
};
|
262
|
+
const LinkedTemplateArtifact = {
|
263
|
+
type: {
|
264
|
+
name: "Composite",
|
265
|
+
className: "LinkedTemplateArtifact",
|
266
|
+
modelProperties: {
|
267
|
+
path: {
|
268
|
+
serializedName: "path",
|
269
|
+
required: true,
|
270
|
+
type: {
|
271
|
+
name: "String"
|
272
|
+
}
|
273
|
+
},
|
274
|
+
template: {
|
275
|
+
serializedName: "template",
|
276
|
+
required: true,
|
277
|
+
type: {
|
278
|
+
name: "Dictionary",
|
279
|
+
value: { type: { name: "any" } }
|
280
|
+
}
|
281
|
+
}
|
282
|
+
}
|
283
|
+
}
|
284
|
+
};
|
285
|
+
const TemplateSpecVersionsListResult = {
|
286
|
+
type: {
|
287
|
+
name: "Composite",
|
288
|
+
className: "TemplateSpecVersionsListResult",
|
289
|
+
modelProperties: {
|
290
|
+
value: {
|
291
|
+
serializedName: "value",
|
292
|
+
type: {
|
293
|
+
name: "Sequence",
|
294
|
+
element: {
|
295
|
+
type: {
|
296
|
+
name: "Composite",
|
297
|
+
className: "TemplateSpecVersion"
|
298
|
+
}
|
299
|
+
}
|
300
|
+
}
|
301
|
+
},
|
302
|
+
nextLink: {
|
303
|
+
serializedName: "nextLink",
|
304
|
+
readOnly: true,
|
305
|
+
type: {
|
306
|
+
name: "String"
|
307
|
+
}
|
308
|
+
}
|
309
|
+
}
|
310
|
+
}
|
311
|
+
};
|
312
|
+
const TemplateSpec = {
|
313
|
+
type: {
|
314
|
+
name: "Composite",
|
315
|
+
className: "TemplateSpec",
|
316
|
+
modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { location: {
|
317
|
+
serializedName: "location",
|
318
|
+
required: true,
|
319
|
+
type: {
|
320
|
+
name: "String"
|
321
|
+
}
|
322
|
+
}, tags: {
|
323
|
+
serializedName: "tags",
|
324
|
+
type: {
|
325
|
+
name: "Dictionary",
|
326
|
+
value: { type: { name: "String" } }
|
327
|
+
}
|
328
|
+
}, description: {
|
329
|
+
constraints: {
|
330
|
+
MaxLength: 4096
|
331
|
+
},
|
332
|
+
serializedName: "properties.description",
|
333
|
+
type: {
|
334
|
+
name: "String"
|
335
|
+
}
|
336
|
+
}, displayName: {
|
337
|
+
constraints: {
|
338
|
+
MaxLength: 64
|
339
|
+
},
|
340
|
+
serializedName: "properties.displayName",
|
341
|
+
type: {
|
342
|
+
name: "String"
|
343
|
+
}
|
344
|
+
}, metadata: {
|
345
|
+
serializedName: "properties.metadata",
|
346
|
+
type: {
|
347
|
+
name: "Dictionary",
|
348
|
+
value: { type: { name: "any" } }
|
349
|
+
}
|
350
|
+
}, versions: {
|
351
|
+
serializedName: "properties.versions",
|
352
|
+
readOnly: true,
|
353
|
+
type: {
|
354
|
+
name: "Dictionary",
|
355
|
+
value: {
|
356
|
+
type: { name: "Composite", className: "TemplateSpecVersionInfo" }
|
357
|
+
}
|
358
|
+
}
|
359
|
+
} })
|
360
|
+
}
|
361
|
+
};
|
362
|
+
const TemplateSpecUpdateModel = {
|
363
|
+
type: {
|
364
|
+
name: "Composite",
|
365
|
+
className: "TemplateSpecUpdateModel",
|
366
|
+
modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { tags: {
|
367
|
+
serializedName: "tags",
|
368
|
+
type: {
|
369
|
+
name: "Dictionary",
|
370
|
+
value: { type: { name: "String" } }
|
371
|
+
}
|
372
|
+
} })
|
373
|
+
}
|
374
|
+
};
|
375
|
+
const TemplateSpecVersion = {
|
376
|
+
type: {
|
377
|
+
name: "Composite",
|
378
|
+
className: "TemplateSpecVersion",
|
379
|
+
modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { location: {
|
380
|
+
serializedName: "location",
|
381
|
+
required: true,
|
382
|
+
type: {
|
383
|
+
name: "String"
|
384
|
+
}
|
385
|
+
}, tags: {
|
386
|
+
serializedName: "tags",
|
387
|
+
type: {
|
388
|
+
name: "Dictionary",
|
389
|
+
value: { type: { name: "String" } }
|
390
|
+
}
|
391
|
+
}, description: {
|
392
|
+
constraints: {
|
393
|
+
MaxLength: 4096
|
394
|
+
},
|
395
|
+
serializedName: "properties.description",
|
396
|
+
type: {
|
397
|
+
name: "String"
|
398
|
+
}
|
399
|
+
}, linkedTemplates: {
|
400
|
+
serializedName: "properties.linkedTemplates",
|
401
|
+
type: {
|
402
|
+
name: "Sequence",
|
403
|
+
element: {
|
404
|
+
type: {
|
405
|
+
name: "Composite",
|
406
|
+
className: "LinkedTemplateArtifact"
|
407
|
+
}
|
408
|
+
}
|
409
|
+
}
|
410
|
+
}, metadata: {
|
411
|
+
serializedName: "properties.metadata",
|
412
|
+
type: {
|
413
|
+
name: "Dictionary",
|
414
|
+
value: { type: { name: "any" } }
|
415
|
+
}
|
416
|
+
}, mainTemplate: {
|
417
|
+
serializedName: "properties.mainTemplate",
|
418
|
+
type: {
|
419
|
+
name: "Dictionary",
|
420
|
+
value: { type: { name: "any" } }
|
421
|
+
}
|
422
|
+
}, uiFormDefinition: {
|
423
|
+
serializedName: "properties.uiFormDefinition",
|
424
|
+
type: {
|
425
|
+
name: "Dictionary",
|
426
|
+
value: { type: { name: "any" } }
|
427
|
+
}
|
428
|
+
} })
|
429
|
+
}
|
430
|
+
};
|
431
|
+
const TemplateSpecVersionUpdateModel = {
|
432
|
+
type: {
|
433
|
+
name: "Composite",
|
434
|
+
className: "TemplateSpecVersionUpdateModel",
|
435
|
+
modelProperties: Object.assign(Object.assign({}, AzureResourceBase.type.modelProperties), { tags: {
|
436
|
+
serializedName: "tags",
|
437
|
+
type: {
|
438
|
+
name: "Dictionary",
|
439
|
+
value: { type: { name: "String" } }
|
440
|
+
}
|
441
|
+
} })
|
442
|
+
}
|
443
|
+
};
|
444
|
+
|
445
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
446
|
+
__proto__: null,
|
447
|
+
TemplateSpecVersionInfo: TemplateSpecVersionInfo,
|
448
|
+
AzureResourceBase: AzureResourceBase,
|
449
|
+
SystemData: SystemData,
|
450
|
+
TemplateSpecsError: TemplateSpecsError,
|
451
|
+
ErrorResponse: ErrorResponse,
|
452
|
+
ErrorAdditionalInfo: ErrorAdditionalInfo,
|
453
|
+
TemplateSpecsListResult: TemplateSpecsListResult,
|
454
|
+
LinkedTemplateArtifact: LinkedTemplateArtifact,
|
455
|
+
TemplateSpecVersionsListResult: TemplateSpecVersionsListResult,
|
456
|
+
TemplateSpec: TemplateSpec,
|
457
|
+
TemplateSpecUpdateModel: TemplateSpecUpdateModel,
|
458
|
+
TemplateSpecVersion: TemplateSpecVersion,
|
459
|
+
TemplateSpecVersionUpdateModel: TemplateSpecVersionUpdateModel
|
460
|
+
});
|
461
|
+
|
462
|
+
/*
|
463
|
+
* Copyright (c) Microsoft Corporation.
|
464
|
+
* Licensed under the MIT License.
|
465
|
+
*
|
466
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
467
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
468
|
+
*/
|
469
|
+
const contentType = {
|
470
|
+
parameterPath: ["options", "contentType"],
|
471
|
+
mapper: {
|
472
|
+
defaultValue: "application/json",
|
473
|
+
isConstant: true,
|
474
|
+
serializedName: "Content-Type",
|
475
|
+
type: {
|
476
|
+
name: "String"
|
477
|
+
}
|
478
|
+
}
|
479
|
+
};
|
480
|
+
const templateSpec = {
|
481
|
+
parameterPath: "templateSpec",
|
482
|
+
mapper: TemplateSpec
|
483
|
+
};
|
484
|
+
const accept = {
|
485
|
+
parameterPath: "accept",
|
486
|
+
mapper: {
|
487
|
+
defaultValue: "application/json",
|
488
|
+
isConstant: true,
|
489
|
+
serializedName: "Accept",
|
490
|
+
type: {
|
491
|
+
name: "String"
|
492
|
+
}
|
493
|
+
}
|
494
|
+
};
|
495
|
+
const $host = {
|
496
|
+
parameterPath: "$host",
|
497
|
+
mapper: {
|
498
|
+
serializedName: "$host",
|
499
|
+
required: true,
|
500
|
+
type: {
|
501
|
+
name: "String"
|
502
|
+
}
|
503
|
+
},
|
504
|
+
skipEncoding: true
|
505
|
+
};
|
506
|
+
const subscriptionId = {
|
507
|
+
parameterPath: "subscriptionId",
|
508
|
+
mapper: {
|
509
|
+
serializedName: "subscriptionId",
|
510
|
+
required: true,
|
511
|
+
type: {
|
512
|
+
name: "String"
|
513
|
+
}
|
514
|
+
}
|
515
|
+
};
|
516
|
+
const resourceGroupName = {
|
517
|
+
parameterPath: "resourceGroupName",
|
518
|
+
mapper: {
|
519
|
+
constraints: {
|
520
|
+
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
|
521
|
+
MaxLength: 90,
|
522
|
+
MinLength: 1
|
523
|
+
},
|
524
|
+
serializedName: "resourceGroupName",
|
525
|
+
required: true,
|
526
|
+
type: {
|
527
|
+
name: "String"
|
528
|
+
}
|
529
|
+
}
|
530
|
+
};
|
531
|
+
const templateSpecName = {
|
532
|
+
parameterPath: "templateSpecName",
|
533
|
+
mapper: {
|
534
|
+
constraints: {
|
535
|
+
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
|
536
|
+
MaxLength: 90,
|
537
|
+
MinLength: 1
|
538
|
+
},
|
539
|
+
serializedName: "templateSpecName",
|
540
|
+
required: true,
|
541
|
+
type: {
|
542
|
+
name: "String"
|
543
|
+
}
|
544
|
+
}
|
545
|
+
};
|
546
|
+
const apiVersion = {
|
547
|
+
parameterPath: "apiVersion",
|
548
|
+
mapper: {
|
549
|
+
defaultValue: "2021-05-01",
|
550
|
+
isConstant: true,
|
551
|
+
serializedName: "api-version",
|
552
|
+
type: {
|
553
|
+
name: "String"
|
554
|
+
}
|
555
|
+
}
|
556
|
+
};
|
557
|
+
const templateSpec1 = {
|
558
|
+
parameterPath: ["options", "templateSpec"],
|
559
|
+
mapper: TemplateSpecUpdateModel
|
560
|
+
};
|
561
|
+
const expand = {
|
562
|
+
parameterPath: ["options", "expand"],
|
563
|
+
mapper: {
|
564
|
+
serializedName: "$expand",
|
565
|
+
type: {
|
566
|
+
name: "String"
|
567
|
+
}
|
568
|
+
}
|
569
|
+
};
|
570
|
+
const nextLink = {
|
571
|
+
parameterPath: "nextLink",
|
572
|
+
mapper: {
|
573
|
+
serializedName: "nextLink",
|
574
|
+
required: true,
|
575
|
+
type: {
|
576
|
+
name: "String"
|
577
|
+
}
|
578
|
+
},
|
579
|
+
skipEncoding: true
|
580
|
+
};
|
581
|
+
const templateSpecVersionModel = {
|
582
|
+
parameterPath: "templateSpecVersionModel",
|
583
|
+
mapper: TemplateSpecVersion
|
584
|
+
};
|
585
|
+
const templateSpecVersion = {
|
586
|
+
parameterPath: "templateSpecVersion",
|
587
|
+
mapper: {
|
588
|
+
constraints: {
|
589
|
+
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
|
590
|
+
MaxLength: 90,
|
591
|
+
MinLength: 1
|
592
|
+
},
|
593
|
+
serializedName: "templateSpecVersion",
|
594
|
+
required: true,
|
595
|
+
type: {
|
596
|
+
name: "String"
|
597
|
+
}
|
598
|
+
}
|
599
|
+
};
|
600
|
+
const templateSpecVersionUpdateModel = {
|
601
|
+
parameterPath: ["options", "templateSpecVersionUpdateModel"],
|
602
|
+
mapper: TemplateSpecVersionUpdateModel
|
603
|
+
};
|
604
|
+
|
605
|
+
/*
|
606
|
+
* Copyright (c) Microsoft Corporation.
|
607
|
+
* Licensed under the MIT License.
|
608
|
+
*
|
609
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
610
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
611
|
+
*/
|
612
|
+
/// <reference lib="esnext.asynciterable" />
|
613
|
+
/** Class containing TemplateSpecs operations. */
|
614
|
+
class TemplateSpecsImpl {
|
615
|
+
/**
|
616
|
+
* Initialize a new instance of the class TemplateSpecs class.
|
617
|
+
* @param client Reference to the service client
|
618
|
+
*/
|
619
|
+
constructor(client) {
|
620
|
+
this.client = client;
|
621
|
+
}
|
622
|
+
/**
|
623
|
+
* Lists all the Template Specs within the specified subscriptions.
|
624
|
+
* @param options The options parameters.
|
625
|
+
*/
|
626
|
+
listBySubscription(options) {
|
627
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
628
|
+
return {
|
629
|
+
next() {
|
630
|
+
return iter.next();
|
631
|
+
},
|
632
|
+
[Symbol.asyncIterator]() {
|
633
|
+
return this;
|
634
|
+
},
|
635
|
+
byPage: () => {
|
636
|
+
return this.listBySubscriptionPagingPage(options);
|
637
|
+
}
|
638
|
+
};
|
639
|
+
}
|
640
|
+
listBySubscriptionPagingPage(options) {
|
641
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
642
|
+
let result = yield tslib.__await(this._listBySubscription(options));
|
643
|
+
yield yield tslib.__await(result.value || []);
|
644
|
+
let continuationToken = result.nextLink;
|
645
|
+
while (continuationToken) {
|
646
|
+
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
647
|
+
continuationToken = result.nextLink;
|
648
|
+
yield yield tslib.__await(result.value || []);
|
649
|
+
}
|
650
|
+
});
|
651
|
+
}
|
652
|
+
listBySubscriptionPagingAll(options) {
|
653
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
|
654
|
+
var e_1, _a;
|
655
|
+
try {
|
656
|
+
for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
657
|
+
const page = _c.value;
|
658
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
659
|
+
}
|
660
|
+
}
|
661
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
662
|
+
finally {
|
663
|
+
try {
|
664
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
665
|
+
}
|
666
|
+
finally { if (e_1) throw e_1.error; }
|
667
|
+
}
|
668
|
+
});
|
669
|
+
}
|
670
|
+
/**
|
671
|
+
* Lists all the Template Specs within the specified resource group.
|
672
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
673
|
+
* @param options The options parameters.
|
674
|
+
*/
|
675
|
+
listByResourceGroup(resourceGroupName, options) {
|
676
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
677
|
+
return {
|
678
|
+
next() {
|
679
|
+
return iter.next();
|
680
|
+
},
|
681
|
+
[Symbol.asyncIterator]() {
|
682
|
+
return this;
|
683
|
+
},
|
684
|
+
byPage: () => {
|
685
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
686
|
+
}
|
687
|
+
};
|
688
|
+
}
|
689
|
+
listByResourceGroupPagingPage(resourceGroupName, options) {
|
690
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
691
|
+
let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
692
|
+
yield yield tslib.__await(result.value || []);
|
693
|
+
let continuationToken = result.nextLink;
|
694
|
+
while (continuationToken) {
|
695
|
+
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
696
|
+
continuationToken = result.nextLink;
|
697
|
+
yield yield tslib.__await(result.value || []);
|
698
|
+
}
|
699
|
+
});
|
700
|
+
}
|
701
|
+
listByResourceGroupPagingAll(resourceGroupName, options) {
|
702
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
703
|
+
var e_2, _a;
|
704
|
+
try {
|
705
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
706
|
+
const page = _c.value;
|
707
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
708
|
+
}
|
709
|
+
}
|
710
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
711
|
+
finally {
|
712
|
+
try {
|
713
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
714
|
+
}
|
715
|
+
finally { if (e_2) throw e_2.error; }
|
716
|
+
}
|
717
|
+
});
|
718
|
+
}
|
719
|
+
/**
|
720
|
+
* Creates or updates a Template Spec.
|
721
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
722
|
+
* @param templateSpecName Name of the Template Spec.
|
723
|
+
* @param templateSpec Template Spec supplied to the operation.
|
724
|
+
* @param options The options parameters.
|
725
|
+
*/
|
726
|
+
createOrUpdate(resourceGroupName, templateSpecName, templateSpec, options) {
|
727
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpec, options }, createOrUpdateOperationSpec);
|
728
|
+
}
|
729
|
+
/**
|
730
|
+
* Updates Template Spec tags with specified values.
|
731
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
732
|
+
* @param templateSpecName Name of the Template Spec.
|
733
|
+
* @param options The options parameters.
|
734
|
+
*/
|
735
|
+
update(resourceGroupName, templateSpecName, options) {
|
736
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, updateOperationSpec);
|
737
|
+
}
|
738
|
+
/**
|
739
|
+
* Gets a Template Spec with a given name.
|
740
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
741
|
+
* @param templateSpecName Name of the Template Spec.
|
742
|
+
* @param options The options parameters.
|
743
|
+
*/
|
744
|
+
get(resourceGroupName, templateSpecName, options) {
|
745
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, getOperationSpec);
|
746
|
+
}
|
747
|
+
/**
|
748
|
+
* Deletes a Template Spec by name. When operation completes, status code 200 returned without content.
|
749
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
750
|
+
* @param templateSpecName Name of the Template Spec.
|
751
|
+
* @param options The options parameters.
|
752
|
+
*/
|
753
|
+
delete(resourceGroupName, templateSpecName, options) {
|
754
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, deleteOperationSpec);
|
755
|
+
}
|
756
|
+
/**
|
757
|
+
* Lists all the Template Specs within the specified subscriptions.
|
758
|
+
* @param options The options parameters.
|
759
|
+
*/
|
760
|
+
_listBySubscription(options) {
|
761
|
+
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
|
762
|
+
}
|
763
|
+
/**
|
764
|
+
* Lists all the Template Specs within the specified resource group.
|
765
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
766
|
+
* @param options The options parameters.
|
767
|
+
*/
|
768
|
+
_listByResourceGroup(resourceGroupName, options) {
|
769
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
770
|
+
}
|
771
|
+
/**
|
772
|
+
* ListBySubscriptionNext
|
773
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
774
|
+
* @param options The options parameters.
|
775
|
+
*/
|
776
|
+
_listBySubscriptionNext(nextLink, options) {
|
777
|
+
return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
|
778
|
+
}
|
779
|
+
/**
|
780
|
+
* ListByResourceGroupNext
|
781
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
782
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
783
|
+
* @param options The options parameters.
|
784
|
+
*/
|
785
|
+
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
786
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
|
787
|
+
}
|
788
|
+
}
|
789
|
+
// Operation Specifications
|
790
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
791
|
+
const createOrUpdateOperationSpec = {
|
792
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
|
793
|
+
httpMethod: "PUT",
|
794
|
+
responses: {
|
795
|
+
200: {
|
796
|
+
bodyMapper: TemplateSpec
|
797
|
+
},
|
798
|
+
201: {
|
799
|
+
bodyMapper: TemplateSpec
|
800
|
+
},
|
801
|
+
default: {
|
802
|
+
bodyMapper: TemplateSpecsError
|
803
|
+
}
|
804
|
+
},
|
805
|
+
requestBody: templateSpec,
|
806
|
+
queryParameters: [apiVersion],
|
807
|
+
urlParameters: [
|
808
|
+
$host,
|
809
|
+
subscriptionId,
|
810
|
+
resourceGroupName,
|
811
|
+
templateSpecName
|
812
|
+
],
|
813
|
+
headerParameters: [contentType, accept],
|
814
|
+
mediaType: "json",
|
815
|
+
serializer
|
816
|
+
};
|
817
|
+
const updateOperationSpec = {
|
818
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
|
819
|
+
httpMethod: "PATCH",
|
820
|
+
responses: {
|
821
|
+
200: {
|
822
|
+
bodyMapper: TemplateSpec
|
823
|
+
},
|
824
|
+
default: {
|
825
|
+
bodyMapper: TemplateSpecsError
|
826
|
+
}
|
827
|
+
},
|
828
|
+
requestBody: templateSpec1,
|
829
|
+
queryParameters: [apiVersion],
|
830
|
+
urlParameters: [
|
831
|
+
$host,
|
832
|
+
subscriptionId,
|
833
|
+
resourceGroupName,
|
834
|
+
templateSpecName
|
835
|
+
],
|
836
|
+
headerParameters: [contentType, accept],
|
837
|
+
mediaType: "json",
|
838
|
+
serializer
|
839
|
+
};
|
840
|
+
const getOperationSpec = {
|
841
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
|
842
|
+
httpMethod: "GET",
|
843
|
+
responses: {
|
844
|
+
200: {
|
845
|
+
bodyMapper: TemplateSpec
|
846
|
+
},
|
847
|
+
default: {
|
848
|
+
bodyMapper: TemplateSpecsError
|
849
|
+
}
|
850
|
+
},
|
851
|
+
queryParameters: [apiVersion, expand],
|
852
|
+
urlParameters: [
|
853
|
+
$host,
|
854
|
+
subscriptionId,
|
855
|
+
resourceGroupName,
|
856
|
+
templateSpecName
|
857
|
+
],
|
858
|
+
headerParameters: [accept],
|
859
|
+
serializer
|
860
|
+
};
|
861
|
+
const deleteOperationSpec = {
|
862
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}",
|
863
|
+
httpMethod: "DELETE",
|
864
|
+
responses: {
|
865
|
+
200: {},
|
866
|
+
204: {},
|
867
|
+
default: {
|
868
|
+
bodyMapper: TemplateSpecsError
|
869
|
+
}
|
870
|
+
},
|
871
|
+
queryParameters: [apiVersion],
|
872
|
+
urlParameters: [
|
873
|
+
$host,
|
874
|
+
subscriptionId,
|
875
|
+
resourceGroupName,
|
876
|
+
templateSpecName
|
877
|
+
],
|
878
|
+
headerParameters: [accept],
|
879
|
+
serializer
|
880
|
+
};
|
881
|
+
const listBySubscriptionOperationSpec = {
|
882
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Resources/templateSpecs/",
|
883
|
+
httpMethod: "GET",
|
884
|
+
responses: {
|
885
|
+
200: {
|
886
|
+
bodyMapper: TemplateSpecsListResult
|
887
|
+
},
|
888
|
+
default: {
|
889
|
+
bodyMapper: TemplateSpecsError
|
890
|
+
}
|
891
|
+
},
|
892
|
+
queryParameters: [apiVersion, expand],
|
893
|
+
urlParameters: [$host, subscriptionId],
|
894
|
+
headerParameters: [accept],
|
895
|
+
serializer
|
896
|
+
};
|
897
|
+
const listByResourceGroupOperationSpec = {
|
898
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/",
|
899
|
+
httpMethod: "GET",
|
900
|
+
responses: {
|
901
|
+
200: {
|
902
|
+
bodyMapper: TemplateSpecsListResult
|
903
|
+
},
|
904
|
+
default: {
|
905
|
+
bodyMapper: TemplateSpecsError
|
906
|
+
}
|
907
|
+
},
|
908
|
+
queryParameters: [apiVersion, expand],
|
909
|
+
urlParameters: [
|
910
|
+
$host,
|
911
|
+
subscriptionId,
|
912
|
+
resourceGroupName
|
913
|
+
],
|
914
|
+
headerParameters: [accept],
|
915
|
+
serializer
|
916
|
+
};
|
917
|
+
const listBySubscriptionNextOperationSpec = {
|
918
|
+
path: "{nextLink}",
|
919
|
+
httpMethod: "GET",
|
920
|
+
responses: {
|
921
|
+
200: {
|
922
|
+
bodyMapper: TemplateSpecsListResult
|
923
|
+
},
|
924
|
+
default: {
|
925
|
+
bodyMapper: TemplateSpecsError
|
926
|
+
}
|
927
|
+
},
|
928
|
+
queryParameters: [apiVersion, expand],
|
929
|
+
urlParameters: [
|
930
|
+
$host,
|
931
|
+
subscriptionId,
|
932
|
+
nextLink
|
933
|
+
],
|
934
|
+
headerParameters: [accept],
|
935
|
+
serializer
|
936
|
+
};
|
937
|
+
const listByResourceGroupNextOperationSpec = {
|
938
|
+
path: "{nextLink}",
|
939
|
+
httpMethod: "GET",
|
940
|
+
responses: {
|
941
|
+
200: {
|
942
|
+
bodyMapper: TemplateSpecsListResult
|
943
|
+
},
|
944
|
+
default: {
|
945
|
+
bodyMapper: TemplateSpecsError
|
946
|
+
}
|
947
|
+
},
|
948
|
+
queryParameters: [apiVersion, expand],
|
949
|
+
urlParameters: [
|
950
|
+
$host,
|
951
|
+
subscriptionId,
|
952
|
+
resourceGroupName,
|
953
|
+
nextLink
|
954
|
+
],
|
955
|
+
headerParameters: [accept],
|
956
|
+
serializer
|
957
|
+
};
|
958
|
+
|
959
|
+
/*
|
960
|
+
* Copyright (c) Microsoft Corporation.
|
961
|
+
* Licensed under the MIT License.
|
962
|
+
*
|
963
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
964
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
965
|
+
*/
|
966
|
+
/// <reference lib="esnext.asynciterable" />
|
967
|
+
/** Class containing TemplateSpecVersions operations. */
|
968
|
+
class TemplateSpecVersionsImpl {
|
969
|
+
/**
|
970
|
+
* Initialize a new instance of the class TemplateSpecVersions class.
|
971
|
+
* @param client Reference to the service client
|
972
|
+
*/
|
973
|
+
constructor(client) {
|
974
|
+
this.client = client;
|
975
|
+
}
|
976
|
+
/**
|
977
|
+
* Lists all the Template Spec versions in the specified Template Spec.
|
978
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
979
|
+
* @param templateSpecName Name of the Template Spec.
|
980
|
+
* @param options The options parameters.
|
981
|
+
*/
|
982
|
+
list(resourceGroupName, templateSpecName, options) {
|
983
|
+
const iter = this.listPagingAll(resourceGroupName, templateSpecName, options);
|
984
|
+
return {
|
985
|
+
next() {
|
986
|
+
return iter.next();
|
987
|
+
},
|
988
|
+
[Symbol.asyncIterator]() {
|
989
|
+
return this;
|
990
|
+
},
|
991
|
+
byPage: () => {
|
992
|
+
return this.listPagingPage(resourceGroupName, templateSpecName, options);
|
993
|
+
}
|
994
|
+
};
|
995
|
+
}
|
996
|
+
listPagingPage(resourceGroupName, templateSpecName, options) {
|
997
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
998
|
+
let result = yield tslib.__await(this._list(resourceGroupName, templateSpecName, options));
|
999
|
+
yield yield tslib.__await(result.value || []);
|
1000
|
+
let continuationToken = result.nextLink;
|
1001
|
+
while (continuationToken) {
|
1002
|
+
result = yield tslib.__await(this._listNext(resourceGroupName, templateSpecName, continuationToken, options));
|
1003
|
+
continuationToken = result.nextLink;
|
1004
|
+
yield yield tslib.__await(result.value || []);
|
1005
|
+
}
|
1006
|
+
});
|
1007
|
+
}
|
1008
|
+
listPagingAll(resourceGroupName, templateSpecName, options) {
|
1009
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
1010
|
+
var e_1, _a;
|
1011
|
+
try {
|
1012
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, templateSpecName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
1013
|
+
const page = _c.value;
|
1014
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
1015
|
+
}
|
1016
|
+
}
|
1017
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
1018
|
+
finally {
|
1019
|
+
try {
|
1020
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
1021
|
+
}
|
1022
|
+
finally { if (e_1) throw e_1.error; }
|
1023
|
+
}
|
1024
|
+
});
|
1025
|
+
}
|
1026
|
+
/**
|
1027
|
+
* Creates or updates a Template Spec version.
|
1028
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
1029
|
+
* @param templateSpecName Name of the Template Spec.
|
1030
|
+
* @param templateSpecVersion The version of the Template Spec.
|
1031
|
+
* @param templateSpecVersionModel Template Spec Version supplied to the operation.
|
1032
|
+
* @param options The options parameters.
|
1033
|
+
*/
|
1034
|
+
createOrUpdate(resourceGroupName, templateSpecName, templateSpecVersion, templateSpecVersionModel, options) {
|
1035
|
+
return this.client.sendOperationRequest({
|
1036
|
+
resourceGroupName,
|
1037
|
+
templateSpecName,
|
1038
|
+
templateSpecVersion,
|
1039
|
+
templateSpecVersionModel,
|
1040
|
+
options
|
1041
|
+
}, createOrUpdateOperationSpec$1);
|
1042
|
+
}
|
1043
|
+
/**
|
1044
|
+
* Updates Template Spec Version tags with specified values.
|
1045
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
1046
|
+
* @param templateSpecName Name of the Template Spec.
|
1047
|
+
* @param templateSpecVersion The version of the Template Spec.
|
1048
|
+
* @param options The options parameters.
|
1049
|
+
*/
|
1050
|
+
update(resourceGroupName, templateSpecName, templateSpecVersion, options) {
|
1051
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpecVersion, options }, updateOperationSpec$1);
|
1052
|
+
}
|
1053
|
+
/**
|
1054
|
+
* Gets a Template Spec version from a specific Template Spec.
|
1055
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
1056
|
+
* @param templateSpecName Name of the Template Spec.
|
1057
|
+
* @param templateSpecVersion The version of the Template Spec.
|
1058
|
+
* @param options The options parameters.
|
1059
|
+
*/
|
1060
|
+
get(resourceGroupName, templateSpecName, templateSpecVersion, options) {
|
1061
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpecVersion, options }, getOperationSpec$1);
|
1062
|
+
}
|
1063
|
+
/**
|
1064
|
+
* Deletes a specific version from a Template Spec. When operation completes, status code 200 returned
|
1065
|
+
* without content.
|
1066
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
1067
|
+
* @param templateSpecName Name of the Template Spec.
|
1068
|
+
* @param templateSpecVersion The version of the Template Spec.
|
1069
|
+
* @param options The options parameters.
|
1070
|
+
*/
|
1071
|
+
delete(resourceGroupName, templateSpecName, templateSpecVersion, options) {
|
1072
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, templateSpecVersion, options }, deleteOperationSpec$1);
|
1073
|
+
}
|
1074
|
+
/**
|
1075
|
+
* Lists all the Template Spec versions in the specified Template Spec.
|
1076
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
1077
|
+
* @param templateSpecName Name of the Template Spec.
|
1078
|
+
* @param options The options parameters.
|
1079
|
+
*/
|
1080
|
+
_list(resourceGroupName, templateSpecName, options) {
|
1081
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, options }, listOperationSpec);
|
1082
|
+
}
|
1083
|
+
/**
|
1084
|
+
* ListNext
|
1085
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
1086
|
+
* @param templateSpecName Name of the Template Spec.
|
1087
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
1088
|
+
* @param options The options parameters.
|
1089
|
+
*/
|
1090
|
+
_listNext(resourceGroupName, templateSpecName, nextLink, options) {
|
1091
|
+
return this.client.sendOperationRequest({ resourceGroupName, templateSpecName, nextLink, options }, listNextOperationSpec);
|
1092
|
+
}
|
1093
|
+
}
|
1094
|
+
// Operation Specifications
|
1095
|
+
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
1096
|
+
const createOrUpdateOperationSpec$1 = {
|
1097
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
|
1098
|
+
httpMethod: "PUT",
|
1099
|
+
responses: {
|
1100
|
+
200: {
|
1101
|
+
bodyMapper: TemplateSpecVersion
|
1102
|
+
},
|
1103
|
+
201: {
|
1104
|
+
bodyMapper: TemplateSpecVersion
|
1105
|
+
},
|
1106
|
+
default: {
|
1107
|
+
bodyMapper: TemplateSpecsError
|
1108
|
+
}
|
1109
|
+
},
|
1110
|
+
requestBody: templateSpecVersionModel,
|
1111
|
+
queryParameters: [apiVersion],
|
1112
|
+
urlParameters: [
|
1113
|
+
$host,
|
1114
|
+
subscriptionId,
|
1115
|
+
resourceGroupName,
|
1116
|
+
templateSpecName,
|
1117
|
+
templateSpecVersion
|
1118
|
+
],
|
1119
|
+
headerParameters: [contentType, accept],
|
1120
|
+
mediaType: "json",
|
1121
|
+
serializer: serializer$1
|
1122
|
+
};
|
1123
|
+
const updateOperationSpec$1 = {
|
1124
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
|
1125
|
+
httpMethod: "PATCH",
|
1126
|
+
responses: {
|
1127
|
+
200: {
|
1128
|
+
bodyMapper: TemplateSpecVersion
|
1129
|
+
},
|
1130
|
+
default: {
|
1131
|
+
bodyMapper: TemplateSpecsError
|
1132
|
+
}
|
1133
|
+
},
|
1134
|
+
requestBody: templateSpecVersionUpdateModel,
|
1135
|
+
queryParameters: [apiVersion],
|
1136
|
+
urlParameters: [
|
1137
|
+
$host,
|
1138
|
+
subscriptionId,
|
1139
|
+
resourceGroupName,
|
1140
|
+
templateSpecName,
|
1141
|
+
templateSpecVersion
|
1142
|
+
],
|
1143
|
+
headerParameters: [contentType, accept],
|
1144
|
+
mediaType: "json",
|
1145
|
+
serializer: serializer$1
|
1146
|
+
};
|
1147
|
+
const getOperationSpec$1 = {
|
1148
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
|
1149
|
+
httpMethod: "GET",
|
1150
|
+
responses: {
|
1151
|
+
200: {
|
1152
|
+
bodyMapper: TemplateSpecVersion
|
1153
|
+
},
|
1154
|
+
default: {
|
1155
|
+
bodyMapper: TemplateSpecsError
|
1156
|
+
}
|
1157
|
+
},
|
1158
|
+
queryParameters: [apiVersion],
|
1159
|
+
urlParameters: [
|
1160
|
+
$host,
|
1161
|
+
subscriptionId,
|
1162
|
+
resourceGroupName,
|
1163
|
+
templateSpecName,
|
1164
|
+
templateSpecVersion
|
1165
|
+
],
|
1166
|
+
headerParameters: [accept],
|
1167
|
+
serializer: serializer$1
|
1168
|
+
};
|
1169
|
+
const deleteOperationSpec$1 = {
|
1170
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions/{templateSpecVersion}",
|
1171
|
+
httpMethod: "DELETE",
|
1172
|
+
responses: {
|
1173
|
+
200: {},
|
1174
|
+
204: {},
|
1175
|
+
default: {
|
1176
|
+
bodyMapper: TemplateSpecsError
|
1177
|
+
}
|
1178
|
+
},
|
1179
|
+
queryParameters: [apiVersion],
|
1180
|
+
urlParameters: [
|
1181
|
+
$host,
|
1182
|
+
subscriptionId,
|
1183
|
+
resourceGroupName,
|
1184
|
+
templateSpecName,
|
1185
|
+
templateSpecVersion
|
1186
|
+
],
|
1187
|
+
headerParameters: [accept],
|
1188
|
+
serializer: serializer$1
|
1189
|
+
};
|
1190
|
+
const listOperationSpec = {
|
1191
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Resources/templateSpecs/{templateSpecName}/versions",
|
1192
|
+
httpMethod: "GET",
|
1193
|
+
responses: {
|
1194
|
+
200: {
|
1195
|
+
bodyMapper: TemplateSpecVersionsListResult
|
1196
|
+
},
|
1197
|
+
default: {
|
1198
|
+
bodyMapper: TemplateSpecsError
|
1199
|
+
}
|
1200
|
+
},
|
1201
|
+
queryParameters: [apiVersion],
|
1202
|
+
urlParameters: [
|
1203
|
+
$host,
|
1204
|
+
subscriptionId,
|
1205
|
+
resourceGroupName,
|
1206
|
+
templateSpecName
|
1207
|
+
],
|
1208
|
+
headerParameters: [accept],
|
1209
|
+
serializer: serializer$1
|
1210
|
+
};
|
1211
|
+
const listNextOperationSpec = {
|
1212
|
+
path: "{nextLink}",
|
1213
|
+
httpMethod: "GET",
|
1214
|
+
responses: {
|
1215
|
+
200: {
|
1216
|
+
bodyMapper: TemplateSpecVersionsListResult
|
1217
|
+
},
|
1218
|
+
default: {
|
1219
|
+
bodyMapper: TemplateSpecsError
|
1220
|
+
}
|
1221
|
+
},
|
1222
|
+
queryParameters: [apiVersion],
|
1223
|
+
urlParameters: [
|
1224
|
+
$host,
|
1225
|
+
subscriptionId,
|
1226
|
+
resourceGroupName,
|
1227
|
+
templateSpecName,
|
1228
|
+
nextLink
|
1229
|
+
],
|
1230
|
+
headerParameters: [accept],
|
1231
|
+
serializer: serializer$1
|
1232
|
+
};
|
1233
|
+
|
1234
|
+
/*
|
1235
|
+
* Copyright (c) Microsoft Corporation.
|
1236
|
+
* Licensed under the MIT License.
|
1237
|
+
*
|
1238
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
1239
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
1240
|
+
*/
|
1241
|
+
class TemplateSpecsClient extends coreClient.ServiceClient {
|
1242
|
+
/**
|
1243
|
+
* Initializes a new instance of the TemplateSpecsClient class.
|
1244
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
1245
|
+
* @param subscriptionId Subscription Id which forms part of the URI for every service call.
|
1246
|
+
* @param options The parameter options
|
1247
|
+
*/
|
1248
|
+
constructor(credentials, subscriptionId, options) {
|
1249
|
+
if (credentials === undefined) {
|
1250
|
+
throw new Error("'credentials' cannot be null");
|
1251
|
+
}
|
1252
|
+
if (subscriptionId === undefined) {
|
1253
|
+
throw new Error("'subscriptionId' cannot be null");
|
1254
|
+
}
|
1255
|
+
// Initializing default values for options
|
1256
|
+
if (!options) {
|
1257
|
+
options = {};
|
1258
|
+
}
|
1259
|
+
const defaults = {
|
1260
|
+
requestContentType: "application/json; charset=utf-8",
|
1261
|
+
credential: credentials
|
1262
|
+
};
|
1263
|
+
const packageDetails = `azsdk-js-arm-templatespecs/2.0.0`;
|
1264
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
1265
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
1266
|
+
: `${packageDetails}`;
|
1267
|
+
if (!options.credentialScopes) {
|
1268
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
1269
|
+
}
|
1270
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
1271
|
+
userAgentPrefix
|
1272
|
+
}, baseUri: options.endpoint || "https://management.azure.com" });
|
1273
|
+
super(optionsWithDefaults);
|
1274
|
+
// Parameter assignments
|
1275
|
+
this.subscriptionId = subscriptionId;
|
1276
|
+
// Assigning values to Constant parameters
|
1277
|
+
this.$host = options.$host || "https://management.azure.com";
|
1278
|
+
this.apiVersion = options.apiVersion || "2021-05-01";
|
1279
|
+
this.templateSpecs = new TemplateSpecsImpl(this);
|
1280
|
+
this.templateSpecVersions = new TemplateSpecVersionsImpl(this);
|
1281
|
+
}
|
1282
|
+
}
|
1283
|
+
|
1284
|
+
exports.TemplateSpecsClient = TemplateSpecsClient;
|
1285
|
+
//# sourceMappingURL=index.js.map
|