@azure/arm-msi 2.1.0-beta.2 → 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.
- package/CHANGELOG.md +6 -9
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/index.js +240 -321
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.js +13 -5
- package/dist-esm/samples-dev/federatedIdentityCredentialsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/federatedIdentityCredentialsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.js +12 -4
- package/dist-esm/samples-dev/federatedIdentityCredentialsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.js +12 -4
- package/dist-esm/samples-dev/federatedIdentityCredentialsListSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +11 -3
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/systemAssignedIdentitiesGetByScopeSample.js +11 -3
- package/dist-esm/samples-dev/systemAssignedIdentitiesGetByScopeSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesCreateOrUpdateSample.js +11 -4
- package/dist-esm/samples-dev/userAssignedIdentitiesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesDeleteSample.js +11 -4
- package/dist-esm/samples-dev/userAssignedIdentitiesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesGetSample.js +11 -4
- package/dist-esm/samples-dev/userAssignedIdentitiesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListByResourceGroupSample.js +11 -4
- package/dist-esm/samples-dev/userAssignedIdentitiesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListBySubscriptionSample.js +10 -3
- package/dist-esm/samples-dev/userAssignedIdentitiesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesUpdateSample.js +11 -4
- package/dist-esm/samples-dev/userAssignedIdentitiesUpdateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/managedServiceIdentityClient.d.ts.map +1 -1
- package/dist-esm/src/managedServiceIdentityClient.js +21 -16
- package/dist-esm/src/managedServiceIdentityClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +43 -86
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +12 -1
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +1 -2
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +51 -85
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -6
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +29 -42
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/federatedIdentityCredentials.d.ts +6 -6
- package/dist-esm/src/operations/federatedIdentityCredentials.d.ts.map +1 -1
- package/dist-esm/src/operations/federatedIdentityCredentials.js +32 -25
- package/dist-esm/src/operations/federatedIdentityCredentials.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/userAssignedIdentities.d.ts +1 -26
- package/dist-esm/src/operations/userAssignedIdentities.d.ts.map +1 -1
- package/dist-esm/src/operations/userAssignedIdentities.js +37 -143
- package/dist-esm/src/operations/userAssignedIdentities.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/federatedIdentityCredentials.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/userAssignedIdentities.d.ts +1 -8
- package/dist-esm/src/operationsInterfaces/userAssignedIdentities.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/package.json +8 -6
- package/review/arm-msi.api.md +25 -44
- package/src/index.ts +1 -0
- package/src/managedServiceIdentityClient.ts +27 -18
- package/src/models/index.ts +47 -96
- package/src/models/mappers.ts +52 -87
- package/src/models/parameters.ts +31 -46
- package/src/operations/federatedIdentityCredentials.ts +39 -26
- package/src/operations/operations.ts +21 -9
- package/src/operations/userAssignedIdentities.ts +46 -190
- package/src/operationsInterfaces/federatedIdentityCredentials.ts +4 -4
- package/src/operationsInterfaces/userAssignedIdentities.ts +0 -13
- package/src/pagingHelper.ts +39 -0
- package/types/arm-msi.d.ts +59 -103
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.d.ts +0 -2
- package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.js +0 -55
- package/dist-esm/samples-dev/userAssignedIdentitiesListAssociatedResourcesSample.js.map +0 -1
@@ -6,7 +6,8 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
10
11
|
import { FederatedIdentityCredentials } from "../operationsInterfaces";
|
11
12
|
import * as coreClient from "@azure/core-client";
|
12
13
|
import * as Mappers from "../models/mappers";
|
@@ -41,7 +42,7 @@ export class FederatedIdentityCredentialsImpl
|
|
41
42
|
|
42
43
|
/**
|
43
44
|
* Lists all the federated identity credentials under the specified user assigned identity.
|
44
|
-
* @param resourceGroupName The name of the
|
45
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
45
46
|
* @param resourceName The name of the identity resource.
|
46
47
|
* @param options The options parameters.
|
47
48
|
*/
|
@@ -58,8 +59,16 @@ export class FederatedIdentityCredentialsImpl
|
|
58
59
|
[Symbol.asyncIterator]() {
|
59
60
|
return this;
|
60
61
|
},
|
61
|
-
byPage: () => {
|
62
|
-
|
62
|
+
byPage: (settings?: PageSettings) => {
|
63
|
+
if (settings?.maxPageSize) {
|
64
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
65
|
+
}
|
66
|
+
return this.listPagingPage(
|
67
|
+
resourceGroupName,
|
68
|
+
resourceName,
|
69
|
+
options,
|
70
|
+
settings
|
71
|
+
);
|
63
72
|
}
|
64
73
|
};
|
65
74
|
}
|
@@ -67,11 +76,18 @@ export class FederatedIdentityCredentialsImpl
|
|
67
76
|
private async *listPagingPage(
|
68
77
|
resourceGroupName: string,
|
69
78
|
resourceName: string,
|
70
|
-
options?: FederatedIdentityCredentialsListOptionalParams
|
79
|
+
options?: FederatedIdentityCredentialsListOptionalParams,
|
80
|
+
settings?: PageSettings
|
71
81
|
): AsyncIterableIterator<FederatedIdentityCredential[]> {
|
72
|
-
let result
|
73
|
-
|
74
|
-
|
82
|
+
let result: FederatedIdentityCredentialsListResponse;
|
83
|
+
let continuationToken = settings?.continuationToken;
|
84
|
+
if (!continuationToken) {
|
85
|
+
result = await this._list(resourceGroupName, resourceName, options);
|
86
|
+
let page = result.value || [];
|
87
|
+
continuationToken = result.nextLink;
|
88
|
+
setContinuationToken(page, continuationToken);
|
89
|
+
yield page;
|
90
|
+
}
|
75
91
|
while (continuationToken) {
|
76
92
|
result = await this._listNext(
|
77
93
|
resourceGroupName,
|
@@ -80,7 +96,9 @@ export class FederatedIdentityCredentialsImpl
|
|
80
96
|
options
|
81
97
|
);
|
82
98
|
continuationToken = result.nextLink;
|
83
|
-
|
99
|
+
let page = result.value || [];
|
100
|
+
setContinuationToken(page, continuationToken);
|
101
|
+
yield page;
|
84
102
|
}
|
85
103
|
}
|
86
104
|
|
@@ -100,7 +118,7 @@ export class FederatedIdentityCredentialsImpl
|
|
100
118
|
|
101
119
|
/**
|
102
120
|
* Lists all the federated identity credentials under the specified user assigned identity.
|
103
|
-
* @param resourceGroupName The name of the
|
121
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
104
122
|
* @param resourceName The name of the identity resource.
|
105
123
|
* @param options The options parameters.
|
106
124
|
*/
|
@@ -117,7 +135,7 @@ export class FederatedIdentityCredentialsImpl
|
|
117
135
|
|
118
136
|
/**
|
119
137
|
* Create or update a federated identity credential under the specified user assigned identity.
|
120
|
-
* @param resourceGroupName The name of the
|
138
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
121
139
|
* @param resourceName The name of the identity resource.
|
122
140
|
* @param federatedIdentityCredentialResourceName The name of the federated identity credential
|
123
141
|
* resource.
|
@@ -145,7 +163,7 @@ export class FederatedIdentityCredentialsImpl
|
|
145
163
|
|
146
164
|
/**
|
147
165
|
* Gets the federated identity credential.
|
148
|
-
* @param resourceGroupName The name of the
|
166
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
149
167
|
* @param resourceName The name of the identity resource.
|
150
168
|
* @param federatedIdentityCredentialResourceName The name of the federated identity credential
|
151
169
|
* resource.
|
@@ -170,7 +188,7 @@ export class FederatedIdentityCredentialsImpl
|
|
170
188
|
|
171
189
|
/**
|
172
190
|
* Deletes the federated identity credential.
|
173
|
-
* @param resourceGroupName The name of the
|
191
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
174
192
|
* @param resourceName The name of the identity resource.
|
175
193
|
* @param federatedIdentityCredentialResourceName The name of the federated identity credential
|
176
194
|
* resource.
|
@@ -195,7 +213,7 @@ export class FederatedIdentityCredentialsImpl
|
|
195
213
|
|
196
214
|
/**
|
197
215
|
* ListNext
|
198
|
-
* @param resourceGroupName The name of the
|
216
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
199
217
|
* @param resourceName The name of the identity resource.
|
200
218
|
* @param nextLink The nextLink from the previous successful call to the List method.
|
201
219
|
* @param options The options parameters.
|
@@ -235,8 +253,8 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
235
253
|
urlParameters: [
|
236
254
|
Parameters.$host,
|
237
255
|
Parameters.subscriptionId,
|
238
|
-
Parameters.
|
239
|
-
Parameters.
|
256
|
+
Parameters.resourceName,
|
257
|
+
Parameters.resourceGroupName1
|
240
258
|
],
|
241
259
|
headerParameters: [Parameters.accept],
|
242
260
|
serializer
|
@@ -261,8 +279,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
261
279
|
urlParameters: [
|
262
280
|
Parameters.$host,
|
263
281
|
Parameters.subscriptionId,
|
264
|
-
Parameters.resourceGroupName,
|
265
282
|
Parameters.resourceName,
|
283
|
+
Parameters.resourceGroupName1,
|
266
284
|
Parameters.federatedIdentityCredentialResourceName
|
267
285
|
],
|
268
286
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
@@ -285,8 +303,8 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|
285
303
|
urlParameters: [
|
286
304
|
Parameters.$host,
|
287
305
|
Parameters.subscriptionId,
|
288
|
-
Parameters.resourceGroupName,
|
289
306
|
Parameters.resourceName,
|
307
|
+
Parameters.resourceGroupName1,
|
290
308
|
Parameters.federatedIdentityCredentialResourceName
|
291
309
|
],
|
292
310
|
headerParameters: [Parameters.accept],
|
@@ -307,8 +325,8 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
307
325
|
urlParameters: [
|
308
326
|
Parameters.$host,
|
309
327
|
Parameters.subscriptionId,
|
310
|
-
Parameters.resourceGroupName,
|
311
328
|
Parameters.resourceName,
|
329
|
+
Parameters.resourceGroupName1,
|
312
330
|
Parameters.federatedIdentityCredentialResourceName
|
313
331
|
],
|
314
332
|
headerParameters: [Parameters.accept],
|
@@ -325,17 +343,12 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
325
343
|
bodyMapper: Mappers.CloudError
|
326
344
|
}
|
327
345
|
},
|
328
|
-
queryParameters: [
|
329
|
-
Parameters.apiVersion,
|
330
|
-
Parameters.top,
|
331
|
-
Parameters.skiptoken
|
332
|
-
],
|
333
346
|
urlParameters: [
|
334
347
|
Parameters.$host,
|
335
348
|
Parameters.nextLink,
|
336
349
|
Parameters.subscriptionId,
|
337
|
-
Parameters.
|
338
|
-
Parameters.
|
350
|
+
Parameters.resourceName,
|
351
|
+
Parameters.resourceGroupName1
|
339
352
|
],
|
340
353
|
headerParameters: [Parameters.accept],
|
341
354
|
serializer
|
@@ -6,7 +6,8 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
10
11
|
import { Operations } from "../operationsInterfaces";
|
11
12
|
import * as coreClient from "@azure/core-client";
|
12
13
|
import * as Mappers from "../models/mappers";
|
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
|
|
48
49
|
[Symbol.asyncIterator]() {
|
49
50
|
return this;
|
50
51
|
},
|
51
|
-
byPage: () => {
|
52
|
-
|
52
|
+
byPage: (settings?: PageSettings) => {
|
53
|
+
if (settings?.maxPageSize) {
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
55
|
+
}
|
56
|
+
return this.listPagingPage(options, settings);
|
53
57
|
}
|
54
58
|
};
|
55
59
|
}
|
56
60
|
|
57
61
|
private async *listPagingPage(
|
58
|
-
options?: OperationsListOptionalParams
|
62
|
+
options?: OperationsListOptionalParams,
|
63
|
+
settings?: PageSettings
|
59
64
|
): AsyncIterableIterator<Operation[]> {
|
60
|
-
let result
|
61
|
-
|
62
|
-
|
65
|
+
let result: OperationsListResponse;
|
66
|
+
let continuationToken = settings?.continuationToken;
|
67
|
+
if (!continuationToken) {
|
68
|
+
result = await this._list(options);
|
69
|
+
let page = result.value || [];
|
70
|
+
continuationToken = result.nextLink;
|
71
|
+
setContinuationToken(page, continuationToken);
|
72
|
+
yield page;
|
73
|
+
}
|
63
74
|
while (continuationToken) {
|
64
75
|
result = await this._listNext(continuationToken, options);
|
65
76
|
continuationToken = result.nextLink;
|
66
|
-
|
77
|
+
let page = result.value || [];
|
78
|
+
setContinuationToken(page, continuationToken);
|
79
|
+
yield page;
|
67
80
|
}
|
68
81
|
}
|
69
82
|
|
@@ -130,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
130
143
|
bodyMapper: Mappers.CloudError
|
131
144
|
}
|
132
145
|
},
|
133
|
-
queryParameters: [Parameters.apiVersion],
|
134
146
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
135
147
|
headerParameters: [Parameters.accept],
|
136
148
|
serializer
|
@@ -6,7 +6,8 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
10
11
|
import { UserAssignedIdentities } from "../operationsInterfaces";
|
11
12
|
import * as coreClient from "@azure/core-client";
|
12
13
|
import * as Mappers from "../models/mappers";
|
@@ -16,14 +17,10 @@ import {
|
|
16
17
|
Identity,
|
17
18
|
UserAssignedIdentitiesListBySubscriptionNextOptionalParams,
|
18
19
|
UserAssignedIdentitiesListBySubscriptionOptionalParams,
|
20
|
+
UserAssignedIdentitiesListBySubscriptionResponse,
|
19
21
|
UserAssignedIdentitiesListByResourceGroupNextOptionalParams,
|
20
22
|
UserAssignedIdentitiesListByResourceGroupOptionalParams,
|
21
|
-
AzureResource,
|
22
|
-
UserAssignedIdentitiesListAssociatedResourcesNextOptionalParams,
|
23
|
-
UserAssignedIdentitiesListAssociatedResourcesOptionalParams,
|
24
|
-
UserAssignedIdentitiesListBySubscriptionResponse,
|
25
23
|
UserAssignedIdentitiesListByResourceGroupResponse,
|
26
|
-
UserAssignedIdentitiesListAssociatedResourcesResponse,
|
27
24
|
UserAssignedIdentitiesCreateOrUpdateOptionalParams,
|
28
25
|
UserAssignedIdentitiesCreateOrUpdateResponse,
|
29
26
|
IdentityUpdate,
|
@@ -33,8 +30,7 @@ import {
|
|
33
30
|
UserAssignedIdentitiesGetResponse,
|
34
31
|
UserAssignedIdentitiesDeleteOptionalParams,
|
35
32
|
UserAssignedIdentitiesListBySubscriptionNextResponse,
|
36
|
-
UserAssignedIdentitiesListByResourceGroupNextResponse
|
37
|
-
UserAssignedIdentitiesListAssociatedResourcesNextResponse
|
33
|
+
UserAssignedIdentitiesListByResourceGroupNextResponse
|
38
34
|
} from "../models";
|
39
35
|
|
40
36
|
/// <reference lib="esnext.asynciterable" />
|
@@ -65,22 +61,34 @@ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
|
|
65
61
|
[Symbol.asyncIterator]() {
|
66
62
|
return this;
|
67
63
|
},
|
68
|
-
byPage: () => {
|
69
|
-
|
64
|
+
byPage: (settings?: PageSettings) => {
|
65
|
+
if (settings?.maxPageSize) {
|
66
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
67
|
+
}
|
68
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
70
69
|
}
|
71
70
|
};
|
72
71
|
}
|
73
72
|
|
74
73
|
private async *listBySubscriptionPagingPage(
|
75
|
-
options?: UserAssignedIdentitiesListBySubscriptionOptionalParams
|
74
|
+
options?: UserAssignedIdentitiesListBySubscriptionOptionalParams,
|
75
|
+
settings?: PageSettings
|
76
76
|
): AsyncIterableIterator<Identity[]> {
|
77
|
-
let result
|
78
|
-
|
79
|
-
|
77
|
+
let result: UserAssignedIdentitiesListBySubscriptionResponse;
|
78
|
+
let continuationToken = settings?.continuationToken;
|
79
|
+
if (!continuationToken) {
|
80
|
+
result = await this._listBySubscription(options);
|
81
|
+
let page = result.value || [];
|
82
|
+
continuationToken = result.nextLink;
|
83
|
+
setContinuationToken(page, continuationToken);
|
84
|
+
yield page;
|
85
|
+
}
|
80
86
|
while (continuationToken) {
|
81
87
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
82
88
|
continuationToken = result.nextLink;
|
83
|
-
|
89
|
+
let page = result.value || [];
|
90
|
+
setContinuationToken(page, continuationToken);
|
91
|
+
yield page;
|
84
92
|
}
|
85
93
|
}
|
86
94
|
|
@@ -109,19 +117,33 @@ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
|
|
109
117
|
[Symbol.asyncIterator]() {
|
110
118
|
return this;
|
111
119
|
},
|
112
|
-
byPage: () => {
|
113
|
-
|
120
|
+
byPage: (settings?: PageSettings) => {
|
121
|
+
if (settings?.maxPageSize) {
|
122
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
123
|
+
}
|
124
|
+
return this.listByResourceGroupPagingPage(
|
125
|
+
resourceGroupName,
|
126
|
+
options,
|
127
|
+
settings
|
128
|
+
);
|
114
129
|
}
|
115
130
|
};
|
116
131
|
}
|
117
132
|
|
118
133
|
private async *listByResourceGroupPagingPage(
|
119
134
|
resourceGroupName: string,
|
120
|
-
options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
|
135
|
+
options?: UserAssignedIdentitiesListByResourceGroupOptionalParams,
|
136
|
+
settings?: PageSettings
|
121
137
|
): AsyncIterableIterator<Identity[]> {
|
122
|
-
let result
|
123
|
-
|
124
|
-
|
138
|
+
let result: UserAssignedIdentitiesListByResourceGroupResponse;
|
139
|
+
let continuationToken = settings?.continuationToken;
|
140
|
+
if (!continuationToken) {
|
141
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
142
|
+
let page = result.value || [];
|
143
|
+
continuationToken = result.nextLink;
|
144
|
+
setContinuationToken(page, continuationToken);
|
145
|
+
yield page;
|
146
|
+
}
|
125
147
|
while (continuationToken) {
|
126
148
|
result = await this._listByResourceGroupNext(
|
127
149
|
resourceGroupName,
|
@@ -129,7 +151,9 @@ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
|
|
129
151
|
options
|
130
152
|
);
|
131
153
|
continuationToken = result.nextLink;
|
132
|
-
|
154
|
+
let page = result.value || [];
|
155
|
+
setContinuationToken(page, continuationToken);
|
156
|
+
yield page;
|
133
157
|
}
|
134
158
|
}
|
135
159
|
|
@@ -145,77 +169,6 @@ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
|
|
145
169
|
}
|
146
170
|
}
|
147
171
|
|
148
|
-
/**
|
149
|
-
* Lists the associated resources for this identity.
|
150
|
-
* @param resourceGroupName The name of the Resource Group to which the identity belongs.
|
151
|
-
* @param resourceName The name of the identity resource.
|
152
|
-
* @param options The options parameters.
|
153
|
-
*/
|
154
|
-
public listAssociatedResources(
|
155
|
-
resourceGroupName: string,
|
156
|
-
resourceName: string,
|
157
|
-
options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams
|
158
|
-
): PagedAsyncIterableIterator<AzureResource> {
|
159
|
-
const iter = this.listAssociatedResourcesPagingAll(
|
160
|
-
resourceGroupName,
|
161
|
-
resourceName,
|
162
|
-
options
|
163
|
-
);
|
164
|
-
return {
|
165
|
-
next() {
|
166
|
-
return iter.next();
|
167
|
-
},
|
168
|
-
[Symbol.asyncIterator]() {
|
169
|
-
return this;
|
170
|
-
},
|
171
|
-
byPage: () => {
|
172
|
-
return this.listAssociatedResourcesPagingPage(
|
173
|
-
resourceGroupName,
|
174
|
-
resourceName,
|
175
|
-
options
|
176
|
-
);
|
177
|
-
}
|
178
|
-
};
|
179
|
-
}
|
180
|
-
|
181
|
-
private async *listAssociatedResourcesPagingPage(
|
182
|
-
resourceGroupName: string,
|
183
|
-
resourceName: string,
|
184
|
-
options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams
|
185
|
-
): AsyncIterableIterator<AzureResource[]> {
|
186
|
-
let result = await this._listAssociatedResources(
|
187
|
-
resourceGroupName,
|
188
|
-
resourceName,
|
189
|
-
options
|
190
|
-
);
|
191
|
-
yield result.value || [];
|
192
|
-
let continuationToken = result.nextLink;
|
193
|
-
while (continuationToken) {
|
194
|
-
result = await this._listAssociatedResourcesNext(
|
195
|
-
resourceGroupName,
|
196
|
-
resourceName,
|
197
|
-
continuationToken,
|
198
|
-
options
|
199
|
-
);
|
200
|
-
continuationToken = result.nextLink;
|
201
|
-
yield result.value || [];
|
202
|
-
}
|
203
|
-
}
|
204
|
-
|
205
|
-
private async *listAssociatedResourcesPagingAll(
|
206
|
-
resourceGroupName: string,
|
207
|
-
resourceName: string,
|
208
|
-
options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams
|
209
|
-
): AsyncIterableIterator<AzureResource> {
|
210
|
-
for await (const page of this.listAssociatedResourcesPagingPage(
|
211
|
-
resourceGroupName,
|
212
|
-
resourceName,
|
213
|
-
options
|
214
|
-
)) {
|
215
|
-
yield* page;
|
216
|
-
}
|
217
|
-
}
|
218
|
-
|
219
172
|
/**
|
220
173
|
* Lists all the userAssignedIdentities available under the specified subscription.
|
221
174
|
* @param options The options parameters.
|
@@ -244,23 +197,6 @@ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
|
|
244
197
|
);
|
245
198
|
}
|
246
199
|
|
247
|
-
/**
|
248
|
-
* Lists the associated resources for this identity.
|
249
|
-
* @param resourceGroupName The name of the Resource Group to which the identity belongs.
|
250
|
-
* @param resourceName The name of the identity resource.
|
251
|
-
* @param options The options parameters.
|
252
|
-
*/
|
253
|
-
private _listAssociatedResources(
|
254
|
-
resourceGroupName: string,
|
255
|
-
resourceName: string,
|
256
|
-
options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams
|
257
|
-
): Promise<UserAssignedIdentitiesListAssociatedResourcesResponse> {
|
258
|
-
return this.client.sendOperationRequest(
|
259
|
-
{ resourceGroupName, resourceName, options },
|
260
|
-
listAssociatedResourcesOperationSpec
|
261
|
-
);
|
262
|
-
}
|
263
|
-
|
264
200
|
/**
|
265
201
|
* Create or update an identity in the specified subscription and resource group.
|
266
202
|
* @param resourceGroupName The name of the Resource Group to which the identity belongs.
|
@@ -364,26 +300,6 @@ export class UserAssignedIdentitiesImpl implements UserAssignedIdentities {
|
|
364
300
|
listByResourceGroupNextOperationSpec
|
365
301
|
);
|
366
302
|
}
|
367
|
-
|
368
|
-
/**
|
369
|
-
* ListAssociatedResourcesNext
|
370
|
-
* @param resourceGroupName The name of the Resource Group to which the identity belongs.
|
371
|
-
* @param resourceName The name of the identity resource.
|
372
|
-
* @param nextLink The nextLink from the previous successful call to the ListAssociatedResources
|
373
|
-
* method.
|
374
|
-
* @param options The options parameters.
|
375
|
-
*/
|
376
|
-
private _listAssociatedResourcesNext(
|
377
|
-
resourceGroupName: string,
|
378
|
-
resourceName: string,
|
379
|
-
nextLink: string,
|
380
|
-
options?: UserAssignedIdentitiesListAssociatedResourcesNextOptionalParams
|
381
|
-
): Promise<UserAssignedIdentitiesListAssociatedResourcesNextResponse> {
|
382
|
-
return this.client.sendOperationRequest(
|
383
|
-
{ resourceGroupName, resourceName, nextLink, options },
|
384
|
-
listAssociatedResourcesNextOperationSpec
|
385
|
-
);
|
386
|
-
}
|
387
303
|
}
|
388
304
|
// Operation Specifications
|
389
305
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
@@ -426,35 +342,6 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
426
342
|
headerParameters: [Parameters.accept],
|
427
343
|
serializer
|
428
344
|
};
|
429
|
-
const listAssociatedResourcesOperationSpec: coreClient.OperationSpec = {
|
430
|
-
path:
|
431
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}/listAssociatedResources",
|
432
|
-
httpMethod: "POST",
|
433
|
-
responses: {
|
434
|
-
200: {
|
435
|
-
bodyMapper: Mappers.AssociatedResourcesListResult
|
436
|
-
},
|
437
|
-
default: {
|
438
|
-
bodyMapper: Mappers.CloudError
|
439
|
-
}
|
440
|
-
},
|
441
|
-
queryParameters: [
|
442
|
-
Parameters.apiVersion,
|
443
|
-
Parameters.filter,
|
444
|
-
Parameters.orderby,
|
445
|
-
Parameters.top,
|
446
|
-
Parameters.skip,
|
447
|
-
Parameters.skiptoken
|
448
|
-
],
|
449
|
-
urlParameters: [
|
450
|
-
Parameters.$host,
|
451
|
-
Parameters.subscriptionId,
|
452
|
-
Parameters.resourceGroupName,
|
453
|
-
Parameters.resourceName
|
454
|
-
],
|
455
|
-
headerParameters: [Parameters.accept],
|
456
|
-
serializer
|
457
|
-
};
|
458
345
|
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
459
346
|
path:
|
460
347
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resourceName}",
|
@@ -560,7 +447,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
560
447
|
bodyMapper: Mappers.CloudError
|
561
448
|
}
|
562
449
|
},
|
563
|
-
queryParameters: [Parameters.apiVersion],
|
564
450
|
urlParameters: [
|
565
451
|
Parameters.$host,
|
566
452
|
Parameters.nextLink,
|
@@ -580,7 +466,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
580
466
|
bodyMapper: Mappers.CloudError
|
581
467
|
}
|
582
468
|
},
|
583
|
-
queryParameters: [Parameters.apiVersion],
|
584
469
|
urlParameters: [
|
585
470
|
Parameters.$host,
|
586
471
|
Parameters.nextLink,
|
@@ -590,32 +475,3 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
590
475
|
headerParameters: [Parameters.accept],
|
591
476
|
serializer
|
592
477
|
};
|
593
|
-
const listAssociatedResourcesNextOperationSpec: coreClient.OperationSpec = {
|
594
|
-
path: "{nextLink}",
|
595
|
-
httpMethod: "GET",
|
596
|
-
responses: {
|
597
|
-
200: {
|
598
|
-
bodyMapper: Mappers.AssociatedResourcesListResult
|
599
|
-
},
|
600
|
-
default: {
|
601
|
-
bodyMapper: Mappers.CloudError
|
602
|
-
}
|
603
|
-
},
|
604
|
-
queryParameters: [
|
605
|
-
Parameters.apiVersion,
|
606
|
-
Parameters.filter,
|
607
|
-
Parameters.orderby,
|
608
|
-
Parameters.top,
|
609
|
-
Parameters.skip,
|
610
|
-
Parameters.skiptoken
|
611
|
-
],
|
612
|
-
urlParameters: [
|
613
|
-
Parameters.$host,
|
614
|
-
Parameters.nextLink,
|
615
|
-
Parameters.subscriptionId,
|
616
|
-
Parameters.resourceGroupName,
|
617
|
-
Parameters.resourceName
|
618
|
-
],
|
619
|
-
headerParameters: [Parameters.accept],
|
620
|
-
serializer
|
621
|
-
};
|
@@ -22,7 +22,7 @@ import {
|
|
22
22
|
export interface FederatedIdentityCredentials {
|
23
23
|
/**
|
24
24
|
* Lists all the federated identity credentials under the specified user assigned identity.
|
25
|
-
* @param resourceGroupName The name of the
|
25
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
26
26
|
* @param resourceName The name of the identity resource.
|
27
27
|
* @param options The options parameters.
|
28
28
|
*/
|
@@ -33,7 +33,7 @@ export interface FederatedIdentityCredentials {
|
|
33
33
|
): PagedAsyncIterableIterator<FederatedIdentityCredential>;
|
34
34
|
/**
|
35
35
|
* Create or update a federated identity credential under the specified user assigned identity.
|
36
|
-
* @param resourceGroupName The name of the
|
36
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
37
37
|
* @param resourceName The name of the identity resource.
|
38
38
|
* @param federatedIdentityCredentialResourceName The name of the federated identity credential
|
39
39
|
* resource.
|
@@ -49,7 +49,7 @@ export interface FederatedIdentityCredentials {
|
|
49
49
|
): Promise<FederatedIdentityCredentialsCreateOrUpdateResponse>;
|
50
50
|
/**
|
51
51
|
* Gets the federated identity credential.
|
52
|
-
* @param resourceGroupName The name of the
|
52
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
53
53
|
* @param resourceName The name of the identity resource.
|
54
54
|
* @param federatedIdentityCredentialResourceName The name of the federated identity credential
|
55
55
|
* resource.
|
@@ -63,7 +63,7 @@ export interface FederatedIdentityCredentials {
|
|
63
63
|
): Promise<FederatedIdentityCredentialsGetResponse>;
|
64
64
|
/**
|
65
65
|
* Deletes the federated identity credential.
|
66
|
-
* @param resourceGroupName The name of the
|
66
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
67
67
|
* @param resourceName The name of the identity resource.
|
68
68
|
* @param federatedIdentityCredentialResourceName The name of the federated identity credential
|
69
69
|
* resource.
|
@@ -11,8 +11,6 @@ import {
|
|
11
11
|
Identity,
|
12
12
|
UserAssignedIdentitiesListBySubscriptionOptionalParams,
|
13
13
|
UserAssignedIdentitiesListByResourceGroupOptionalParams,
|
14
|
-
AzureResource,
|
15
|
-
UserAssignedIdentitiesListAssociatedResourcesOptionalParams,
|
16
14
|
UserAssignedIdentitiesCreateOrUpdateOptionalParams,
|
17
15
|
UserAssignedIdentitiesCreateOrUpdateResponse,
|
18
16
|
IdentityUpdate,
|
@@ -42,17 +40,6 @@ export interface UserAssignedIdentities {
|
|
42
40
|
resourceGroupName: string,
|
43
41
|
options?: UserAssignedIdentitiesListByResourceGroupOptionalParams
|
44
42
|
): PagedAsyncIterableIterator<Identity>;
|
45
|
-
/**
|
46
|
-
* Lists the associated resources for this identity.
|
47
|
-
* @param resourceGroupName The name of the Resource Group to which the identity belongs.
|
48
|
-
* @param resourceName The name of the identity resource.
|
49
|
-
* @param options The options parameters.
|
50
|
-
*/
|
51
|
-
listAssociatedResources(
|
52
|
-
resourceGroupName: string,
|
53
|
-
resourceName: string,
|
54
|
-
options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams
|
55
|
-
): PagedAsyncIterableIterator<AzureResource>;
|
56
43
|
/**
|
57
44
|
* Create or update an identity in the specified subscription and resource group.
|
58
45
|
* @param resourceGroupName The name of the Resource Group to which the identity belongs.
|
@@ -0,0 +1,39 @@
|
|
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 interface PageInfo {
|
10
|
+
continuationToken?: string;
|
11
|
+
}
|
12
|
+
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
17
|
+
* returns a continuation token that can be used to begin paging from
|
18
|
+
* that point later.
|
19
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
20
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
21
|
+
*/
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
23
|
+
if (typeof page !== "object" || page === null) {
|
24
|
+
return undefined;
|
25
|
+
}
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
27
|
+
}
|
28
|
+
|
29
|
+
export function setContinuationToken(
|
30
|
+
page: unknown,
|
31
|
+
continuationToken: string | undefined
|
32
|
+
): void {
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
38
|
+
pageMap.set(page, pageInfo);
|
39
|
+
}
|