@databricks/sdk-uc-credentials 0.1.0-dev.1 → 0.1.0-dev.3

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';
@@ -20,32 +19,32 @@ import pkgJson from '../../package.json' with {type: 'json'};
20
19
  import {z} from 'zod';
21
20
  import type {
22
21
  AccountsCreateStorageCredentialRequest,
23
- AccountsCreateStorageCredentialRequest_Response,
22
+ AccountsCreateStorageCredentialResponse,
24
23
  AccountsDeleteStorageCredentialRequest,
25
- AccountsDeleteStorageCredentialRequest_Response,
24
+ AccountsDeleteStorageCredentialResponse,
26
25
  AccountsGetStorageCredentialRequest,
27
- AccountsGetStorageCredentialRequest_Response,
26
+ AccountsGetStorageCredentialResponse,
28
27
  AccountsListStorageCredentialsRequest,
29
- AccountsListStorageCredentialsRequest_Response,
28
+ AccountsListStorageCredentialsResponse,
30
29
  AccountsUpdateStorageCredentialRequest,
31
- AccountsUpdateStorageCredentialRequest_Response,
30
+ AccountsUpdateStorageCredentialResponse,
32
31
  CreateCredentialRequest,
33
32
  CreateCredentialsRequest,
34
33
  CreateStorageCredentialRequest,
35
34
  CredentialInfo,
36
35
  Credentials,
37
36
  DeleteCredentialRequest,
38
- DeleteCredentialRequest_Response,
37
+ DeleteCredentialResponse,
39
38
  DeleteCredentialsRequest,
40
39
  DeleteStorageCredentialRequest,
41
- DeleteStorageCredentialRequest_Response,
40
+ DeleteStorageCredentialResponse,
42
41
  GenerateTemporaryPathCredentialRequest,
43
- GenerateTemporaryPathCredentialRequest_Response,
42
+ GenerateTemporaryPathCredentialResponse,
44
43
  GenerateTemporaryServiceCredentialRequest,
45
44
  GenerateTemporaryTableCredentialRequest,
46
- GenerateTemporaryTableCredentialRequest_Response,
45
+ GenerateTemporaryTableCredentialResponse,
47
46
  GenerateTemporaryVolumeCredentialRequest,
48
- GenerateTemporaryVolumeCredentialRequest_Response,
47
+ GenerateTemporaryVolumeCredentialResponse,
49
48
  GetCredentialRequest,
50
49
  GetCredentialsRequest,
51
50
  GetStorageCredentialRequest,
@@ -54,15 +53,15 @@ import type {
54
53
  ListCredentialsRequest_Response,
55
54
  ListCredentialsResponse,
56
55
  ListStorageCredentialsRequest,
57
- ListStorageCredentialsRequest_Response,
56
+ ListStorageCredentialsResponse,
58
57
  StorageCredentialInfo,
59
58
  TemporaryCredentials,
60
59
  UpdateCredentialRequest,
61
60
  UpdateStorageCredentialRequest,
62
61
  ValidateCredentialRequest,
63
- ValidateCredentialRequest_Response,
62
+ ValidateCredentialResponse,
64
63
  ValidateStorageCredentialRequest,
65
- ValidateStorageCredentialRequest_Response,
64
+ ValidateStorageCredentialResponse,
66
65
  } from './model';
67
66
  import {
68
67
  marshalAccountsCreateStorageCredentialRequestSchema,
@@ -78,23 +77,23 @@ import {
78
77
  marshalUpdateStorageCredentialRequestSchema,
79
78
  marshalValidateCredentialRequestSchema,
80
79
  marshalValidateStorageCredentialRequestSchema,
81
- unmarshalAccountsCreateStorageCredentialRequest_ResponseSchema,
82
- unmarshalAccountsDeleteStorageCredentialRequest_ResponseSchema,
83
- unmarshalAccountsGetStorageCredentialRequest_ResponseSchema,
84
- unmarshalAccountsListStorageCredentialsRequest_ResponseSchema,
85
- unmarshalAccountsUpdateStorageCredentialRequest_ResponseSchema,
80
+ unmarshalAccountsCreateStorageCredentialResponseSchema,
81
+ unmarshalAccountsDeleteStorageCredentialResponseSchema,
82
+ unmarshalAccountsGetStorageCredentialResponseSchema,
83
+ unmarshalAccountsListStorageCredentialsResponseSchema,
84
+ unmarshalAccountsUpdateStorageCredentialResponseSchema,
86
85
  unmarshalCredentialsSchema,
87
- unmarshalDeleteCredentialRequest_ResponseSchema,
88
- unmarshalDeleteStorageCredentialRequest_ResponseSchema,
89
- unmarshalGenerateTemporaryPathCredentialRequest_ResponseSchema,
90
- unmarshalGenerateTemporaryTableCredentialRequest_ResponseSchema,
91
- unmarshalGenerateTemporaryVolumeCredentialRequest_ResponseSchema,
86
+ unmarshalDeleteCredentialResponseSchema,
87
+ unmarshalDeleteStorageCredentialResponseSchema,
88
+ unmarshalGenerateTemporaryPathCredentialResponseSchema,
89
+ unmarshalGenerateTemporaryTableCredentialResponseSchema,
90
+ unmarshalGenerateTemporaryVolumeCredentialResponseSchema,
92
91
  unmarshalListCredentialsRequest_ResponseSchema,
93
- unmarshalListStorageCredentialsRequest_ResponseSchema,
92
+ unmarshalListStorageCredentialsResponseSchema,
94
93
  unmarshalStorageCredentialInfoSchema,
95
94
  unmarshalTemporaryCredentialsSchema,
96
- unmarshalValidateCredentialRequest_ResponseSchema,
97
- unmarshalValidateStorageCredentialRequest_ResponseSchema,
95
+ unmarshalValidateCredentialResponseSchema,
96
+ unmarshalValidateStorageCredentialResponseSchema,
98
97
  } from './model';
99
98
 
100
99
  // Package identity segment for this client to be used in the User-Agent header.
@@ -146,14 +145,14 @@ export class CredentialsClient {
146
145
  async createAccountsStorageCredential(
147
146
  req: AccountsCreateStorageCredentialRequest,
148
147
  options?: CallOptions
149
- ): Promise<AccountsCreateStorageCredentialRequest_Response> {
148
+ ): Promise<AccountsCreateStorageCredentialResponse> {
150
149
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}/storage-credentials`;
151
150
  const body = marshalRequest(
152
151
  req,
153
152
  marshalAccountsCreateStorageCredentialRequestSchema
154
153
  );
155
- let resp: AccountsCreateStorageCredentialRequest_Response | undefined;
156
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
154
+ let resp: AccountsCreateStorageCredentialResponse | undefined;
155
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
157
156
  const headers = new Headers({'Content-Type': 'application/json'});
158
157
  headers.set('User-Agent', this.userAgent);
159
158
  const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
@@ -164,12 +163,12 @@ export class CredentialsClient {
164
163
  });
165
164
  resp = parseResponse(
166
165
  respBody,
167
- unmarshalAccountsCreateStorageCredentialRequest_ResponseSchema
166
+ unmarshalAccountsCreateStorageCredentialResponseSchema
168
167
  );
169
168
  };
170
169
  await executeCall(call, options);
171
170
  if (resp === undefined) {
172
- throw new Error('API call completed without a result.');
171
+ throw new Error('operation completed without a result.');
173
172
  }
174
173
  return resp;
175
174
  }
@@ -178,7 +177,7 @@ export class CredentialsClient {
178
177
  async deleteAccountsStorageCredential(
179
178
  req: AccountsDeleteStorageCredentialRequest,
180
179
  options?: CallOptions
181
- ): Promise<AccountsDeleteStorageCredentialRequest_Response> {
180
+ ): Promise<AccountsDeleteStorageCredentialResponse> {
182
181
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}/storage-credentials/${req.nameArg ?? ''}`;
183
182
  const params = new URLSearchParams();
184
183
  if (req.force !== undefined) {
@@ -186,8 +185,8 @@ export class CredentialsClient {
186
185
  }
187
186
  const query = params.toString();
188
187
  const fullUrl = query !== '' ? `${url}?${query}` : url;
189
- let resp: AccountsDeleteStorageCredentialRequest_Response | undefined;
190
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
188
+ let resp: AccountsDeleteStorageCredentialResponse | undefined;
189
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
191
190
  const headers = new Headers();
192
191
  headers.set('User-Agent', this.userAgent);
193
192
  const httpReq = buildHttpRequest('DELETE', fullUrl, headers, callSignal);
@@ -198,12 +197,12 @@ export class CredentialsClient {
198
197
  });
199
198
  resp = parseResponse(
200
199
  respBody,
201
- unmarshalAccountsDeleteStorageCredentialRequest_ResponseSchema
200
+ unmarshalAccountsDeleteStorageCredentialResponseSchema
202
201
  );
203
202
  };
204
203
  await executeCall(call, options);
205
204
  if (resp === undefined) {
206
- throw new Error('API call completed without a result.');
205
+ throw new Error('operation completed without a result.');
207
206
  }
208
207
  return resp;
209
208
  }
@@ -215,10 +214,10 @@ export class CredentialsClient {
215
214
  async getAccountsStorageCredential(
216
215
  req: AccountsGetStorageCredentialRequest,
217
216
  options?: CallOptions
218
- ): Promise<AccountsGetStorageCredentialRequest_Response> {
217
+ ): Promise<AccountsGetStorageCredentialResponse> {
219
218
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}/storage-credentials/${req.nameArg ?? ''}`;
220
- let resp: AccountsGetStorageCredentialRequest_Response | undefined;
221
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
219
+ let resp: AccountsGetStorageCredentialResponse | undefined;
220
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
222
221
  const headers = new Headers();
223
222
  headers.set('User-Agent', this.userAgent);
224
223
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
@@ -229,12 +228,12 @@ export class CredentialsClient {
229
228
  });
230
229
  resp = parseResponse(
231
230
  respBody,
232
- unmarshalAccountsGetStorageCredentialRequest_ResponseSchema
231
+ unmarshalAccountsGetStorageCredentialResponseSchema
233
232
  );
234
233
  };
235
234
  await executeCall(call, options);
236
235
  if (resp === undefined) {
237
- throw new Error('API call completed without a result.');
236
+ throw new Error('operation completed without a result.');
238
237
  }
239
238
  return resp;
240
239
  }
@@ -243,10 +242,10 @@ export class CredentialsClient {
243
242
  async listAccountsStorageCredentials(
244
243
  req: AccountsListStorageCredentialsRequest,
245
244
  options?: CallOptions
246
- ): Promise<AccountsListStorageCredentialsRequest_Response> {
245
+ ): Promise<AccountsListStorageCredentialsResponse> {
247
246
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}/storage-credentials`;
248
- let resp: AccountsListStorageCredentialsRequest_Response | undefined;
249
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
247
+ let resp: AccountsListStorageCredentialsResponse | undefined;
248
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
250
249
  const headers = new Headers();
251
250
  headers.set('User-Agent', this.userAgent);
252
251
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
@@ -257,12 +256,12 @@ export class CredentialsClient {
257
256
  });
258
257
  resp = parseResponse(
259
258
  respBody,
260
- unmarshalAccountsListStorageCredentialsRequest_ResponseSchema
259
+ unmarshalAccountsListStorageCredentialsResponseSchema
261
260
  );
262
261
  };
263
262
  await executeCall(call, options);
264
263
  if (resp === undefined) {
265
- throw new Error('API call completed without a result.');
264
+ throw new Error('operation completed without a result.');
266
265
  }
267
266
  return resp;
268
267
  }
@@ -274,14 +273,14 @@ export class CredentialsClient {
274
273
  async updateAccountsStorageCredential(
275
274
  req: AccountsUpdateStorageCredentialRequest,
276
275
  options?: CallOptions
277
- ): Promise<AccountsUpdateStorageCredentialRequest_Response> {
276
+ ): Promise<AccountsUpdateStorageCredentialResponse> {
278
277
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}/storage-credentials/${req.nameArg ?? ''}`;
279
278
  const body = marshalRequest(
280
279
  req,
281
280
  marshalAccountsUpdateStorageCredentialRequestSchema
282
281
  );
283
- let resp: AccountsUpdateStorageCredentialRequest_Response | undefined;
284
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
282
+ let resp: AccountsUpdateStorageCredentialResponse | undefined;
283
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
285
284
  const headers = new Headers({'Content-Type': 'application/json'});
286
285
  headers.set('User-Agent', this.userAgent);
287
286
  const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
@@ -292,12 +291,12 @@ export class CredentialsClient {
292
291
  });
293
292
  resp = parseResponse(
294
293
  respBody,
295
- unmarshalAccountsUpdateStorageCredentialRequest_ResponseSchema
294
+ unmarshalAccountsUpdateStorageCredentialResponseSchema
296
295
  );
297
296
  };
298
297
  await executeCall(call, options);
299
298
  if (resp === undefined) {
300
- throw new Error('API call completed without a result.');
299
+ throw new Error('operation completed without a result.');
301
300
  }
302
301
  return resp;
303
302
  }
@@ -316,7 +315,7 @@ export class CredentialsClient {
316
315
  const url = `${this.host}/api/2.1/unity-catalog/credentials`;
317
316
  const body = marshalRequest(req, marshalCreateCredentialRequestSchema);
318
317
  let resp: StorageCredentialInfo | undefined;
319
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
318
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
320
319
  const headers = new Headers({'Content-Type': 'application/json'});
321
320
  if (this.workspaceId !== undefined) {
322
321
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -332,7 +331,7 @@ export class CredentialsClient {
332
331
  };
333
332
  await executeCall(call, options);
334
333
  if (resp === undefined) {
335
- throw new Error('API call completed without a result.');
334
+ throw new Error('operation completed without a result.');
336
335
  }
337
336
  return resp;
338
337
  }
@@ -352,7 +351,7 @@ export class CredentialsClient {
352
351
  marshalCreateStorageCredentialRequestSchema
353
352
  );
354
353
  let resp: StorageCredentialInfo | undefined;
355
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
354
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
356
355
  const headers = new Headers({'Content-Type': 'application/json'});
357
356
  if (this.workspaceId !== undefined) {
358
357
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -368,7 +367,7 @@ export class CredentialsClient {
368
367
  };
369
368
  await executeCall(call, options);
370
369
  if (resp === undefined) {
371
- throw new Error('API call completed without a result.');
370
+ throw new Error('operation completed without a result.');
372
371
  }
373
372
  return resp;
374
373
  }
@@ -377,7 +376,7 @@ export class CredentialsClient {
377
376
  async deleteCredential(
378
377
  req: DeleteCredentialRequest,
379
378
  options?: CallOptions
380
- ): Promise<DeleteCredentialRequest_Response> {
379
+ ): Promise<DeleteCredentialResponse> {
381
380
  const url = `${this.host}/api/2.1/unity-catalog/credentials/${req.nameArg ?? ''}`;
382
381
  const params = new URLSearchParams();
383
382
  if (req.force !== undefined) {
@@ -385,8 +384,8 @@ export class CredentialsClient {
385
384
  }
386
385
  const query = params.toString();
387
386
  const fullUrl = query !== '' ? `${url}?${query}` : url;
388
- let resp: DeleteCredentialRequest_Response | undefined;
389
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
387
+ let resp: DeleteCredentialResponse | undefined;
388
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
390
389
  const headers = new Headers();
391
390
  if (this.workspaceId !== undefined) {
392
391
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -398,14 +397,11 @@ export class CredentialsClient {
398
397
  httpClient: this.httpClient,
399
398
  logger: this.logger,
400
399
  });
401
- resp = parseResponse(
402
- respBody,
403
- unmarshalDeleteCredentialRequest_ResponseSchema
404
- );
400
+ resp = parseResponse(respBody, unmarshalDeleteCredentialResponseSchema);
405
401
  };
406
402
  await executeCall(call, options);
407
403
  if (resp === undefined) {
408
- throw new Error('API call completed without a result.');
404
+ throw new Error('operation completed without a result.');
409
405
  }
410
406
  return resp;
411
407
  }
@@ -414,7 +410,7 @@ export class CredentialsClient {
414
410
  async deleteStorageCredential(
415
411
  req: DeleteStorageCredentialRequest,
416
412
  options?: CallOptions
417
- ): Promise<DeleteStorageCredentialRequest_Response> {
413
+ ): Promise<DeleteStorageCredentialResponse> {
418
414
  const url = `${this.host}/api/2.1/unity-catalog/storage-credentials/${req.nameArg ?? ''}`;
419
415
  const params = new URLSearchParams();
420
416
  if (req.force !== undefined) {
@@ -422,8 +418,8 @@ export class CredentialsClient {
422
418
  }
423
419
  const query = params.toString();
424
420
  const fullUrl = query !== '' ? `${url}?${query}` : url;
425
- let resp: DeleteStorageCredentialRequest_Response | undefined;
426
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
421
+ let resp: DeleteStorageCredentialResponse | undefined;
422
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
427
423
  const headers = new Headers();
428
424
  if (this.workspaceId !== undefined) {
429
425
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -437,12 +433,12 @@ export class CredentialsClient {
437
433
  });
438
434
  resp = parseResponse(
439
435
  respBody,
440
- unmarshalDeleteStorageCredentialRequest_ResponseSchema
436
+ unmarshalDeleteStorageCredentialResponseSchema
441
437
  );
442
438
  };
443
439
  await executeCall(call, options);
444
440
  if (resp === undefined) {
445
- throw new Error('API call completed without a result.');
441
+ throw new Error('operation completed without a result.');
446
442
  }
447
443
  return resp;
448
444
  }
@@ -460,14 +456,14 @@ export class CredentialsClient {
460
456
  async generateTemporaryPathCredential(
461
457
  req: GenerateTemporaryPathCredentialRequest,
462
458
  options?: CallOptions
463
- ): Promise<GenerateTemporaryPathCredentialRequest_Response> {
459
+ ): Promise<GenerateTemporaryPathCredentialResponse> {
464
460
  const url = `${this.host}/api/2.0/unity-catalog/temporary-path-credentials`;
465
461
  const body = marshalRequest(
466
462
  req,
467
463
  marshalGenerateTemporaryPathCredentialRequestSchema
468
464
  );
469
- let resp: GenerateTemporaryPathCredentialRequest_Response | undefined;
470
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
465
+ let resp: GenerateTemporaryPathCredentialResponse | undefined;
466
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
471
467
  const headers = new Headers({'Content-Type': 'application/json'});
472
468
  if (this.workspaceId !== undefined) {
473
469
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -481,12 +477,12 @@ export class CredentialsClient {
481
477
  });
482
478
  resp = parseResponse(
483
479
  respBody,
484
- unmarshalGenerateTemporaryPathCredentialRequest_ResponseSchema
480
+ unmarshalGenerateTemporaryPathCredentialResponseSchema
485
481
  );
486
482
  };
487
483
  await executeCall(call, options);
488
484
  if (resp === undefined) {
489
- throw new Error('API call completed without a result.');
485
+ throw new Error('operation completed without a result.');
490
486
  }
491
487
  return resp;
492
488
  }
@@ -505,7 +501,7 @@ export class CredentialsClient {
505
501
  marshalGenerateTemporaryServiceCredentialRequestSchema
506
502
  );
507
503
  let resp: TemporaryCredentials | undefined;
508
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
504
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
509
505
  const headers = new Headers({'Content-Type': 'application/json'});
510
506
  if (this.workspaceId !== undefined) {
511
507
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -521,7 +517,7 @@ export class CredentialsClient {
521
517
  };
522
518
  await executeCall(call, options);
523
519
  if (resp === undefined) {
524
- throw new Error('API call completed without a result.');
520
+ throw new Error('operation completed without a result.');
525
521
  }
526
522
  return resp;
527
523
  }
@@ -535,14 +531,14 @@ export class CredentialsClient {
535
531
  async generateTemporaryTableCredential(
536
532
  req: GenerateTemporaryTableCredentialRequest,
537
533
  options?: CallOptions
538
- ): Promise<GenerateTemporaryTableCredentialRequest_Response> {
534
+ ): Promise<GenerateTemporaryTableCredentialResponse> {
539
535
  const url = `${this.host}/api/2.0/unity-catalog/temporary-table-credentials`;
540
536
  const body = marshalRequest(
541
537
  req,
542
538
  marshalGenerateTemporaryTableCredentialRequestSchema
543
539
  );
544
- let resp: GenerateTemporaryTableCredentialRequest_Response | undefined;
545
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
540
+ let resp: GenerateTemporaryTableCredentialResponse | undefined;
541
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
546
542
  const headers = new Headers({'Content-Type': 'application/json'});
547
543
  if (this.workspaceId !== undefined) {
548
544
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -556,12 +552,12 @@ export class CredentialsClient {
556
552
  });
557
553
  resp = parseResponse(
558
554
  respBody,
559
- unmarshalGenerateTemporaryTableCredentialRequest_ResponseSchema
555
+ unmarshalGenerateTemporaryTableCredentialResponseSchema
560
556
  );
561
557
  };
562
558
  await executeCall(call, options);
563
559
  if (resp === undefined) {
564
- throw new Error('API call completed without a result.');
560
+ throw new Error('operation completed without a result.');
565
561
  }
566
562
  return resp;
567
563
  }
@@ -575,14 +571,14 @@ export class CredentialsClient {
575
571
  async generateTemporaryVolumeCredential(
576
572
  req: GenerateTemporaryVolumeCredentialRequest,
577
573
  options?: CallOptions
578
- ): Promise<GenerateTemporaryVolumeCredentialRequest_Response> {
574
+ ): Promise<GenerateTemporaryVolumeCredentialResponse> {
579
575
  const url = `${this.host}/api/2.0/unity-catalog/temporary-volume-credentials`;
580
576
  const body = marshalRequest(
581
577
  req,
582
578
  marshalGenerateTemporaryVolumeCredentialRequestSchema
583
579
  );
584
- let resp: GenerateTemporaryVolumeCredentialRequest_Response | undefined;
585
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
580
+ let resp: GenerateTemporaryVolumeCredentialResponse | undefined;
581
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
586
582
  const headers = new Headers({'Content-Type': 'application/json'});
587
583
  if (this.workspaceId !== undefined) {
588
584
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -596,12 +592,12 @@ export class CredentialsClient {
596
592
  });
597
593
  resp = parseResponse(
598
594
  respBody,
599
- unmarshalGenerateTemporaryVolumeCredentialRequest_ResponseSchema
595
+ unmarshalGenerateTemporaryVolumeCredentialResponseSchema
600
596
  );
601
597
  };
602
598
  await executeCall(call, options);
603
599
  if (resp === undefined) {
604
- throw new Error('API call completed without a result.');
600
+ throw new Error('operation completed without a result.');
605
601
  }
606
602
  return resp;
607
603
  }
@@ -616,7 +612,7 @@ export class CredentialsClient {
616
612
  ): Promise<StorageCredentialInfo> {
617
613
  const url = `${this.host}/api/2.1/unity-catalog/credentials/${req.nameArg ?? ''}`;
618
614
  let resp: StorageCredentialInfo | undefined;
619
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
615
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
620
616
  const headers = new Headers();
621
617
  if (this.workspaceId !== undefined) {
622
618
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -632,7 +628,7 @@ export class CredentialsClient {
632
628
  };
633
629
  await executeCall(call, options);
634
630
  if (resp === undefined) {
635
- throw new Error('API call completed without a result.');
631
+ throw new Error('operation completed without a result.');
636
632
  }
637
633
  return resp;
638
634
  }
@@ -647,7 +643,7 @@ export class CredentialsClient {
647
643
  ): Promise<StorageCredentialInfo> {
648
644
  const url = `${this.host}/api/2.1/unity-catalog/storage-credentials/${req.nameArg ?? ''}`;
649
645
  let resp: StorageCredentialInfo | undefined;
650
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
646
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
651
647
  const headers = new Headers();
652
648
  if (this.workspaceId !== undefined) {
653
649
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -663,7 +659,7 @@ export class CredentialsClient {
663
659
  };
664
660
  await executeCall(call, options);
665
661
  if (resp === undefined) {
666
- throw new Error('API call completed without a result.');
662
+ throw new Error('operation completed without a result.');
667
663
  }
668
664
  return resp;
669
665
  }
@@ -696,7 +692,7 @@ export class CredentialsClient {
696
692
  const query = params.toString();
697
693
  const fullUrl = query !== '' ? `${url}?${query}` : url;
698
694
  let resp: ListCredentialsRequest_Response | undefined;
699
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
695
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
700
696
  const headers = new Headers();
701
697
  if (this.workspaceId !== undefined) {
702
698
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -715,7 +711,7 @@ export class CredentialsClient {
715
711
  };
716
712
  await executeCall(call, options);
717
713
  if (resp === undefined) {
718
- throw new Error('API call completed without a result.');
714
+ throw new Error('operation completed without a result.');
719
715
  }
720
716
  return resp;
721
717
  }
@@ -751,7 +747,7 @@ export class CredentialsClient {
751
747
  async listStorageCredentials(
752
748
  req: ListStorageCredentialsRequest,
753
749
  options?: CallOptions
754
- ): Promise<ListStorageCredentialsRequest_Response> {
750
+ ): Promise<ListStorageCredentialsResponse> {
755
751
  const url = `${this.host}/api/2.1/unity-catalog/storage-credentials`;
756
752
  const params = new URLSearchParams();
757
753
  if (req.includeUnbound !== undefined) {
@@ -765,8 +761,8 @@ export class CredentialsClient {
765
761
  }
766
762
  const query = params.toString();
767
763
  const fullUrl = query !== '' ? `${url}?${query}` : url;
768
- let resp: ListStorageCredentialsRequest_Response | undefined;
769
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
764
+ let resp: ListStorageCredentialsResponse | undefined;
765
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
770
766
  const headers = new Headers();
771
767
  if (this.workspaceId !== undefined) {
772
768
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -780,12 +776,12 @@ export class CredentialsClient {
780
776
  });
781
777
  resp = parseResponse(
782
778
  respBody,
783
- unmarshalListStorageCredentialsRequest_ResponseSchema
779
+ unmarshalListStorageCredentialsResponseSchema
784
780
  );
785
781
  };
786
782
  await executeCall(call, options);
787
783
  if (resp === undefined) {
788
- throw new Error('API call completed without a result.');
784
+ throw new Error('operation completed without a result.');
789
785
  }
790
786
  return resp;
791
787
  }
@@ -820,7 +816,7 @@ export class CredentialsClient {
820
816
  const url = `${this.host}/api/2.1/unity-catalog/credentials/${req.nameArg ?? ''}`;
821
817
  const body = marshalRequest(req, marshalUpdateCredentialRequestSchema);
822
818
  let resp: StorageCredentialInfo | undefined;
823
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
819
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
824
820
  const headers = new Headers({'Content-Type': 'application/json'});
825
821
  if (this.workspaceId !== undefined) {
826
822
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -836,7 +832,7 @@ export class CredentialsClient {
836
832
  };
837
833
  await executeCall(call, options);
838
834
  if (resp === undefined) {
839
- throw new Error('API call completed without a result.');
835
+ throw new Error('operation completed without a result.');
840
836
  }
841
837
  return resp;
842
838
  }
@@ -857,7 +853,7 @@ export class CredentialsClient {
857
853
  marshalUpdateStorageCredentialRequestSchema
858
854
  );
859
855
  let resp: StorageCredentialInfo | undefined;
860
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
856
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
861
857
  const headers = new Headers({'Content-Type': 'application/json'});
862
858
  if (this.workspaceId !== undefined) {
863
859
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -873,7 +869,7 @@ export class CredentialsClient {
873
869
  };
874
870
  await executeCall(call, options);
875
871
  if (resp === undefined) {
876
- throw new Error('API call completed without a result.');
872
+ throw new Error('operation completed without a result.');
877
873
  }
878
874
  return resp;
879
875
  }
@@ -895,11 +891,11 @@ export class CredentialsClient {
895
891
  async validateCredential(
896
892
  req: ValidateCredentialRequest,
897
893
  options?: CallOptions
898
- ): Promise<ValidateCredentialRequest_Response> {
894
+ ): Promise<ValidateCredentialResponse> {
899
895
  const url = `${this.host}/api/2.1/unity-catalog/validate-credentials`;
900
896
  const body = marshalRequest(req, marshalValidateCredentialRequestSchema);
901
- let resp: ValidateCredentialRequest_Response | undefined;
902
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
897
+ let resp: ValidateCredentialResponse | undefined;
898
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
903
899
  const headers = new Headers({'Content-Type': 'application/json'});
904
900
  if (this.workspaceId !== undefined) {
905
901
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -911,14 +907,11 @@ export class CredentialsClient {
911
907
  httpClient: this.httpClient,
912
908
  logger: this.logger,
913
909
  });
914
- resp = parseResponse(
915
- respBody,
916
- unmarshalValidateCredentialRequest_ResponseSchema
917
- );
910
+ resp = parseResponse(respBody, unmarshalValidateCredentialResponseSchema);
918
911
  };
919
912
  await executeCall(call, options);
920
913
  if (resp === undefined) {
921
- throw new Error('API call completed without a result.');
914
+ throw new Error('operation completed without a result.');
922
915
  }
923
916
  return resp;
924
917
  }
@@ -937,14 +930,14 @@ export class CredentialsClient {
937
930
  async validateStorageCredential(
938
931
  req: ValidateStorageCredentialRequest,
939
932
  options?: CallOptions
940
- ): Promise<ValidateStorageCredentialRequest_Response> {
933
+ ): Promise<ValidateStorageCredentialResponse> {
941
934
  const url = `${this.host}/api/2.1/unity-catalog/validate-storage-credentials`;
942
935
  const body = marshalRequest(
943
936
  req,
944
937
  marshalValidateStorageCredentialRequestSchema
945
938
  );
946
- let resp: ValidateStorageCredentialRequest_Response | undefined;
947
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
939
+ let resp: ValidateStorageCredentialResponse | undefined;
940
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
948
941
  const headers = new Headers({'Content-Type': 'application/json'});
949
942
  if (this.workspaceId !== undefined) {
950
943
  headers.set('X-Databricks-Org-Id', this.workspaceId);
@@ -958,12 +951,12 @@ export class CredentialsClient {
958
951
  });
959
952
  resp = parseResponse(
960
953
  respBody,
961
- unmarshalValidateStorageCredentialRequest_ResponseSchema
954
+ unmarshalValidateStorageCredentialResponseSchema
962
955
  );
963
956
  };
964
957
  await executeCall(call, options);
965
958
  if (resp === undefined) {
966
- throw new Error('API call completed without a result.');
959
+ throw new Error('operation completed without a result.');
967
960
  }
968
961
  return resp;
969
962
  }
@@ -982,7 +975,7 @@ export class CredentialsClient {
982
975
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/credentials`;
983
976
  const body = marshalRequest(req, marshalCreateCredentialsRequestSchema);
984
977
  let resp: Credentials | undefined;
985
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
978
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
986
979
  const headers = new Headers({'Content-Type': 'application/json'});
987
980
  headers.set('User-Agent', this.userAgent);
988
981
  const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
@@ -995,7 +988,7 @@ export class CredentialsClient {
995
988
  };
996
989
  await executeCall(call, options);
997
990
  if (resp === undefined) {
998
- throw new Error('API call completed without a result.');
991
+ throw new Error('operation completed without a result.');
999
992
  }
1000
993
  return resp;
1001
994
  }
@@ -1007,7 +1000,7 @@ export class CredentialsClient {
1007
1000
  ): Promise<Credentials> {
1008
1001
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/credentials/${req.credentialsId ?? ''}`;
1009
1002
  let resp: Credentials | undefined;
1010
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1003
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1011
1004
  const headers = new Headers();
1012
1005
  headers.set('User-Agent', this.userAgent);
1013
1006
  const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
@@ -1020,7 +1013,7 @@ export class CredentialsClient {
1020
1013
  };
1021
1014
  await executeCall(call, options);
1022
1015
  if (resp === undefined) {
1023
- throw new Error('API call completed without a result.');
1016
+ throw new Error('operation completed without a result.');
1024
1017
  }
1025
1018
  return resp;
1026
1019
  }
@@ -1032,7 +1025,7 @@ export class CredentialsClient {
1032
1025
  ): Promise<Credentials> {
1033
1026
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/credentials/${req.credentialsId ?? ''}`;
1034
1027
  let resp: Credentials | undefined;
1035
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1028
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1036
1029
  const headers = new Headers();
1037
1030
  headers.set('User-Agent', this.userAgent);
1038
1031
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
@@ -1045,7 +1038,7 @@ export class CredentialsClient {
1045
1038
  };
1046
1039
  await executeCall(call, options);
1047
1040
  if (resp === undefined) {
1048
- throw new Error('API call completed without a result.');
1041
+ throw new Error('operation completed without a result.');
1049
1042
  }
1050
1043
  return resp;
1051
1044
  }
@@ -1057,7 +1050,7 @@ export class CredentialsClient {
1057
1050
  ): Promise<ListCredentialsResponse> {
1058
1051
  const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/credentials`;
1059
1052
  let resp: ListCredentialsResponse | undefined;
1060
- const call: Call = async (callSignal?: AbortSignal): Promise<void> => {
1053
+ const call = async (callSignal?: AbortSignal): Promise<void> => {
1061
1054
  const headers = new Headers();
1062
1055
  headers.set('User-Agent', this.userAgent);
1063
1056
  const httpReq = buildHttpRequest('GET', url, headers, callSignal);
@@ -1075,7 +1068,7 @@ export class CredentialsClient {
1075
1068
  };
1076
1069
  await executeCall(call, options);
1077
1070
  if (resp === undefined) {
1078
- throw new Error('API call completed without a result.');
1071
+ throw new Error('operation completed without a result.');
1079
1072
  }
1080
1073
  return resp;
1081
1074
  }