@azure/arm-msi 2.1.0-beta.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +23 -8
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/dist/index.js +555 -262
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.js +45 -0
  11. package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.js +40 -0
  15. package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.js +40 -0
  19. package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/{userAssignedIdentitiesListAssociatedResourcesSample.js → federatedIdentityCredentialsListSample.js} +18 -20
  23. package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.js.map +1 -0
  24. package/dist-esm/samples-dev/operationsListSample.js +11 -3
  25. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  26. package/dist-esm/samples-dev/systemAssignedIdentitiesGetByScopeSample.js +11 -3
  27. package/dist-esm/samples-dev/systemAssignedIdentitiesGetByScopeSample.js.map +1 -1
  28. package/dist-esm/samples-dev/userAssignedIdentitiesCreateOrUpdateSample.js +11 -4
  29. package/dist-esm/samples-dev/userAssignedIdentitiesCreateOrUpdateSample.js.map +1 -1
  30. package/dist-esm/samples-dev/userAssignedIdentitiesDeleteSample.js +11 -4
  31. package/dist-esm/samples-dev/userAssignedIdentitiesDeleteSample.js.map +1 -1
  32. package/dist-esm/samples-dev/userAssignedIdentitiesGetSample.js +11 -4
  33. package/dist-esm/samples-dev/userAssignedIdentitiesGetSample.js.map +1 -1
  34. package/dist-esm/samples-dev/userAssignedIdentitiesListByResourceGroupSample.js +11 -4
  35. package/dist-esm/samples-dev/userAssignedIdentitiesListByResourceGroupSample.js.map +1 -1
  36. package/dist-esm/samples-dev/userAssignedIdentitiesListBySubscriptionSample.js +10 -3
  37. package/dist-esm/samples-dev/userAssignedIdentitiesListBySubscriptionSample.js.map +1 -1
  38. package/dist-esm/samples-dev/userAssignedIdentitiesUpdateSample.js +11 -4
  39. package/dist-esm/samples-dev/userAssignedIdentitiesUpdateSample.js.map +1 -1
  40. package/dist-esm/src/index.d.ts +1 -0
  41. package/dist-esm/src/index.d.ts.map +1 -1
  42. package/dist-esm/src/index.js +1 -0
  43. package/dist-esm/src/index.js.map +1 -1
  44. package/dist-esm/src/managedServiceIdentityClient.d.ts +4 -1
  45. package/dist-esm/src/managedServiceIdentityClient.d.ts.map +1 -1
  46. package/dist-esm/src/managedServiceIdentityClient.js +57 -8
  47. package/dist-esm/src/managedServiceIdentityClient.js.map +1 -1
  48. package/dist-esm/src/models/index.d.ts +89 -84
  49. package/dist-esm/src/models/index.d.ts.map +1 -1
  50. package/dist-esm/src/models/index.js +12 -1
  51. package/dist-esm/src/models/index.js.map +1 -1
  52. package/dist-esm/src/models/mappers.d.ts +3 -2
  53. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  54. package/dist-esm/src/models/mappers.js +81 -62
  55. package/dist-esm/src/models/mappers.js.map +1 -1
  56. package/dist-esm/src/models/parameters.d.ts +6 -6
  57. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  58. package/dist-esm/src/models/parameters.js +38 -37
  59. package/dist-esm/src/models/parameters.js.map +1 -1
  60. package/dist-esm/src/operations/federatedIdentityCredentials.d.ts +66 -0
  61. package/dist-esm/src/operations/federatedIdentityCredentials.d.ts.map +1 -0
  62. package/dist-esm/src/operations/federatedIdentityCredentials.js +272 -0
  63. package/dist-esm/src/operations/federatedIdentityCredentials.js.map +1 -0
  64. package/dist-esm/src/operations/index.d.ts +1 -0
  65. package/dist-esm/src/operations/index.d.ts.map +1 -1
  66. package/dist-esm/src/operations/index.js +1 -0
  67. package/dist-esm/src/operations/index.js.map +1 -1
  68. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  69. package/dist-esm/src/operations/operations.js +19 -8
  70. package/dist-esm/src/operations/operations.js.map +1 -1
  71. package/dist-esm/src/operations/userAssignedIdentities.d.ts +1 -26
  72. package/dist-esm/src/operations/userAssignedIdentities.d.ts.map +1 -1
  73. package/dist-esm/src/operations/userAssignedIdentities.js +37 -143
  74. package/dist-esm/src/operations/userAssignedIdentities.js.map +1 -1
  75. package/dist-esm/src/operationsInterfaces/federatedIdentityCredentials.d.ts +41 -0
  76. package/dist-esm/src/operationsInterfaces/federatedIdentityCredentials.d.ts.map +1 -0
  77. package/dist-esm/src/operationsInterfaces/federatedIdentityCredentials.js +9 -0
  78. package/dist-esm/src/operationsInterfaces/federatedIdentityCredentials.js.map +1 -0
  79. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  80. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  81. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  82. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  83. package/dist-esm/src/operationsInterfaces/userAssignedIdentities.d.ts +1 -8
  84. package/dist-esm/src/operationsInterfaces/userAssignedIdentities.d.ts.map +1 -1
  85. package/dist-esm/src/pagingHelper.d.ts +13 -0
  86. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  87. package/dist-esm/src/pagingHelper.js +32 -0
  88. package/dist-esm/src/pagingHelper.js.map +1 -0
  89. package/dist-esm/test/sampleTest.js +11 -13
  90. package/dist-esm/test/sampleTest.js.map +1 -1
  91. package/package.json +17 -12
  92. package/review/arm-msi.api.md +100 -59
  93. package/src/index.ts +1 -0
  94. package/src/managedServiceIdentityClient.ts +78 -8
  95. package/src/models/index.ts +99 -88
  96. package/src/models/mappers.ts +88 -63
  97. package/src/models/parameters.ts +42 -40
  98. package/src/operations/federatedIdentityCredentials.ts +355 -0
  99. package/src/operations/index.ts +1 -0
  100. package/src/operations/operations.ts +21 -9
  101. package/src/operations/userAssignedIdentities.ts +46 -190
  102. package/src/operationsInterfaces/federatedIdentityCredentials.ts +78 -0
  103. package/src/operationsInterfaces/index.ts +1 -0
  104. package/src/operationsInterfaces/userAssignedIdentities.ts +0 -13
  105. package/src/pagingHelper.ts +39 -0
  106. package/types/arm-msi.d.ts +161 -104
  107. package/types/tsdoc-metadata.json +1 -1
  108. package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.d.ts +0 -2
  109. package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.d.ts.map +0 -1
  110. package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.js.map +0 -1
package/dist/index.js CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var coreClient = require('@azure/core-client');
6
5
  var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
7
8
 
8
9
  function _interopNamespace(e) {
9
10
  if (e && e.__esModule) return e;
@@ -24,6 +25,59 @@ function _interopNamespace(e) {
24
25
  }
25
26
 
26
27
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
28
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
29
+
30
+ /*
31
+ * Copyright (c) Microsoft Corporation.
32
+ * Licensed under the MIT License.
33
+ *
34
+ * Code generated by Microsoft (R) AutoRest Code Generator.
35
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
36
+ */
37
+ const pageMap = new WeakMap();
38
+ /**
39
+ * Given the last `.value` produced by the `byPage` iterator,
40
+ * returns a continuation token that can be used to begin paging from
41
+ * that point later.
42
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
43
+ * @returns The continuation token that can be passed into byPage() during future calls.
44
+ */
45
+ function getContinuationToken(page) {
46
+ var _a;
47
+ if (typeof page !== "object" || page === null) {
48
+ return undefined;
49
+ }
50
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
51
+ }
52
+ function setContinuationToken(page, continuationToken) {
53
+ var _a;
54
+ if (typeof page !== "object" || page === null || !continuationToken) {
55
+ return;
56
+ }
57
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
58
+ pageInfo.continuationToken = continuationToken;
59
+ pageMap.set(page, pageInfo);
60
+ }
61
+
62
+ /*
63
+ * Copyright (c) Microsoft Corporation.
64
+ * Licensed under the MIT License.
65
+ *
66
+ * Code generated by Microsoft (R) AutoRest Code Generator.
67
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
68
+ */
69
+ /** Known values of {@link CreatedByType} that the service accepts. */
70
+ exports.KnownCreatedByType = void 0;
71
+ (function (KnownCreatedByType) {
72
+ /** User */
73
+ KnownCreatedByType["User"] = "User";
74
+ /** Application */
75
+ KnownCreatedByType["Application"] = "Application";
76
+ /** ManagedIdentity */
77
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
78
+ /** Key */
79
+ KnownCreatedByType["Key"] = "Key";
80
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
27
81
 
28
82
  /*
29
83
  * Copyright (c) Microsoft Corporation.
@@ -57,6 +111,57 @@ const Resource = {
57
111
  type: {
58
112
  name: "String"
59
113
  }
114
+ },
115
+ systemData: {
116
+ serializedName: "systemData",
117
+ type: {
118
+ name: "Composite",
119
+ className: "SystemData"
120
+ }
121
+ }
122
+ }
123
+ }
124
+ };
125
+ const SystemData = {
126
+ type: {
127
+ name: "Composite",
128
+ className: "SystemData",
129
+ modelProperties: {
130
+ createdBy: {
131
+ serializedName: "createdBy",
132
+ type: {
133
+ name: "String"
134
+ }
135
+ },
136
+ createdByType: {
137
+ serializedName: "createdByType",
138
+ type: {
139
+ name: "String"
140
+ }
141
+ },
142
+ createdAt: {
143
+ serializedName: "createdAt",
144
+ type: {
145
+ name: "DateTime"
146
+ }
147
+ },
148
+ lastModifiedBy: {
149
+ serializedName: "lastModifiedBy",
150
+ type: {
151
+ name: "String"
152
+ }
153
+ },
154
+ lastModifiedByType: {
155
+ serializedName: "lastModifiedByType",
156
+ type: {
157
+ name: "String"
158
+ }
159
+ },
160
+ lastModifiedAt: {
161
+ serializedName: "lastModifiedAt",
162
+ type: {
163
+ name: "DateTime"
164
+ }
60
165
  }
61
166
  }
62
167
  }
@@ -219,84 +324,25 @@ const UserAssignedIdentitiesListResult = {
219
324
  }
220
325
  }
221
326
  };
222
- const AssociatedResourcesListResult = {
327
+ const FederatedIdentityCredentialsListResult = {
223
328
  type: {
224
329
  name: "Composite",
225
- className: "AssociatedResourcesListResult",
330
+ className: "FederatedIdentityCredentialsListResult",
226
331
  modelProperties: {
227
- totalCount: {
228
- serializedName: "totalCount",
229
- readOnly: true,
230
- type: {
231
- name: "Number"
232
- }
233
- },
234
332
  value: {
235
333
  serializedName: "value",
236
- readOnly: true,
237
334
  type: {
238
335
  name: "Sequence",
239
336
  element: {
240
337
  type: {
241
338
  name: "Composite",
242
- className: "AzureResource"
339
+ className: "FederatedIdentityCredential"
243
340
  }
244
341
  }
245
342
  }
246
343
  },
247
344
  nextLink: {
248
345
  serializedName: "nextLink",
249
- readOnly: true,
250
- type: {
251
- name: "String"
252
- }
253
- }
254
- }
255
- }
256
- };
257
- const AzureResource = {
258
- type: {
259
- name: "Composite",
260
- className: "AzureResource",
261
- modelProperties: {
262
- id: {
263
- serializedName: "id",
264
- readOnly: true,
265
- type: {
266
- name: "String"
267
- }
268
- },
269
- name: {
270
- serializedName: "name",
271
- readOnly: true,
272
- type: {
273
- name: "String"
274
- }
275
- },
276
- type: {
277
- serializedName: "type",
278
- readOnly: true,
279
- type: {
280
- name: "String"
281
- }
282
- },
283
- resourceGroup: {
284
- serializedName: "resourceGroup",
285
- readOnly: true,
286
- type: {
287
- name: "String"
288
- }
289
- },
290
- subscriptionId: {
291
- serializedName: "subscriptionId",
292
- readOnly: true,
293
- type: {
294
- name: "String"
295
- }
296
- },
297
- subscriptionDisplayName: {
298
- serializedName: "subscriptionDisplayName",
299
- readOnly: true,
300
346
  type: {
301
347
  name: "String"
302
348
  }
@@ -409,6 +455,33 @@ const SystemAssignedIdentity = {
409
455
  } })
410
456
  }
411
457
  };
458
+ const FederatedIdentityCredential = {
459
+ type: {
460
+ name: "Composite",
461
+ className: "FederatedIdentityCredential",
462
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { issuer: {
463
+ serializedName: "properties.issuer",
464
+ type: {
465
+ name: "String"
466
+ }
467
+ }, subject: {
468
+ serializedName: "properties.subject",
469
+ type: {
470
+ name: "String"
471
+ }
472
+ }, audiences: {
473
+ serializedName: "properties.audiences",
474
+ type: {
475
+ name: "Sequence",
476
+ element: {
477
+ type: {
478
+ name: "String"
479
+ }
480
+ }
481
+ }
482
+ } })
483
+ }
484
+ };
412
485
  const Identity = {
413
486
  type: {
414
487
  name: "Composite",
@@ -438,18 +511,19 @@ const Identity = {
438
511
  var Mappers = /*#__PURE__*/Object.freeze({
439
512
  __proto__: null,
440
513
  Resource: Resource,
514
+ SystemData: SystemData,
441
515
  CloudError: CloudError,
442
516
  CloudErrorBody: CloudErrorBody,
443
517
  OperationListResult: OperationListResult,
444
518
  Operation: Operation,
445
519
  OperationDisplay: OperationDisplay,
446
520
  UserAssignedIdentitiesListResult: UserAssignedIdentitiesListResult,
447
- AssociatedResourcesListResult: AssociatedResourcesListResult,
448
- AzureResource: AzureResource,
521
+ FederatedIdentityCredentialsListResult: FederatedIdentityCredentialsListResult,
449
522
  ProxyResource: ProxyResource,
450
523
  TrackedResource: TrackedResource,
451
524
  IdentityUpdate: IdentityUpdate,
452
525
  SystemAssignedIdentity: SystemAssignedIdentity,
526
+ FederatedIdentityCredential: FederatedIdentityCredential,
453
527
  Identity: Identity
454
528
  });
455
529
 
@@ -496,7 +570,7 @@ const scope = {
496
570
  const apiVersion = {
497
571
  parameterPath: "apiVersion",
498
572
  mapper: {
499
- defaultValue: "2021-09-30-preview",
573
+ defaultValue: "2023-01-31",
500
574
  isConstant: true,
501
575
  serializedName: "api-version",
502
576
  type: {
@@ -535,29 +609,44 @@ const resourceGroupName = {
535
609
  }
536
610
  }
537
611
  };
538
- const resourceName = {
539
- parameterPath: "resourceName",
612
+ const contentType = {
613
+ parameterPath: ["options", "contentType"],
540
614
  mapper: {
541
- serializedName: "resourceName",
542
- required: true,
615
+ defaultValue: "application/json",
616
+ isConstant: true,
617
+ serializedName: "Content-Type",
543
618
  type: {
544
619
  name: "String"
545
620
  }
546
621
  }
547
622
  };
548
- const filter = {
549
- parameterPath: ["options", "filter"],
623
+ const parameters = {
624
+ parameterPath: "parameters",
625
+ mapper: Identity
626
+ };
627
+ const resourceName = {
628
+ parameterPath: "resourceName",
550
629
  mapper: {
551
- serializedName: "$filter",
630
+ serializedName: "resourceName",
631
+ required: true,
552
632
  type: {
553
633
  name: "String"
554
634
  }
555
635
  }
556
636
  };
557
- const orderby = {
558
- parameterPath: ["options", "orderby"],
637
+ const parameters1 = {
638
+ parameterPath: "parameters",
639
+ mapper: IdentityUpdate
640
+ };
641
+ const resourceGroupName1 = {
642
+ parameterPath: "resourceGroupName",
559
643
  mapper: {
560
- serializedName: "$orderby",
644
+ constraints: {
645
+ MaxLength: 90,
646
+ MinLength: 1
647
+ },
648
+ serializedName: "resourceGroupName",
649
+ required: true,
561
650
  type: {
562
651
  name: "String"
563
652
  }
@@ -575,18 +664,6 @@ const top = {
575
664
  }
576
665
  }
577
666
  };
578
- const skip = {
579
- parameterPath: ["options", "skip"],
580
- mapper: {
581
- constraints: {
582
- InclusiveMinimum: 1
583
- },
584
- serializedName: "$skip",
585
- type: {
586
- name: "Number"
587
- }
588
- }
589
- };
590
667
  const skiptoken = {
591
668
  parameterPath: ["options", "skiptoken"],
592
669
  mapper: {
@@ -596,25 +673,23 @@ const skiptoken = {
596
673
  }
597
674
  }
598
675
  };
599
- const contentType = {
600
- parameterPath: ["options", "contentType"],
676
+ const parameters2 = {
677
+ parameterPath: "parameters",
678
+ mapper: FederatedIdentityCredential
679
+ };
680
+ const federatedIdentityCredentialResourceName = {
681
+ parameterPath: "federatedIdentityCredentialResourceName",
601
682
  mapper: {
602
- defaultValue: "application/json",
603
- isConstant: true,
604
- serializedName: "Content-Type",
683
+ constraints: {
684
+ Pattern: new RegExp("^[a-zA-Z0-9]{1}[a-zA-Z0-9-_]{2,119}$")
685
+ },
686
+ serializedName: "federatedIdentityCredentialResourceName",
687
+ required: true,
605
688
  type: {
606
689
  name: "String"
607
690
  }
608
691
  }
609
692
  };
610
- const parameters = {
611
- parameterPath: "parameters",
612
- mapper: Identity
613
- };
614
- const parameters1 = {
615
- parameterPath: "parameters",
616
- mapper: IdentityUpdate
617
- };
618
693
 
619
694
  /*
620
695
  * Copyright (c) Microsoft Corporation.
@@ -643,7 +718,7 @@ class SystemAssignedIdentitiesImpl {
643
718
  }
644
719
  }
645
720
  // Operation Specifications
646
- const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
721
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
647
722
  const getByScopeOperationSpec = {
648
723
  path: "/{scope}/providers/Microsoft.ManagedIdentity/identities/default",
649
724
  httpMethod: "GET",
@@ -658,7 +733,7 @@ const getByScopeOperationSpec = {
658
733
  queryParameters: [apiVersion],
659
734
  urlParameters: [$host, scope],
660
735
  headerParameters: [accept],
661
- serializer: serializer$2
736
+ serializer: serializer$3
662
737
  };
663
738
 
664
739
  /*
@@ -691,20 +766,31 @@ class OperationsImpl {
691
766
  [Symbol.asyncIterator]() {
692
767
  return this;
693
768
  },
694
- byPage: () => {
695
- return this.listPagingPage(options);
769
+ byPage: (settings) => {
770
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
771
+ throw new Error("maxPageSize is not supported by this operation.");
772
+ }
773
+ return this.listPagingPage(options, settings);
696
774
  }
697
775
  };
698
776
  }
699
- listPagingPage(options) {
777
+ listPagingPage(options, settings) {
700
778
  return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
701
- let result = yield tslib.__await(this._list(options));
702
- yield yield tslib.__await(result.value || []);
703
- let continuationToken = result.nextLink;
779
+ let result;
780
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
781
+ if (!continuationToken) {
782
+ result = yield tslib.__await(this._list(options));
783
+ let page = result.value || [];
784
+ continuationToken = result.nextLink;
785
+ setContinuationToken(page, continuationToken);
786
+ yield yield tslib.__await(page);
787
+ }
704
788
  while (continuationToken) {
705
789
  result = yield tslib.__await(this._listNext(continuationToken, options));
706
790
  continuationToken = result.nextLink;
707
- yield yield tslib.__await(result.value || []);
791
+ let page = result.value || [];
792
+ setContinuationToken(page, continuationToken);
793
+ yield yield tslib.__await(page);
708
794
  }
709
795
  });
710
796
  }
@@ -731,7 +817,7 @@ class OperationsImpl {
731
817
  * @param options The options parameters.
732
818
  */
733
819
  _list(options) {
734
- return this.client.sendOperationRequest({ options }, listOperationSpec);
820
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
735
821
  }
736
822
  /**
737
823
  * ListNext
@@ -739,12 +825,12 @@ class OperationsImpl {
739
825
  * @param options The options parameters.
740
826
  */
741
827
  _listNext(nextLink, options) {
742
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
828
+ return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
743
829
  }
744
830
  }
745
831
  // Operation Specifications
746
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
747
- const listOperationSpec = {
832
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
833
+ const listOperationSpec$1 = {
748
834
  path: "/providers/Microsoft.ManagedIdentity/operations",
749
835
  httpMethod: "GET",
750
836
  responses: {
@@ -758,9 +844,9 @@ const listOperationSpec = {
758
844
  queryParameters: [apiVersion],
759
845
  urlParameters: [$host],
760
846
  headerParameters: [accept],
761
- serializer: serializer$1
847
+ serializer: serializer$2
762
848
  };
763
- const listNextOperationSpec = {
849
+ const listNextOperationSpec$1 = {
764
850
  path: "{nextLink}",
765
851
  httpMethod: "GET",
766
852
  responses: {
@@ -771,10 +857,9 @@ const listNextOperationSpec = {
771
857
  bodyMapper: CloudError
772
858
  }
773
859
  },
774
- queryParameters: [apiVersion],
775
860
  urlParameters: [$host, nextLink],
776
861
  headerParameters: [accept],
777
- serializer: serializer$1
862
+ serializer: serializer$2
778
863
  };
779
864
 
780
865
  /*
@@ -807,20 +892,31 @@ class UserAssignedIdentitiesImpl {
807
892
  [Symbol.asyncIterator]() {
808
893
  return this;
809
894
  },
810
- byPage: () => {
811
- return this.listBySubscriptionPagingPage(options);
895
+ byPage: (settings) => {
896
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
897
+ throw new Error("maxPageSize is not supported by this operation.");
898
+ }
899
+ return this.listBySubscriptionPagingPage(options, settings);
812
900
  }
813
901
  };
814
902
  }
815
- listBySubscriptionPagingPage(options) {
903
+ listBySubscriptionPagingPage(options, settings) {
816
904
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
817
- let result = yield tslib.__await(this._listBySubscription(options));
818
- yield yield tslib.__await(result.value || []);
819
- let continuationToken = result.nextLink;
905
+ let result;
906
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
907
+ if (!continuationToken) {
908
+ result = yield tslib.__await(this._listBySubscription(options));
909
+ let page = result.value || [];
910
+ continuationToken = result.nextLink;
911
+ setContinuationToken(page, continuationToken);
912
+ yield yield tslib.__await(page);
913
+ }
820
914
  while (continuationToken) {
821
915
  result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
822
916
  continuationToken = result.nextLink;
823
- yield yield tslib.__await(result.value || []);
917
+ let page = result.value || [];
918
+ setContinuationToken(page, continuationToken);
919
+ yield yield tslib.__await(page);
824
920
  }
825
921
  });
826
922
  }
@@ -856,20 +952,31 @@ class UserAssignedIdentitiesImpl {
856
952
  [Symbol.asyncIterator]() {
857
953
  return this;
858
954
  },
859
- byPage: () => {
860
- return this.listByResourceGroupPagingPage(resourceGroupName, options);
955
+ byPage: (settings) => {
956
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
957
+ throw new Error("maxPageSize is not supported by this operation.");
958
+ }
959
+ return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
861
960
  }
862
961
  };
863
962
  }
864
- listByResourceGroupPagingPage(resourceGroupName, options) {
963
+ listByResourceGroupPagingPage(resourceGroupName, options, settings) {
865
964
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
866
- let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
867
- yield yield tslib.__await(result.value || []);
868
- let continuationToken = result.nextLink;
965
+ let result;
966
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
967
+ if (!continuationToken) {
968
+ result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
969
+ let page = result.value || [];
970
+ continuationToken = result.nextLink;
971
+ setContinuationToken(page, continuationToken);
972
+ yield yield tslib.__await(page);
973
+ }
869
974
  while (continuationToken) {
870
975
  result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
871
976
  continuationToken = result.nextLink;
872
- yield yield tslib.__await(result.value || []);
977
+ let page = result.value || [];
978
+ setContinuationToken(page, continuationToken);
979
+ yield yield tslib.__await(page);
873
980
  }
874
981
  });
875
982
  }
@@ -891,56 +998,6 @@ class UserAssignedIdentitiesImpl {
891
998
  }
892
999
  });
893
1000
  }
894
- /**
895
- * Lists the associated resources for this identity.
896
- * @param resourceGroupName The name of the Resource Group to which the identity belongs.
897
- * @param resourceName The name of the identity resource.
898
- * @param options The options parameters.
899
- */
900
- listAssociatedResources(resourceGroupName, resourceName, options) {
901
- const iter = this.listAssociatedResourcesPagingAll(resourceGroupName, resourceName, options);
902
- return {
903
- next() {
904
- return iter.next();
905
- },
906
- [Symbol.asyncIterator]() {
907
- return this;
908
- },
909
- byPage: () => {
910
- return this.listAssociatedResourcesPagingPage(resourceGroupName, resourceName, options);
911
- }
912
- };
913
- }
914
- listAssociatedResourcesPagingPage(resourceGroupName, resourceName, options) {
915
- return tslib.__asyncGenerator(this, arguments, function* listAssociatedResourcesPagingPage_1() {
916
- let result = yield tslib.__await(this._listAssociatedResources(resourceGroupName, resourceName, options));
917
- yield yield tslib.__await(result.value || []);
918
- let continuationToken = result.nextLink;
919
- while (continuationToken) {
920
- result = yield tslib.__await(this._listAssociatedResourcesNext(resourceGroupName, resourceName, continuationToken, options));
921
- continuationToken = result.nextLink;
922
- yield yield tslib.__await(result.value || []);
923
- }
924
- });
925
- }
926
- listAssociatedResourcesPagingAll(resourceGroupName, resourceName, options) {
927
- return tslib.__asyncGenerator(this, arguments, function* listAssociatedResourcesPagingAll_1() {
928
- var e_3, _a;
929
- try {
930
- for (var _b = tslib.__asyncValues(this.listAssociatedResourcesPagingPage(resourceGroupName, resourceName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
931
- const page = _c.value;
932
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
933
- }
934
- }
935
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
936
- finally {
937
- try {
938
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
939
- }
940
- finally { if (e_3) throw e_3.error; }
941
- }
942
- });
943
- }
944
1001
  /**
945
1002
  * Lists all the userAssignedIdentities available under the specified subscription.
946
1003
  * @param options The options parameters.
@@ -956,15 +1013,6 @@ class UserAssignedIdentitiesImpl {
956
1013
  _listByResourceGroup(resourceGroupName, options) {
957
1014
  return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
958
1015
  }
959
- /**
960
- * Lists the associated resources for this identity.
961
- * @param resourceGroupName The name of the Resource Group to which the identity belongs.
962
- * @param resourceName The name of the identity resource.
963
- * @param options The options parameters.
964
- */
965
- _listAssociatedResources(resourceGroupName, resourceName, options) {
966
- return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, listAssociatedResourcesOperationSpec);
967
- }
968
1016
  /**
969
1017
  * Create or update an identity in the specified subscription and resource group.
970
1018
  * @param resourceGroupName The name of the Resource Group to which the identity belongs.
@@ -973,7 +1021,7 @@ class UserAssignedIdentitiesImpl {
973
1021
  * @param options The options parameters.
974
1022
  */
975
1023
  createOrUpdate(resourceGroupName, resourceName, parameters, options) {
976
- return this.client.sendOperationRequest({ resourceGroupName, resourceName, parameters, options }, createOrUpdateOperationSpec);
1024
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, parameters, options }, createOrUpdateOperationSpec$1);
977
1025
  }
978
1026
  /**
979
1027
  * Update an identity in the specified subscription and resource group.
@@ -992,7 +1040,7 @@ class UserAssignedIdentitiesImpl {
992
1040
  * @param options The options parameters.
993
1041
  */
994
1042
  get(resourceGroupName, resourceName, options) {
995
- return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, getOperationSpec);
1043
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, getOperationSpec$1);
996
1044
  }
997
1045
  /**
998
1046
  * Deletes the identity.
@@ -1001,7 +1049,7 @@ class UserAssignedIdentitiesImpl {
1001
1049
  * @param options The options parameters.
1002
1050
  */
1003
1051
  delete(resourceGroupName, resourceName, options) {
1004
- return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, deleteOperationSpec);
1052
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, deleteOperationSpec$1);
1005
1053
  }
1006
1054
  /**
1007
1055
  * ListBySubscriptionNext
@@ -1020,20 +1068,9 @@ class UserAssignedIdentitiesImpl {
1020
1068
  _listByResourceGroupNext(resourceGroupName, nextLink, options) {
1021
1069
  return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
1022
1070
  }
1023
- /**
1024
- * ListAssociatedResourcesNext
1025
- * @param resourceGroupName The name of the Resource Group to which the identity belongs.
1026
- * @param resourceName The name of the identity resource.
1027
- * @param nextLink The nextLink from the previous successful call to the ListAssociatedResources
1028
- * method.
1029
- * @param options The options parameters.
1030
- */
1031
- _listAssociatedResourcesNext(resourceGroupName, resourceName, nextLink, options) {
1032
- return this.client.sendOperationRequest({ resourceGroupName, resourceName, nextLink, options }, listAssociatedResourcesNextOperationSpec);
1033
- }
1034
1071
  }
1035
1072
  // Operation Specifications
1036
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1073
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1037
1074
  const listBySubscriptionOperationSpec = {
1038
1075
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.ManagedIdentity/userAssignedIdentities",
1039
1076
  httpMethod: "GET",
@@ -1048,7 +1085,7 @@ const listBySubscriptionOperationSpec = {
1048
1085
  queryParameters: [apiVersion],
1049
1086
  urlParameters: [$host, subscriptionId],
1050
1087
  headerParameters: [accept],
1051
- serializer
1088
+ serializer: serializer$1
1052
1089
  };
1053
1090
  const listByResourceGroupOperationSpec = {
1054
1091
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities",
@@ -1068,37 +1105,9 @@ const listByResourceGroupOperationSpec = {
1068
1105
  resourceGroupName
1069
1106
  ],
1070
1107
  headerParameters: [accept],
1071
- serializer
1072
- };
1073
- const listAssociatedResourcesOperationSpec = {
1074
- path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/listAssociatedResources",
1075
- httpMethod: "POST",
1076
- responses: {
1077
- 200: {
1078
- bodyMapper: AssociatedResourcesListResult
1079
- },
1080
- default: {
1081
- bodyMapper: CloudError
1082
- }
1083
- },
1084
- queryParameters: [
1085
- apiVersion,
1086
- filter,
1087
- orderby,
1088
- top,
1089
- skip,
1090
- skiptoken
1091
- ],
1092
- urlParameters: [
1093
- $host,
1094
- subscriptionId,
1095
- resourceGroupName,
1096
- resourceName
1097
- ],
1098
- headerParameters: [accept],
1099
- serializer
1108
+ serializer: serializer$1
1100
1109
  };
1101
- const createOrUpdateOperationSpec = {
1110
+ const createOrUpdateOperationSpec$1 = {
1102
1111
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
1103
1112
  httpMethod: "PUT",
1104
1113
  responses: {
@@ -1122,7 +1131,7 @@ const createOrUpdateOperationSpec = {
1122
1131
  ],
1123
1132
  headerParameters: [accept, contentType],
1124
1133
  mediaType: "json",
1125
- serializer
1134
+ serializer: serializer$1
1126
1135
  };
1127
1136
  const updateOperationSpec = {
1128
1137
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
@@ -1145,9 +1154,9 @@ const updateOperationSpec = {
1145
1154
  ],
1146
1155
  headerParameters: [accept, contentType],
1147
1156
  mediaType: "json",
1148
- serializer
1157
+ serializer: serializer$1
1149
1158
  };
1150
- const getOperationSpec = {
1159
+ const getOperationSpec$1 = {
1151
1160
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
1152
1161
  httpMethod: "GET",
1153
1162
  responses: {
@@ -1166,9 +1175,9 @@ const getOperationSpec = {
1166
1175
  resourceName
1167
1176
  ],
1168
1177
  headerParameters: [accept],
1169
- serializer
1178
+ serializer: serializer$1
1170
1179
  };
1171
- const deleteOperationSpec = {
1180
+ const deleteOperationSpec$1 = {
1172
1181
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
1173
1182
  httpMethod: "DELETE",
1174
1183
  responses: {
@@ -1186,7 +1195,7 @@ const deleteOperationSpec = {
1186
1195
  resourceName
1187
1196
  ],
1188
1197
  headerParameters: [accept],
1189
- serializer
1198
+ serializer: serializer$1
1190
1199
  };
1191
1200
  const listBySubscriptionNextOperationSpec = {
1192
1201
  path: "{nextLink}",
@@ -1199,14 +1208,13 @@ const listBySubscriptionNextOperationSpec = {
1199
1208
  bodyMapper: CloudError
1200
1209
  }
1201
1210
  },
1202
- queryParameters: [apiVersion],
1203
1211
  urlParameters: [
1204
1212
  $host,
1205
1213
  nextLink,
1206
1214
  subscriptionId
1207
1215
  ],
1208
1216
  headerParameters: [accept],
1209
- serializer
1217
+ serializer: serializer$1
1210
1218
  };
1211
1219
  const listByResourceGroupNextOperationSpec = {
1212
1220
  path: "{nextLink}",
@@ -1219,7 +1227,6 @@ const listByResourceGroupNextOperationSpec = {
1219
1227
  bodyMapper: CloudError
1220
1228
  }
1221
1229
  },
1222
- queryParameters: [apiVersion],
1223
1230
  urlParameters: [
1224
1231
  $host,
1225
1232
  nextLink,
@@ -1227,14 +1234,165 @@ const listByResourceGroupNextOperationSpec = {
1227
1234
  resourceGroupName
1228
1235
  ],
1229
1236
  headerParameters: [accept],
1230
- serializer
1237
+ serializer: serializer$1
1231
1238
  };
1232
- const listAssociatedResourcesNextOperationSpec = {
1233
- path: "{nextLink}",
1239
+
1240
+ /*
1241
+ * Copyright (c) Microsoft Corporation.
1242
+ * Licensed under the MIT License.
1243
+ *
1244
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1245
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1246
+ */
1247
+ /// <reference lib="esnext.asynciterable" />
1248
+ /** Class containing FederatedIdentityCredentials operations. */
1249
+ class FederatedIdentityCredentialsImpl {
1250
+ /**
1251
+ * Initialize a new instance of the class FederatedIdentityCredentials class.
1252
+ * @param client Reference to the service client
1253
+ */
1254
+ constructor(client) {
1255
+ this.client = client;
1256
+ }
1257
+ /**
1258
+ * Lists all the federated identity credentials under the specified user assigned identity.
1259
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1260
+ * @param resourceName The name of the identity resource.
1261
+ * @param options The options parameters.
1262
+ */
1263
+ list(resourceGroupName, resourceName, options) {
1264
+ const iter = this.listPagingAll(resourceGroupName, resourceName, options);
1265
+ return {
1266
+ next() {
1267
+ return iter.next();
1268
+ },
1269
+ [Symbol.asyncIterator]() {
1270
+ return this;
1271
+ },
1272
+ byPage: (settings) => {
1273
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1274
+ throw new Error("maxPageSize is not supported by this operation.");
1275
+ }
1276
+ return this.listPagingPage(resourceGroupName, resourceName, options, settings);
1277
+ }
1278
+ };
1279
+ }
1280
+ listPagingPage(resourceGroupName, resourceName, options, settings) {
1281
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1282
+ let result;
1283
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1284
+ if (!continuationToken) {
1285
+ result = yield tslib.__await(this._list(resourceGroupName, resourceName, options));
1286
+ let page = result.value || [];
1287
+ continuationToken = result.nextLink;
1288
+ setContinuationToken(page, continuationToken);
1289
+ yield yield tslib.__await(page);
1290
+ }
1291
+ while (continuationToken) {
1292
+ result = yield tslib.__await(this._listNext(resourceGroupName, resourceName, continuationToken, options));
1293
+ continuationToken = result.nextLink;
1294
+ let page = result.value || [];
1295
+ setContinuationToken(page, continuationToken);
1296
+ yield yield tslib.__await(page);
1297
+ }
1298
+ });
1299
+ }
1300
+ listPagingAll(resourceGroupName, resourceName, options) {
1301
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1302
+ var e_1, _a;
1303
+ try {
1304
+ for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, resourceName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1305
+ const page = _c.value;
1306
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1307
+ }
1308
+ }
1309
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1310
+ finally {
1311
+ try {
1312
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1313
+ }
1314
+ finally { if (e_1) throw e_1.error; }
1315
+ }
1316
+ });
1317
+ }
1318
+ /**
1319
+ * Lists all the federated identity credentials under the specified user assigned identity.
1320
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1321
+ * @param resourceName The name of the identity resource.
1322
+ * @param options The options parameters.
1323
+ */
1324
+ _list(resourceGroupName, resourceName, options) {
1325
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, options }, listOperationSpec);
1326
+ }
1327
+ /**
1328
+ * Create or update a federated identity credential under the specified user assigned identity.
1329
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1330
+ * @param resourceName The name of the identity resource.
1331
+ * @param federatedIdentityCredentialResourceName The name of the federated identity credential
1332
+ * resource.
1333
+ * @param parameters Parameters to create or update the federated identity credential.
1334
+ * @param options The options parameters.
1335
+ */
1336
+ createOrUpdate(resourceGroupName, resourceName, federatedIdentityCredentialResourceName, parameters, options) {
1337
+ return this.client.sendOperationRequest({
1338
+ resourceGroupName,
1339
+ resourceName,
1340
+ federatedIdentityCredentialResourceName,
1341
+ parameters,
1342
+ options
1343
+ }, createOrUpdateOperationSpec);
1344
+ }
1345
+ /**
1346
+ * Gets the federated identity credential.
1347
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1348
+ * @param resourceName The name of the identity resource.
1349
+ * @param federatedIdentityCredentialResourceName The name of the federated identity credential
1350
+ * resource.
1351
+ * @param options The options parameters.
1352
+ */
1353
+ get(resourceGroupName, resourceName, federatedIdentityCredentialResourceName, options) {
1354
+ return this.client.sendOperationRequest({
1355
+ resourceGroupName,
1356
+ resourceName,
1357
+ federatedIdentityCredentialResourceName,
1358
+ options
1359
+ }, getOperationSpec);
1360
+ }
1361
+ /**
1362
+ * Deletes the federated identity credential.
1363
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1364
+ * @param resourceName The name of the identity resource.
1365
+ * @param federatedIdentityCredentialResourceName The name of the federated identity credential
1366
+ * resource.
1367
+ * @param options The options parameters.
1368
+ */
1369
+ delete(resourceGroupName, resourceName, federatedIdentityCredentialResourceName, options) {
1370
+ return this.client.sendOperationRequest({
1371
+ resourceGroupName,
1372
+ resourceName,
1373
+ federatedIdentityCredentialResourceName,
1374
+ options
1375
+ }, deleteOperationSpec);
1376
+ }
1377
+ /**
1378
+ * ListNext
1379
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1380
+ * @param resourceName The name of the identity resource.
1381
+ * @param nextLink The nextLink from the previous successful call to the List method.
1382
+ * @param options The options parameters.
1383
+ */
1384
+ _listNext(resourceGroupName, resourceName, nextLink, options) {
1385
+ return this.client.sendOperationRequest({ resourceGroupName, resourceName, nextLink, options }, listNextOperationSpec);
1386
+ }
1387
+ }
1388
+ // Operation Specifications
1389
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1390
+ const listOperationSpec = {
1391
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials",
1234
1392
  httpMethod: "GET",
1235
1393
  responses: {
1236
1394
  200: {
1237
- bodyMapper: AssociatedResourcesListResult
1395
+ bodyMapper: FederatedIdentityCredentialsListResult
1238
1396
  },
1239
1397
  default: {
1240
1398
  bodyMapper: CloudError
@@ -1242,18 +1400,105 @@ const listAssociatedResourcesNextOperationSpec = {
1242
1400
  },
1243
1401
  queryParameters: [
1244
1402
  apiVersion,
1245
- filter,
1246
- orderby,
1247
1403
  top,
1248
- skip,
1249
1404
  skiptoken
1250
1405
  ],
1406
+ urlParameters: [
1407
+ $host,
1408
+ subscriptionId,
1409
+ resourceName,
1410
+ resourceGroupName1
1411
+ ],
1412
+ headerParameters: [accept],
1413
+ serializer
1414
+ };
1415
+ const createOrUpdateOperationSpec = {
1416
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}",
1417
+ httpMethod: "PUT",
1418
+ responses: {
1419
+ 200: {
1420
+ bodyMapper: FederatedIdentityCredential
1421
+ },
1422
+ 201: {
1423
+ bodyMapper: FederatedIdentityCredential
1424
+ },
1425
+ default: {
1426
+ bodyMapper: CloudError
1427
+ }
1428
+ },
1429
+ requestBody: parameters2,
1430
+ queryParameters: [apiVersion],
1431
+ urlParameters: [
1432
+ $host,
1433
+ subscriptionId,
1434
+ resourceName,
1435
+ resourceGroupName1,
1436
+ federatedIdentityCredentialResourceName
1437
+ ],
1438
+ headerParameters: [accept, contentType],
1439
+ mediaType: "json",
1440
+ serializer
1441
+ };
1442
+ const getOperationSpec = {
1443
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}",
1444
+ httpMethod: "GET",
1445
+ responses: {
1446
+ 200: {
1447
+ bodyMapper: FederatedIdentityCredential
1448
+ },
1449
+ default: {
1450
+ bodyMapper: CloudError
1451
+ }
1452
+ },
1453
+ queryParameters: [apiVersion],
1454
+ urlParameters: [
1455
+ $host,
1456
+ subscriptionId,
1457
+ resourceName,
1458
+ resourceGroupName1,
1459
+ federatedIdentityCredentialResourceName
1460
+ ],
1461
+ headerParameters: [accept],
1462
+ serializer
1463
+ };
1464
+ const deleteOperationSpec = {
1465
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/federatedIdentityCredentials/{federatedIdentityCredentialResourceName}",
1466
+ httpMethod: "DELETE",
1467
+ responses: {
1468
+ 200: {},
1469
+ 204: {},
1470
+ default: {
1471
+ bodyMapper: CloudError
1472
+ }
1473
+ },
1474
+ queryParameters: [apiVersion],
1475
+ urlParameters: [
1476
+ $host,
1477
+ subscriptionId,
1478
+ resourceName,
1479
+ resourceGroupName1,
1480
+ federatedIdentityCredentialResourceName
1481
+ ],
1482
+ headerParameters: [accept],
1483
+ serializer
1484
+ };
1485
+ const listNextOperationSpec = {
1486
+ path: "{nextLink}",
1487
+ httpMethod: "GET",
1488
+ responses: {
1489
+ 200: {
1490
+ bodyMapper: FederatedIdentityCredentialsListResult
1491
+ },
1492
+ default: {
1493
+ bodyMapper: CloudError
1494
+ }
1495
+ },
1251
1496
  urlParameters: [
1252
1497
  $host,
1253
1498
  nextLink,
1254
1499
  subscriptionId,
1255
- resourceGroupName,
1256
- resourceName
1500
+ resourceName,
1501
+ resourceGroupName1
1257
1502
  ],
1258
1503
  headerParameters: [accept],
1259
1504
  serializer
@@ -1274,7 +1519,7 @@ class ManagedServiceIdentityClient extends coreClient__namespace.ServiceClient {
1274
1519
  * @param options The parameter options
1275
1520
  */
1276
1521
  constructor(credentials, subscriptionId, options) {
1277
- var _a, _b;
1522
+ var _a, _b, _c;
1278
1523
  if (credentials === undefined) {
1279
1524
  throw new Error("'credentials' cannot be null");
1280
1525
  }
@@ -1289,27 +1534,75 @@ class ManagedServiceIdentityClient extends coreClient__namespace.ServiceClient {
1289
1534
  requestContentType: "application/json; charset=utf-8",
1290
1535
  credential: credentials
1291
1536
  };
1292
- const packageDetails = `azsdk-js-arm-msi/2.1.0-beta.1`;
1537
+ const packageDetails = `azsdk-js-arm-msi/2.1.0`;
1293
1538
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1294
1539
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1295
1540
  : `${packageDetails}`;
1296
- if (!options.credentialScopes) {
1297
- options.credentialScopes = ["https://management.azure.com/.default"];
1298
- }
1299
1541
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1300
1542
  userAgentPrefix
1301
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1543
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1302
1544
  super(optionsWithDefaults);
1545
+ let bearerTokenAuthenticationPolicyFound = false;
1546
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
1547
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
1548
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
1549
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
1550
+ }
1551
+ if (!options ||
1552
+ !options.pipeline ||
1553
+ options.pipeline.getOrderedPolicies().length == 0 ||
1554
+ !bearerTokenAuthenticationPolicyFound) {
1555
+ this.pipeline.removePolicy({
1556
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
1557
+ });
1558
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
1559
+ credential: credentials,
1560
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
1561
+ challengeCallbacks: {
1562
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
1563
+ }
1564
+ }));
1565
+ }
1303
1566
  // Parameter assignments
1304
1567
  this.subscriptionId = subscriptionId;
1305
1568
  // Assigning values to Constant parameters
1306
1569
  this.$host = options.$host || "https://management.azure.com";
1307
- this.apiVersion = options.apiVersion || "2021-09-30-preview";
1570
+ this.apiVersion = options.apiVersion || "2023-01-31";
1308
1571
  this.systemAssignedIdentities = new SystemAssignedIdentitiesImpl(this);
1309
1572
  this.operations = new OperationsImpl(this);
1310
1573
  this.userAssignedIdentities = new UserAssignedIdentitiesImpl(this);
1574
+ this.federatedIdentityCredentials = new FederatedIdentityCredentialsImpl(this);
1575
+ this.addCustomApiVersionPolicy(options.apiVersion);
1576
+ }
1577
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
1578
+ addCustomApiVersionPolicy(apiVersion) {
1579
+ if (!apiVersion) {
1580
+ return;
1581
+ }
1582
+ const apiVersionPolicy = {
1583
+ name: "CustomApiVersionPolicy",
1584
+ sendRequest(request, next) {
1585
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1586
+ const param = request.url.split("?");
1587
+ if (param.length > 1) {
1588
+ const newParams = param[1].split("&").map((item) => {
1589
+ if (item.indexOf("api-version") > -1) {
1590
+ return "api-version=" + apiVersion;
1591
+ }
1592
+ else {
1593
+ return item;
1594
+ }
1595
+ });
1596
+ request.url = param[0] + "?" + newParams.join("&");
1597
+ }
1598
+ return next(request);
1599
+ });
1600
+ }
1601
+ };
1602
+ this.pipeline.addPolicy(apiVersionPolicy);
1311
1603
  }
1312
1604
  }
1313
1605
 
1314
1606
  exports.ManagedServiceIdentityClient = ManagedServiceIdentityClient;
1607
+ exports.getContinuationToken = getContinuationToken;
1315
1608
  //# sourceMappingURL=index.js.map