@azure/arm-msi 0.1.0 → 2.0.0-alpha.20211217.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +75 -73
  4. package/dist/index.js +1029 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/managedServiceIdentityClient.d.ts +20 -0
  13. package/dist-esm/src/managedServiceIdentityClient.d.ts.map +1 -0
  14. package/dist-esm/src/managedServiceIdentityClient.js +53 -0
  15. package/dist-esm/src/managedServiceIdentityClient.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +212 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +9 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +14 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/dist-esm/src/models/mappers.js +325 -0
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +13 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +113 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/index.d.ts +4 -0
  29. package/dist-esm/src/operations/index.d.ts.map +1 -0
  30. package/dist-esm/src/operations/index.js +11 -0
  31. package/dist-esm/src/operations/index.js.map +1 -0
  32. package/dist-esm/src/operations/operations.d.ts +32 -0
  33. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  34. package/dist-esm/src/operations/operations.js +120 -0
  35. package/dist-esm/src/operations/operations.js.map +1 -0
  36. package/dist-esm/src/operations/systemAssignedIdentities.d.ts +20 -0
  37. package/dist-esm/src/operations/systemAssignedIdentities.d.ts.map +1 -0
  38. package/dist-esm/src/operations/systemAssignedIdentities.js +48 -0
  39. package/dist-esm/src/operations/systemAssignedIdentities.js.map +1 -0
  40. package/dist-esm/src/operations/userAssignedIdentities.d.ts +83 -0
  41. package/dist-esm/src/operations/userAssignedIdentities.d.ts.map +1 -0
  42. package/dist-esm/src/operations/userAssignedIdentities.js +359 -0
  43. package/dist-esm/src/operations/userAssignedIdentities.js.map +1 -0
  44. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  45. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  46. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  47. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  49. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  51. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/systemAssignedIdentities.d.ts +12 -0
  53. package/dist-esm/src/operationsInterfaces/systemAssignedIdentities.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/systemAssignedIdentities.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/systemAssignedIdentities.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/userAssignedIdentities.d.ts +47 -0
  57. package/dist-esm/src/operationsInterfaces/userAssignedIdentities.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/userAssignedIdentities.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/userAssignedIdentities.js.map +1 -0
  60. package/dist-esm/test/sampleTest.d.ts +2 -0
  61. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  62. package/dist-esm/test/sampleTest.js +40 -0
  63. package/dist-esm/test/sampleTest.js.map +1 -0
  64. package/package.json +70 -25
  65. package/review/arm-msi.api.md +218 -0
  66. package/rollup.config.js +184 -27
  67. package/src/index.ts +12 -0
  68. package/src/managedServiceIdentityClient.ts +87 -0
  69. package/src/models/index.ts +248 -0
  70. package/src/models/mappers.ts +364 -0
  71. package/src/models/parameters.ts +132 -0
  72. package/{lib → src}/operations/index.ts +4 -5
  73. package/src/operations/operations.ts +137 -0
  74. package/src/operations/systemAssignedIdentities.ts +65 -0
  75. package/src/operations/userAssignedIdentities.ts +450 -0
  76. package/src/operationsInterfaces/index.ts +11 -0
  77. package/src/operationsInterfaces/operations.ts +22 -0
  78. package/src/operationsInterfaces/systemAssignedIdentities.ts +26 -0
  79. package/src/operationsInterfaces/userAssignedIdentities.ts +91 -0
  80. package/tsconfig.json +4 -4
  81. package/types/arm-msi.d.ts +330 -0
  82. package/types/tsdoc-metadata.json +11 -0
  83. package/dist/arm-msi.js +0 -820
  84. package/dist/arm-msi.js.map +0 -1
  85. package/dist/arm-msi.min.js +0 -1
  86. package/dist/arm-msi.min.js.map +0 -1
  87. package/esm/managedServiceIdentityClient.d.ts +0 -19
  88. package/esm/managedServiceIdentityClient.d.ts.map +0 -1
  89. package/esm/managedServiceIdentityClient.js +0 -34
  90. package/esm/managedServiceIdentityClient.js.map +0 -1
  91. package/esm/managedServiceIdentityClientContext.d.ts +0 -16
  92. package/esm/managedServiceIdentityClientContext.d.ts.map +0 -1
  93. package/esm/managedServiceIdentityClientContext.js +0 -56
  94. package/esm/managedServiceIdentityClientContext.js.map +0 -1
  95. package/esm/models/index.d.ts +0 -332
  96. package/esm/models/index.d.ts.map +0 -1
  97. package/esm/models/index.js +0 -10
  98. package/esm/models/index.js.map +0 -1
  99. package/esm/models/mappers.d.ts +0 -9
  100. package/esm/models/mappers.d.ts.map +0 -1
  101. package/esm/models/mappers.js +0 -197
  102. package/esm/models/mappers.js.map +0 -1
  103. package/esm/models/operationsMappers.d.ts +0 -2
  104. package/esm/models/operationsMappers.d.ts.map +0 -1
  105. package/esm/models/operationsMappers.js +0 -11
  106. package/esm/models/operationsMappers.js.map +0 -1
  107. package/esm/models/parameters.d.ts +0 -8
  108. package/esm/models/parameters.d.ts.map +0 -1
  109. package/esm/models/parameters.js +0 -71
  110. package/esm/models/parameters.js.map +0 -1
  111. package/esm/models/userAssignedIdentitiesMappers.d.ts +0 -2
  112. package/esm/models/userAssignedIdentitiesMappers.d.ts.map +0 -1
  113. package/esm/models/userAssignedIdentitiesMappers.js +0 -11
  114. package/esm/models/userAssignedIdentitiesMappers.js.map +0 -1
  115. package/esm/operations/index.d.ts +0 -3
  116. package/esm/operations/index.d.ts.map +0 -1
  117. package/esm/operations/index.js +0 -12
  118. package/esm/operations/index.js.map +0 -1
  119. package/esm/operations/operations.d.ts +0 -46
  120. package/esm/operations/operations.d.ts.map +0 -1
  121. package/esm/operations/operations.js +0 -77
  122. package/esm/operations/operations.js.map +0 -1
  123. package/esm/operations/userAssignedIdentities.d.ts +0 -172
  124. package/esm/operations/userAssignedIdentities.d.ts.map +0 -1
  125. package/esm/operations/userAssignedIdentities.js +0 -272
  126. package/esm/operations/userAssignedIdentities.js.map +0 -1
  127. package/lib/managedServiceIdentityClient.ts +0 -44
  128. package/lib/managedServiceIdentityClientContext.ts +0 -62
  129. package/lib/models/index.ts +0 -358
  130. package/lib/models/mappers.ts +0 -204
  131. package/lib/models/operationsMappers.ts +0 -17
  132. package/lib/models/parameters.ts +0 -73
  133. package/lib/models/userAssignedIdentitiesMappers.ts +0 -17
  134. package/lib/operations/operations.ts +0 -123
  135. package/lib/operations/userAssignedIdentities.ts +0 -479
@@ -0,0 +1,450 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { UserAssignedIdentities } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { ManagedServiceIdentityClient } from "../managedServiceIdentityClient";
15
+ import {
16
+ Identity,
17
+ UserAssignedIdentitiesListBySubscriptionNextOptionalParams,
18
+ UserAssignedIdentitiesListBySubscriptionOptionalParams,
19
+ UserAssignedIdentitiesListByResourceGroupNextOptionalParams,
20
+ UserAssignedIdentitiesListByResourceGroupOptionalParams,
21
+ UserAssignedIdentitiesListBySubscriptionResponse,
22
+ UserAssignedIdentitiesListByResourceGroupResponse,
23
+ UserAssignedIdentitiesCreateOrUpdateOptionalParams,
24
+ UserAssignedIdentitiesCreateOrUpdateResponse,
25
+ IdentityUpdate,
26
+ UserAssignedIdentitiesUpdateOptionalParams,
27
+ UserAssignedIdentitiesUpdateResponse,
28
+ UserAssignedIdentitiesGetOptionalParams,
29
+ UserAssignedIdentitiesGetResponse,
30
+ UserAssignedIdentitiesDeleteOptionalParams,
31
+ UserAssignedIdentitiesListBySubscriptionNextResponse,
32
+ UserAssignedIdentitiesListByResourceGroupNextResponse
33
+ } from "../models";
34
+
35
+ /// <reference lib="esnext.asynciterable" />
36
+ /** Class containing UserAssignedIdentities operations. */
37
+ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
38
+ private readonly client: ManagedServiceIdentityClient;
39
+
40
+ /**
41
+ * Initialize a new instance of the class UserAssignedIdentities class.
42
+ * @param client Reference to the service client
43
+ */
44
+ constructor(client: ManagedServiceIdentityClient) {
45
+ this.client = client;
46
+ }
47
+
48
+ /**
49
+ * Lists all the userAssignedIdentities available under the specified subscription.
50
+ * @param options The options parameters.
51
+ */
52
+ public listBySubscription(
53
+ options?: UserAssignedIdentitiesListBySubscriptionOptionalParams
54
+ ): PagedAsyncIterableIterator<Identity> {
55
+ const iter = this.listBySubscriptionPagingAll(options);
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: () => {
64
+ return this.listBySubscriptionPagingPage(options);
65
+ }
66
+ };
67
+ }
68
+
69
+ private async *listBySubscriptionPagingPage(
70
+ options?: UserAssignedIdentitiesListBySubscriptionOptionalParams
71
+ ): AsyncIterableIterator<Identity[]> {
72
+ let result = await this._listBySubscription(options);
73
+ yield result.value || [];
74
+ let continuationToken = result.nextLink;
75
+ while (continuationToken) {
76
+ result = await this._listBySubscriptionNext(continuationToken, options);
77
+ continuationToken = result.nextLink;
78
+ yield result.value || [];
79
+ }
80
+ }
81
+
82
+ private async *listBySubscriptionPagingAll(
83
+ options?: UserAssignedIdentitiesListBySubscriptionOptionalParams
84
+ ): AsyncIterableIterator<Identity> {
85
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
86
+ yield* page;
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Lists all the userAssignedIdentities available under the specified ResourceGroup.
92
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
93
+ * @param options The options parameters.
94
+ */
95
+ public listByResourceGroup(
96
+ resourceGroupName: string,
97
+ options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
98
+ ): PagedAsyncIterableIterator<Identity> {
99
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
100
+ return {
101
+ next() {
102
+ return iter.next();
103
+ },
104
+ [Symbol.asyncIterator]() {
105
+ return this;
106
+ },
107
+ byPage: () => {
108
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
109
+ }
110
+ };
111
+ }
112
+
113
+ private async *listByResourceGroupPagingPage(
114
+ resourceGroupName: string,
115
+ options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
116
+ ): AsyncIterableIterator<Identity[]> {
117
+ let result = await this._listByResourceGroup(resourceGroupName, options);
118
+ yield result.value || [];
119
+ let continuationToken = result.nextLink;
120
+ while (continuationToken) {
121
+ result = await this._listByResourceGroupNext(
122
+ resourceGroupName,
123
+ continuationToken,
124
+ options
125
+ );
126
+ continuationToken = result.nextLink;
127
+ yield result.value || [];
128
+ }
129
+ }
130
+
131
+ private async *listByResourceGroupPagingAll(
132
+ resourceGroupName: string,
133
+ options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
134
+ ): AsyncIterableIterator<Identity> {
135
+ for await (const page of this.listByResourceGroupPagingPage(
136
+ resourceGroupName,
137
+ options
138
+ )) {
139
+ yield* page;
140
+ }
141
+ }
142
+
143
+ /**
144
+ * Lists all the userAssignedIdentities available under the specified subscription.
145
+ * @param options The options parameters.
146
+ */
147
+ private _listBySubscription(
148
+ options?: UserAssignedIdentitiesListBySubscriptionOptionalParams
149
+ ): Promise<UserAssignedIdentitiesListBySubscriptionResponse> {
150
+ return this.client.sendOperationRequest(
151
+ { options },
152
+ listBySubscriptionOperationSpec
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Lists all the userAssignedIdentities available under the specified ResourceGroup.
158
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
159
+ * @param options The options parameters.
160
+ */
161
+ private _listByResourceGroup(
162
+ resourceGroupName: string,
163
+ options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
164
+ ): Promise<UserAssignedIdentitiesListByResourceGroupResponse> {
165
+ return this.client.sendOperationRequest(
166
+ { resourceGroupName, options },
167
+ listByResourceGroupOperationSpec
168
+ );
169
+ }
170
+
171
+ /**
172
+ * Create or update an identity in the specified subscription and resource group.
173
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
174
+ * @param resourceName The name of the identity resource.
175
+ * @param parameters Parameters to create or update the identity
176
+ * @param options The options parameters.
177
+ */
178
+ createOrUpdate(
179
+ resourceGroupName: string,
180
+ resourceName: string,
181
+ parameters: Identity,
182
+ options?: UserAssignedIdentitiesCreateOrUpdateOptionalParams
183
+ ): Promise<UserAssignedIdentitiesCreateOrUpdateResponse> {
184
+ return this.client.sendOperationRequest(
185
+ { resourceGroupName, resourceName, parameters, options },
186
+ createOrUpdateOperationSpec
187
+ );
188
+ }
189
+
190
+ /**
191
+ * Update an identity in the specified subscription and resource group.
192
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
193
+ * @param resourceName The name of the identity resource.
194
+ * @param parameters Parameters to update the identity
195
+ * @param options The options parameters.
196
+ */
197
+ update(
198
+ resourceGroupName: string,
199
+ resourceName: string,
200
+ parameters: IdentityUpdate,
201
+ options?: UserAssignedIdentitiesUpdateOptionalParams
202
+ ): Promise<UserAssignedIdentitiesUpdateResponse> {
203
+ return this.client.sendOperationRequest(
204
+ { resourceGroupName, resourceName, parameters, options },
205
+ updateOperationSpec
206
+ );
207
+ }
208
+
209
+ /**
210
+ * Gets the identity.
211
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
212
+ * @param resourceName The name of the identity resource.
213
+ * @param options The options parameters.
214
+ */
215
+ get(
216
+ resourceGroupName: string,
217
+ resourceName: string,
218
+ options?: UserAssignedIdentitiesGetOptionalParams
219
+ ): Promise<UserAssignedIdentitiesGetResponse> {
220
+ return this.client.sendOperationRequest(
221
+ { resourceGroupName, resourceName, options },
222
+ getOperationSpec
223
+ );
224
+ }
225
+
226
+ /**
227
+ * Deletes the identity.
228
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
229
+ * @param resourceName The name of the identity resource.
230
+ * @param options The options parameters.
231
+ */
232
+ delete(
233
+ resourceGroupName: string,
234
+ resourceName: string,
235
+ options?: UserAssignedIdentitiesDeleteOptionalParams
236
+ ): Promise<void> {
237
+ return this.client.sendOperationRequest(
238
+ { resourceGroupName, resourceName, options },
239
+ deleteOperationSpec
240
+ );
241
+ }
242
+
243
+ /**
244
+ * ListBySubscriptionNext
245
+ * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
246
+ * @param options The options parameters.
247
+ */
248
+ private _listBySubscriptionNext(
249
+ nextLink: string,
250
+ options?: UserAssignedIdentitiesListBySubscriptionNextOptionalParams
251
+ ): Promise<UserAssignedIdentitiesListBySubscriptionNextResponse> {
252
+ return this.client.sendOperationRequest(
253
+ { nextLink, options },
254
+ listBySubscriptionNextOperationSpec
255
+ );
256
+ }
257
+
258
+ /**
259
+ * ListByResourceGroupNext
260
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
261
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
262
+ * @param options The options parameters.
263
+ */
264
+ private _listByResourceGroupNext(
265
+ resourceGroupName: string,
266
+ nextLink: string,
267
+ options?: UserAssignedIdentitiesListByResourceGroupNextOptionalParams
268
+ ): Promise<UserAssignedIdentitiesListByResourceGroupNextResponse> {
269
+ return this.client.sendOperationRequest(
270
+ { resourceGroupName, nextLink, options },
271
+ listByResourceGroupNextOperationSpec
272
+ );
273
+ }
274
+ }
275
+ // Operation Specifications
276
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
277
+
278
+ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
279
+ path:
280
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities",
281
+ httpMethod: "GET",
282
+ responses: {
283
+ 200: {
284
+ bodyMapper: Mappers.UserAssignedIdentitiesListResult
285
+ },
286
+ default: {
287
+ bodyMapper: Mappers.CloudError
288
+ }
289
+ },
290
+ queryParameters: [Parameters.apiVersion],
291
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
292
+ headerParameters: [Parameters.accept],
293
+ serializer
294
+ };
295
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
296
+ path:
297
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities",
298
+ httpMethod: "GET",
299
+ responses: {
300
+ 200: {
301
+ bodyMapper: Mappers.UserAssignedIdentitiesListResult
302
+ },
303
+ default: {
304
+ bodyMapper: Mappers.CloudError
305
+ }
306
+ },
307
+ queryParameters: [Parameters.apiVersion],
308
+ urlParameters: [
309
+ Parameters.$host,
310
+ Parameters.subscriptionId,
311
+ Parameters.resourceGroupName
312
+ ],
313
+ headerParameters: [Parameters.accept],
314
+ serializer
315
+ };
316
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
317
+ path:
318
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
319
+ httpMethod: "PUT",
320
+ responses: {
321
+ 200: {
322
+ bodyMapper: Mappers.Identity
323
+ },
324
+ 201: {
325
+ bodyMapper: Mappers.Identity
326
+ },
327
+ default: {
328
+ bodyMapper: Mappers.CloudError
329
+ }
330
+ },
331
+ requestBody: Parameters.parameters,
332
+ queryParameters: [Parameters.apiVersion],
333
+ urlParameters: [
334
+ Parameters.$host,
335
+ Parameters.subscriptionId,
336
+ Parameters.resourceGroupName,
337
+ Parameters.resourceName
338
+ ],
339
+ headerParameters: [Parameters.accept, Parameters.contentType],
340
+ mediaType: "json",
341
+ serializer
342
+ };
343
+ const updateOperationSpec: coreClient.OperationSpec = {
344
+ path:
345
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
346
+ httpMethod: "PATCH",
347
+ responses: {
348
+ 200: {
349
+ bodyMapper: Mappers.Identity
350
+ },
351
+ default: {
352
+ bodyMapper: Mappers.CloudError
353
+ }
354
+ },
355
+ requestBody: Parameters.parameters1,
356
+ queryParameters: [Parameters.apiVersion],
357
+ urlParameters: [
358
+ Parameters.$host,
359
+ Parameters.subscriptionId,
360
+ Parameters.resourceGroupName,
361
+ Parameters.resourceName
362
+ ],
363
+ headerParameters: [Parameters.accept, Parameters.contentType],
364
+ mediaType: "json",
365
+ serializer
366
+ };
367
+ const getOperationSpec: coreClient.OperationSpec = {
368
+ path:
369
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
370
+ httpMethod: "GET",
371
+ responses: {
372
+ 200: {
373
+ bodyMapper: Mappers.Identity
374
+ },
375
+ default: {
376
+ bodyMapper: Mappers.CloudError
377
+ }
378
+ },
379
+ queryParameters: [Parameters.apiVersion],
380
+ urlParameters: [
381
+ Parameters.$host,
382
+ Parameters.subscriptionId,
383
+ Parameters.resourceGroupName,
384
+ Parameters.resourceName
385
+ ],
386
+ headerParameters: [Parameters.accept],
387
+ serializer
388
+ };
389
+ const deleteOperationSpec: coreClient.OperationSpec = {
390
+ path:
391
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
392
+ httpMethod: "DELETE",
393
+ responses: {
394
+ 200: {},
395
+ 204: {},
396
+ default: {
397
+ bodyMapper: Mappers.CloudError
398
+ }
399
+ },
400
+ queryParameters: [Parameters.apiVersion],
401
+ urlParameters: [
402
+ Parameters.$host,
403
+ Parameters.subscriptionId,
404
+ Parameters.resourceGroupName,
405
+ Parameters.resourceName
406
+ ],
407
+ headerParameters: [Parameters.accept],
408
+ serializer
409
+ };
410
+ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
411
+ path: "{nextLink}",
412
+ httpMethod: "GET",
413
+ responses: {
414
+ 200: {
415
+ bodyMapper: Mappers.UserAssignedIdentitiesListResult
416
+ },
417
+ default: {
418
+ bodyMapper: Mappers.CloudError
419
+ }
420
+ },
421
+ queryParameters: [Parameters.apiVersion],
422
+ urlParameters: [
423
+ Parameters.$host,
424
+ Parameters.nextLink,
425
+ Parameters.subscriptionId
426
+ ],
427
+ headerParameters: [Parameters.accept],
428
+ serializer
429
+ };
430
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
431
+ path: "{nextLink}",
432
+ httpMethod: "GET",
433
+ responses: {
434
+ 200: {
435
+ bodyMapper: Mappers.UserAssignedIdentitiesListResult
436
+ },
437
+ default: {
438
+ bodyMapper: Mappers.CloudError
439
+ }
440
+ },
441
+ queryParameters: [Parameters.apiVersion],
442
+ urlParameters: [
443
+ Parameters.$host,
444
+ Parameters.nextLink,
445
+ Parameters.subscriptionId,
446
+ Parameters.resourceGroupName
447
+ ],
448
+ headerParameters: [Parameters.accept],
449
+ serializer
450
+ };
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export * from "./systemAssignedIdentities";
10
+ export * from "./operations";
11
+ export * from "./userAssignedIdentities";
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operation, OperationsListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Operations. */
14
+ export interface Operations {
15
+ /**
16
+ * Lists available operations for the Microsoft.ManagedIdentity provider
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: OperationsListOptionalParams
21
+ ): PagedAsyncIterableIterator<Operation>;
22
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import {
10
+ SystemAssignedIdentitiesGetByScopeOptionalParams,
11
+ SystemAssignedIdentitiesGetByScopeResponse
12
+ } from "../models";
13
+
14
+ /** Interface representing a SystemAssignedIdentities. */
15
+ export interface SystemAssignedIdentities {
16
+ /**
17
+ * Gets the systemAssignedIdentity available under the specified RP scope.
18
+ * @param scope The resource provider scope of the resource. Parent resource being extended by Managed
19
+ * Identities.
20
+ * @param options The options parameters.
21
+ */
22
+ getByScope(
23
+ scope: string,
24
+ options?: SystemAssignedIdentitiesGetByScopeOptionalParams
25
+ ): Promise<SystemAssignedIdentitiesGetByScopeResponse>;
26
+ }
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import {
11
+ Identity,
12
+ UserAssignedIdentitiesListBySubscriptionOptionalParams,
13
+ UserAssignedIdentitiesListByResourceGroupOptionalParams,
14
+ UserAssignedIdentitiesCreateOrUpdateOptionalParams,
15
+ UserAssignedIdentitiesCreateOrUpdateResponse,
16
+ IdentityUpdate,
17
+ UserAssignedIdentitiesUpdateOptionalParams,
18
+ UserAssignedIdentitiesUpdateResponse,
19
+ UserAssignedIdentitiesGetOptionalParams,
20
+ UserAssignedIdentitiesGetResponse,
21
+ UserAssignedIdentitiesDeleteOptionalParams
22
+ } from "../models";
23
+
24
+ /// <reference lib="esnext.asynciterable" />
25
+ /** Interface representing a UserAssignedIdentities. */
26
+ export interface UserAssignedIdentities {
27
+ /**
28
+ * Lists all the userAssignedIdentities available under the specified subscription.
29
+ * @param options The options parameters.
30
+ */
31
+ listBySubscription(
32
+ options?: UserAssignedIdentitiesListBySubscriptionOptionalParams
33
+ ): PagedAsyncIterableIterator<Identity>;
34
+ /**
35
+ * Lists all the userAssignedIdentities available under the specified ResourceGroup.
36
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
37
+ * @param options The options parameters.
38
+ */
39
+ listByResourceGroup(
40
+ resourceGroupName: string,
41
+ options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
42
+ ): PagedAsyncIterableIterator<Identity>;
43
+ /**
44
+ * Create or update an identity in the specified subscription and resource group.
45
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
46
+ * @param resourceName The name of the identity resource.
47
+ * @param parameters Parameters to create or update the identity
48
+ * @param options The options parameters.
49
+ */
50
+ createOrUpdate(
51
+ resourceGroupName: string,
52
+ resourceName: string,
53
+ parameters: Identity,
54
+ options?: UserAssignedIdentitiesCreateOrUpdateOptionalParams
55
+ ): Promise<UserAssignedIdentitiesCreateOrUpdateResponse>;
56
+ /**
57
+ * Update an identity in the specified subscription and resource group.
58
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
59
+ * @param resourceName The name of the identity resource.
60
+ * @param parameters Parameters to update the identity
61
+ * @param options The options parameters.
62
+ */
63
+ update(
64
+ resourceGroupName: string,
65
+ resourceName: string,
66
+ parameters: IdentityUpdate,
67
+ options?: UserAssignedIdentitiesUpdateOptionalParams
68
+ ): Promise<UserAssignedIdentitiesUpdateResponse>;
69
+ /**
70
+ * Gets the identity.
71
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
72
+ * @param resourceName The name of the identity resource.
73
+ * @param options The options parameters.
74
+ */
75
+ get(
76
+ resourceGroupName: string,
77
+ resourceName: string,
78
+ options?: UserAssignedIdentitiesGetOptionalParams
79
+ ): Promise<UserAssignedIdentitiesGetResponse>;
80
+ /**
81
+ * Deletes the identity.
82
+ * @param resourceGroupName The name of the Resource Group to which the identity belongs.
83
+ * @param resourceName The name of the identity resource.
84
+ * @param options The options parameters.
85
+ */
86
+ delete(
87
+ resourceGroupName: string,
88
+ resourceName: string,
89
+ options?: UserAssignedIdentitiesDeleteOptionalParams
90
+ ): Promise<void>;
91
+ }
package/tsconfig.json CHANGED
@@ -3,17 +3,17 @@
3
3
  "module": "es6",
4
4
  "moduleResolution": "node",
5
5
  "strict": true,
6
- "target": "es5",
6
+ "target": "es6",
7
7
  "sourceMap": true,
8
8
  "declarationMap": true,
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6"],
12
+ "lib": ["es6", "dom"],
13
13
  "declaration": true,
14
- "outDir": "./esm",
14
+ "outDir": "./dist-esm",
15
15
  "importHelpers": true
16
16
  },
17
- "include": ["./lib/**/*.ts"],
17
+ "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
18
  "exclude": ["node_modules"]
19
19
  }