@azure/arm-locks 1.2.0 → 2.0.0-alpha.20211015.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +63 -80
- package/dist/index.js +1796 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/esm/index.d.ts +534 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +13 -0
- package/esm/index.js.map +1 -0
- package/esm/managementLockClient.d.ts +9 -18
- package/esm/managementLockClient.d.ts.map +1 -1
- package/esm/managementLockClient.js +12 -28
- package/esm/managementLockClient.js.map +1 -1
- package/esm/managementLockClientContext.d.ts +10 -16
- package/esm/managementLockClientContext.d.ts.map +1 -1
- package/esm/managementLockClientContext.js +34 -46
- package/esm/managementLockClientContext.js.map +1 -1
- package/esm/models/index.d.ts +208 -445
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +9 -2
- package/esm/models/index.js.map +1 -1
- package/esm/models/mappers.d.ts +7 -9
- package/esm/models/mappers.d.ts.map +1 -1
- package/esm/models/mappers.js +69 -78
- package/esm/models/mappers.js.map +1 -1
- package/esm/models/parameters.d.ts +16 -13
- package/esm/models/parameters.d.ts.map +1 -1
- package/esm/models/parameters.js +78 -54
- package/esm/models/parameters.js.map +1 -1
- package/esm/operations/authorizationOperations.d.ts +27 -26
- package/esm/operations/authorizationOperations.d.ts.map +1 -1
- package/esm/operations/authorizationOperations.js +158 -50
- package/esm/operations/authorizationOperations.js.map +1 -1
- package/esm/operations/index.d.ts.map +1 -1
- package/esm/operations/index.js +3 -5
- package/esm/operations/index.js.map +1 -1
- package/esm/operations/managementLocks.d.ts +203 -393
- package/esm/operations/managementLocks.d.ts.map +1 -1
- package/esm/operations/managementLocks.js +993 -485
- package/esm/operations/managementLocks.js.map +1 -1
- package/esm/operationsInterfaces/authorizationOperations.d.ts +18 -0
- package/esm/operationsInterfaces/authorizationOperations.d.ts.map +1 -0
- package/esm/operationsInterfaces/authorizationOperations.js +9 -0
- package/esm/operationsInterfaces/authorizationOperations.js.map +1 -0
- package/esm/operationsInterfaces/index.d.ts +3 -0
- package/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/esm/operationsInterfaces/index.js +10 -0
- package/esm/operationsInterfaces/index.js.map +1 -0
- package/esm/operationsInterfaces/managementLocks.d.ts +198 -0
- package/esm/operationsInterfaces/managementLocks.d.ts.map +1 -0
- package/esm/operationsInterfaces/managementLocks.js +9 -0
- package/esm/operationsInterfaces/managementLocks.js.map +1 -0
- package/package.json +53 -16
- package/review/arm-locks.api.md +313 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +13 -0
- package/src/managementLockClient.ts +23 -36
- package/src/managementLockClientContext.ts +47 -45
- package/src/models/index.ts +256 -470
- package/src/models/mappers.ts +72 -82
- package/src/models/parameters.ts +97 -55
- package/src/operations/authorizationOperations.ts +155 -70
- package/src/operations/index.ts +3 -5
- package/src/operations/managementLocks.ts +1165 -869
- package/src/operationsInterfaces/authorizationOperations.ts +36 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/managementLocks.ts +332 -0
- package/tsconfig.json +3 -2
- package/dist/arm-locks.js +0 -1280
- package/dist/arm-locks.js.map +0 -1
- package/dist/arm-locks.min.js +0 -1
- package/dist/arm-locks.min.js.map +0 -1
- package/esm/models/authorizationOperationsMappers.d.ts +0 -2
- package/esm/models/authorizationOperationsMappers.d.ts.map +0 -1
- package/esm/models/authorizationOperationsMappers.js +0 -9
- package/esm/models/authorizationOperationsMappers.js.map +0 -1
- package/esm/models/managementLocksMappers.d.ts +0 -2
- package/esm/models/managementLocksMappers.d.ts.map +0 -1
- package/esm/models/managementLocksMappers.js +0 -9
- package/esm/models/managementLocksMappers.js.map +0 -1
- package/src/models/authorizationOperationsMappers.ts +0 -14
- package/src/models/managementLocksMappers.ts +0 -15
package/dist/index.js
ADDED
@@ -0,0 +1,1796 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var tslib = require('tslib');
|
6
|
+
require('@azure/core-paging');
|
7
|
+
var coreClient = require('@azure/core-client');
|
8
|
+
|
9
|
+
/*
|
10
|
+
* Copyright (c) Microsoft Corporation.
|
11
|
+
* Licensed under the MIT License.
|
12
|
+
*
|
13
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
14
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
15
|
+
*/
|
16
|
+
(function (KnownLockLevel) {
|
17
|
+
KnownLockLevel["NotSpecified"] = "NotSpecified";
|
18
|
+
KnownLockLevel["CanNotDelete"] = "CanNotDelete";
|
19
|
+
KnownLockLevel["ReadOnly"] = "ReadOnly";
|
20
|
+
})(exports.KnownLockLevel || (exports.KnownLockLevel = {}));
|
21
|
+
|
22
|
+
/*
|
23
|
+
* Copyright (c) Microsoft Corporation.
|
24
|
+
* Licensed under the MIT License.
|
25
|
+
*
|
26
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
27
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
28
|
+
*/
|
29
|
+
const OperationListResult = {
|
30
|
+
type: {
|
31
|
+
name: "Composite",
|
32
|
+
className: "OperationListResult",
|
33
|
+
modelProperties: {
|
34
|
+
value: {
|
35
|
+
serializedName: "value",
|
36
|
+
type: {
|
37
|
+
name: "Sequence",
|
38
|
+
element: {
|
39
|
+
type: {
|
40
|
+
name: "Composite",
|
41
|
+
className: "Operation"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
},
|
46
|
+
nextLink: {
|
47
|
+
serializedName: "nextLink",
|
48
|
+
type: {
|
49
|
+
name: "String"
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
};
|
55
|
+
const Operation = {
|
56
|
+
type: {
|
57
|
+
name: "Composite",
|
58
|
+
className: "Operation",
|
59
|
+
modelProperties: {
|
60
|
+
name: {
|
61
|
+
serializedName: "name",
|
62
|
+
type: {
|
63
|
+
name: "String"
|
64
|
+
}
|
65
|
+
},
|
66
|
+
display: {
|
67
|
+
serializedName: "display",
|
68
|
+
type: {
|
69
|
+
name: "Composite",
|
70
|
+
className: "OperationDisplay"
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
};
|
76
|
+
const OperationDisplay = {
|
77
|
+
type: {
|
78
|
+
name: "Composite",
|
79
|
+
className: "OperationDisplay",
|
80
|
+
modelProperties: {
|
81
|
+
provider: {
|
82
|
+
serializedName: "provider",
|
83
|
+
type: {
|
84
|
+
name: "String"
|
85
|
+
}
|
86
|
+
},
|
87
|
+
resource: {
|
88
|
+
serializedName: "resource",
|
89
|
+
type: {
|
90
|
+
name: "String"
|
91
|
+
}
|
92
|
+
},
|
93
|
+
operation: {
|
94
|
+
serializedName: "operation",
|
95
|
+
type: {
|
96
|
+
name: "String"
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
};
|
102
|
+
const ManagementLockObject = {
|
103
|
+
type: {
|
104
|
+
name: "Composite",
|
105
|
+
className: "ManagementLockObject",
|
106
|
+
modelProperties: {
|
107
|
+
id: {
|
108
|
+
serializedName: "id",
|
109
|
+
readOnly: true,
|
110
|
+
type: {
|
111
|
+
name: "String"
|
112
|
+
}
|
113
|
+
},
|
114
|
+
type: {
|
115
|
+
serializedName: "type",
|
116
|
+
readOnly: true,
|
117
|
+
type: {
|
118
|
+
name: "String"
|
119
|
+
}
|
120
|
+
},
|
121
|
+
name: {
|
122
|
+
serializedName: "name",
|
123
|
+
readOnly: true,
|
124
|
+
type: {
|
125
|
+
name: "String"
|
126
|
+
}
|
127
|
+
},
|
128
|
+
level: {
|
129
|
+
serializedName: "properties.level",
|
130
|
+
required: true,
|
131
|
+
type: {
|
132
|
+
name: "String"
|
133
|
+
}
|
134
|
+
},
|
135
|
+
notes: {
|
136
|
+
serializedName: "properties.notes",
|
137
|
+
type: {
|
138
|
+
name: "String"
|
139
|
+
}
|
140
|
+
},
|
141
|
+
owners: {
|
142
|
+
serializedName: "properties.owners",
|
143
|
+
type: {
|
144
|
+
name: "Sequence",
|
145
|
+
element: {
|
146
|
+
type: {
|
147
|
+
name: "Composite",
|
148
|
+
className: "ManagementLockOwner"
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
};
|
156
|
+
const ManagementLockOwner = {
|
157
|
+
type: {
|
158
|
+
name: "Composite",
|
159
|
+
className: "ManagementLockOwner",
|
160
|
+
modelProperties: {
|
161
|
+
applicationId: {
|
162
|
+
serializedName: "applicationId",
|
163
|
+
type: {
|
164
|
+
name: "String"
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}
|
169
|
+
};
|
170
|
+
const ManagementLockListResult = {
|
171
|
+
type: {
|
172
|
+
name: "Composite",
|
173
|
+
className: "ManagementLockListResult",
|
174
|
+
modelProperties: {
|
175
|
+
value: {
|
176
|
+
serializedName: "value",
|
177
|
+
type: {
|
178
|
+
name: "Sequence",
|
179
|
+
element: {
|
180
|
+
type: {
|
181
|
+
name: "Composite",
|
182
|
+
className: "ManagementLockObject"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
},
|
187
|
+
nextLink: {
|
188
|
+
serializedName: "nextLink",
|
189
|
+
type: {
|
190
|
+
name: "String"
|
191
|
+
}
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
};
|
196
|
+
|
197
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
198
|
+
__proto__: null,
|
199
|
+
OperationListResult: OperationListResult,
|
200
|
+
Operation: Operation,
|
201
|
+
OperationDisplay: OperationDisplay,
|
202
|
+
ManagementLockObject: ManagementLockObject,
|
203
|
+
ManagementLockOwner: ManagementLockOwner,
|
204
|
+
ManagementLockListResult: ManagementLockListResult
|
205
|
+
});
|
206
|
+
|
207
|
+
/*
|
208
|
+
* Copyright (c) Microsoft Corporation.
|
209
|
+
* Licensed under the MIT License.
|
210
|
+
*
|
211
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
212
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
213
|
+
*/
|
214
|
+
const accept = {
|
215
|
+
parameterPath: "accept",
|
216
|
+
mapper: {
|
217
|
+
defaultValue: "application/json",
|
218
|
+
isConstant: true,
|
219
|
+
serializedName: "Accept",
|
220
|
+
type: {
|
221
|
+
name: "String"
|
222
|
+
}
|
223
|
+
}
|
224
|
+
};
|
225
|
+
const $host = {
|
226
|
+
parameterPath: "$host",
|
227
|
+
mapper: {
|
228
|
+
serializedName: "$host",
|
229
|
+
required: true,
|
230
|
+
type: {
|
231
|
+
name: "String"
|
232
|
+
}
|
233
|
+
},
|
234
|
+
skipEncoding: true
|
235
|
+
};
|
236
|
+
const apiVersion = {
|
237
|
+
parameterPath: "apiVersion",
|
238
|
+
mapper: {
|
239
|
+
defaultValue: "2016-09-01",
|
240
|
+
isConstant: true,
|
241
|
+
serializedName: "api-version",
|
242
|
+
type: {
|
243
|
+
name: "String"
|
244
|
+
}
|
245
|
+
}
|
246
|
+
};
|
247
|
+
const nextLink = {
|
248
|
+
parameterPath: "nextLink",
|
249
|
+
mapper: {
|
250
|
+
serializedName: "nextLink",
|
251
|
+
required: true,
|
252
|
+
type: {
|
253
|
+
name: "String"
|
254
|
+
}
|
255
|
+
},
|
256
|
+
skipEncoding: true
|
257
|
+
};
|
258
|
+
const contentType = {
|
259
|
+
parameterPath: ["options", "contentType"],
|
260
|
+
mapper: {
|
261
|
+
defaultValue: "application/json",
|
262
|
+
isConstant: true,
|
263
|
+
serializedName: "Content-Type",
|
264
|
+
type: {
|
265
|
+
name: "String"
|
266
|
+
}
|
267
|
+
}
|
268
|
+
};
|
269
|
+
const parameters = {
|
270
|
+
parameterPath: "parameters",
|
271
|
+
mapper: ManagementLockObject
|
272
|
+
};
|
273
|
+
const resourceGroupName = {
|
274
|
+
parameterPath: "resourceGroupName",
|
275
|
+
mapper: {
|
276
|
+
constraints: {
|
277
|
+
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
|
278
|
+
MaxLength: 90,
|
279
|
+
MinLength: 1
|
280
|
+
},
|
281
|
+
serializedName: "resourceGroupName",
|
282
|
+
required: true,
|
283
|
+
type: {
|
284
|
+
name: "String"
|
285
|
+
}
|
286
|
+
}
|
287
|
+
};
|
288
|
+
const lockName = {
|
289
|
+
parameterPath: "lockName",
|
290
|
+
mapper: {
|
291
|
+
serializedName: "lockName",
|
292
|
+
required: true,
|
293
|
+
type: {
|
294
|
+
name: "String"
|
295
|
+
}
|
296
|
+
}
|
297
|
+
};
|
298
|
+
const subscriptionId = {
|
299
|
+
parameterPath: "subscriptionId",
|
300
|
+
mapper: {
|
301
|
+
serializedName: "subscriptionId",
|
302
|
+
required: true,
|
303
|
+
type: {
|
304
|
+
name: "String"
|
305
|
+
}
|
306
|
+
}
|
307
|
+
};
|
308
|
+
const scope = {
|
309
|
+
parameterPath: "scope",
|
310
|
+
mapper: {
|
311
|
+
serializedName: "scope",
|
312
|
+
required: true,
|
313
|
+
type: {
|
314
|
+
name: "String"
|
315
|
+
}
|
316
|
+
}
|
317
|
+
};
|
318
|
+
const resourceProviderNamespace = {
|
319
|
+
parameterPath: "resourceProviderNamespace",
|
320
|
+
mapper: {
|
321
|
+
serializedName: "resourceProviderNamespace",
|
322
|
+
required: true,
|
323
|
+
type: {
|
324
|
+
name: "String"
|
325
|
+
}
|
326
|
+
}
|
327
|
+
};
|
328
|
+
const parentResourcePath = {
|
329
|
+
parameterPath: "parentResourcePath",
|
330
|
+
mapper: {
|
331
|
+
serializedName: "parentResourcePath",
|
332
|
+
required: true,
|
333
|
+
type: {
|
334
|
+
name: "String"
|
335
|
+
}
|
336
|
+
},
|
337
|
+
skipEncoding: true
|
338
|
+
};
|
339
|
+
const resourceType = {
|
340
|
+
parameterPath: "resourceType",
|
341
|
+
mapper: {
|
342
|
+
serializedName: "resourceType",
|
343
|
+
required: true,
|
344
|
+
type: {
|
345
|
+
name: "String"
|
346
|
+
}
|
347
|
+
},
|
348
|
+
skipEncoding: true
|
349
|
+
};
|
350
|
+
const resourceName = {
|
351
|
+
parameterPath: "resourceName",
|
352
|
+
mapper: {
|
353
|
+
serializedName: "resourceName",
|
354
|
+
required: true,
|
355
|
+
type: {
|
356
|
+
name: "String"
|
357
|
+
}
|
358
|
+
}
|
359
|
+
};
|
360
|
+
const filter = {
|
361
|
+
parameterPath: ["options", "filter"],
|
362
|
+
mapper: {
|
363
|
+
serializedName: "$filter",
|
364
|
+
type: {
|
365
|
+
name: "String"
|
366
|
+
}
|
367
|
+
}
|
368
|
+
};
|
369
|
+
|
370
|
+
/*
|
371
|
+
* Copyright (c) Microsoft Corporation.
|
372
|
+
* Licensed under the MIT License.
|
373
|
+
*
|
374
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
375
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
376
|
+
*/
|
377
|
+
/// <reference lib="esnext.asynciterable" />
|
378
|
+
/** Class representing a AuthorizationOperations. */
|
379
|
+
class AuthorizationOperationsImpl {
|
380
|
+
/**
|
381
|
+
* Initialize a new instance of the class AuthorizationOperations class.
|
382
|
+
* @param client Reference to the service client
|
383
|
+
*/
|
384
|
+
constructor(client) {
|
385
|
+
this.client = client;
|
386
|
+
}
|
387
|
+
/**
|
388
|
+
* Lists all of the available Microsoft.Authorization REST API operations.
|
389
|
+
* @param options The options parameters.
|
390
|
+
*/
|
391
|
+
list(options) {
|
392
|
+
const iter = this.listPagingAll(options);
|
393
|
+
return {
|
394
|
+
next() {
|
395
|
+
return iter.next();
|
396
|
+
},
|
397
|
+
[Symbol.asyncIterator]() {
|
398
|
+
return this;
|
399
|
+
},
|
400
|
+
byPage: () => {
|
401
|
+
return this.listPagingPage(options);
|
402
|
+
}
|
403
|
+
};
|
404
|
+
}
|
405
|
+
listPagingPage(options) {
|
406
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
407
|
+
let result = yield tslib.__await(this._list(options));
|
408
|
+
yield yield tslib.__await(result.value || []);
|
409
|
+
let continuationToken = result.nextLink;
|
410
|
+
while (continuationToken) {
|
411
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
412
|
+
continuationToken = result.nextLink;
|
413
|
+
yield yield tslib.__await(result.value || []);
|
414
|
+
}
|
415
|
+
});
|
416
|
+
}
|
417
|
+
listPagingAll(options) {
|
418
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
419
|
+
var e_1, _a;
|
420
|
+
try {
|
421
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
422
|
+
const page = _c.value;
|
423
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
424
|
+
}
|
425
|
+
}
|
426
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
427
|
+
finally {
|
428
|
+
try {
|
429
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
430
|
+
}
|
431
|
+
finally { if (e_1) throw e_1.error; }
|
432
|
+
}
|
433
|
+
});
|
434
|
+
}
|
435
|
+
/**
|
436
|
+
* ListNext
|
437
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
438
|
+
* @param options The options parameters.
|
439
|
+
*/
|
440
|
+
listNext(nextLink, options) {
|
441
|
+
const iter = this.listNextPagingAll(nextLink, options);
|
442
|
+
return {
|
443
|
+
next() {
|
444
|
+
return iter.next();
|
445
|
+
},
|
446
|
+
[Symbol.asyncIterator]() {
|
447
|
+
return this;
|
448
|
+
},
|
449
|
+
byPage: () => {
|
450
|
+
return this.listNextPagingPage(nextLink, options);
|
451
|
+
}
|
452
|
+
};
|
453
|
+
}
|
454
|
+
listNextPagingPage(nextLink, options) {
|
455
|
+
return tslib.__asyncGenerator(this, arguments, function* listNextPagingPage_1() {
|
456
|
+
let result = yield tslib.__await(this._listNext(nextLink, options));
|
457
|
+
yield yield tslib.__await(result.value || []);
|
458
|
+
let continuationToken = result.nextLink;
|
459
|
+
while (continuationToken) {
|
460
|
+
result = yield tslib.__await(this._listNextNext(continuationToken, options));
|
461
|
+
continuationToken = result.nextLink;
|
462
|
+
yield yield tslib.__await(result.value || []);
|
463
|
+
}
|
464
|
+
});
|
465
|
+
}
|
466
|
+
listNextPagingAll(nextLink, options) {
|
467
|
+
return tslib.__asyncGenerator(this, arguments, function* listNextPagingAll_1() {
|
468
|
+
var e_2, _a;
|
469
|
+
try {
|
470
|
+
for (var _b = tslib.__asyncValues(this.listNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
471
|
+
const page = _c.value;
|
472
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
473
|
+
}
|
474
|
+
}
|
475
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
476
|
+
finally {
|
477
|
+
try {
|
478
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
479
|
+
}
|
480
|
+
finally { if (e_2) throw e_2.error; }
|
481
|
+
}
|
482
|
+
});
|
483
|
+
}
|
484
|
+
/**
|
485
|
+
* Lists all of the available Microsoft.Authorization REST API operations.
|
486
|
+
* @param options The options parameters.
|
487
|
+
*/
|
488
|
+
_list(options) {
|
489
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
490
|
+
}
|
491
|
+
/**
|
492
|
+
* ListNext
|
493
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
494
|
+
* @param options The options parameters.
|
495
|
+
*/
|
496
|
+
_listNext(nextLink, options) {
|
497
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
|
498
|
+
}
|
499
|
+
/**
|
500
|
+
* ListNextNext
|
501
|
+
* @param nextLink The nextLink from the previous successful call to the ListNext method.
|
502
|
+
* @param options The options parameters.
|
503
|
+
*/
|
504
|
+
_listNextNext(nextLink, options) {
|
505
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextNextOperationSpec);
|
506
|
+
}
|
507
|
+
}
|
508
|
+
// Operation Specifications
|
509
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
510
|
+
const listOperationSpec = {
|
511
|
+
path: "/providers/Microsoft.Authorization/operations",
|
512
|
+
httpMethod: "GET",
|
513
|
+
responses: {
|
514
|
+
200: {
|
515
|
+
bodyMapper: OperationListResult
|
516
|
+
}
|
517
|
+
},
|
518
|
+
queryParameters: [apiVersion],
|
519
|
+
urlParameters: [$host],
|
520
|
+
headerParameters: [accept],
|
521
|
+
serializer
|
522
|
+
};
|
523
|
+
const listNextOperationSpec = {
|
524
|
+
path: "{nextLink}",
|
525
|
+
httpMethod: "GET",
|
526
|
+
responses: {
|
527
|
+
200: {
|
528
|
+
bodyMapper: OperationListResult
|
529
|
+
}
|
530
|
+
},
|
531
|
+
queryParameters: [apiVersion],
|
532
|
+
urlParameters: [$host, nextLink],
|
533
|
+
headerParameters: [accept],
|
534
|
+
serializer
|
535
|
+
};
|
536
|
+
const listNextNextOperationSpec = {
|
537
|
+
path: "{nextLink}",
|
538
|
+
httpMethod: "GET",
|
539
|
+
responses: {
|
540
|
+
200: {
|
541
|
+
bodyMapper: OperationListResult
|
542
|
+
}
|
543
|
+
},
|
544
|
+
queryParameters: [apiVersion],
|
545
|
+
urlParameters: [$host, nextLink],
|
546
|
+
headerParameters: [accept],
|
547
|
+
serializer
|
548
|
+
};
|
549
|
+
|
550
|
+
/*
|
551
|
+
* Copyright (c) Microsoft Corporation.
|
552
|
+
* Licensed under the MIT License.
|
553
|
+
*
|
554
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
555
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
556
|
+
*/
|
557
|
+
/// <reference lib="esnext.asynciterable" />
|
558
|
+
/** Class representing a ManagementLocks. */
|
559
|
+
class ManagementLocksImpl {
|
560
|
+
/**
|
561
|
+
* Initialize a new instance of the class ManagementLocks class.
|
562
|
+
* @param client Reference to the service client
|
563
|
+
*/
|
564
|
+
constructor(client) {
|
565
|
+
this.client = client;
|
566
|
+
}
|
567
|
+
/**
|
568
|
+
* Gets all the management locks for a resource group.
|
569
|
+
* @param resourceGroupName The name of the resource group containing the locks to get.
|
570
|
+
* @param options The options parameters.
|
571
|
+
*/
|
572
|
+
listAtResourceGroupLevel(resourceGroupName, options) {
|
573
|
+
const iter = this.listAtResourceGroupLevelPagingAll(resourceGroupName, options);
|
574
|
+
return {
|
575
|
+
next() {
|
576
|
+
return iter.next();
|
577
|
+
},
|
578
|
+
[Symbol.asyncIterator]() {
|
579
|
+
return this;
|
580
|
+
},
|
581
|
+
byPage: () => {
|
582
|
+
return this.listAtResourceGroupLevelPagingPage(resourceGroupName, options);
|
583
|
+
}
|
584
|
+
};
|
585
|
+
}
|
586
|
+
listAtResourceGroupLevelPagingPage(resourceGroupName, options) {
|
587
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceGroupLevelPagingPage_1() {
|
588
|
+
let result = yield tslib.__await(this._listAtResourceGroupLevel(resourceGroupName, options));
|
589
|
+
yield yield tslib.__await(result.value || []);
|
590
|
+
let continuationToken = result.nextLink;
|
591
|
+
while (continuationToken) {
|
592
|
+
result = yield tslib.__await(this._listAtResourceGroupLevelNext(resourceGroupName, continuationToken, options));
|
593
|
+
continuationToken = result.nextLink;
|
594
|
+
yield yield tslib.__await(result.value || []);
|
595
|
+
}
|
596
|
+
});
|
597
|
+
}
|
598
|
+
listAtResourceGroupLevelPagingAll(resourceGroupName, options) {
|
599
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceGroupLevelPagingAll_1() {
|
600
|
+
var e_1, _a;
|
601
|
+
try {
|
602
|
+
for (var _b = tslib.__asyncValues(this.listAtResourceGroupLevelPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
603
|
+
const page = _c.value;
|
604
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
605
|
+
}
|
606
|
+
}
|
607
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
608
|
+
finally {
|
609
|
+
try {
|
610
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
611
|
+
}
|
612
|
+
finally { if (e_1) throw e_1.error; }
|
613
|
+
}
|
614
|
+
});
|
615
|
+
}
|
616
|
+
/**
|
617
|
+
* Gets all the management locks for a resource or any level below resource.
|
618
|
+
* @param resourceGroupName The name of the resource group containing the locked resource. The name is
|
619
|
+
* case insensitive.
|
620
|
+
* @param resourceProviderNamespace The namespace of the resource provider.
|
621
|
+
* @param parentResourcePath The parent resource identity.
|
622
|
+
* @param resourceType The resource type of the locked resource.
|
623
|
+
* @param resourceName The name of the locked resource.
|
624
|
+
* @param options The options parameters.
|
625
|
+
*/
|
626
|
+
listAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
|
627
|
+
const iter = this.listAtResourceLevelPagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options);
|
628
|
+
return {
|
629
|
+
next() {
|
630
|
+
return iter.next();
|
631
|
+
},
|
632
|
+
[Symbol.asyncIterator]() {
|
633
|
+
return this;
|
634
|
+
},
|
635
|
+
byPage: () => {
|
636
|
+
return this.listAtResourceLevelPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options);
|
637
|
+
}
|
638
|
+
};
|
639
|
+
}
|
640
|
+
listAtResourceLevelPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
|
641
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceLevelPagingPage_1() {
|
642
|
+
let result = yield tslib.__await(this._listAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options));
|
643
|
+
yield yield tslib.__await(result.value || []);
|
644
|
+
let continuationToken = result.nextLink;
|
645
|
+
while (continuationToken) {
|
646
|
+
result = yield tslib.__await(this._listAtResourceLevelNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, continuationToken, options));
|
647
|
+
continuationToken = result.nextLink;
|
648
|
+
yield yield tslib.__await(result.value || []);
|
649
|
+
}
|
650
|
+
});
|
651
|
+
}
|
652
|
+
listAtResourceLevelPagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
|
653
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceLevelPagingAll_1() {
|
654
|
+
var e_2, _a;
|
655
|
+
try {
|
656
|
+
for (var _b = tslib.__asyncValues(this.listAtResourceLevelPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, 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_2_1) { e_2 = { error: e_2_1 }; }
|
662
|
+
finally {
|
663
|
+
try {
|
664
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
665
|
+
}
|
666
|
+
finally { if (e_2) throw e_2.error; }
|
667
|
+
}
|
668
|
+
});
|
669
|
+
}
|
670
|
+
/**
|
671
|
+
* Gets all the management locks for a subscription.
|
672
|
+
* @param options The options parameters.
|
673
|
+
*/
|
674
|
+
listAtSubscriptionLevel(options) {
|
675
|
+
const iter = this.listAtSubscriptionLevelPagingAll(options);
|
676
|
+
return {
|
677
|
+
next() {
|
678
|
+
return iter.next();
|
679
|
+
},
|
680
|
+
[Symbol.asyncIterator]() {
|
681
|
+
return this;
|
682
|
+
},
|
683
|
+
byPage: () => {
|
684
|
+
return this.listAtSubscriptionLevelPagingPage(options);
|
685
|
+
}
|
686
|
+
};
|
687
|
+
}
|
688
|
+
listAtSubscriptionLevelPagingPage(options) {
|
689
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtSubscriptionLevelPagingPage_1() {
|
690
|
+
let result = yield tslib.__await(this._listAtSubscriptionLevel(options));
|
691
|
+
yield yield tslib.__await(result.value || []);
|
692
|
+
let continuationToken = result.nextLink;
|
693
|
+
while (continuationToken) {
|
694
|
+
result = yield tslib.__await(this._listAtSubscriptionLevelNext(continuationToken, options));
|
695
|
+
continuationToken = result.nextLink;
|
696
|
+
yield yield tslib.__await(result.value || []);
|
697
|
+
}
|
698
|
+
});
|
699
|
+
}
|
700
|
+
listAtSubscriptionLevelPagingAll(options) {
|
701
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtSubscriptionLevelPagingAll_1() {
|
702
|
+
var e_3, _a;
|
703
|
+
try {
|
704
|
+
for (var _b = tslib.__asyncValues(this.listAtSubscriptionLevelPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
705
|
+
const page = _c.value;
|
706
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
707
|
+
}
|
708
|
+
}
|
709
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
710
|
+
finally {
|
711
|
+
try {
|
712
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
713
|
+
}
|
714
|
+
finally { if (e_3) throw e_3.error; }
|
715
|
+
}
|
716
|
+
});
|
717
|
+
}
|
718
|
+
/**
|
719
|
+
* Gets all the management locks for a scope.
|
720
|
+
* @param scope The scope for the lock. When providing a scope for the assignment, use
|
721
|
+
* '/subscriptions/{subscriptionId}' for subscriptions,
|
722
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
|
723
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
|
724
|
+
* for resources.
|
725
|
+
* @param options The options parameters.
|
726
|
+
*/
|
727
|
+
listByScope(scope, options) {
|
728
|
+
const iter = this.listByScopePagingAll(scope, options);
|
729
|
+
return {
|
730
|
+
next() {
|
731
|
+
return iter.next();
|
732
|
+
},
|
733
|
+
[Symbol.asyncIterator]() {
|
734
|
+
return this;
|
735
|
+
},
|
736
|
+
byPage: () => {
|
737
|
+
return this.listByScopePagingPage(scope, options);
|
738
|
+
}
|
739
|
+
};
|
740
|
+
}
|
741
|
+
listByScopePagingPage(scope, options) {
|
742
|
+
return tslib.__asyncGenerator(this, arguments, function* listByScopePagingPage_1() {
|
743
|
+
let result = yield tslib.__await(this._listByScope(scope, options));
|
744
|
+
yield yield tslib.__await(result.value || []);
|
745
|
+
let continuationToken = result.nextLink;
|
746
|
+
while (continuationToken) {
|
747
|
+
result = yield tslib.__await(this._listByScopeNext(scope, continuationToken, options));
|
748
|
+
continuationToken = result.nextLink;
|
749
|
+
yield yield tslib.__await(result.value || []);
|
750
|
+
}
|
751
|
+
});
|
752
|
+
}
|
753
|
+
listByScopePagingAll(scope, options) {
|
754
|
+
return tslib.__asyncGenerator(this, arguments, function* listByScopePagingAll_1() {
|
755
|
+
var e_4, _a;
|
756
|
+
try {
|
757
|
+
for (var _b = tslib.__asyncValues(this.listByScopePagingPage(scope, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
758
|
+
const page = _c.value;
|
759
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
760
|
+
}
|
761
|
+
}
|
762
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
763
|
+
finally {
|
764
|
+
try {
|
765
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
766
|
+
}
|
767
|
+
finally { if (e_4) throw e_4.error; }
|
768
|
+
}
|
769
|
+
});
|
770
|
+
}
|
771
|
+
/**
|
772
|
+
* ListAtResourceGroupLevelNext
|
773
|
+
* @param resourceGroupName The name of the resource group containing the locks to get.
|
774
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtResourceGroupLevel
|
775
|
+
* method.
|
776
|
+
* @param options The options parameters.
|
777
|
+
*/
|
778
|
+
listAtResourceGroupLevelNext(resourceGroupName, nextLink, options) {
|
779
|
+
const iter = this.listAtResourceGroupLevelNextPagingAll(resourceGroupName, nextLink, options);
|
780
|
+
return {
|
781
|
+
next() {
|
782
|
+
return iter.next();
|
783
|
+
},
|
784
|
+
[Symbol.asyncIterator]() {
|
785
|
+
return this;
|
786
|
+
},
|
787
|
+
byPage: () => {
|
788
|
+
return this.listAtResourceGroupLevelNextPagingPage(resourceGroupName, nextLink, options);
|
789
|
+
}
|
790
|
+
};
|
791
|
+
}
|
792
|
+
listAtResourceGroupLevelNextPagingPage(resourceGroupName, nextLink, options) {
|
793
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceGroupLevelNextPagingPage_1() {
|
794
|
+
let result = yield tslib.__await(this._listAtResourceGroupLevelNext(resourceGroupName, nextLink, options));
|
795
|
+
yield yield tslib.__await(result.value || []);
|
796
|
+
let continuationToken = result.nextLink;
|
797
|
+
while (continuationToken) {
|
798
|
+
result = yield tslib.__await(this._listAtResourceGroupLevelNextNext(resourceGroupName, continuationToken, options));
|
799
|
+
continuationToken = result.nextLink;
|
800
|
+
yield yield tslib.__await(result.value || []);
|
801
|
+
}
|
802
|
+
});
|
803
|
+
}
|
804
|
+
listAtResourceGroupLevelNextPagingAll(resourceGroupName, nextLink, options) {
|
805
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceGroupLevelNextPagingAll_1() {
|
806
|
+
var e_5, _a;
|
807
|
+
try {
|
808
|
+
for (var _b = tslib.__asyncValues(this.listAtResourceGroupLevelNextPagingPage(resourceGroupName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
809
|
+
const page = _c.value;
|
810
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
811
|
+
}
|
812
|
+
}
|
813
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
814
|
+
finally {
|
815
|
+
try {
|
816
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
817
|
+
}
|
818
|
+
finally { if (e_5) throw e_5.error; }
|
819
|
+
}
|
820
|
+
});
|
821
|
+
}
|
822
|
+
/**
|
823
|
+
* ListAtResourceLevelNext
|
824
|
+
* @param resourceGroupName The name of the resource group containing the locked resource. The name is
|
825
|
+
* case insensitive.
|
826
|
+
* @param resourceProviderNamespace The namespace of the resource provider.
|
827
|
+
* @param parentResourcePath The parent resource identity.
|
828
|
+
* @param resourceType The resource type of the locked resource.
|
829
|
+
* @param resourceName The name of the locked resource.
|
830
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtResourceLevel method.
|
831
|
+
* @param options The options parameters.
|
832
|
+
*/
|
833
|
+
listAtResourceLevelNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
|
834
|
+
const iter = this.listAtResourceLevelNextPagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options);
|
835
|
+
return {
|
836
|
+
next() {
|
837
|
+
return iter.next();
|
838
|
+
},
|
839
|
+
[Symbol.asyncIterator]() {
|
840
|
+
return this;
|
841
|
+
},
|
842
|
+
byPage: () => {
|
843
|
+
return this.listAtResourceLevelNextPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options);
|
844
|
+
}
|
845
|
+
};
|
846
|
+
}
|
847
|
+
listAtResourceLevelNextPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
|
848
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceLevelNextPagingPage_1() {
|
849
|
+
let result = yield tslib.__await(this._listAtResourceLevelNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options));
|
850
|
+
yield yield tslib.__await(result.value || []);
|
851
|
+
let continuationToken = result.nextLink;
|
852
|
+
while (continuationToken) {
|
853
|
+
result = yield tslib.__await(this._listAtResourceLevelNextNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, continuationToken, options));
|
854
|
+
continuationToken = result.nextLink;
|
855
|
+
yield yield tslib.__await(result.value || []);
|
856
|
+
}
|
857
|
+
});
|
858
|
+
}
|
859
|
+
listAtResourceLevelNextPagingAll(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
|
860
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtResourceLevelNextPagingAll_1() {
|
861
|
+
var e_6, _a;
|
862
|
+
try {
|
863
|
+
for (var _b = tslib.__asyncValues(this.listAtResourceLevelNextPagingPage(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
864
|
+
const page = _c.value;
|
865
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
866
|
+
}
|
867
|
+
}
|
868
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
869
|
+
finally {
|
870
|
+
try {
|
871
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
872
|
+
}
|
873
|
+
finally { if (e_6) throw e_6.error; }
|
874
|
+
}
|
875
|
+
});
|
876
|
+
}
|
877
|
+
/**
|
878
|
+
* ListAtSubscriptionLevelNext
|
879
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionLevel
|
880
|
+
* method.
|
881
|
+
* @param options The options parameters.
|
882
|
+
*/
|
883
|
+
listAtSubscriptionLevelNext(nextLink, options) {
|
884
|
+
const iter = this.listAtSubscriptionLevelNextPagingAll(nextLink, options);
|
885
|
+
return {
|
886
|
+
next() {
|
887
|
+
return iter.next();
|
888
|
+
},
|
889
|
+
[Symbol.asyncIterator]() {
|
890
|
+
return this;
|
891
|
+
},
|
892
|
+
byPage: () => {
|
893
|
+
return this.listAtSubscriptionLevelNextPagingPage(nextLink, options);
|
894
|
+
}
|
895
|
+
};
|
896
|
+
}
|
897
|
+
listAtSubscriptionLevelNextPagingPage(nextLink, options) {
|
898
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtSubscriptionLevelNextPagingPage_1() {
|
899
|
+
let result = yield tslib.__await(this._listAtSubscriptionLevelNext(nextLink, options));
|
900
|
+
yield yield tslib.__await(result.value || []);
|
901
|
+
let continuationToken = result.nextLink;
|
902
|
+
while (continuationToken) {
|
903
|
+
result = yield tslib.__await(this._listAtSubscriptionLevelNextNext(continuationToken, options));
|
904
|
+
continuationToken = result.nextLink;
|
905
|
+
yield yield tslib.__await(result.value || []);
|
906
|
+
}
|
907
|
+
});
|
908
|
+
}
|
909
|
+
listAtSubscriptionLevelNextPagingAll(nextLink, options) {
|
910
|
+
return tslib.__asyncGenerator(this, arguments, function* listAtSubscriptionLevelNextPagingAll_1() {
|
911
|
+
var e_7, _a;
|
912
|
+
try {
|
913
|
+
for (var _b = tslib.__asyncValues(this.listAtSubscriptionLevelNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
914
|
+
const page = _c.value;
|
915
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
916
|
+
}
|
917
|
+
}
|
918
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
919
|
+
finally {
|
920
|
+
try {
|
921
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
922
|
+
}
|
923
|
+
finally { if (e_7) throw e_7.error; }
|
924
|
+
}
|
925
|
+
});
|
926
|
+
}
|
927
|
+
/**
|
928
|
+
* ListByScopeNext
|
929
|
+
* @param scope The scope for the lock. When providing a scope for the assignment, use
|
930
|
+
* '/subscriptions/{subscriptionId}' for subscriptions,
|
931
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
|
932
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
|
933
|
+
* for resources.
|
934
|
+
* @param nextLink The nextLink from the previous successful call to the ListByScope method.
|
935
|
+
* @param options The options parameters.
|
936
|
+
*/
|
937
|
+
listByScopeNext(scope, nextLink, options) {
|
938
|
+
const iter = this.listByScopeNextPagingAll(scope, nextLink, options);
|
939
|
+
return {
|
940
|
+
next() {
|
941
|
+
return iter.next();
|
942
|
+
},
|
943
|
+
[Symbol.asyncIterator]() {
|
944
|
+
return this;
|
945
|
+
},
|
946
|
+
byPage: () => {
|
947
|
+
return this.listByScopeNextPagingPage(scope, nextLink, options);
|
948
|
+
}
|
949
|
+
};
|
950
|
+
}
|
951
|
+
listByScopeNextPagingPage(scope, nextLink, options) {
|
952
|
+
return tslib.__asyncGenerator(this, arguments, function* listByScopeNextPagingPage_1() {
|
953
|
+
let result = yield tslib.__await(this._listByScopeNext(scope, nextLink, options));
|
954
|
+
yield yield tslib.__await(result.value || []);
|
955
|
+
let continuationToken = result.nextLink;
|
956
|
+
while (continuationToken) {
|
957
|
+
result = yield tslib.__await(this._listByScopeNextNext(scope, continuationToken, options));
|
958
|
+
continuationToken = result.nextLink;
|
959
|
+
yield yield tslib.__await(result.value || []);
|
960
|
+
}
|
961
|
+
});
|
962
|
+
}
|
963
|
+
listByScopeNextPagingAll(scope, nextLink, options) {
|
964
|
+
return tslib.__asyncGenerator(this, arguments, function* listByScopeNextPagingAll_1() {
|
965
|
+
var e_8, _a;
|
966
|
+
try {
|
967
|
+
for (var _b = tslib.__asyncValues(this.listByScopeNextPagingPage(scope, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
968
|
+
const page = _c.value;
|
969
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
970
|
+
}
|
971
|
+
}
|
972
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
973
|
+
finally {
|
974
|
+
try {
|
975
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
976
|
+
}
|
977
|
+
finally { if (e_8) throw e_8.error; }
|
978
|
+
}
|
979
|
+
});
|
980
|
+
}
|
981
|
+
/**
|
982
|
+
* When you apply a lock at a parent scope, all child resources inherit the same lock. To create
|
983
|
+
* management locks, you must have access to Microsoft.Authorization/* or
|
984
|
+
* Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
|
985
|
+
* Administrator are granted those actions.
|
986
|
+
* @param resourceGroupName The name of the resource group to lock.
|
987
|
+
* @param lockName The lock name. The lock name can be a maximum of 260 characters. It cannot contain
|
988
|
+
* <, > %, &, :, \, ?, /, or any control characters.
|
989
|
+
* @param parameters The management lock parameters.
|
990
|
+
* @param options The options parameters.
|
991
|
+
*/
|
992
|
+
createOrUpdateAtResourceGroupLevel(resourceGroupName, lockName, parameters, options) {
|
993
|
+
return this.client.sendOperationRequest({ resourceGroupName, lockName, parameters, options }, createOrUpdateAtResourceGroupLevelOperationSpec);
|
994
|
+
}
|
995
|
+
/**
|
996
|
+
* To delete management locks, you must have access to Microsoft.Authorization/* or
|
997
|
+
* Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
|
998
|
+
* Administrator are granted those actions.
|
999
|
+
* @param resourceGroupName The name of the resource group containing the lock.
|
1000
|
+
* @param lockName The name of lock to delete.
|
1001
|
+
* @param options The options parameters.
|
1002
|
+
*/
|
1003
|
+
deleteAtResourceGroupLevel(resourceGroupName, lockName, options) {
|
1004
|
+
return this.client.sendOperationRequest({ resourceGroupName, lockName, options }, deleteAtResourceGroupLevelOperationSpec);
|
1005
|
+
}
|
1006
|
+
/**
|
1007
|
+
* Gets a management lock at the resource group level.
|
1008
|
+
* @param resourceGroupName The name of the locked resource group.
|
1009
|
+
* @param lockName The name of the lock to get.
|
1010
|
+
* @param options The options parameters.
|
1011
|
+
*/
|
1012
|
+
getAtResourceGroupLevel(resourceGroupName, lockName, options) {
|
1013
|
+
return this.client.sendOperationRequest({ resourceGroupName, lockName, options }, getAtResourceGroupLevelOperationSpec);
|
1014
|
+
}
|
1015
|
+
/**
|
1016
|
+
* Create or update a management lock by scope.
|
1017
|
+
* @param scope The scope for the lock. When providing a scope for the assignment, use
|
1018
|
+
* '/subscriptions/{subscriptionId}' for subscriptions,
|
1019
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
|
1020
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
|
1021
|
+
* for resources.
|
1022
|
+
* @param lockName The name of lock.
|
1023
|
+
* @param parameters Create or update management lock parameters.
|
1024
|
+
* @param options The options parameters.
|
1025
|
+
*/
|
1026
|
+
createOrUpdateByScope(scope, lockName, parameters, options) {
|
1027
|
+
return this.client.sendOperationRequest({ scope, lockName, parameters, options }, createOrUpdateByScopeOperationSpec);
|
1028
|
+
}
|
1029
|
+
/**
|
1030
|
+
* Delete a management lock by scope.
|
1031
|
+
* @param scope The scope for the lock.
|
1032
|
+
* @param lockName The name of lock.
|
1033
|
+
* @param options The options parameters.
|
1034
|
+
*/
|
1035
|
+
deleteByScope(scope, lockName, options) {
|
1036
|
+
return this.client.sendOperationRequest({ scope, lockName, options }, deleteByScopeOperationSpec);
|
1037
|
+
}
|
1038
|
+
/**
|
1039
|
+
* Get a management lock by scope.
|
1040
|
+
* @param scope The scope for the lock.
|
1041
|
+
* @param lockName The name of lock.
|
1042
|
+
* @param options The options parameters.
|
1043
|
+
*/
|
1044
|
+
getByScope(scope, lockName, options) {
|
1045
|
+
return this.client.sendOperationRequest({ scope, lockName, options }, getByScopeOperationSpec);
|
1046
|
+
}
|
1047
|
+
/**
|
1048
|
+
* When you apply a lock at a parent scope, all child resources inherit the same lock. To create
|
1049
|
+
* management locks, you must have access to Microsoft.Authorization/* or
|
1050
|
+
* Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
|
1051
|
+
* Administrator are granted those actions.
|
1052
|
+
* @param resourceGroupName The name of the resource group containing the resource to lock.
|
1053
|
+
* @param resourceProviderNamespace The resource provider namespace of the resource to lock.
|
1054
|
+
* @param parentResourcePath The parent resource identity.
|
1055
|
+
* @param resourceType The resource type of the resource to lock.
|
1056
|
+
* @param resourceName The name of the resource to lock.
|
1057
|
+
* @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
|
1058
|
+
* contain <, > %, &, :, \, ?, /, or any control characters.
|
1059
|
+
* @param parameters Parameters for creating or updating a management lock.
|
1060
|
+
* @param options The options parameters.
|
1061
|
+
*/
|
1062
|
+
createOrUpdateAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, lockName, parameters, options) {
|
1063
|
+
return this.client.sendOperationRequest({
|
1064
|
+
resourceGroupName,
|
1065
|
+
resourceProviderNamespace,
|
1066
|
+
parentResourcePath,
|
1067
|
+
resourceType,
|
1068
|
+
resourceName,
|
1069
|
+
lockName,
|
1070
|
+
parameters,
|
1071
|
+
options
|
1072
|
+
}, createOrUpdateAtResourceLevelOperationSpec);
|
1073
|
+
}
|
1074
|
+
/**
|
1075
|
+
* To delete management locks, you must have access to Microsoft.Authorization/* or
|
1076
|
+
* Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
|
1077
|
+
* Administrator are granted those actions.
|
1078
|
+
* @param resourceGroupName The name of the resource group containing the resource with the lock to
|
1079
|
+
* delete.
|
1080
|
+
* @param resourceProviderNamespace The resource provider namespace of the resource with the lock to
|
1081
|
+
* delete.
|
1082
|
+
* @param parentResourcePath The parent resource identity.
|
1083
|
+
* @param resourceType The resource type of the resource with the lock to delete.
|
1084
|
+
* @param resourceName The name of the resource with the lock to delete.
|
1085
|
+
* @param lockName The name of the lock to delete.
|
1086
|
+
* @param options The options parameters.
|
1087
|
+
*/
|
1088
|
+
deleteAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, lockName, options) {
|
1089
|
+
return this.client.sendOperationRequest({
|
1090
|
+
resourceGroupName,
|
1091
|
+
resourceProviderNamespace,
|
1092
|
+
parentResourcePath,
|
1093
|
+
resourceType,
|
1094
|
+
resourceName,
|
1095
|
+
lockName,
|
1096
|
+
options
|
1097
|
+
}, deleteAtResourceLevelOperationSpec);
|
1098
|
+
}
|
1099
|
+
/**
|
1100
|
+
* Get the management lock of a resource or any level below resource.
|
1101
|
+
* @param resourceGroupName The name of the resource group.
|
1102
|
+
* @param resourceProviderNamespace The namespace of the resource provider.
|
1103
|
+
* @param parentResourcePath An extra path parameter needed in some services, like SQL Databases.
|
1104
|
+
* @param resourceType The type of the resource.
|
1105
|
+
* @param resourceName The name of the resource.
|
1106
|
+
* @param lockName The name of lock.
|
1107
|
+
* @param options The options parameters.
|
1108
|
+
*/
|
1109
|
+
getAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, lockName, options) {
|
1110
|
+
return this.client.sendOperationRequest({
|
1111
|
+
resourceGroupName,
|
1112
|
+
resourceProviderNamespace,
|
1113
|
+
parentResourcePath,
|
1114
|
+
resourceType,
|
1115
|
+
resourceName,
|
1116
|
+
lockName,
|
1117
|
+
options
|
1118
|
+
}, getAtResourceLevelOperationSpec);
|
1119
|
+
}
|
1120
|
+
/**
|
1121
|
+
* When you apply a lock at a parent scope, all child resources inherit the same lock. To create
|
1122
|
+
* management locks, you must have access to Microsoft.Authorization/* or
|
1123
|
+
* Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
|
1124
|
+
* Administrator are granted those actions.
|
1125
|
+
* @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
|
1126
|
+
* contain <, > %, &, :, \, ?, /, or any control characters.
|
1127
|
+
* @param parameters The management lock parameters.
|
1128
|
+
* @param options The options parameters.
|
1129
|
+
*/
|
1130
|
+
createOrUpdateAtSubscriptionLevel(lockName, parameters, options) {
|
1131
|
+
return this.client.sendOperationRequest({ lockName, parameters, options }, createOrUpdateAtSubscriptionLevelOperationSpec);
|
1132
|
+
}
|
1133
|
+
/**
|
1134
|
+
* To delete management locks, you must have access to Microsoft.Authorization/* or
|
1135
|
+
* Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
|
1136
|
+
* Administrator are granted those actions.
|
1137
|
+
* @param lockName The name of lock to delete.
|
1138
|
+
* @param options The options parameters.
|
1139
|
+
*/
|
1140
|
+
deleteAtSubscriptionLevel(lockName, options) {
|
1141
|
+
return this.client.sendOperationRequest({ lockName, options }, deleteAtSubscriptionLevelOperationSpec);
|
1142
|
+
}
|
1143
|
+
/**
|
1144
|
+
* Gets a management lock at the subscription level.
|
1145
|
+
* @param lockName The name of the lock to get.
|
1146
|
+
* @param options The options parameters.
|
1147
|
+
*/
|
1148
|
+
getAtSubscriptionLevel(lockName, options) {
|
1149
|
+
return this.client.sendOperationRequest({ lockName, options }, getAtSubscriptionLevelOperationSpec);
|
1150
|
+
}
|
1151
|
+
/**
|
1152
|
+
* Gets all the management locks for a resource group.
|
1153
|
+
* @param resourceGroupName The name of the resource group containing the locks to get.
|
1154
|
+
* @param options The options parameters.
|
1155
|
+
*/
|
1156
|
+
_listAtResourceGroupLevel(resourceGroupName, options) {
|
1157
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listAtResourceGroupLevelOperationSpec);
|
1158
|
+
}
|
1159
|
+
/**
|
1160
|
+
* Gets all the management locks for a resource or any level below resource.
|
1161
|
+
* @param resourceGroupName The name of the resource group containing the locked resource. The name is
|
1162
|
+
* case insensitive.
|
1163
|
+
* @param resourceProviderNamespace The namespace of the resource provider.
|
1164
|
+
* @param parentResourcePath The parent resource identity.
|
1165
|
+
* @param resourceType The resource type of the locked resource.
|
1166
|
+
* @param resourceName The name of the locked resource.
|
1167
|
+
* @param options The options parameters.
|
1168
|
+
*/
|
1169
|
+
_listAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, options) {
|
1170
|
+
return this.client.sendOperationRequest({
|
1171
|
+
resourceGroupName,
|
1172
|
+
resourceProviderNamespace,
|
1173
|
+
parentResourcePath,
|
1174
|
+
resourceType,
|
1175
|
+
resourceName,
|
1176
|
+
options
|
1177
|
+
}, listAtResourceLevelOperationSpec);
|
1178
|
+
}
|
1179
|
+
/**
|
1180
|
+
* Gets all the management locks for a subscription.
|
1181
|
+
* @param options The options parameters.
|
1182
|
+
*/
|
1183
|
+
_listAtSubscriptionLevel(options) {
|
1184
|
+
return this.client.sendOperationRequest({ options }, listAtSubscriptionLevelOperationSpec);
|
1185
|
+
}
|
1186
|
+
/**
|
1187
|
+
* Gets all the management locks for a scope.
|
1188
|
+
* @param scope The scope for the lock. When providing a scope for the assignment, use
|
1189
|
+
* '/subscriptions/{subscriptionId}' for subscriptions,
|
1190
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
|
1191
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
|
1192
|
+
* for resources.
|
1193
|
+
* @param options The options parameters.
|
1194
|
+
*/
|
1195
|
+
_listByScope(scope, options) {
|
1196
|
+
return this.client.sendOperationRequest({ scope, options }, listByScopeOperationSpec);
|
1197
|
+
}
|
1198
|
+
/**
|
1199
|
+
* ListAtResourceGroupLevelNext
|
1200
|
+
* @param resourceGroupName The name of the resource group containing the locks to get.
|
1201
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtResourceGroupLevel
|
1202
|
+
* method.
|
1203
|
+
* @param options The options parameters.
|
1204
|
+
*/
|
1205
|
+
_listAtResourceGroupLevelNext(resourceGroupName, nextLink, options) {
|
1206
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listAtResourceGroupLevelNextOperationSpec);
|
1207
|
+
}
|
1208
|
+
/**
|
1209
|
+
* ListAtResourceLevelNext
|
1210
|
+
* @param resourceGroupName The name of the resource group containing the locked resource. The name is
|
1211
|
+
* case insensitive.
|
1212
|
+
* @param resourceProviderNamespace The namespace of the resource provider.
|
1213
|
+
* @param parentResourcePath The parent resource identity.
|
1214
|
+
* @param resourceType The resource type of the locked resource.
|
1215
|
+
* @param resourceName The name of the locked resource.
|
1216
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtResourceLevel method.
|
1217
|
+
* @param options The options parameters.
|
1218
|
+
*/
|
1219
|
+
_listAtResourceLevelNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
|
1220
|
+
return this.client.sendOperationRequest({
|
1221
|
+
resourceGroupName,
|
1222
|
+
resourceProviderNamespace,
|
1223
|
+
parentResourcePath,
|
1224
|
+
resourceType,
|
1225
|
+
resourceName,
|
1226
|
+
nextLink,
|
1227
|
+
options
|
1228
|
+
}, listAtResourceLevelNextOperationSpec);
|
1229
|
+
}
|
1230
|
+
/**
|
1231
|
+
* ListAtSubscriptionLevelNext
|
1232
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionLevel
|
1233
|
+
* method.
|
1234
|
+
* @param options The options parameters.
|
1235
|
+
*/
|
1236
|
+
_listAtSubscriptionLevelNext(nextLink, options) {
|
1237
|
+
return this.client.sendOperationRequest({ nextLink, options }, listAtSubscriptionLevelNextOperationSpec);
|
1238
|
+
}
|
1239
|
+
/**
|
1240
|
+
* ListByScopeNext
|
1241
|
+
* @param scope The scope for the lock. When providing a scope for the assignment, use
|
1242
|
+
* '/subscriptions/{subscriptionId}' for subscriptions,
|
1243
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
|
1244
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
|
1245
|
+
* for resources.
|
1246
|
+
* @param nextLink The nextLink from the previous successful call to the ListByScope method.
|
1247
|
+
* @param options The options parameters.
|
1248
|
+
*/
|
1249
|
+
_listByScopeNext(scope, nextLink, options) {
|
1250
|
+
return this.client.sendOperationRequest({ scope, nextLink, options }, listByScopeNextOperationSpec);
|
1251
|
+
}
|
1252
|
+
/**
|
1253
|
+
* ListAtResourceGroupLevelNextNext
|
1254
|
+
* @param resourceGroupName The name of the resource group containing the locks to get.
|
1255
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtResourceGroupLevelNext
|
1256
|
+
* method.
|
1257
|
+
* @param options The options parameters.
|
1258
|
+
*/
|
1259
|
+
_listAtResourceGroupLevelNextNext(resourceGroupName, nextLink, options) {
|
1260
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listAtResourceGroupLevelNextNextOperationSpec);
|
1261
|
+
}
|
1262
|
+
/**
|
1263
|
+
* ListAtResourceLevelNextNext
|
1264
|
+
* @param resourceGroupName The name of the resource group containing the locked resource. The name is
|
1265
|
+
* case insensitive.
|
1266
|
+
* @param resourceProviderNamespace The namespace of the resource provider.
|
1267
|
+
* @param parentResourcePath The parent resource identity.
|
1268
|
+
* @param resourceType The resource type of the locked resource.
|
1269
|
+
* @param resourceName The name of the locked resource.
|
1270
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtResourceLevelNext
|
1271
|
+
* method.
|
1272
|
+
* @param options The options parameters.
|
1273
|
+
*/
|
1274
|
+
_listAtResourceLevelNextNext(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, nextLink, options) {
|
1275
|
+
return this.client.sendOperationRequest({
|
1276
|
+
resourceGroupName,
|
1277
|
+
resourceProviderNamespace,
|
1278
|
+
parentResourcePath,
|
1279
|
+
resourceType,
|
1280
|
+
resourceName,
|
1281
|
+
nextLink,
|
1282
|
+
options
|
1283
|
+
}, listAtResourceLevelNextNextOperationSpec);
|
1284
|
+
}
|
1285
|
+
/**
|
1286
|
+
* ListAtSubscriptionLevelNextNext
|
1287
|
+
* @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionLevelNext
|
1288
|
+
* method.
|
1289
|
+
* @param options The options parameters.
|
1290
|
+
*/
|
1291
|
+
_listAtSubscriptionLevelNextNext(nextLink, options) {
|
1292
|
+
return this.client.sendOperationRequest({ nextLink, options }, listAtSubscriptionLevelNextNextOperationSpec);
|
1293
|
+
}
|
1294
|
+
/**
|
1295
|
+
* ListByScopeNextNext
|
1296
|
+
* @param scope The scope for the lock. When providing a scope for the assignment, use
|
1297
|
+
* '/subscriptions/{subscriptionId}' for subscriptions,
|
1298
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
|
1299
|
+
* '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
|
1300
|
+
* for resources.
|
1301
|
+
* @param nextLink The nextLink from the previous successful call to the ListByScopeNext method.
|
1302
|
+
* @param options The options parameters.
|
1303
|
+
*/
|
1304
|
+
_listByScopeNextNext(scope, nextLink, options) {
|
1305
|
+
return this.client.sendOperationRequest({ scope, nextLink, options }, listByScopeNextNextOperationSpec);
|
1306
|
+
}
|
1307
|
+
}
|
1308
|
+
// Operation Specifications
|
1309
|
+
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
1310
|
+
const createOrUpdateAtResourceGroupLevelOperationSpec = {
|
1311
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}",
|
1312
|
+
httpMethod: "PUT",
|
1313
|
+
responses: {
|
1314
|
+
200: {
|
1315
|
+
bodyMapper: ManagementLockObject
|
1316
|
+
},
|
1317
|
+
201: {
|
1318
|
+
bodyMapper: ManagementLockObject
|
1319
|
+
}
|
1320
|
+
},
|
1321
|
+
requestBody: parameters,
|
1322
|
+
queryParameters: [apiVersion],
|
1323
|
+
urlParameters: [
|
1324
|
+
$host,
|
1325
|
+
resourceGroupName,
|
1326
|
+
lockName,
|
1327
|
+
subscriptionId
|
1328
|
+
],
|
1329
|
+
headerParameters: [accept, contentType],
|
1330
|
+
mediaType: "json",
|
1331
|
+
serializer: serializer$1
|
1332
|
+
};
|
1333
|
+
const deleteAtResourceGroupLevelOperationSpec = {
|
1334
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}",
|
1335
|
+
httpMethod: "DELETE",
|
1336
|
+
responses: { 200: {}, 204: {} },
|
1337
|
+
queryParameters: [apiVersion],
|
1338
|
+
urlParameters: [
|
1339
|
+
$host,
|
1340
|
+
resourceGroupName,
|
1341
|
+
lockName,
|
1342
|
+
subscriptionId
|
1343
|
+
],
|
1344
|
+
serializer: serializer$1
|
1345
|
+
};
|
1346
|
+
const getAtResourceGroupLevelOperationSpec = {
|
1347
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks/{lockName}",
|
1348
|
+
httpMethod: "GET",
|
1349
|
+
responses: {
|
1350
|
+
200: {
|
1351
|
+
bodyMapper: ManagementLockObject
|
1352
|
+
}
|
1353
|
+
},
|
1354
|
+
queryParameters: [apiVersion],
|
1355
|
+
urlParameters: [
|
1356
|
+
$host,
|
1357
|
+
resourceGroupName,
|
1358
|
+
lockName,
|
1359
|
+
subscriptionId
|
1360
|
+
],
|
1361
|
+
headerParameters: [accept],
|
1362
|
+
serializer: serializer$1
|
1363
|
+
};
|
1364
|
+
const createOrUpdateByScopeOperationSpec = {
|
1365
|
+
path: "/{scope}/providers/Microsoft.Authorization/locks/{lockName}",
|
1366
|
+
httpMethod: "PUT",
|
1367
|
+
responses: {
|
1368
|
+
200: {
|
1369
|
+
bodyMapper: ManagementLockObject
|
1370
|
+
},
|
1371
|
+
201: {
|
1372
|
+
bodyMapper: ManagementLockObject
|
1373
|
+
}
|
1374
|
+
},
|
1375
|
+
requestBody: parameters,
|
1376
|
+
queryParameters: [apiVersion],
|
1377
|
+
urlParameters: [$host, lockName, scope],
|
1378
|
+
headerParameters: [accept, contentType],
|
1379
|
+
mediaType: "json",
|
1380
|
+
serializer: serializer$1
|
1381
|
+
};
|
1382
|
+
const deleteByScopeOperationSpec = {
|
1383
|
+
path: "/{scope}/providers/Microsoft.Authorization/locks/{lockName}",
|
1384
|
+
httpMethod: "DELETE",
|
1385
|
+
responses: { 200: {}, 204: {} },
|
1386
|
+
queryParameters: [apiVersion],
|
1387
|
+
urlParameters: [$host, lockName, scope],
|
1388
|
+
serializer: serializer$1
|
1389
|
+
};
|
1390
|
+
const getByScopeOperationSpec = {
|
1391
|
+
path: "/{scope}/providers/Microsoft.Authorization/locks/{lockName}",
|
1392
|
+
httpMethod: "GET",
|
1393
|
+
responses: {
|
1394
|
+
200: {
|
1395
|
+
bodyMapper: ManagementLockObject
|
1396
|
+
}
|
1397
|
+
},
|
1398
|
+
queryParameters: [apiVersion],
|
1399
|
+
urlParameters: [$host, lockName, scope],
|
1400
|
+
headerParameters: [accept],
|
1401
|
+
serializer: serializer$1
|
1402
|
+
};
|
1403
|
+
const createOrUpdateAtResourceLevelOperationSpec = {
|
1404
|
+
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}",
|
1405
|
+
httpMethod: "PUT",
|
1406
|
+
responses: {
|
1407
|
+
200: {
|
1408
|
+
bodyMapper: ManagementLockObject
|
1409
|
+
},
|
1410
|
+
201: {
|
1411
|
+
bodyMapper: ManagementLockObject
|
1412
|
+
}
|
1413
|
+
},
|
1414
|
+
requestBody: parameters,
|
1415
|
+
queryParameters: [apiVersion],
|
1416
|
+
urlParameters: [
|
1417
|
+
$host,
|
1418
|
+
resourceGroupName,
|
1419
|
+
lockName,
|
1420
|
+
subscriptionId,
|
1421
|
+
resourceProviderNamespace,
|
1422
|
+
parentResourcePath,
|
1423
|
+
resourceType,
|
1424
|
+
resourceName
|
1425
|
+
],
|
1426
|
+
headerParameters: [accept, contentType],
|
1427
|
+
mediaType: "json",
|
1428
|
+
serializer: serializer$1
|
1429
|
+
};
|
1430
|
+
const deleteAtResourceLevelOperationSpec = {
|
1431
|
+
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}",
|
1432
|
+
httpMethod: "DELETE",
|
1433
|
+
responses: { 200: {}, 204: {} },
|
1434
|
+
queryParameters: [apiVersion],
|
1435
|
+
urlParameters: [
|
1436
|
+
$host,
|
1437
|
+
resourceGroupName,
|
1438
|
+
lockName,
|
1439
|
+
subscriptionId,
|
1440
|
+
resourceProviderNamespace,
|
1441
|
+
parentResourcePath,
|
1442
|
+
resourceType,
|
1443
|
+
resourceName
|
1444
|
+
],
|
1445
|
+
serializer: serializer$1
|
1446
|
+
};
|
1447
|
+
const getAtResourceLevelOperationSpec = {
|
1448
|
+
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks/{lockName}",
|
1449
|
+
httpMethod: "GET",
|
1450
|
+
responses: {
|
1451
|
+
200: {
|
1452
|
+
bodyMapper: ManagementLockObject
|
1453
|
+
}
|
1454
|
+
},
|
1455
|
+
queryParameters: [apiVersion],
|
1456
|
+
urlParameters: [
|
1457
|
+
$host,
|
1458
|
+
resourceGroupName,
|
1459
|
+
lockName,
|
1460
|
+
subscriptionId,
|
1461
|
+
resourceProviderNamespace,
|
1462
|
+
parentResourcePath,
|
1463
|
+
resourceType,
|
1464
|
+
resourceName
|
1465
|
+
],
|
1466
|
+
headerParameters: [accept],
|
1467
|
+
serializer: serializer$1
|
1468
|
+
};
|
1469
|
+
const createOrUpdateAtSubscriptionLevelOperationSpec = {
|
1470
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}",
|
1471
|
+
httpMethod: "PUT",
|
1472
|
+
responses: {
|
1473
|
+
200: {
|
1474
|
+
bodyMapper: ManagementLockObject
|
1475
|
+
},
|
1476
|
+
201: {
|
1477
|
+
bodyMapper: ManagementLockObject
|
1478
|
+
}
|
1479
|
+
},
|
1480
|
+
requestBody: parameters,
|
1481
|
+
queryParameters: [apiVersion],
|
1482
|
+
urlParameters: [
|
1483
|
+
$host,
|
1484
|
+
lockName,
|
1485
|
+
subscriptionId
|
1486
|
+
],
|
1487
|
+
headerParameters: [accept, contentType],
|
1488
|
+
mediaType: "json",
|
1489
|
+
serializer: serializer$1
|
1490
|
+
};
|
1491
|
+
const deleteAtSubscriptionLevelOperationSpec = {
|
1492
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}",
|
1493
|
+
httpMethod: "DELETE",
|
1494
|
+
responses: { 200: {}, 204: {} },
|
1495
|
+
queryParameters: [apiVersion],
|
1496
|
+
urlParameters: [
|
1497
|
+
$host,
|
1498
|
+
lockName,
|
1499
|
+
subscriptionId
|
1500
|
+
],
|
1501
|
+
serializer: serializer$1
|
1502
|
+
};
|
1503
|
+
const getAtSubscriptionLevelOperationSpec = {
|
1504
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks/{lockName}",
|
1505
|
+
httpMethod: "GET",
|
1506
|
+
responses: {
|
1507
|
+
200: {
|
1508
|
+
bodyMapper: ManagementLockObject
|
1509
|
+
}
|
1510
|
+
},
|
1511
|
+
queryParameters: [apiVersion],
|
1512
|
+
urlParameters: [
|
1513
|
+
$host,
|
1514
|
+
lockName,
|
1515
|
+
subscriptionId
|
1516
|
+
],
|
1517
|
+
headerParameters: [accept],
|
1518
|
+
serializer: serializer$1
|
1519
|
+
};
|
1520
|
+
const listAtResourceGroupLevelOperationSpec = {
|
1521
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/locks",
|
1522
|
+
httpMethod: "GET",
|
1523
|
+
responses: {
|
1524
|
+
200: {
|
1525
|
+
bodyMapper: ManagementLockListResult
|
1526
|
+
}
|
1527
|
+
},
|
1528
|
+
queryParameters: [apiVersion, filter],
|
1529
|
+
urlParameters: [
|
1530
|
+
$host,
|
1531
|
+
resourceGroupName,
|
1532
|
+
subscriptionId
|
1533
|
+
],
|
1534
|
+
headerParameters: [accept],
|
1535
|
+
serializer: serializer$1
|
1536
|
+
};
|
1537
|
+
const listAtResourceLevelOperationSpec = {
|
1538
|
+
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/locks",
|
1539
|
+
httpMethod: "GET",
|
1540
|
+
responses: {
|
1541
|
+
200: {
|
1542
|
+
bodyMapper: ManagementLockListResult
|
1543
|
+
}
|
1544
|
+
},
|
1545
|
+
queryParameters: [apiVersion, filter],
|
1546
|
+
urlParameters: [
|
1547
|
+
$host,
|
1548
|
+
resourceGroupName,
|
1549
|
+
subscriptionId,
|
1550
|
+
resourceProviderNamespace,
|
1551
|
+
parentResourcePath,
|
1552
|
+
resourceType,
|
1553
|
+
resourceName
|
1554
|
+
],
|
1555
|
+
headerParameters: [accept],
|
1556
|
+
serializer: serializer$1
|
1557
|
+
};
|
1558
|
+
const listAtSubscriptionLevelOperationSpec = {
|
1559
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/locks",
|
1560
|
+
httpMethod: "GET",
|
1561
|
+
responses: {
|
1562
|
+
200: {
|
1563
|
+
bodyMapper: ManagementLockListResult
|
1564
|
+
}
|
1565
|
+
},
|
1566
|
+
queryParameters: [apiVersion, filter],
|
1567
|
+
urlParameters: [$host, subscriptionId],
|
1568
|
+
headerParameters: [accept],
|
1569
|
+
serializer: serializer$1
|
1570
|
+
};
|
1571
|
+
const listByScopeOperationSpec = {
|
1572
|
+
path: "/{scope}/providers/Microsoft.Authorization/locks",
|
1573
|
+
httpMethod: "GET",
|
1574
|
+
responses: {
|
1575
|
+
200: {
|
1576
|
+
bodyMapper: ManagementLockListResult
|
1577
|
+
}
|
1578
|
+
},
|
1579
|
+
queryParameters: [apiVersion, filter],
|
1580
|
+
urlParameters: [$host, scope],
|
1581
|
+
headerParameters: [accept],
|
1582
|
+
serializer: serializer$1
|
1583
|
+
};
|
1584
|
+
const listAtResourceGroupLevelNextOperationSpec = {
|
1585
|
+
path: "{nextLink}",
|
1586
|
+
httpMethod: "GET",
|
1587
|
+
responses: {
|
1588
|
+
200: {
|
1589
|
+
bodyMapper: ManagementLockListResult
|
1590
|
+
}
|
1591
|
+
},
|
1592
|
+
queryParameters: [apiVersion, filter],
|
1593
|
+
urlParameters: [
|
1594
|
+
$host,
|
1595
|
+
nextLink,
|
1596
|
+
resourceGroupName,
|
1597
|
+
subscriptionId
|
1598
|
+
],
|
1599
|
+
headerParameters: [accept],
|
1600
|
+
serializer: serializer$1
|
1601
|
+
};
|
1602
|
+
const listAtResourceLevelNextOperationSpec = {
|
1603
|
+
path: "{nextLink}",
|
1604
|
+
httpMethod: "GET",
|
1605
|
+
responses: {
|
1606
|
+
200: {
|
1607
|
+
bodyMapper: ManagementLockListResult
|
1608
|
+
}
|
1609
|
+
},
|
1610
|
+
queryParameters: [apiVersion, filter],
|
1611
|
+
urlParameters: [
|
1612
|
+
$host,
|
1613
|
+
nextLink,
|
1614
|
+
resourceGroupName,
|
1615
|
+
subscriptionId,
|
1616
|
+
resourceProviderNamespace,
|
1617
|
+
parentResourcePath,
|
1618
|
+
resourceType,
|
1619
|
+
resourceName
|
1620
|
+
],
|
1621
|
+
headerParameters: [accept],
|
1622
|
+
serializer: serializer$1
|
1623
|
+
};
|
1624
|
+
const listAtSubscriptionLevelNextOperationSpec = {
|
1625
|
+
path: "{nextLink}",
|
1626
|
+
httpMethod: "GET",
|
1627
|
+
responses: {
|
1628
|
+
200: {
|
1629
|
+
bodyMapper: ManagementLockListResult
|
1630
|
+
}
|
1631
|
+
},
|
1632
|
+
queryParameters: [apiVersion, filter],
|
1633
|
+
urlParameters: [
|
1634
|
+
$host,
|
1635
|
+
nextLink,
|
1636
|
+
subscriptionId
|
1637
|
+
],
|
1638
|
+
headerParameters: [accept],
|
1639
|
+
serializer: serializer$1
|
1640
|
+
};
|
1641
|
+
const listByScopeNextOperationSpec = {
|
1642
|
+
path: "{nextLink}",
|
1643
|
+
httpMethod: "GET",
|
1644
|
+
responses: {
|
1645
|
+
200: {
|
1646
|
+
bodyMapper: ManagementLockListResult
|
1647
|
+
}
|
1648
|
+
},
|
1649
|
+
queryParameters: [apiVersion, filter],
|
1650
|
+
urlParameters: [$host, nextLink, scope],
|
1651
|
+
headerParameters: [accept],
|
1652
|
+
serializer: serializer$1
|
1653
|
+
};
|
1654
|
+
const listAtResourceGroupLevelNextNextOperationSpec = {
|
1655
|
+
path: "{nextLink}",
|
1656
|
+
httpMethod: "GET",
|
1657
|
+
responses: {
|
1658
|
+
200: {
|
1659
|
+
bodyMapper: ManagementLockListResult
|
1660
|
+
}
|
1661
|
+
},
|
1662
|
+
queryParameters: [apiVersion, filter],
|
1663
|
+
urlParameters: [
|
1664
|
+
$host,
|
1665
|
+
nextLink,
|
1666
|
+
resourceGroupName,
|
1667
|
+
subscriptionId
|
1668
|
+
],
|
1669
|
+
headerParameters: [accept],
|
1670
|
+
serializer: serializer$1
|
1671
|
+
};
|
1672
|
+
const listAtResourceLevelNextNextOperationSpec = {
|
1673
|
+
path: "{nextLink}",
|
1674
|
+
httpMethod: "GET",
|
1675
|
+
responses: {
|
1676
|
+
200: {
|
1677
|
+
bodyMapper: ManagementLockListResult
|
1678
|
+
}
|
1679
|
+
},
|
1680
|
+
queryParameters: [apiVersion, filter],
|
1681
|
+
urlParameters: [
|
1682
|
+
$host,
|
1683
|
+
nextLink,
|
1684
|
+
resourceGroupName,
|
1685
|
+
subscriptionId,
|
1686
|
+
resourceProviderNamespace,
|
1687
|
+
parentResourcePath,
|
1688
|
+
resourceType,
|
1689
|
+
resourceName
|
1690
|
+
],
|
1691
|
+
headerParameters: [accept],
|
1692
|
+
serializer: serializer$1
|
1693
|
+
};
|
1694
|
+
const listAtSubscriptionLevelNextNextOperationSpec = {
|
1695
|
+
path: "{nextLink}",
|
1696
|
+
httpMethod: "GET",
|
1697
|
+
responses: {
|
1698
|
+
200: {
|
1699
|
+
bodyMapper: ManagementLockListResult
|
1700
|
+
}
|
1701
|
+
},
|
1702
|
+
queryParameters: [apiVersion, filter],
|
1703
|
+
urlParameters: [
|
1704
|
+
$host,
|
1705
|
+
nextLink,
|
1706
|
+
subscriptionId
|
1707
|
+
],
|
1708
|
+
headerParameters: [accept],
|
1709
|
+
serializer: serializer$1
|
1710
|
+
};
|
1711
|
+
const listByScopeNextNextOperationSpec = {
|
1712
|
+
path: "{nextLink}",
|
1713
|
+
httpMethod: "GET",
|
1714
|
+
responses: {
|
1715
|
+
200: {
|
1716
|
+
bodyMapper: ManagementLockListResult
|
1717
|
+
}
|
1718
|
+
},
|
1719
|
+
queryParameters: [apiVersion, filter],
|
1720
|
+
urlParameters: [$host, nextLink, scope],
|
1721
|
+
headerParameters: [accept],
|
1722
|
+
serializer: serializer$1
|
1723
|
+
};
|
1724
|
+
|
1725
|
+
/*
|
1726
|
+
* Copyright (c) Microsoft Corporation.
|
1727
|
+
* Licensed under the MIT License.
|
1728
|
+
*
|
1729
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
1730
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
1731
|
+
*/
|
1732
|
+
class ManagementLockClientContext extends coreClient.ServiceClient {
|
1733
|
+
/**
|
1734
|
+
* Initializes a new instance of the ManagementLockClientContext class.
|
1735
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
1736
|
+
* @param subscriptionId The ID of the target subscription.
|
1737
|
+
* @param options The parameter options
|
1738
|
+
*/
|
1739
|
+
constructor(credentials, subscriptionId, options) {
|
1740
|
+
if (credentials === undefined) {
|
1741
|
+
throw new Error("'credentials' cannot be null");
|
1742
|
+
}
|
1743
|
+
if (subscriptionId === undefined) {
|
1744
|
+
throw new Error("'subscriptionId' cannot be null");
|
1745
|
+
}
|
1746
|
+
// Initializing default values for options
|
1747
|
+
if (!options) {
|
1748
|
+
options = {};
|
1749
|
+
}
|
1750
|
+
const defaults = {
|
1751
|
+
requestContentType: "application/json; charset=utf-8",
|
1752
|
+
credential: credentials
|
1753
|
+
};
|
1754
|
+
const packageDetails = `azsdk-js-arm-locks/2.0.0-beta.1`;
|
1755
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
1756
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
1757
|
+
: `${packageDetails}`;
|
1758
|
+
if (!options.credentialScopes) {
|
1759
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
1760
|
+
}
|
1761
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
1762
|
+
userAgentPrefix
|
1763
|
+
}, baseUri: options.endpoint || "https://management.azure.com" });
|
1764
|
+
super(optionsWithDefaults);
|
1765
|
+
// Parameter assignments
|
1766
|
+
this.subscriptionId = subscriptionId;
|
1767
|
+
// Assigning values to Constant parameters
|
1768
|
+
this.$host = options.$host || "https://management.azure.com";
|
1769
|
+
this.apiVersion = options.apiVersion || "2016-09-01";
|
1770
|
+
}
|
1771
|
+
}
|
1772
|
+
|
1773
|
+
/*
|
1774
|
+
* Copyright (c) Microsoft Corporation.
|
1775
|
+
* Licensed under the MIT License.
|
1776
|
+
*
|
1777
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
1778
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
1779
|
+
*/
|
1780
|
+
class ManagementLockClient extends ManagementLockClientContext {
|
1781
|
+
/**
|
1782
|
+
* Initializes a new instance of the ManagementLockClient class.
|
1783
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
1784
|
+
* @param subscriptionId The ID of the target subscription.
|
1785
|
+
* @param options The parameter options
|
1786
|
+
*/
|
1787
|
+
constructor(credentials, subscriptionId, options) {
|
1788
|
+
super(credentials, subscriptionId, options);
|
1789
|
+
this.authorizationOperations = new AuthorizationOperationsImpl(this);
|
1790
|
+
this.managementLocks = new ManagementLocksImpl(this);
|
1791
|
+
}
|
1792
|
+
}
|
1793
|
+
|
1794
|
+
exports.ManagementLockClient = ManagementLockClient;
|
1795
|
+
exports.ManagementLockClientContext = ManagementLockClientContext;
|
1796
|
+
//# sourceMappingURL=index.js.map
|