@azure/arm-locks 2.1.0-alpha.20221102.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 (40) hide show
  1. package/CHANGELOG.md +1 -2
  2. package/dist/index.js +178 -53
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/index.d.ts +1 -0
  7. package/dist-esm/src/index.d.ts.map +1 -1
  8. package/dist-esm/src/index.js +1 -0
  9. package/dist-esm/src/index.js.map +1 -1
  10. package/dist-esm/src/managementLockClient.d.ts +2 -0
  11. package/dist-esm/src/managementLockClient.d.ts.map +1 -1
  12. package/dist-esm/src/managementLockClient.js +48 -17
  13. package/dist-esm/src/managementLockClient.js.map +1 -1
  14. package/dist-esm/src/models/index.d.ts +7 -0
  15. package/dist-esm/src/models/index.d.ts.map +1 -1
  16. package/dist-esm/src/models/index.js +7 -0
  17. package/dist-esm/src/models/index.js.map +1 -1
  18. package/dist-esm/src/operations/authorizationOperations.d.ts.map +1 -1
  19. package/dist-esm/src/operations/authorizationOperations.js +19 -7
  20. package/dist-esm/src/operations/authorizationOperations.js.map +1 -1
  21. package/dist-esm/src/operations/managementLocks.d.ts.map +1 -1
  22. package/dist-esm/src/operations/managementLocks.js +73 -28
  23. package/dist-esm/src/operations/managementLocks.js.map +1 -1
  24. package/dist-esm/src/pagingHelper.d.ts +13 -0
  25. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  26. package/dist-esm/src/pagingHelper.js +32 -0
  27. package/dist-esm/src/pagingHelper.js.map +1 -0
  28. package/dist-esm/test/locks_examples.d.ts.map +1 -1
  29. package/dist-esm/test/locks_examples.js +32 -51
  30. package/dist-esm/test/locks_examples.js.map +1 -1
  31. package/package.json +13 -9
  32. package/review/arm-locks.api.md +3 -7
  33. package/src/index.ts +1 -0
  34. package/src/managementLockClient.ts +59 -19
  35. package/src/models/index.ts +7 -0
  36. package/src/operations/authorizationOperations.ts +21 -8
  37. package/src/operations/managementLocks.ts +91 -43
  38. package/src/pagingHelper.ts +39 -0
  39. package/tsconfig.json +0 -2
  40. package/types/arm-locks.d.ts +18 -0
@@ -8,6 +8,11 @@
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
10
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
11
+ import {
12
+ PipelineRequest,
13
+ PipelineResponse,
14
+ SendRequest
15
+ } from "@azure/core-rest-pipeline";
11
16
  import * as coreAuth from "@azure/core-auth";
12
17
  import { AuthorizationOperationsImpl, ManagementLocksImpl } from "./operations";
13
18
  import {
@@ -54,41 +59,47 @@ export class ManagementLockClient extends coreClient.ServiceClient {
54
59
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
55
60
  : `${packageDetails}`;
56
61
 
57
- if (!options.credentialScopes) {
58
- options.credentialScopes = ["https://management.azure.com/.default"];
59
- }
60
62
  const optionsWithDefaults = {
61
63
  ...defaults,
62
64
  ...options,
63
65
  userAgentOptions: {
64
66
  userAgentPrefix
65
67
  },
66
- baseUri:
68
+ endpoint:
67
69
  options.endpoint ?? options.baseUri ?? "https://management.azure.com"
68
70
  };
69
71
  super(optionsWithDefaults);
70
72
 
73
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
71
74
  if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
72
75
  const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
73
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
76
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
74
77
  (pipelinePolicy) =>
75
78
  pipelinePolicy.name ===
76
79
  coreRestPipeline.bearerTokenAuthenticationPolicyName
77
80
  );
78
- if (!bearerTokenAuthenticationPolicyFound) {
79
- this.pipeline.removePolicy({
80
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName
81
- });
82
- this.pipeline.addPolicy(
83
- coreRestPipeline.bearerTokenAuthenticationPolicy({
84
- scopes: `${optionsWithDefaults.baseUri}/.default`,
85
- challengeCallbacks: {
86
- authorizeRequestOnChallenge:
87
- coreClient.authorizeRequestOnClaimChallenge
88
- }
89
- })
90
- );
91
- }
81
+ }
82
+ if (
83
+ !options ||
84
+ !options.pipeline ||
85
+ options.pipeline.getOrderedPolicies().length == 0 ||
86
+ !bearerTokenAuthenticationPolicyFound
87
+ ) {
88
+ this.pipeline.removePolicy({
89
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
90
+ });
91
+ this.pipeline.addPolicy(
92
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
93
+ credential: credentials,
94
+ scopes:
95
+ optionsWithDefaults.credentialScopes ??
96
+ `${optionsWithDefaults.endpoint}/.default`,
97
+ challengeCallbacks: {
98
+ authorizeRequestOnChallenge:
99
+ coreClient.authorizeRequestOnClaimChallenge
100
+ }
101
+ })
102
+ );
92
103
  }
93
104
  // Parameter assignments
94
105
  this.subscriptionId = subscriptionId;
@@ -98,6 +109,35 @@ export class ManagementLockClient extends coreClient.ServiceClient {
98
109
  this.apiVersion = options.apiVersion || "2020-05-01";
99
110
  this.authorizationOperations = new AuthorizationOperationsImpl(this);
100
111
  this.managementLocks = new ManagementLocksImpl(this);
112
+ this.addCustomApiVersionPolicy(options.apiVersion);
113
+ }
114
+
115
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
116
+ private addCustomApiVersionPolicy(apiVersion?: string) {
117
+ if (!apiVersion) {
118
+ return;
119
+ }
120
+ const apiVersionPolicy = {
121
+ name: "CustomApiVersionPolicy",
122
+ async sendRequest(
123
+ request: PipelineRequest,
124
+ next: SendRequest
125
+ ): Promise<PipelineResponse> {
126
+ const param = request.url.split("?");
127
+ if (param.length > 1) {
128
+ const newParams = param[1].split("&").map((item) => {
129
+ if (item.indexOf("api-version") > -1) {
130
+ return "api-version=" + apiVersion;
131
+ } else {
132
+ return item;
133
+ }
134
+ });
135
+ request.url = param[0] + "?" + newParams.join("&");
136
+ }
137
+ return next(request);
138
+ }
139
+ };
140
+ this.pipeline.addPolicy(apiVersionPolicy);
101
141
  }
102
142
 
103
143
  authorizationOperations: AuthorizationOperations;
@@ -145,8 +145,11 @@ export interface ManagementLockListResult {
145
145
 
146
146
  /** Known values of {@link LockLevel} that the service accepts. */
147
147
  export enum KnownLockLevel {
148
+ /** NotSpecified */
148
149
  NotSpecified = "NotSpecified",
150
+ /** CanNotDelete */
149
151
  CanNotDelete = "CanNotDelete",
152
+ /** ReadOnly */
150
153
  ReadOnly = "ReadOnly"
151
154
  }
152
155
 
@@ -163,9 +166,13 @@ export type LockLevel = string;
163
166
 
164
167
  /** Known values of {@link CreatedByType} that the service accepts. */
165
168
  export enum KnownCreatedByType {
169
+ /** User */
166
170
  User = "User",
171
+ /** Application */
167
172
  Application = "Application",
173
+ /** ManagedIdentity */
168
174
  ManagedIdentity = "ManagedIdentity",
175
+ /** Key */
169
176
  Key = "Key"
170
177
  }
171
178
 
@@ -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 { AuthorizationOperations } 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 AuthorizationOperationsImpl implements AuthorizationOperations {
48
49
  [Symbol.asyncIterator]() {
49
50
  return this;
50
51
  },
51
- byPage: () => {
52
- return this.listPagingPage(options);
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?: AuthorizationOperationsListOptionalParams
62
+ options?: AuthorizationOperationsListOptionalParams,
63
+ settings?: PageSettings
59
64
  ): AsyncIterableIterator<Operation[]> {
60
- let result = await this._list(options);
61
- yield result.value || [];
62
- let continuationToken = result.nextLink;
65
+ let result: AuthorizationOperationsListResponse;
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
- yield result.value || [];
77
+ let page = result.value || [];
78
+ setContinuationToken(page, continuationToken);
79
+ yield page;
67
80
  }
68
81
  }
69
82
 
@@ -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 { ManagementLocks } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -16,12 +17,16 @@ import {
16
17
  ManagementLockObject,
17
18
  ManagementLocksListAtResourceGroupLevelNextOptionalParams,
18
19
  ManagementLocksListAtResourceGroupLevelOptionalParams,
20
+ ManagementLocksListAtResourceGroupLevelResponse,
19
21
  ManagementLocksListAtResourceLevelNextOptionalParams,
20
22
  ManagementLocksListAtResourceLevelOptionalParams,
23
+ ManagementLocksListAtResourceLevelResponse,
21
24
  ManagementLocksListAtSubscriptionLevelNextOptionalParams,
22
25
  ManagementLocksListAtSubscriptionLevelOptionalParams,
26
+ ManagementLocksListAtSubscriptionLevelResponse,
23
27
  ManagementLocksListByScopeNextOptionalParams,
24
28
  ManagementLocksListByScopeOptionalParams,
29
+ ManagementLocksListByScopeResponse,
25
30
  ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams,
26
31
  ManagementLocksCreateOrUpdateAtResourceGroupLevelResponse,
27
32
  ManagementLocksDeleteAtResourceGroupLevelOptionalParams,
@@ -42,10 +47,6 @@ import {
42
47
  ManagementLocksDeleteAtSubscriptionLevelOptionalParams,
43
48
  ManagementLocksGetAtSubscriptionLevelOptionalParams,
44
49
  ManagementLocksGetAtSubscriptionLevelResponse,
45
- ManagementLocksListAtResourceGroupLevelResponse,
46
- ManagementLocksListAtResourceLevelResponse,
47
- ManagementLocksListAtSubscriptionLevelResponse,
48
- ManagementLocksListByScopeResponse,
49
50
  ManagementLocksListAtResourceGroupLevelNextResponse,
50
51
  ManagementLocksListAtResourceLevelNextResponse,
51
52
  ManagementLocksListAtSubscriptionLevelNextResponse,
@@ -85,10 +86,14 @@ export class ManagementLocksImpl implements ManagementLocks {
85
86
  [Symbol.asyncIterator]() {
86
87
  return this;
87
88
  },
88
- byPage: () => {
89
+ byPage: (settings?: PageSettings) => {
90
+ if (settings?.maxPageSize) {
91
+ throw new Error("maxPageSize is not supported by this operation.");
92
+ }
89
93
  return this.listAtResourceGroupLevelPagingPage(
90
94
  resourceGroupName,
91
- options
95
+ options,
96
+ settings
92
97
  );
93
98
  }
94
99
  };
@@ -96,14 +101,18 @@ export class ManagementLocksImpl implements ManagementLocks {
96
101
 
97
102
  private async *listAtResourceGroupLevelPagingPage(
98
103
  resourceGroupName: string,
99
- options?: ManagementLocksListAtResourceGroupLevelOptionalParams
104
+ options?: ManagementLocksListAtResourceGroupLevelOptionalParams,
105
+ settings?: PageSettings
100
106
  ): AsyncIterableIterator<ManagementLockObject[]> {
101
- let result = await this._listAtResourceGroupLevel(
102
- resourceGroupName,
103
- options
104
- );
105
- yield result.value || [];
106
- let continuationToken = result.nextLink;
107
+ let result: ManagementLocksListAtResourceGroupLevelResponse;
108
+ let continuationToken = settings?.continuationToken;
109
+ if (!continuationToken) {
110
+ result = await this._listAtResourceGroupLevel(resourceGroupName, options);
111
+ let page = result.value || [];
112
+ continuationToken = result.nextLink;
113
+ setContinuationToken(page, continuationToken);
114
+ yield page;
115
+ }
107
116
  while (continuationToken) {
108
117
  result = await this._listAtResourceGroupLevelNext(
109
118
  resourceGroupName,
@@ -111,7 +120,9 @@ export class ManagementLocksImpl implements ManagementLocks {
111
120
  options
112
121
  );
113
122
  continuationToken = result.nextLink;
114
- yield result.value || [];
123
+ let page = result.value || [];
124
+ setContinuationToken(page, continuationToken);
125
+ yield page;
115
126
  }
116
127
  }
117
128
 
@@ -160,14 +171,18 @@ export class ManagementLocksImpl implements ManagementLocks {
160
171
  [Symbol.asyncIterator]() {
161
172
  return this;
162
173
  },
163
- byPage: () => {
174
+ byPage: (settings?: PageSettings) => {
175
+ if (settings?.maxPageSize) {
176
+ throw new Error("maxPageSize is not supported by this operation.");
177
+ }
164
178
  return this.listAtResourceLevelPagingPage(
165
179
  resourceGroupName,
166
180
  resourceProviderNamespace,
167
181
  parentResourcePath,
168
182
  resourceType,
169
183
  resourceName,
170
- options
184
+ options,
185
+ settings
171
186
  );
172
187
  }
173
188
  };
@@ -179,18 +194,25 @@ export class ManagementLocksImpl implements ManagementLocks {
179
194
  parentResourcePath: string,
180
195
  resourceType: string,
181
196
  resourceName: string,
182
- options?: ManagementLocksListAtResourceLevelOptionalParams
197
+ options?: ManagementLocksListAtResourceLevelOptionalParams,
198
+ settings?: PageSettings
183
199
  ): AsyncIterableIterator<ManagementLockObject[]> {
184
- let result = await this._listAtResourceLevel(
185
- resourceGroupName,
186
- resourceProviderNamespace,
187
- parentResourcePath,
188
- resourceType,
189
- resourceName,
190
- options
191
- );
192
- yield result.value || [];
193
- let continuationToken = result.nextLink;
200
+ let result: ManagementLocksListAtResourceLevelResponse;
201
+ let continuationToken = settings?.continuationToken;
202
+ if (!continuationToken) {
203
+ result = await this._listAtResourceLevel(
204
+ resourceGroupName,
205
+ resourceProviderNamespace,
206
+ parentResourcePath,
207
+ resourceType,
208
+ resourceName,
209
+ options
210
+ );
211
+ let page = result.value || [];
212
+ continuationToken = result.nextLink;
213
+ setContinuationToken(page, continuationToken);
214
+ yield page;
215
+ }
194
216
  while (continuationToken) {
195
217
  result = await this._listAtResourceLevelNext(
196
218
  resourceGroupName,
@@ -202,7 +224,9 @@ export class ManagementLocksImpl implements ManagementLocks {
202
224
  options
203
225
  );
204
226
  continuationToken = result.nextLink;
205
- yield result.value || [];
227
+ let page = result.value || [];
228
+ setContinuationToken(page, continuationToken);
229
+ yield page;
206
230
  }
207
231
  }
208
232
 
@@ -241,25 +265,37 @@ export class ManagementLocksImpl implements ManagementLocks {
241
265
  [Symbol.asyncIterator]() {
242
266
  return this;
243
267
  },
244
- byPage: () => {
245
- return this.listAtSubscriptionLevelPagingPage(options);
268
+ byPage: (settings?: PageSettings) => {
269
+ if (settings?.maxPageSize) {
270
+ throw new Error("maxPageSize is not supported by this operation.");
271
+ }
272
+ return this.listAtSubscriptionLevelPagingPage(options, settings);
246
273
  }
247
274
  };
248
275
  }
249
276
 
250
277
  private async *listAtSubscriptionLevelPagingPage(
251
- options?: ManagementLocksListAtSubscriptionLevelOptionalParams
278
+ options?: ManagementLocksListAtSubscriptionLevelOptionalParams,
279
+ settings?: PageSettings
252
280
  ): AsyncIterableIterator<ManagementLockObject[]> {
253
- let result = await this._listAtSubscriptionLevel(options);
254
- yield result.value || [];
255
- let continuationToken = result.nextLink;
281
+ let result: ManagementLocksListAtSubscriptionLevelResponse;
282
+ let continuationToken = settings?.continuationToken;
283
+ if (!continuationToken) {
284
+ result = await this._listAtSubscriptionLevel(options);
285
+ let page = result.value || [];
286
+ continuationToken = result.nextLink;
287
+ setContinuationToken(page, continuationToken);
288
+ yield page;
289
+ }
256
290
  while (continuationToken) {
257
291
  result = await this._listAtSubscriptionLevelNext(
258
292
  continuationToken,
259
293
  options
260
294
  );
261
295
  continuationToken = result.nextLink;
262
- yield result.value || [];
296
+ let page = result.value || [];
297
+ setContinuationToken(page, continuationToken);
298
+ yield page;
263
299
  }
264
300
  }
265
301
 
@@ -292,23 +328,35 @@ export class ManagementLocksImpl implements ManagementLocks {
292
328
  [Symbol.asyncIterator]() {
293
329
  return this;
294
330
  },
295
- byPage: () => {
296
- return this.listByScopePagingPage(scope, options);
331
+ byPage: (settings?: PageSettings) => {
332
+ if (settings?.maxPageSize) {
333
+ throw new Error("maxPageSize is not supported by this operation.");
334
+ }
335
+ return this.listByScopePagingPage(scope, options, settings);
297
336
  }
298
337
  };
299
338
  }
300
339
 
301
340
  private async *listByScopePagingPage(
302
341
  scope: string,
303
- options?: ManagementLocksListByScopeOptionalParams
342
+ options?: ManagementLocksListByScopeOptionalParams,
343
+ settings?: PageSettings
304
344
  ): AsyncIterableIterator<ManagementLockObject[]> {
305
- let result = await this._listByScope(scope, options);
306
- yield result.value || [];
307
- let continuationToken = result.nextLink;
345
+ let result: ManagementLocksListByScopeResponse;
346
+ let continuationToken = settings?.continuationToken;
347
+ if (!continuationToken) {
348
+ result = await this._listByScope(scope, options);
349
+ let page = result.value || [];
350
+ continuationToken = result.nextLink;
351
+ setContinuationToken(page, continuationToken);
352
+ yield page;
353
+ }
308
354
  while (continuationToken) {
309
355
  result = await this._listByScopeNext(scope, continuationToken, options);
310
356
  continuationToken = result.nextLink;
311
- yield result.value || [];
357
+ let page = result.value || [];
358
+ setContinuationToken(page, continuationToken);
359
+ yield page;
312
360
  }
313
361
  }
314
362
 
@@ -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 a result page from a pageable operation, returns a
17
+ * continuation token that can be used to begin paging from
18
+ * that point later.
19
+ * @param page A result object from calling .byPage() on a paged operation.
20
+ * @returns The continuation token that can be passed into byPage().
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
+ }
package/tsconfig.json CHANGED
@@ -27,8 +27,6 @@
27
27
  "./test/**/*.ts",
28
28
  "samples-dev/**/*.ts",
29
29
  "./test/**/*.ts",
30
- "samples-dev/**/*.ts",
31
- "./test/**/*.ts",
32
30
  "samples-dev/**/*.ts"
33
31
  ],
34
32
  "exclude": [
@@ -86,18 +86,34 @@ export declare interface ErrorResponse {
86
86
  error?: ErrorDetail;
87
87
  }
88
88
 
89
+ /**
90
+ * Given a result page from a pageable operation, returns a
91
+ * continuation token that can be used to begin paging from
92
+ * that point later.
93
+ * @param page A result object from calling .byPage() on a paged operation.
94
+ * @returns The continuation token that can be passed into byPage().
95
+ */
96
+ export declare function getContinuationToken(page: unknown): string | undefined;
97
+
89
98
  /** Known values of {@link CreatedByType} that the service accepts. */
90
99
  export declare enum KnownCreatedByType {
100
+ /** User */
91
101
  User = "User",
102
+ /** Application */
92
103
  Application = "Application",
104
+ /** ManagedIdentity */
93
105
  ManagedIdentity = "ManagedIdentity",
106
+ /** Key */
94
107
  Key = "Key"
95
108
  }
96
109
 
97
110
  /** Known values of {@link LockLevel} that the service accepts. */
98
111
  export declare enum KnownLockLevel {
112
+ /** NotSpecified */
99
113
  NotSpecified = "NotSpecified",
114
+ /** CanNotDelete */
100
115
  CanNotDelete = "CanNotDelete",
116
+ /** ReadOnly */
101
117
  ReadOnly = "ReadOnly"
102
118
  }
103
119
 
@@ -123,6 +139,8 @@ export declare class ManagementLockClient extends coreClient.ServiceClient {
123
139
  * @param options The parameter options
124
140
  */
125
141
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ManagementLockClientOptionalParams);
142
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
143
+ private addCustomApiVersionPolicy;
126
144
  authorizationOperations: AuthorizationOperations;
127
145
  managementLocks: ManagementLocks;
128
146
  }