@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
@@ -8,23 +8,6 @@ import * as coreAuth from '@azure/core-auth';
8
8
  import * as coreClient from '@azure/core-client';
9
9
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
10
10
 
11
- // @public
12
- export interface AssociatedResourcesListResult {
13
- readonly nextLink?: string;
14
- readonly totalCount?: number;
15
- readonly value?: AzureResource[];
16
- }
17
-
18
- // @public
19
- export interface AzureResource {
20
- readonly id?: string;
21
- readonly name?: string;
22
- readonly resourceGroup?: string;
23
- readonly subscriptionDisplayName?: string;
24
- readonly subscriptionId?: string;
25
- readonly type?: string;
26
- }
27
-
28
11
  // @public
29
12
  export interface CloudError {
30
13
  error?: CloudErrorBody;
@@ -39,22 +22,91 @@ export interface CloudErrorBody {
39
22
  }
40
23
 
41
24
  // @public
42
- export type Identity = TrackedResource & {
43
- readonly tenantId?: string;
44
- readonly principalId?: string;
25
+ export type CreatedByType = string;
26
+
27
+ // @public
28
+ export interface FederatedIdentityCredential extends ProxyResource {
29
+ audiences?: string[];
30
+ issuer?: string;
31
+ subject?: string;
32
+ }
33
+
34
+ // @public
35
+ export interface FederatedIdentityCredentials {
36
+ createOrUpdate(resourceGroupName: string, resourceName: string, federatedIdentityCredentialResourceName: string, parameters: FederatedIdentityCredential, options?: FederatedIdentityCredentialsCreateOrUpdateOptionalParams): Promise<FederatedIdentityCredentialsCreateOrUpdateResponse>;
37
+ delete(resourceGroupName: string, resourceName: string, federatedIdentityCredentialResourceName: string, options?: FederatedIdentityCredentialsDeleteOptionalParams): Promise<void>;
38
+ get(resourceGroupName: string, resourceName: string, federatedIdentityCredentialResourceName: string, options?: FederatedIdentityCredentialsGetOptionalParams): Promise<FederatedIdentityCredentialsGetResponse>;
39
+ list(resourceGroupName: string, resourceName: string, options?: FederatedIdentityCredentialsListOptionalParams): PagedAsyncIterableIterator<FederatedIdentityCredential>;
40
+ }
41
+
42
+ // @public
43
+ export interface FederatedIdentityCredentialsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
44
+ }
45
+
46
+ // @public
47
+ export type FederatedIdentityCredentialsCreateOrUpdateResponse = FederatedIdentityCredential;
48
+
49
+ // @public
50
+ export interface FederatedIdentityCredentialsDeleteOptionalParams extends coreClient.OperationOptions {
51
+ }
52
+
53
+ // @public
54
+ export interface FederatedIdentityCredentialsGetOptionalParams extends coreClient.OperationOptions {
55
+ }
56
+
57
+ // @public
58
+ export type FederatedIdentityCredentialsGetResponse = FederatedIdentityCredential;
59
+
60
+ // @public
61
+ export interface FederatedIdentityCredentialsListNextOptionalParams extends coreClient.OperationOptions {
62
+ }
63
+
64
+ // @public
65
+ export type FederatedIdentityCredentialsListNextResponse = FederatedIdentityCredentialsListResult;
66
+
67
+ // @public
68
+ export interface FederatedIdentityCredentialsListOptionalParams extends coreClient.OperationOptions {
69
+ skiptoken?: string;
70
+ top?: number;
71
+ }
72
+
73
+ // @public
74
+ export type FederatedIdentityCredentialsListResponse = FederatedIdentityCredentialsListResult;
75
+
76
+ // @public
77
+ export interface FederatedIdentityCredentialsListResult {
78
+ nextLink?: string;
79
+ value?: FederatedIdentityCredential[];
80
+ }
81
+
82
+ // @public
83
+ export function getContinuationToken(page: unknown): string | undefined;
84
+
85
+ // @public
86
+ export interface Identity extends TrackedResource {
45
87
  readonly clientId?: string;
46
- };
88
+ readonly principalId?: string;
89
+ readonly tenantId?: string;
90
+ }
47
91
 
48
92
  // @public
49
- export type IdentityUpdate = Resource & {
93
+ export interface IdentityUpdate extends Resource {
94
+ readonly clientId?: string;
50
95
  location?: string;
96
+ readonly principalId?: string;
51
97
  tags?: {
52
98
  [propertyName: string]: string;
53
99
  };
54
100
  readonly tenantId?: string;
55
- readonly principalId?: string;
56
- readonly clientId?: string;
57
- };
101
+ }
102
+
103
+ // @public
104
+ export enum KnownCreatedByType {
105
+ Application = "Application",
106
+ Key = "Key",
107
+ ManagedIdentity = "ManagedIdentity",
108
+ User = "User"
109
+ }
58
110
 
59
111
  // @public (undocumented)
60
112
  export class ManagedServiceIdentityClient extends coreClient.ServiceClient {
@@ -64,6 +116,8 @@ export class ManagedServiceIdentityClient extends coreClient.ServiceClient {
64
116
  // (undocumented)
65
117
  apiVersion: string;
66
118
  // (undocumented)
119
+ federatedIdentityCredentials: FederatedIdentityCredentials;
120
+ // (undocumented)
67
121
  operations: Operations;
68
122
  // (undocumented)
69
123
  subscriptionId: string;
@@ -120,12 +174,14 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption
120
174
  export type OperationsListResponse = OperationListResult;
121
175
 
122
176
  // @public
123
- export type ProxyResource = Resource & {};
177
+ export interface ProxyResource extends Resource {
178
+ }
124
179
 
125
180
  // @public
126
181
  export interface Resource {
127
182
  readonly id?: string;
128
183
  readonly name?: string;
184
+ readonly systemData?: SystemData;
129
185
  readonly type?: string;
130
186
  }
131
187
 
@@ -142,31 +198,40 @@ export interface SystemAssignedIdentitiesGetByScopeOptionalParams extends coreCl
142
198
  export type SystemAssignedIdentitiesGetByScopeResponse = SystemAssignedIdentity;
143
199
 
144
200
  // @public
145
- export type SystemAssignedIdentity = ProxyResource & {
201
+ export interface SystemAssignedIdentity extends ProxyResource {
202
+ readonly clientId?: string;
203
+ readonly clientSecretUrl?: string;
146
204
  location: string;
205
+ readonly principalId?: string;
147
206
  tags?: {
148
207
  [propertyName: string]: string;
149
208
  };
150
209
  readonly tenantId?: string;
151
- readonly principalId?: string;
152
- readonly clientId?: string;
153
- readonly clientSecretUrl?: string;
154
- };
210
+ }
211
+
212
+ // @public
213
+ export interface SystemData {
214
+ createdAt?: Date;
215
+ createdBy?: string;
216
+ createdByType?: CreatedByType;
217
+ lastModifiedAt?: Date;
218
+ lastModifiedBy?: string;
219
+ lastModifiedByType?: CreatedByType;
220
+ }
155
221
 
156
222
  // @public
157
- export type TrackedResource = Resource & {
223
+ export interface TrackedResource extends Resource {
224
+ location: string;
158
225
  tags?: {
159
226
  [propertyName: string]: string;
160
227
  };
161
- location: string;
162
- };
228
+ }
163
229
 
164
230
  // @public
165
231
  export interface UserAssignedIdentities {
166
232
  createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Identity, options?: UserAssignedIdentitiesCreateOrUpdateOptionalParams): Promise<UserAssignedIdentitiesCreateOrUpdateResponse>;
167
233
  delete(resourceGroupName: string, resourceName: string, options?: UserAssignedIdentitiesDeleteOptionalParams): Promise<void>;
168
234
  get(resourceGroupName: string, resourceName: string, options?: UserAssignedIdentitiesGetOptionalParams): Promise<UserAssignedIdentitiesGetResponse>;
169
- listAssociatedResources(resourceGroupName: string, resourceName: string, options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams): PagedAsyncIterableIterator<AzureResource>;
170
235
  listByResourceGroup(resourceGroupName: string, options?: UserAssignedIdentitiesListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Identity>;
171
236
  listBySubscription(options?: UserAssignedIdentitiesListBySubscriptionOptionalParams): PagedAsyncIterableIterator<Identity>;
172
237
  update(resourceGroupName: string, resourceName: string, parameters: IdentityUpdate, options?: UserAssignedIdentitiesUpdateOptionalParams): Promise<UserAssignedIdentitiesUpdateResponse>;
@@ -190,30 +255,6 @@ export interface UserAssignedIdentitiesGetOptionalParams extends coreClient.Oper
190
255
  // @public
191
256
  export type UserAssignedIdentitiesGetResponse = Identity;
192
257
 
193
- // @public
194
- export interface UserAssignedIdentitiesListAssociatedResourcesNextOptionalParams extends coreClient.OperationOptions {
195
- filter?: string;
196
- orderby?: string;
197
- skip?: number;
198
- skiptoken?: string;
199
- top?: number;
200
- }
201
-
202
- // @public
203
- export type UserAssignedIdentitiesListAssociatedResourcesNextResponse = AssociatedResourcesListResult;
204
-
205
- // @public
206
- export interface UserAssignedIdentitiesListAssociatedResourcesOptionalParams extends coreClient.OperationOptions {
207
- filter?: string;
208
- orderby?: string;
209
- skip?: number;
210
- skiptoken?: string;
211
- top?: number;
212
- }
213
-
214
- // @public
215
- export type UserAssignedIdentitiesListAssociatedResourcesResponse = AssociatedResourcesListResult;
216
-
217
258
  // @public
218
259
  export interface UserAssignedIdentitiesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
219
260
  }
package/src/index.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  /// <reference lib="esnext.asynciterable" />
10
+ export { getContinuationToken } from "./pagingHelper";
10
11
  export * from "./models";
11
12
  export { ManagedServiceIdentityClient } from "./managedServiceIdentityClient";
12
13
  export * from "./operationsInterfaces";
@@ -7,16 +7,24 @@
7
7
  */
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
10
16
  import * as coreAuth from "@azure/core-auth";
11
17
  import {
12
18
  SystemAssignedIdentitiesImpl,
13
19
  OperationsImpl,
14
- UserAssignedIdentitiesImpl
20
+ UserAssignedIdentitiesImpl,
21
+ FederatedIdentityCredentialsImpl
15
22
  } from "./operations";
16
23
  import {
17
24
  SystemAssignedIdentities,
18
25
  Operations,
19
- UserAssignedIdentities
26
+ UserAssignedIdentities,
27
+ FederatedIdentityCredentials
20
28
  } from "./operationsInterfaces";
21
29
  import { ManagedServiceIdentityClientOptionalParams } from "./models";
22
30
 
@@ -52,37 +60,99 @@ export class ManagedServiceIdentityClient extends coreClient.ServiceClient {
52
60
  credential: credentials
53
61
  };
54
62
 
55
- const packageDetails = `azsdk-js-arm-msi/2.1.0-beta.1`;
63
+ const packageDetails = `azsdk-js-arm-msi/2.1.0`;
56
64
  const userAgentPrefix =
57
65
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
58
66
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
59
67
  : `${packageDetails}`;
60
68
 
61
- if (!options.credentialScopes) {
62
- options.credentialScopes = ["https://management.azure.com/.default"];
63
- }
64
69
  const optionsWithDefaults = {
65
70
  ...defaults,
66
71
  ...options,
67
72
  userAgentOptions: {
68
73
  userAgentPrefix
69
74
  },
70
- baseUri:
75
+ endpoint:
71
76
  options.endpoint ?? options.baseUri ?? "https://management.azure.com"
72
77
  };
73
78
  super(optionsWithDefaults);
79
+
80
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
81
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
82
+ const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
83
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
84
+ (pipelinePolicy) =>
85
+ pipelinePolicy.name ===
86
+ coreRestPipeline.bearerTokenAuthenticationPolicyName
87
+ );
88
+ }
89
+ if (
90
+ !options ||
91
+ !options.pipeline ||
92
+ options.pipeline.getOrderedPolicies().length == 0 ||
93
+ !bearerTokenAuthenticationPolicyFound
94
+ ) {
95
+ this.pipeline.removePolicy({
96
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
97
+ });
98
+ this.pipeline.addPolicy(
99
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
100
+ credential: credentials,
101
+ scopes:
102
+ optionsWithDefaults.credentialScopes ??
103
+ `${optionsWithDefaults.endpoint}/.default`,
104
+ challengeCallbacks: {
105
+ authorizeRequestOnChallenge:
106
+ coreClient.authorizeRequestOnClaimChallenge
107
+ }
108
+ })
109
+ );
110
+ }
74
111
  // Parameter assignments
75
112
  this.subscriptionId = subscriptionId;
76
113
 
77
114
  // Assigning values to Constant parameters
78
115
  this.$host = options.$host || "https://management.azure.com";
79
- this.apiVersion = options.apiVersion || "2021-09-30-preview";
116
+ this.apiVersion = options.apiVersion || "2023-01-31";
80
117
  this.systemAssignedIdentities = new SystemAssignedIdentitiesImpl(this);
81
118
  this.operations = new OperationsImpl(this);
82
119
  this.userAssignedIdentities = new UserAssignedIdentitiesImpl(this);
120
+ this.federatedIdentityCredentials = new FederatedIdentityCredentialsImpl(
121
+ this
122
+ );
123
+ this.addCustomApiVersionPolicy(options.apiVersion);
124
+ }
125
+
126
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
127
+ private addCustomApiVersionPolicy(apiVersion?: string) {
128
+ if (!apiVersion) {
129
+ return;
130
+ }
131
+ const apiVersionPolicy = {
132
+ name: "CustomApiVersionPolicy",
133
+ async sendRequest(
134
+ request: PipelineRequest,
135
+ next: SendRequest
136
+ ): Promise<PipelineResponse> {
137
+ const param = request.url.split("?");
138
+ if (param.length > 1) {
139
+ const newParams = param[1].split("&").map((item) => {
140
+ if (item.indexOf("api-version") > -1) {
141
+ return "api-version=" + apiVersion;
142
+ } else {
143
+ return item;
144
+ }
145
+ });
146
+ request.url = param[0] + "?" + newParams.join("&");
147
+ }
148
+ return next(request);
149
+ }
150
+ };
151
+ this.pipeline.addPolicy(apiVersionPolicy);
83
152
  }
84
153
 
85
154
  systemAssignedIdentities: SystemAssignedIdentities;
86
155
  operations: Operations;
87
156
  userAssignedIdentities: UserAssignedIdentities;
157
+ federatedIdentityCredentials: FederatedIdentityCredentials;
88
158
  }
@@ -11,7 +11,7 @@ import * as coreClient from "@azure/core-client";
11
11
  /** Common fields that are returned in the response for all Azure Resource Manager resources */
12
12
  export interface Resource {
13
13
  /**
14
- * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
14
+ * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
15
15
  * NOTE: This property will not be serialized. It can only be populated by the server.
16
16
  */
17
17
  readonly id?: string;
@@ -25,6 +25,27 @@ export interface Resource {
25
25
  * NOTE: This property will not be serialized. It can only be populated by the server.
26
26
  */
27
27
  readonly type?: string;
28
+ /**
29
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
30
+ * NOTE: This property will not be serialized. It can only be populated by the server.
31
+ */
32
+ readonly systemData?: SystemData;
33
+ }
34
+
35
+ /** Metadata pertaining to creation and last modification of the resource. */
36
+ export interface SystemData {
37
+ /** The identity that created the resource. */
38
+ createdBy?: string;
39
+ /** The type of identity that created the resource. */
40
+ createdByType?: CreatedByType;
41
+ /** The timestamp of resource creation (UTC). */
42
+ createdAt?: Date;
43
+ /** The identity that last modified the resource. */
44
+ lastModifiedBy?: string;
45
+ /** The type of identity that last modified the resource. */
46
+ lastModifiedByType?: CreatedByType;
47
+ /** The timestamp of resource last modification (UTC) */
48
+ lastModifiedAt?: Date;
28
49
  }
29
50
 
30
51
  /** An error response from the ManagedServiceIdentity service. */
@@ -81,72 +102,27 @@ export interface UserAssignedIdentitiesListResult {
81
102
  nextLink?: string;
82
103
  }
83
104
 
84
- /** Azure resources returned by the resource action to get a list of assigned resources. */
85
- export interface AssociatedResourcesListResult {
86
- /**
87
- * Total number of Azure resources assigned to the identity.
88
- * NOTE: This property will not be serialized. It can only be populated by the server.
89
- */
90
- readonly totalCount?: number;
91
- /**
92
- * The collection of Azure resources returned by the resource action to get a list of assigned resources.
93
- * NOTE: This property will not be serialized. It can only be populated by the server.
94
- */
95
- readonly value?: AzureResource[];
96
- /**
97
- * The url to get the next page of results, if any.
98
- * NOTE: This property will not be serialized. It can only be populated by the server.
99
- */
100
- readonly nextLink?: string;
101
- }
102
-
103
- /** Describes an Azure resource that is attached to an identity. */
104
- export interface AzureResource {
105
- /**
106
- * The ID of this resource.
107
- * NOTE: This property will not be serialized. It can only be populated by the server.
108
- */
109
- readonly id?: string;
110
- /**
111
- * The name of this resource.
112
- * NOTE: This property will not be serialized. It can only be populated by the server.
113
- */
114
- readonly name?: string;
115
- /**
116
- * The type of this resource.
117
- * NOTE: This property will not be serialized. It can only be populated by the server.
118
- */
119
- readonly type?: string;
120
- /**
121
- * The name of the resource group this resource belongs to.
122
- * NOTE: This property will not be serialized. It can only be populated by the server.
123
- */
124
- readonly resourceGroup?: string;
125
- /**
126
- * The ID of the subscription this resource belongs to.
127
- * NOTE: This property will not be serialized. It can only be populated by the server.
128
- */
129
- readonly subscriptionId?: string;
130
- /**
131
- * The name of the subscription this resource belongs to.
132
- * NOTE: This property will not be serialized. It can only be populated by the server.
133
- */
134
- readonly subscriptionDisplayName?: string;
105
+ /** Values returned by the List operation for federated identity credentials. */
106
+ export interface FederatedIdentityCredentialsListResult {
107
+ /** The collection of federated identity credentials returned by the listing operation. */
108
+ value?: FederatedIdentityCredential[];
109
+ /** The url to get the next page of results, if any. */
110
+ nextLink?: string;
135
111
  }
136
112
 
137
113
  /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */
138
- export type ProxyResource = Resource & {};
114
+ export interface ProxyResource extends Resource {}
139
115
 
140
116
  /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */
141
- export type TrackedResource = Resource & {
117
+ export interface TrackedResource extends Resource {
142
118
  /** Resource tags. */
143
119
  tags?: { [propertyName: string]: string };
144
120
  /** The geo-location where the resource lives */
145
121
  location: string;
146
- };
122
+ }
147
123
 
148
124
  /** Describes an identity resource. */
149
- export type IdentityUpdate = Resource & {
125
+ export interface IdentityUpdate extends Resource {
150
126
  /** The geo-location where the resource lives */
151
127
  location?: string;
152
128
  /** Resource tags */
@@ -166,10 +142,10 @@ export type IdentityUpdate = Resource & {
166
142
  * NOTE: This property will not be serialized. It can only be populated by the server.
167
143
  */
168
144
  readonly clientId?: string;
169
- };
145
+ }
170
146
 
171
147
  /** Describes a system assigned identity resource. */
172
- export type SystemAssignedIdentity = ProxyResource & {
148
+ export interface SystemAssignedIdentity extends ProxyResource {
173
149
  /** The geo-location where the resource lives */
174
150
  location: string;
175
151
  /** Resource tags */
@@ -194,10 +170,20 @@ export type SystemAssignedIdentity = ProxyResource & {
194
170
  * NOTE: This property will not be serialized. It can only be populated by the server.
195
171
  */
196
172
  readonly clientSecretUrl?: string;
197
- };
173
+ }
174
+
175
+ /** Describes a federated identity credential. */
176
+ export interface FederatedIdentityCredential extends ProxyResource {
177
+ /** The URL of the issuer to be trusted. */
178
+ issuer?: string;
179
+ /** The identifier of the external identity. */
180
+ subject?: string;
181
+ /** The list of audiences that can appear in the issued token. */
182
+ audiences?: string[];
183
+ }
198
184
 
199
185
  /** Describes an identity resource. */
200
- export type Identity = TrackedResource & {
186
+ export interface Identity extends TrackedResource {
201
187
  /**
202
188
  * The id of the tenant which the identity belongs to.
203
189
  * NOTE: This property will not be serialized. It can only be populated by the server.
@@ -213,7 +199,31 @@ export type Identity = TrackedResource & {
213
199
  * NOTE: This property will not be serialized. It can only be populated by the server.
214
200
  */
215
201
  readonly clientId?: string;
216
- };
202
+ }
203
+
204
+ /** Known values of {@link CreatedByType} that the service accepts. */
205
+ export enum KnownCreatedByType {
206
+ /** User */
207
+ User = "User",
208
+ /** Application */
209
+ Application = "Application",
210
+ /** ManagedIdentity */
211
+ ManagedIdentity = "ManagedIdentity",
212
+ /** Key */
213
+ Key = "Key"
214
+ }
215
+
216
+ /**
217
+ * Defines values for CreatedByType. \
218
+ * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
219
+ * this enum contains the known values that the service supports.
220
+ * ### Known values supported by the service
221
+ * **User** \
222
+ * **Application** \
223
+ * **ManagedIdentity** \
224
+ * **Key**
225
+ */
226
+ export type CreatedByType = string;
217
227
 
218
228
  /** Optional parameters. */
219
229
  export interface SystemAssignedIdentitiesGetByScopeOptionalParams
@@ -250,24 +260,6 @@ export interface UserAssignedIdentitiesListByResourceGroupOptionalParams
250
260
  /** Contains response data for the listByResourceGroup operation. */
251
261
  export type UserAssignedIdentitiesListByResourceGroupResponse = UserAssignedIdentitiesListResult;
252
262
 
253
- /** Optional parameters. */
254
- export interface UserAssignedIdentitiesListAssociatedResourcesOptionalParams
255
- extends coreClient.OperationOptions {
256
- /** OData filter expression to apply to the query. */
257
- filter?: string;
258
- /** OData orderBy expression to apply to the query. */
259
- orderby?: string;
260
- /** Number of records to return. */
261
- top?: number;
262
- /** Number of records to skip. */
263
- skip?: number;
264
- /** A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */
265
- skiptoken?: string;
266
- }
267
-
268
- /** Contains response data for the listAssociatedResources operation. */
269
- export type UserAssignedIdentitiesListAssociatedResourcesResponse = AssociatedResourcesListResult;
270
-
271
263
  /** Optional parameters. */
272
264
  export interface UserAssignedIdentitiesCreateOrUpdateOptionalParams
273
265
  extends coreClient.OperationOptions {}
@@ -308,22 +300,41 @@ export interface UserAssignedIdentitiesListByResourceGroupNextOptionalParams
308
300
  export type UserAssignedIdentitiesListByResourceGroupNextResponse = UserAssignedIdentitiesListResult;
309
301
 
310
302
  /** Optional parameters. */
311
- export interface UserAssignedIdentitiesListAssociatedResourcesNextOptionalParams
303
+ export interface FederatedIdentityCredentialsListOptionalParams
312
304
  extends coreClient.OperationOptions {
313
- /** OData filter expression to apply to the query. */
314
- filter?: string;
315
- /** OData orderBy expression to apply to the query. */
316
- orderby?: string;
317
305
  /** Number of records to return. */
318
306
  top?: number;
319
- /** Number of records to skip. */
320
- skip?: number;
321
307
  /** A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls. */
322
308
  skiptoken?: string;
323
309
  }
324
310
 
325
- /** Contains response data for the listAssociatedResourcesNext operation. */
326
- export type UserAssignedIdentitiesListAssociatedResourcesNextResponse = AssociatedResourcesListResult;
311
+ /** Contains response data for the list operation. */
312
+ export type FederatedIdentityCredentialsListResponse = FederatedIdentityCredentialsListResult;
313
+
314
+ /** Optional parameters. */
315
+ export interface FederatedIdentityCredentialsCreateOrUpdateOptionalParams
316
+ extends coreClient.OperationOptions {}
317
+
318
+ /** Contains response data for the createOrUpdate operation. */
319
+ export type FederatedIdentityCredentialsCreateOrUpdateResponse = FederatedIdentityCredential;
320
+
321
+ /** Optional parameters. */
322
+ export interface FederatedIdentityCredentialsGetOptionalParams
323
+ extends coreClient.OperationOptions {}
324
+
325
+ /** Contains response data for the get operation. */
326
+ export type FederatedIdentityCredentialsGetResponse = FederatedIdentityCredential;
327
+
328
+ /** Optional parameters. */
329
+ export interface FederatedIdentityCredentialsDeleteOptionalParams
330
+ extends coreClient.OperationOptions {}
331
+
332
+ /** Optional parameters. */
333
+ export interface FederatedIdentityCredentialsListNextOptionalParams
334
+ extends coreClient.OperationOptions {}
335
+
336
+ /** Contains response data for the listNext operation. */
337
+ export type FederatedIdentityCredentialsListNextResponse = FederatedIdentityCredentialsListResult;
327
338
 
328
339
  /** Optional parameters. */
329
340
  export interface ManagedServiceIdentityClientOptionalParams