@databricks/sdk-accessmanagement 0.1.0-dev.1 → 0.1.0-dev.2

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/src/v1/client.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
 
3
3
  import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
4
- import type {Call} from '@databricks/sdk-core/api';
5
4
  import {createDefault} from '@databricks/sdk-core/clientinfo';
6
5
  import type {Logger} from '@databricks/sdk-core/logger';
7
6
  import {NoOpLogger} from '@databricks/sdk-core/logger';
@@ -23,14 +22,14 @@ import type {
23
22
  CheckPolicyResponse,
24
23
  DeleteWorkspacePermissionAssignmentRequest,
25
24
  DeleteWorkspacePermissionAssignmentRequest_Response,
26
- GetAssignableRolesForResourceRequest,
27
- GetAssignableRolesForResourceResponse,
28
25
  GetObjectPermissionsRequest,
29
- GetPermissionLevelsRequest,
30
- GetPermissionLevelsRequest_Response,
31
26
  GetRuleSetRequest,
32
- GetWorkspacePermissionAssignmentsRequest,
33
- GetWorkspacePermissionAssignmentsRequest_Response,
27
+ ListAssignableRolesForResourceRequest,
28
+ ListAssignableRolesForResourceResponse,
29
+ ListPermissionLevelsRequest,
30
+ ListPermissionLevelsRequest_Response,
31
+ ListWorkspacePermissionAssignmentsRequest,
32
+ ListWorkspacePermissionAssignmentsRequest_Response,
34
33
  ListWorkspacePermissionsRequest,
35
34
  ListWorkspacePermissionsRequest_Response,
36
35
  PermissionsResponse,
@@ -51,9 +50,9 @@ import {
51
50
  marshalUpdateWorkspacePermissionAssignmentRequestSchema,
52
51
  unmarshalCheckPolicyResponseSchema,
53
52
  unmarshalDeleteWorkspacePermissionAssignmentRequest_ResponseSchema,
54
- unmarshalGetAssignableRolesForResourceResponseSchema,
55
- unmarshalGetPermissionLevelsRequest_ResponseSchema,
56
- unmarshalGetWorkspacePermissionAssignmentsRequest_ResponseSchema,
53
+ unmarshalListAssignableRolesForResourceResponseSchema,
54
+ unmarshalListPermissionLevelsRequest_ResponseSchema,
55
+ unmarshalListWorkspacePermissionAssignmentsRequest_ResponseSchema,
57
56
  unmarshalListWorkspacePermissionsRequest_ResponseSchema,
58
57
  unmarshalPermissionsResponseSchema,
59
58
  unmarshalRuleSetSchema,
@@ -66,7 +65,7 @@ const PACKAGE_SEGMENT = {
66
65
  value: pkgJson.version,
67
66
  };
68
67
 
69
- export class AccessmanagementClient {
68
+ export class AccessManagementClient {
70
69
  private readonly host: string;
71
70
  // Fallback for endpoints whose path contains {account_id}. If the request
72
71
  // already carries an accountId, that value wins.
@@ -105,7 +104,7 @@ export class AccessmanagementClient {
105
104
  ): Promise<DeleteWorkspacePermissionAssignmentRequest_Response> {
106
105
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/permissionassignments/principals/${String(req.principalId ?? '')}`;
107
106
  let resp: DeleteWorkspacePermissionAssignmentRequest_Response | undefined;
108
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
107
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
109
108
  const headers = new Headers();
110
109
  headers.set('User-Agent', this.userAgent);
111
110
  const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
@@ -121,19 +120,19 @@ export class AccessmanagementClient {
121
120
  };
122
121
  await executeCall(call, options);
123
122
  if (resp === undefined) {
124
- throw new Error('API call completed without a result.');
123
+ throw new Error('operation completed without a result.');
125
124
  }
126
125
  return resp;
127
126
  }
128
127
 
129
128
  /** Get the permission assignments for the specified <Account> and <Workspace>. */
130
- async getWorkspacePermissionAssignments(
131
- req: GetWorkspacePermissionAssignmentsRequest,
129
+ async listWorkspacePermissionAssignments(
130
+ req: ListWorkspacePermissionAssignmentsRequest,
132
131
  options?: CallOptions
133
- ): Promise<GetWorkspacePermissionAssignmentsRequest_Response> {
132
+ ): Promise<ListWorkspacePermissionAssignmentsRequest_Response> {
134
133
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/permissionassignments`;
135
- let resp: GetWorkspacePermissionAssignmentsRequest_Response | undefined;
136
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
134
+ let resp: ListWorkspacePermissionAssignmentsRequest_Response | undefined;
135
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
137
136
  const headers = new Headers();
138
137
  headers.set('User-Agent', this.userAgent);
139
138
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
@@ -144,12 +143,12 @@ export class AccessmanagementClient {
144
143
  });
145
144
  resp = parseResponse(
146
145
  respBody,
147
- unmarshalGetWorkspacePermissionAssignmentsRequest_ResponseSchema
146
+ unmarshalListWorkspacePermissionAssignmentsRequest_ResponseSchema
148
147
  );
149
148
  };
150
149
  await executeCall(call, options);
151
150
  if (resp === undefined) {
152
- throw new Error('API call completed without a result.');
151
+ throw new Error('operation completed without a result.');
153
152
  }
154
153
  return resp;
155
154
  }
@@ -161,7 +160,7 @@ export class AccessmanagementClient {
161
160
  ): Promise<ListWorkspacePermissionsRequest_Response> {
162
161
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/permissionassignments/permissions`;
163
162
  let resp: ListWorkspacePermissionsRequest_Response | undefined;
164
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
163
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
165
164
  const headers = new Headers();
166
165
  headers.set('User-Agent', this.userAgent);
167
166
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
@@ -177,7 +176,7 @@ export class AccessmanagementClient {
177
176
  };
178
177
  await executeCall(call, options);
179
178
  if (resp === undefined) {
180
- throw new Error('API call completed without a result.');
179
+ throw new Error('operation completed without a result.');
181
180
  }
182
181
  return resp;
183
182
  }
@@ -193,7 +192,7 @@ export class AccessmanagementClient {
193
192
  marshalUpdateWorkspacePermissionAssignmentRequestSchema
194
193
  );
195
194
  let resp: WorkspacePermissionAssignmentOutput | undefined;
196
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
195
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
197
196
  const headers = new Headers({'Content-Type': 'application/json'});
198
197
  headers.set('User-Agent', this.userAgent);
199
198
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
@@ -209,28 +208,31 @@ export class AccessmanagementClient {
209
208
  };
210
209
  await executeCall(call, options);
211
210
  if (resp === undefined) {
212
- throw new Error('API call completed without a result.');
211
+ throw new Error('operation completed without a result.');
213
212
  }
214
213
  return resp;
215
214
  }
216
215
 
217
216
  /**
218
- * Gets all the roles that can be granted on an account level resource. A role is grantable if the rule set on the
219
- * resource can contain an access rule of the role.
217
+ * Get a rule set by its name. A rule set is always attached to a resource and contains a list of access rules on the
218
+ * said resource. Currently only a default rule set for each resource is supported.
220
219
  */
221
- async getAssignableRolesForResource(
222
- req: GetAssignableRolesForResourceRequest,
220
+ async getRuleSet(
221
+ req: GetRuleSetRequest,
223
222
  options?: CallOptions
224
- ): Promise<GetAssignableRolesForResourceResponse> {
225
- const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/assignable-roles`;
223
+ ): Promise<RuleSet> {
224
+ const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/rule-sets`;
226
225
  const params = new URLSearchParams();
227
- if (req.resource !== undefined) {
228
- params.append('resource', req.resource);
226
+ if (req.name !== undefined) {
227
+ params.append('name', req.name);
228
+ }
229
+ if (req.etag !== undefined) {
230
+ params.append('etag', req.etag);
229
231
  }
230
232
  const query = params.toString();
231
233
  const fullUrl = query !== '' ? `${url}?${query}` : url;
232
- let resp: GetAssignableRolesForResourceResponse | undefined;
233
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
234
+ let resp: RuleSet | undefined;
235
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
234
236
  const headers = new Headers();
235
237
  headers.set('User-Agent', this.userAgent);
236
238
  const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
@@ -239,35 +241,35 @@ export class AccessmanagementClient {
239
241
  httpClient: this.httpClient,
240
242
  logger: this.logger,
241
243
  });
242
- resp = parseResponse(
243
- respBody,
244
- unmarshalGetAssignableRolesForResourceResponseSchema
245
- );
244
+ resp = parseResponse(respBody, unmarshalRuleSetSchema);
246
245
  };
247
246
  await executeCall(call, options);
248
247
  if (resp === undefined) {
249
- throw new Error('API call completed without a result.');
248
+ throw new Error('operation completed without a result.');
250
249
  }
251
250
  return resp;
252
251
  }
253
252
 
254
253
  /**
255
- * Gets all the roles that can be granted on an account level resource. A role is grantable if the rule set on the
256
- * resource can contain an access rule of the role.
254
+ * Get a rule set by its name. A rule set is always attached to a resource and contains a list of access rules on the
255
+ * said resource. Currently only a default rule set for each resource is supported.
257
256
  */
258
- async getAssignableRolesForResourceProxy(
259
- req: GetAssignableRolesForResourceRequest,
257
+ async getRuleSetProxy(
258
+ req: GetRuleSetRequest,
260
259
  options?: CallOptions
261
- ): Promise<GetAssignableRolesForResourceResponse> {
262
- const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/assignable-roles`;
260
+ ): Promise<RuleSet> {
261
+ const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/rule-sets`;
263
262
  const params = new URLSearchParams();
264
- if (req.resource !== undefined) {
265
- params.append('resource', req.resource);
263
+ if (req.name !== undefined) {
264
+ params.append('name', req.name);
265
+ }
266
+ if (req.etag !== undefined) {
267
+ params.append('etag', req.etag);
266
268
  }
267
269
  const query = params.toString();
268
270
  const fullUrl = query !== '' ? `${url}?${query}` : url;
269
- let resp: GetAssignableRolesForResourceResponse | undefined;
270
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
271
+ let resp: RuleSet | undefined;
272
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
271
273
  const headers = new Headers();
272
274
  headers.set('User-Agent', this.userAgent);
273
275
  const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
@@ -276,38 +278,32 @@ export class AccessmanagementClient {
276
278
  httpClient: this.httpClient,
277
279
  logger: this.logger,
278
280
  });
279
- resp = parseResponse(
280
- respBody,
281
- unmarshalGetAssignableRolesForResourceResponseSchema
282
- );
281
+ resp = parseResponse(respBody, unmarshalRuleSetSchema);
283
282
  };
284
283
  await executeCall(call, options);
285
284
  if (resp === undefined) {
286
- throw new Error('API call completed without a result.');
285
+ throw new Error('operation completed without a result.');
287
286
  }
288
287
  return resp;
289
288
  }
290
289
 
291
290
  /**
292
- * Get a rule set by its name. A rule set is always attached to a resource and contains a list of access rules on the
293
- * said resource. Currently only a default rule set for each resource is supported.
291
+ * Gets all the roles that can be granted on an account level resource. A role is grantable if the rule set on the
292
+ * resource can contain an access rule of the role.
294
293
  */
295
- async getRuleSet(
296
- req: GetRuleSetRequest,
294
+ async listAssignableRolesForResource(
295
+ req: ListAssignableRolesForResourceRequest,
297
296
  options?: CallOptions
298
- ): Promise<RuleSet> {
299
- const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/rule-sets`;
297
+ ): Promise<ListAssignableRolesForResourceResponse> {
298
+ const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/assignable-roles`;
300
299
  const params = new URLSearchParams();
301
- if (req.name !== undefined) {
302
- params.append('name', req.name);
303
- }
304
- if (req.etag !== undefined) {
305
- params.append('etag', req.etag);
300
+ if (req.resource !== undefined) {
301
+ params.append('resource', req.resource);
306
302
  }
307
303
  const query = params.toString();
308
304
  const fullUrl = query !== '' ? `${url}?${query}` : url;
309
- let resp: RuleSet | undefined;
310
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
305
+ let resp: ListAssignableRolesForResourceResponse | undefined;
306
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
311
307
  const headers = new Headers();
312
308
  headers.set('User-Agent', this.userAgent);
313
309
  const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
@@ -316,35 +312,35 @@ export class AccessmanagementClient {
316
312
  httpClient: this.httpClient,
317
313
  logger: this.logger,
318
314
  });
319
- resp = parseResponse(respBody, unmarshalRuleSetSchema);
315
+ resp = parseResponse(
316
+ respBody,
317
+ unmarshalListAssignableRolesForResourceResponseSchema
318
+ );
320
319
  };
321
320
  await executeCall(call, options);
322
321
  if (resp === undefined) {
323
- throw new Error('API call completed without a result.');
322
+ throw new Error('operation completed without a result.');
324
323
  }
325
324
  return resp;
326
325
  }
327
326
 
328
327
  /**
329
- * Get a rule set by its name. A rule set is always attached to a resource and contains a list of access rules on the
330
- * said resource. Currently only a default rule set for each resource is supported.
328
+ * Gets all the roles that can be granted on an account level resource. A role is grantable if the rule set on the
329
+ * resource can contain an access rule of the role.
331
330
  */
332
- async getRuleSetProxy(
333
- req: GetRuleSetRequest,
331
+ async listAssignableRolesForResourceProxy(
332
+ req: ListAssignableRolesForResourceRequest,
334
333
  options?: CallOptions
335
- ): Promise<RuleSet> {
336
- const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/rule-sets`;
334
+ ): Promise<ListAssignableRolesForResourceResponse> {
335
+ const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/assignable-roles`;
337
336
  const params = new URLSearchParams();
338
- if (req.name !== undefined) {
339
- params.append('name', req.name);
340
- }
341
- if (req.etag !== undefined) {
342
- params.append('etag', req.etag);
337
+ if (req.resource !== undefined) {
338
+ params.append('resource', req.resource);
343
339
  }
344
340
  const query = params.toString();
345
341
  const fullUrl = query !== '' ? `${url}?${query}` : url;
346
- let resp: RuleSet | undefined;
347
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
342
+ let resp: ListAssignableRolesForResourceResponse | undefined;
343
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
348
344
  const headers = new Headers();
349
345
  headers.set('User-Agent', this.userAgent);
350
346
  const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
@@ -353,11 +349,14 @@ export class AccessmanagementClient {
353
349
  httpClient: this.httpClient,
354
350
  logger: this.logger,
355
351
  });
356
- resp = parseResponse(respBody, unmarshalRuleSetSchema);
352
+ resp = parseResponse(
353
+ respBody,
354
+ unmarshalListAssignableRolesForResourceResponseSchema
355
+ );
357
356
  };
358
357
  await executeCall(call, options);
359
358
  if (resp === undefined) {
360
- throw new Error('API call completed without a result.');
359
+ throw new Error('operation completed without a result.');
361
360
  }
362
361
  return resp;
363
362
  }
@@ -373,7 +372,7 @@ export class AccessmanagementClient {
373
372
  const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/rule-sets`;
374
373
  const body = marshalRequest(req, marshalUpdateRuleSetRequestSchema);
375
374
  let resp: RuleSet | undefined;
376
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
375
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
377
376
  const headers = new Headers({'Content-Type': 'application/json'});
378
377
  headers.set('User-Agent', this.userAgent);
379
378
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
@@ -386,7 +385,7 @@ export class AccessmanagementClient {
386
385
  };
387
386
  await executeCall(call, options);
388
387
  if (resp === undefined) {
389
- throw new Error('API call completed without a result.');
388
+ throw new Error('operation completed without a result.');
390
389
  }
391
390
  return resp;
392
391
  }
@@ -402,7 +401,7 @@ export class AccessmanagementClient {
402
401
  const url = `${this.host}/api/2.0/preview/accounts/${req.accountId ?? this.accountId ?? ''}/access-control/rule-sets`;
403
402
  const body = marshalRequest(req, marshalUpdateRuleSetRequestSchema);
404
403
  let resp: RuleSet | undefined;
405
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
404
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
406
405
  const headers = new Headers({'Content-Type': 'application/json'});
407
406
  headers.set('User-Agent', this.userAgent);
408
407
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
@@ -415,7 +414,7 @@ export class AccessmanagementClient {
415
414
  };
416
415
  await executeCall(call, options);
417
416
  if (resp === undefined) {
418
- throw new Error('API call completed without a result.');
417
+ throw new Error('operation completed without a result.');
419
418
  }
420
419
  return resp;
421
420
  }
@@ -427,7 +426,7 @@ export class AccessmanagementClient {
427
426
  ): Promise<PermissionsResponse> {
428
427
  const url = `${this.host}/api/2.0/permissions/${req.requestObjectType ?? ''}/${req.requestObjectId ?? ''}`;
429
428
  let resp: PermissionsResponse | undefined;
430
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
429
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
431
430
  const headers = new Headers();
432
431
  if (this.workspaceId !== undefined) {
433
432
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -443,19 +442,19 @@ export class AccessmanagementClient {
443
442
  };
444
443
  await executeCall(call, options);
445
444
  if (resp === undefined) {
446
- throw new Error('API call completed without a result.');
445
+ throw new Error('operation completed without a result.');
447
446
  }
448
447
  return resp;
449
448
  }
450
449
 
451
450
  /** Gets the permission levels that a user can have on an object. */
452
- async getPermissionLevels(
453
- req: GetPermissionLevelsRequest,
451
+ async listPermissionLevels(
452
+ req: ListPermissionLevelsRequest,
454
453
  options?: CallOptions
455
- ): Promise<GetPermissionLevelsRequest_Response> {
454
+ ): Promise<ListPermissionLevelsRequest_Response> {
456
455
  const url = `${this.host}/api/2.0/permissions/${req.requestObjectType ?? ''}/${req.requestObjectId ?? ''}/permissionLevels`;
457
- let resp: GetPermissionLevelsRequest_Response | undefined;
458
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
456
+ let resp: ListPermissionLevelsRequest_Response | undefined;
457
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
459
458
  const headers = new Headers();
460
459
  if (this.workspaceId !== undefined) {
461
460
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -469,12 +468,12 @@ export class AccessmanagementClient {
469
468
  });
470
469
  resp = parseResponse(
471
470
  respBody,
472
- unmarshalGetPermissionLevelsRequest_ResponseSchema
471
+ unmarshalListPermissionLevelsRequest_ResponseSchema
473
472
  );
474
473
  };
475
474
  await executeCall(call, options);
476
475
  if (resp === undefined) {
477
- throw new Error('API call completed without a result.');
476
+ throw new Error('operation completed without a result.');
478
477
  }
479
478
  return resp;
480
479
  }
@@ -487,7 +486,7 @@ export class AccessmanagementClient {
487
486
  const url = `${this.host}/api/2.0/permissions/${req.requestObjectType ?? ''}/${req.requestObjectId ?? ''}`;
488
487
  const body = marshalRequest(req, marshalSetObjectPermissionsRequestSchema);
489
488
  let resp: PermissionsResponse | undefined;
490
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
489
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
491
490
  const headers = new Headers({'Content-Type': 'application/json'});
492
491
  if (this.workspaceId !== undefined) {
493
492
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -503,7 +502,7 @@ export class AccessmanagementClient {
503
502
  };
504
503
  await executeCall(call, options);
505
504
  if (resp === undefined) {
506
- throw new Error('API call completed without a result.');
505
+ throw new Error('operation completed without a result.');
507
506
  }
508
507
  return resp;
509
508
  }
@@ -519,7 +518,7 @@ export class AccessmanagementClient {
519
518
  marshalUpdateObjectPermissionsRequestSchema
520
519
  );
521
520
  let resp: PermissionsResponse | undefined;
522
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
521
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
523
522
  const headers = new Headers({'Content-Type': 'application/json'});
524
523
  if (this.workspaceId !== undefined) {
525
524
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -535,7 +534,7 @@ export class AccessmanagementClient {
535
534
  };
536
535
  await executeCall(call, options);
537
536
  if (resp === undefined) {
538
- throw new Error('API call completed without a result.');
537
+ throw new Error('operation completed without a result.');
539
538
  }
540
539
  return resp;
541
540
  }
@@ -576,7 +575,7 @@ export class AccessmanagementClient {
576
575
  const query = params.toString();
577
576
  const fullUrl = query !== '' ? `${url}?${query}` : url;
578
577
  let resp: CheckPolicyResponse | undefined;
579
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
578
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
580
579
  const headers = new Headers();
581
580
  if (this.workspaceId !== undefined) {
582
581
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -592,7 +591,7 @@ export class AccessmanagementClient {
592
591
  };
593
592
  await executeCall(call, options);
594
593
  if (resp === undefined) {
595
- throw new Error('API call completed without a result.');
594
+ throw new Error('operation completed without a result.');
596
595
  }
597
596
  return resp;
598
597
  }
package/src/v1/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
 
3
- export {AccessmanagementClient} from './client';
3
+ export {AccessManagementClient} from './client';
4
4
 
5
5
  export {
6
6
  PermissionLevel,
@@ -17,15 +17,15 @@ export type {
17
17
  ConsistencyToken,
18
18
  DeleteWorkspacePermissionAssignmentRequest,
19
19
  DeleteWorkspacePermissionAssignmentRequest_Response,
20
- GetAssignableRolesForResourceRequest,
21
- GetAssignableRolesForResourceResponse,
22
20
  GetObjectPermissionsRequest,
23
- GetPermissionLevelsRequest,
24
- GetPermissionLevelsRequest_Response,
25
21
  GetRuleSetRequest,
26
- GetWorkspacePermissionAssignmentsRequest,
27
- GetWorkspacePermissionAssignmentsRequest_Response,
28
22
  GrantRule,
23
+ ListAssignableRolesForResourceRequest,
24
+ ListAssignableRolesForResourceResponse,
25
+ ListPermissionLevelsRequest,
26
+ ListPermissionLevelsRequest_Response,
27
+ ListWorkspacePermissionAssignmentsRequest,
28
+ ListWorkspacePermissionAssignmentsRequest_Response,
29
29
  ListWorkspacePermissionsRequest,
30
30
  ListWorkspacePermissionsRequest_Response,
31
31
  Permission,