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