@azure/arm-changes 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 +109 -0
- package/dist/index.js +747 -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/samples-dev/changesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/changesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/changesGetSample.js +34 -0
- package/dist-esm/samples-dev/changesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/changesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/changesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/changesListSample.js +47 -0
- package/dist-esm/samples-dev/changesListSample.js.map +1 -0
- package/dist-esm/src/changesClient.d.ts +19 -0
- package/dist-esm/src/changesClient.d.ts.map +1 -0
- package/dist-esm/src/changesClient.js +70 -0
- package/dist-esm/src/changesClient.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 +191 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +9 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +11 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +294 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +14 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +135 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/changes.d.ts +54 -0
- package/dist-esm/src/operations/changes.d.ts.map +1 -0
- package/dist-esm/src/operations/changes.js +211 -0
- package/dist-esm/src/operations/changes.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +2 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +9 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/changes.d.ts +25 -0
- package/dist-esm/src/operationsInterfaces/changes.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/changes.js +9 -0
- package/dist-esm/src/operationsInterfaces/changes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +9 -0
- package/dist-esm/src/operationsInterfaces/index.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 +116 -0
- package/review/arm-changes.api.md +139 -0
- package/rollup.config.js +122 -0
- package/src/changesClient.ts +101 -0
- package/src/index.ts +12 -0
- package/src/models/index.ts +213 -0
- package/src/models/mappers.ts +307 -0
- package/src/models/parameters.ts +152 -0
- package/src/operations/changes.ts +297 -0
- package/src/operations/index.ts +9 -0
- package/src/operationsInterfaces/changes.ts +52 -0
- package/src/operationsInterfaces/index.ts +9 -0
- package/tsconfig.json +33 -0
- package/types/arm-changes.d.ts +251 -0
- package/types/tsdoc-metadata.json +11 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,747 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var coreClient = require('@azure/core-client');
|
|
6
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
|
+
var tslib = require('tslib');
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* Copyright (c) Microsoft Corporation.
|
|
32
|
+
* Licensed under the MIT License.
|
|
33
|
+
*
|
|
34
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
35
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
36
|
+
*/
|
|
37
|
+
const ChangeResourceListResult = {
|
|
38
|
+
type: {
|
|
39
|
+
name: "Composite",
|
|
40
|
+
className: "ChangeResourceListResult",
|
|
41
|
+
modelProperties: {
|
|
42
|
+
nextLink: {
|
|
43
|
+
serializedName: "nextLink",
|
|
44
|
+
type: {
|
|
45
|
+
name: "String"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
value: {
|
|
49
|
+
serializedName: "value",
|
|
50
|
+
type: {
|
|
51
|
+
name: "Sequence",
|
|
52
|
+
element: {
|
|
53
|
+
type: {
|
|
54
|
+
name: "Composite",
|
|
55
|
+
className: "ChangeResourceResult"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const ChangeProperties = {
|
|
64
|
+
type: {
|
|
65
|
+
name: "Composite",
|
|
66
|
+
className: "ChangeProperties",
|
|
67
|
+
modelProperties: {
|
|
68
|
+
targetResourceId: {
|
|
69
|
+
serializedName: "targetResourceId",
|
|
70
|
+
readOnly: true,
|
|
71
|
+
type: {
|
|
72
|
+
name: "String"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
targetResourceType: {
|
|
76
|
+
serializedName: "targetResourceType",
|
|
77
|
+
readOnly: true,
|
|
78
|
+
type: {
|
|
79
|
+
name: "String"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
changeType: {
|
|
83
|
+
serializedName: "changeType",
|
|
84
|
+
readOnly: true,
|
|
85
|
+
type: {
|
|
86
|
+
name: "Enum",
|
|
87
|
+
allowedValues: ["Update", "Delete", "Create"]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
changeAttributes: {
|
|
91
|
+
serializedName: "changeAttributes",
|
|
92
|
+
type: {
|
|
93
|
+
name: "Composite",
|
|
94
|
+
className: "ChangeAttributes"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
changes: {
|
|
98
|
+
serializedName: "changes",
|
|
99
|
+
type: {
|
|
100
|
+
name: "Dictionary",
|
|
101
|
+
value: { type: { name: "Composite", className: "ChangeBase" } }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
const ChangeAttributes = {
|
|
108
|
+
type: {
|
|
109
|
+
name: "Composite",
|
|
110
|
+
className: "ChangeAttributes",
|
|
111
|
+
modelProperties: {
|
|
112
|
+
correlationId: {
|
|
113
|
+
serializedName: "correlationId",
|
|
114
|
+
readOnly: true,
|
|
115
|
+
type: {
|
|
116
|
+
name: "String"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
timestamp: {
|
|
120
|
+
serializedName: "timestamp",
|
|
121
|
+
readOnly: true,
|
|
122
|
+
type: {
|
|
123
|
+
name: "String"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
changesCount: {
|
|
127
|
+
serializedName: "changesCount",
|
|
128
|
+
readOnly: true,
|
|
129
|
+
type: {
|
|
130
|
+
name: "Number"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
previousResourceSnapshotId: {
|
|
134
|
+
serializedName: "previousResourceSnapshotId",
|
|
135
|
+
readOnly: true,
|
|
136
|
+
type: {
|
|
137
|
+
name: "String"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
newResourceSnapshotId: {
|
|
141
|
+
serializedName: "newResourceSnapshotId",
|
|
142
|
+
readOnly: true,
|
|
143
|
+
type: {
|
|
144
|
+
name: "String"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const ChangeBase = {
|
|
151
|
+
type: {
|
|
152
|
+
name: "Composite",
|
|
153
|
+
className: "ChangeBase",
|
|
154
|
+
modelProperties: {
|
|
155
|
+
propertyChangeType: {
|
|
156
|
+
serializedName: "propertyChangeType",
|
|
157
|
+
readOnly: true,
|
|
158
|
+
type: {
|
|
159
|
+
name: "Enum",
|
|
160
|
+
allowedValues: ["Update", "Insert", "Remove"]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
changeCategory: {
|
|
164
|
+
serializedName: "changeCategory",
|
|
165
|
+
readOnly: true,
|
|
166
|
+
type: {
|
|
167
|
+
name: "Enum",
|
|
168
|
+
allowedValues: ["User", "System"]
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
previousValue: {
|
|
172
|
+
serializedName: "previousValue",
|
|
173
|
+
readOnly: true,
|
|
174
|
+
type: {
|
|
175
|
+
name: "String"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
newValue: {
|
|
179
|
+
serializedName: "newValue",
|
|
180
|
+
readOnly: true,
|
|
181
|
+
type: {
|
|
182
|
+
name: "String"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
const Resource = {
|
|
189
|
+
type: {
|
|
190
|
+
name: "Composite",
|
|
191
|
+
className: "Resource",
|
|
192
|
+
modelProperties: {
|
|
193
|
+
id: {
|
|
194
|
+
serializedName: "id",
|
|
195
|
+
readOnly: true,
|
|
196
|
+
type: {
|
|
197
|
+
name: "String"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
name: {
|
|
201
|
+
serializedName: "name",
|
|
202
|
+
readOnly: true,
|
|
203
|
+
type: {
|
|
204
|
+
name: "String"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
type: {
|
|
208
|
+
serializedName: "type",
|
|
209
|
+
readOnly: true,
|
|
210
|
+
type: {
|
|
211
|
+
name: "String"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
const ErrorResponse = {
|
|
218
|
+
type: {
|
|
219
|
+
name: "Composite",
|
|
220
|
+
className: "ErrorResponse",
|
|
221
|
+
modelProperties: {
|
|
222
|
+
error: {
|
|
223
|
+
serializedName: "error",
|
|
224
|
+
type: {
|
|
225
|
+
name: "Composite",
|
|
226
|
+
className: "ErrorDetail"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
const ErrorDetail = {
|
|
233
|
+
type: {
|
|
234
|
+
name: "Composite",
|
|
235
|
+
className: "ErrorDetail",
|
|
236
|
+
modelProperties: {
|
|
237
|
+
code: {
|
|
238
|
+
serializedName: "code",
|
|
239
|
+
readOnly: true,
|
|
240
|
+
type: {
|
|
241
|
+
name: "String"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
message: {
|
|
245
|
+
serializedName: "message",
|
|
246
|
+
readOnly: true,
|
|
247
|
+
type: {
|
|
248
|
+
name: "String"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
target: {
|
|
252
|
+
serializedName: "target",
|
|
253
|
+
readOnly: true,
|
|
254
|
+
type: {
|
|
255
|
+
name: "String"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
details: {
|
|
259
|
+
serializedName: "details",
|
|
260
|
+
readOnly: true,
|
|
261
|
+
type: {
|
|
262
|
+
name: "Sequence",
|
|
263
|
+
element: {
|
|
264
|
+
type: {
|
|
265
|
+
name: "Composite",
|
|
266
|
+
className: "ErrorDetail"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
additionalInfo: {
|
|
272
|
+
serializedName: "additionalInfo",
|
|
273
|
+
readOnly: true,
|
|
274
|
+
type: {
|
|
275
|
+
name: "Sequence",
|
|
276
|
+
element: {
|
|
277
|
+
type: {
|
|
278
|
+
name: "Composite",
|
|
279
|
+
className: "ErrorAdditionalInfo"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
const ErrorAdditionalInfo = {
|
|
288
|
+
type: {
|
|
289
|
+
name: "Composite",
|
|
290
|
+
className: "ErrorAdditionalInfo",
|
|
291
|
+
modelProperties: {
|
|
292
|
+
type: {
|
|
293
|
+
serializedName: "type",
|
|
294
|
+
readOnly: true,
|
|
295
|
+
type: {
|
|
296
|
+
name: "String"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
info: {
|
|
300
|
+
serializedName: "info",
|
|
301
|
+
readOnly: true,
|
|
302
|
+
type: {
|
|
303
|
+
name: "Dictionary",
|
|
304
|
+
value: { type: { name: "any" } }
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
const ChangeResourceResult = {
|
|
311
|
+
type: {
|
|
312
|
+
name: "Composite",
|
|
313
|
+
className: "ChangeResourceResult",
|
|
314
|
+
modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { properties: {
|
|
315
|
+
serializedName: "properties",
|
|
316
|
+
type: {
|
|
317
|
+
name: "Composite",
|
|
318
|
+
className: "ChangeProperties"
|
|
319
|
+
}
|
|
320
|
+
} })
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
325
|
+
__proto__: null,
|
|
326
|
+
ChangeResourceListResult: ChangeResourceListResult,
|
|
327
|
+
ChangeProperties: ChangeProperties,
|
|
328
|
+
ChangeAttributes: ChangeAttributes,
|
|
329
|
+
ChangeBase: ChangeBase,
|
|
330
|
+
Resource: Resource,
|
|
331
|
+
ErrorResponse: ErrorResponse,
|
|
332
|
+
ErrorDetail: ErrorDetail,
|
|
333
|
+
ErrorAdditionalInfo: ErrorAdditionalInfo,
|
|
334
|
+
ChangeResourceResult: ChangeResourceResult
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
/*
|
|
338
|
+
* Copyright (c) Microsoft Corporation.
|
|
339
|
+
* Licensed under the MIT License.
|
|
340
|
+
*
|
|
341
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
342
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
343
|
+
*/
|
|
344
|
+
const accept = {
|
|
345
|
+
parameterPath: "accept",
|
|
346
|
+
mapper: {
|
|
347
|
+
defaultValue: "application/json",
|
|
348
|
+
isConstant: true,
|
|
349
|
+
serializedName: "Accept",
|
|
350
|
+
type: {
|
|
351
|
+
name: "String"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
const $host = {
|
|
356
|
+
parameterPath: "$host",
|
|
357
|
+
mapper: {
|
|
358
|
+
serializedName: "$host",
|
|
359
|
+
required: true,
|
|
360
|
+
type: {
|
|
361
|
+
name: "String"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
skipEncoding: true
|
|
365
|
+
};
|
|
366
|
+
const subscriptionId = {
|
|
367
|
+
parameterPath: "subscriptionId",
|
|
368
|
+
mapper: {
|
|
369
|
+
serializedName: "subscriptionId",
|
|
370
|
+
required: true,
|
|
371
|
+
type: {
|
|
372
|
+
name: "String"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
const resourceGroupName = {
|
|
377
|
+
parameterPath: "resourceGroupName",
|
|
378
|
+
mapper: {
|
|
379
|
+
serializedName: "resourceGroupName",
|
|
380
|
+
required: true,
|
|
381
|
+
type: {
|
|
382
|
+
name: "String"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
const resourceProviderNamespace = {
|
|
387
|
+
parameterPath: "resourceProviderNamespace",
|
|
388
|
+
mapper: {
|
|
389
|
+
serializedName: "resourceProviderNamespace",
|
|
390
|
+
required: true,
|
|
391
|
+
type: {
|
|
392
|
+
name: "String"
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
const resourceType = {
|
|
397
|
+
parameterPath: "resourceType",
|
|
398
|
+
mapper: {
|
|
399
|
+
serializedName: "resourceType",
|
|
400
|
+
required: true,
|
|
401
|
+
type: {
|
|
402
|
+
name: "String"
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
const resourceName = {
|
|
407
|
+
parameterPath: "resourceName",
|
|
408
|
+
mapper: {
|
|
409
|
+
serializedName: "resourceName",
|
|
410
|
+
required: true,
|
|
411
|
+
type: {
|
|
412
|
+
name: "String"
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
const apiVersion = {
|
|
417
|
+
parameterPath: "apiVersion",
|
|
418
|
+
mapper: {
|
|
419
|
+
defaultValue: "2022-05-01",
|
|
420
|
+
isConstant: true,
|
|
421
|
+
serializedName: "api-version",
|
|
422
|
+
type: {
|
|
423
|
+
name: "String"
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const top = {
|
|
428
|
+
parameterPath: ["options", "top"],
|
|
429
|
+
mapper: {
|
|
430
|
+
defaultValue: 100,
|
|
431
|
+
constraints: {
|
|
432
|
+
InclusiveMaximum: 100,
|
|
433
|
+
InclusiveMinimum: 1
|
|
434
|
+
},
|
|
435
|
+
serializedName: "$top",
|
|
436
|
+
type: {
|
|
437
|
+
name: "Number"
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
const skipToken = {
|
|
442
|
+
parameterPath: ["options", "skipToken"],
|
|
443
|
+
mapper: {
|
|
444
|
+
serializedName: "$skipToken",
|
|
445
|
+
type: {
|
|
446
|
+
name: "String"
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
const changeResourceId = {
|
|
451
|
+
parameterPath: "changeResourceId",
|
|
452
|
+
mapper: {
|
|
453
|
+
serializedName: "changeResourceId",
|
|
454
|
+
required: true,
|
|
455
|
+
type: {
|
|
456
|
+
name: "String"
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
const nextLink = {
|
|
461
|
+
parameterPath: "nextLink",
|
|
462
|
+
mapper: {
|
|
463
|
+
serializedName: "nextLink",
|
|
464
|
+
required: true,
|
|
465
|
+
type: {
|
|
466
|
+
name: "String"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
skipEncoding: true
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
/*
|
|
473
|
+
* Copyright (c) Microsoft Corporation.
|
|
474
|
+
* Licensed under the MIT License.
|
|
475
|
+
*
|
|
476
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
477
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
478
|
+
*/
|
|
479
|
+
/// <reference lib="esnext.asynciterable" />
|
|
480
|
+
/** Class containing Changes operations. */
|
|
481
|
+
class ChangesImpl {
|
|
482
|
+
/**
|
|
483
|
+
* Initialize a new instance of the class Changes class.
|
|
484
|
+
* @param client Reference to the service client
|
|
485
|
+
*/
|
|
486
|
+
constructor(client) {
|
|
487
|
+
this.client = client;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Obtains a list of change resources from the past 14 days for the target resource
|
|
491
|
+
* @param resourceGroupName The name of the resource group.
|
|
492
|
+
* @param resourceProviderNamespace The name of the resource provider namespace.
|
|
493
|
+
* @param resourceType The name of the resource type.
|
|
494
|
+
* @param resourceName The name of the resource.
|
|
495
|
+
* @param options The options parameters.
|
|
496
|
+
*/
|
|
497
|
+
list(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options) {
|
|
498
|
+
const iter = this.listPagingAll(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options);
|
|
499
|
+
return {
|
|
500
|
+
next() {
|
|
501
|
+
return iter.next();
|
|
502
|
+
},
|
|
503
|
+
[Symbol.asyncIterator]() {
|
|
504
|
+
return this;
|
|
505
|
+
},
|
|
506
|
+
byPage: () => {
|
|
507
|
+
return this.listPagingPage(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options);
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
listPagingPage(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options) {
|
|
512
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
513
|
+
let result = yield tslib.__await(this._list(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options));
|
|
514
|
+
yield yield tslib.__await(result.value || []);
|
|
515
|
+
let continuationToken = result.nextLink;
|
|
516
|
+
while (continuationToken) {
|
|
517
|
+
result = yield tslib.__await(this._listNext(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, continuationToken, options));
|
|
518
|
+
continuationToken = result.nextLink;
|
|
519
|
+
yield yield tslib.__await(result.value || []);
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
listPagingAll(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options) {
|
|
524
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
525
|
+
var e_1, _a;
|
|
526
|
+
try {
|
|
527
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
528
|
+
const page = _c.value;
|
|
529
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
533
|
+
finally {
|
|
534
|
+
try {
|
|
535
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
536
|
+
}
|
|
537
|
+
finally { if (e_1) throw e_1.error; }
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Obtains a list of change resources from the past 14 days for the target resource
|
|
543
|
+
* @param resourceGroupName The name of the resource group.
|
|
544
|
+
* @param resourceProviderNamespace The name of the resource provider namespace.
|
|
545
|
+
* @param resourceType The name of the resource type.
|
|
546
|
+
* @param resourceName The name of the resource.
|
|
547
|
+
* @param options The options parameters.
|
|
548
|
+
*/
|
|
549
|
+
_list(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, options) {
|
|
550
|
+
return this.client.sendOperationRequest({
|
|
551
|
+
resourceGroupName,
|
|
552
|
+
resourceProviderNamespace,
|
|
553
|
+
resourceType,
|
|
554
|
+
resourceName,
|
|
555
|
+
options
|
|
556
|
+
}, listOperationSpec);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Obtains the specified change resource for the target resource
|
|
560
|
+
* @param resourceGroupName The name of the resource group.
|
|
561
|
+
* @param resourceProviderNamespace The name of the resource provider namespace.
|
|
562
|
+
* @param resourceType The name of the resource type.
|
|
563
|
+
* @param resourceName The name of the resource.
|
|
564
|
+
* @param changeResourceId The ID of the change resource
|
|
565
|
+
* @param options The options parameters.
|
|
566
|
+
*/
|
|
567
|
+
get(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, changeResourceId, options) {
|
|
568
|
+
return this.client.sendOperationRequest({
|
|
569
|
+
resourceGroupName,
|
|
570
|
+
resourceProviderNamespace,
|
|
571
|
+
resourceType,
|
|
572
|
+
resourceName,
|
|
573
|
+
changeResourceId,
|
|
574
|
+
options
|
|
575
|
+
}, getOperationSpec);
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* ListNext
|
|
579
|
+
* @param resourceGroupName The name of the resource group.
|
|
580
|
+
* @param resourceProviderNamespace The name of the resource provider namespace.
|
|
581
|
+
* @param resourceType The name of the resource type.
|
|
582
|
+
* @param resourceName The name of the resource.
|
|
583
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
584
|
+
* @param options The options parameters.
|
|
585
|
+
*/
|
|
586
|
+
_listNext(resourceGroupName, resourceProviderNamespace, resourceType, resourceName, nextLink, options) {
|
|
587
|
+
return this.client.sendOperationRequest({
|
|
588
|
+
resourceGroupName,
|
|
589
|
+
resourceProviderNamespace,
|
|
590
|
+
resourceType,
|
|
591
|
+
resourceName,
|
|
592
|
+
nextLink,
|
|
593
|
+
options
|
|
594
|
+
}, listNextOperationSpec);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
// Operation Specifications
|
|
598
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
599
|
+
const listOperationSpec = {
|
|
600
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/changes",
|
|
601
|
+
httpMethod: "GET",
|
|
602
|
+
responses: {
|
|
603
|
+
200: {
|
|
604
|
+
bodyMapper: ChangeResourceListResult
|
|
605
|
+
},
|
|
606
|
+
default: {
|
|
607
|
+
bodyMapper: ErrorResponse
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
queryParameters: [
|
|
611
|
+
apiVersion,
|
|
612
|
+
top,
|
|
613
|
+
skipToken
|
|
614
|
+
],
|
|
615
|
+
urlParameters: [
|
|
616
|
+
$host,
|
|
617
|
+
subscriptionId,
|
|
618
|
+
resourceGroupName,
|
|
619
|
+
resourceProviderNamespace,
|
|
620
|
+
resourceType,
|
|
621
|
+
resourceName
|
|
622
|
+
],
|
|
623
|
+
headerParameters: [accept],
|
|
624
|
+
serializer
|
|
625
|
+
};
|
|
626
|
+
const getOperationSpec = {
|
|
627
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/changes/{changeResourceId}",
|
|
628
|
+
httpMethod: "GET",
|
|
629
|
+
responses: {
|
|
630
|
+
200: {
|
|
631
|
+
bodyMapper: ChangeResourceResult
|
|
632
|
+
},
|
|
633
|
+
default: {
|
|
634
|
+
bodyMapper: ErrorResponse
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
queryParameters: [apiVersion],
|
|
638
|
+
urlParameters: [
|
|
639
|
+
$host,
|
|
640
|
+
subscriptionId,
|
|
641
|
+
resourceGroupName,
|
|
642
|
+
resourceProviderNamespace,
|
|
643
|
+
resourceType,
|
|
644
|
+
resourceName,
|
|
645
|
+
changeResourceId
|
|
646
|
+
],
|
|
647
|
+
headerParameters: [accept],
|
|
648
|
+
serializer
|
|
649
|
+
};
|
|
650
|
+
const listNextOperationSpec = {
|
|
651
|
+
path: "{nextLink}",
|
|
652
|
+
httpMethod: "GET",
|
|
653
|
+
responses: {
|
|
654
|
+
200: {
|
|
655
|
+
bodyMapper: ChangeResourceListResult
|
|
656
|
+
},
|
|
657
|
+
default: {
|
|
658
|
+
bodyMapper: ErrorResponse
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
queryParameters: [
|
|
662
|
+
apiVersion,
|
|
663
|
+
top,
|
|
664
|
+
skipToken
|
|
665
|
+
],
|
|
666
|
+
urlParameters: [
|
|
667
|
+
$host,
|
|
668
|
+
subscriptionId,
|
|
669
|
+
resourceGroupName,
|
|
670
|
+
resourceProviderNamespace,
|
|
671
|
+
resourceType,
|
|
672
|
+
resourceName,
|
|
673
|
+
nextLink
|
|
674
|
+
],
|
|
675
|
+
headerParameters: [accept],
|
|
676
|
+
serializer
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
/*
|
|
680
|
+
* Copyright (c) Microsoft Corporation.
|
|
681
|
+
* Licensed under the MIT License.
|
|
682
|
+
*
|
|
683
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
684
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
685
|
+
*/
|
|
686
|
+
class ChangesClient extends coreClient__namespace.ServiceClient {
|
|
687
|
+
/**
|
|
688
|
+
* Initializes a new instance of the ChangesClient class.
|
|
689
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
690
|
+
* @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g.
|
|
691
|
+
* 00000000-0000-0000-0000-000000000000)
|
|
692
|
+
* @param options The parameter options
|
|
693
|
+
*/
|
|
694
|
+
constructor(credentials, subscriptionId, options) {
|
|
695
|
+
var _a, _b;
|
|
696
|
+
if (credentials === undefined) {
|
|
697
|
+
throw new Error("'credentials' cannot be null");
|
|
698
|
+
}
|
|
699
|
+
if (subscriptionId === undefined) {
|
|
700
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
701
|
+
}
|
|
702
|
+
// Initializing default values for options
|
|
703
|
+
if (!options) {
|
|
704
|
+
options = {};
|
|
705
|
+
}
|
|
706
|
+
const defaults = {
|
|
707
|
+
requestContentType: "application/json; charset=utf-8",
|
|
708
|
+
credential: credentials
|
|
709
|
+
};
|
|
710
|
+
const packageDetails = `azsdk-js-arm-changes/1.0.0`;
|
|
711
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
712
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
713
|
+
: `${packageDetails}`;
|
|
714
|
+
if (!options.credentialScopes) {
|
|
715
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
716
|
+
}
|
|
717
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
718
|
+
userAgentPrefix
|
|
719
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
720
|
+
super(optionsWithDefaults);
|
|
721
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
722
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
723
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
724
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
725
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
726
|
+
this.pipeline.removePolicy({
|
|
727
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
728
|
+
});
|
|
729
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
730
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
731
|
+
challengeCallbacks: {
|
|
732
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
733
|
+
}
|
|
734
|
+
}));
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
// Parameter assignments
|
|
738
|
+
this.subscriptionId = subscriptionId;
|
|
739
|
+
// Assigning values to Constant parameters
|
|
740
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
741
|
+
this.apiVersion = options.apiVersion || "2022-05-01";
|
|
742
|
+
this.changes = new ChangesImpl(this);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
exports.ChangesClient = ChangesClient;
|
|
747
|
+
//# sourceMappingURL=index.js.map
|