@databricks/sdk-uc-metastores 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/dist/v1/client.d.ts +17 -17
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +37 -37
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +1 -1
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/model.d.ts +32 -32
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +16 -32
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/utils.d.ts +1 -2
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +1 -1
- package/dist/v1/utils.js.map +1 -1
- package/package.json +6 -5
- package/src/v1/client.ts +120 -127
- package/src/v1/index.ts +16 -16
- package/src/v1/model.ts +40 -64
- package/src/v1/utils.ts +3 -3
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';
|
|
@@ -19,42 +18,42 @@ import {
|
|
|
19
18
|
import pkgJson from '../../package.json' with {type: 'json'};
|
|
20
19
|
import type {
|
|
21
20
|
AccountsCreateMetastoreAssignmentRequest,
|
|
22
|
-
|
|
21
|
+
AccountsCreateMetastoreAssignmentResponse,
|
|
23
22
|
AccountsCreateMetastoreRequest,
|
|
24
|
-
|
|
23
|
+
AccountsCreateMetastoreResponse,
|
|
25
24
|
AccountsDeleteMetastoreAssignmentRequest,
|
|
26
|
-
|
|
25
|
+
AccountsDeleteMetastoreAssignmentResponse,
|
|
27
26
|
AccountsDeleteMetastoreRequest,
|
|
28
|
-
|
|
27
|
+
AccountsDeleteMetastoreResponse,
|
|
29
28
|
AccountsGetMetastoreAssignmentRequest,
|
|
30
|
-
|
|
29
|
+
AccountsGetMetastoreAssignmentResponse,
|
|
31
30
|
AccountsGetMetastoreRequest,
|
|
32
|
-
|
|
31
|
+
AccountsGetMetastoreResponse,
|
|
33
32
|
AccountsListMetastoresRequest,
|
|
34
|
-
|
|
33
|
+
AccountsListMetastoresResponse,
|
|
35
34
|
AccountsListWorkspaceIdsForMetastoreRequest,
|
|
36
|
-
|
|
35
|
+
AccountsListWorkspaceIdsForMetastoreResponse,
|
|
37
36
|
AccountsUpdateMetastoreAssignmentRequest,
|
|
38
|
-
|
|
37
|
+
AccountsUpdateMetastoreAssignmentResponse,
|
|
39
38
|
AccountsUpdateMetastoreRequest,
|
|
40
|
-
|
|
39
|
+
AccountsUpdateMetastoreResponse,
|
|
41
40
|
CreateMetastoreAssignmentRequest,
|
|
42
|
-
|
|
41
|
+
CreateMetastoreAssignmentResponse,
|
|
43
42
|
CreateMetastoreRequest,
|
|
44
43
|
DeleteMetastoreAssignmentRequest,
|
|
45
|
-
|
|
44
|
+
DeleteMetastoreAssignmentResponse,
|
|
46
45
|
DeleteMetastoreRequest,
|
|
47
|
-
|
|
46
|
+
DeleteMetastoreResponse,
|
|
48
47
|
GetCurrentMetastoreAssignmentRequest,
|
|
49
48
|
GetMetastoreRequest,
|
|
50
49
|
GetMetastoreSummaryRequest,
|
|
51
|
-
|
|
50
|
+
GetMetastoreSummaryResponse,
|
|
52
51
|
ListMetastoresRequest,
|
|
53
|
-
|
|
52
|
+
ListMetastoresResponse,
|
|
54
53
|
MetastoreAssignment,
|
|
55
54
|
MetastoreInfo,
|
|
56
55
|
UpdateMetastoreAssignmentRequest,
|
|
57
|
-
|
|
56
|
+
UpdateMetastoreAssignmentResponse,
|
|
58
57
|
UpdateMetastoreRequest,
|
|
59
58
|
} from './model';
|
|
60
59
|
import {
|
|
@@ -66,24 +65,24 @@ import {
|
|
|
66
65
|
marshalCreateMetastoreRequestSchema,
|
|
67
66
|
marshalUpdateMetastoreAssignmentRequestSchema,
|
|
68
67
|
marshalUpdateMetastoreRequestSchema,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
unmarshalAccountsCreateMetastoreAssignmentResponseSchema,
|
|
69
|
+
unmarshalAccountsCreateMetastoreResponseSchema,
|
|
70
|
+
unmarshalAccountsDeleteMetastoreAssignmentResponseSchema,
|
|
71
|
+
unmarshalAccountsDeleteMetastoreResponseSchema,
|
|
72
|
+
unmarshalAccountsGetMetastoreAssignmentResponseSchema,
|
|
73
|
+
unmarshalAccountsGetMetastoreResponseSchema,
|
|
74
|
+
unmarshalAccountsListMetastoresResponseSchema,
|
|
75
|
+
unmarshalAccountsListWorkspaceIdsForMetastoreResponseSchema,
|
|
76
|
+
unmarshalAccountsUpdateMetastoreAssignmentResponseSchema,
|
|
77
|
+
unmarshalAccountsUpdateMetastoreResponseSchema,
|
|
78
|
+
unmarshalCreateMetastoreAssignmentResponseSchema,
|
|
79
|
+
unmarshalDeleteMetastoreAssignmentResponseSchema,
|
|
80
|
+
unmarshalDeleteMetastoreResponseSchema,
|
|
81
|
+
unmarshalGetMetastoreSummaryResponseSchema,
|
|
82
|
+
unmarshalListMetastoresResponseSchema,
|
|
84
83
|
unmarshalMetastoreAssignmentSchema,
|
|
85
84
|
unmarshalMetastoreInfoSchema,
|
|
86
|
-
|
|
85
|
+
unmarshalUpdateMetastoreAssignmentResponseSchema,
|
|
87
86
|
} from './model';
|
|
88
87
|
|
|
89
88
|
// Package identity segment for this client to be used in the User-Agent header.
|
|
@@ -128,14 +127,14 @@ export class MetastoresClient {
|
|
|
128
127
|
async createAccountsMetastore(
|
|
129
128
|
req: AccountsCreateMetastoreRequest,
|
|
130
129
|
options?: CallOptions
|
|
131
|
-
): Promise<
|
|
130
|
+
): Promise<AccountsCreateMetastoreResponse> {
|
|
132
131
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores`;
|
|
133
132
|
const body = marshalRequest(
|
|
134
133
|
req,
|
|
135
134
|
marshalAccountsCreateMetastoreRequestSchema
|
|
136
135
|
);
|
|
137
|
-
let resp:
|
|
138
|
-
const call
|
|
136
|
+
let resp: AccountsCreateMetastoreResponse | undefined;
|
|
137
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
139
138
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
140
139
|
headers.set('User-Agent', this.userAgent);
|
|
141
140
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
@@ -146,12 +145,12 @@ export class MetastoresClient {
|
|
|
146
145
|
});
|
|
147
146
|
resp = parseResponse(
|
|
148
147
|
respBody,
|
|
149
|
-
|
|
148
|
+
unmarshalAccountsCreateMetastoreResponseSchema
|
|
150
149
|
);
|
|
151
150
|
};
|
|
152
151
|
await executeCall(call, options);
|
|
153
152
|
if (resp === undefined) {
|
|
154
|
-
throw new Error('
|
|
153
|
+
throw new Error('operation completed without a result.');
|
|
155
154
|
}
|
|
156
155
|
return resp;
|
|
157
156
|
}
|
|
@@ -160,14 +159,14 @@ export class MetastoresClient {
|
|
|
160
159
|
async createAccountsMetastoreAssignment(
|
|
161
160
|
req: AccountsCreateMetastoreAssignmentRequest,
|
|
162
161
|
options?: CallOptions
|
|
163
|
-
): Promise<
|
|
162
|
+
): Promise<AccountsCreateMetastoreAssignmentResponse> {
|
|
164
163
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/metastores/${req.metastoreId ?? ''}`;
|
|
165
164
|
const body = marshalRequest(
|
|
166
165
|
req,
|
|
167
166
|
marshalAccountsCreateMetastoreAssignmentRequestSchema
|
|
168
167
|
);
|
|
169
|
-
let resp:
|
|
170
|
-
const call
|
|
168
|
+
let resp: AccountsCreateMetastoreAssignmentResponse | undefined;
|
|
169
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
171
170
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
172
171
|
headers.set('User-Agent', this.userAgent);
|
|
173
172
|
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
@@ -178,12 +177,12 @@ export class MetastoresClient {
|
|
|
178
177
|
});
|
|
179
178
|
resp = parseResponse(
|
|
180
179
|
respBody,
|
|
181
|
-
|
|
180
|
+
unmarshalAccountsCreateMetastoreAssignmentResponseSchema
|
|
182
181
|
);
|
|
183
182
|
};
|
|
184
183
|
await executeCall(call, options);
|
|
185
184
|
if (resp === undefined) {
|
|
186
|
-
throw new Error('
|
|
185
|
+
throw new Error('operation completed without a result.');
|
|
187
186
|
}
|
|
188
187
|
return resp;
|
|
189
188
|
}
|
|
@@ -192,7 +191,7 @@ export class MetastoresClient {
|
|
|
192
191
|
async deleteAccountsMetastore(
|
|
193
192
|
req: AccountsDeleteMetastoreRequest,
|
|
194
193
|
options?: CallOptions
|
|
195
|
-
): Promise<
|
|
194
|
+
): Promise<AccountsDeleteMetastoreResponse> {
|
|
196
195
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}`;
|
|
197
196
|
const params = new URLSearchParams();
|
|
198
197
|
if (req.force !== undefined) {
|
|
@@ -200,8 +199,8 @@ export class MetastoresClient {
|
|
|
200
199
|
}
|
|
201
200
|
const query = params.toString();
|
|
202
201
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
203
|
-
let resp:
|
|
204
|
-
const call
|
|
202
|
+
let resp: AccountsDeleteMetastoreResponse | undefined;
|
|
203
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
205
204
|
const headers = new Headers();
|
|
206
205
|
headers.set('User-Agent', this.userAgent);
|
|
207
206
|
const httpReq = buildHttpRequest('DELETE', fullUrl, headers, callSignal);
|
|
@@ -212,12 +211,12 @@ export class MetastoresClient {
|
|
|
212
211
|
});
|
|
213
212
|
resp = parseResponse(
|
|
214
213
|
respBody,
|
|
215
|
-
|
|
214
|
+
unmarshalAccountsDeleteMetastoreResponseSchema
|
|
216
215
|
);
|
|
217
216
|
};
|
|
218
217
|
await executeCall(call, options);
|
|
219
218
|
if (resp === undefined) {
|
|
220
|
-
throw new Error('
|
|
219
|
+
throw new Error('operation completed without a result.');
|
|
221
220
|
}
|
|
222
221
|
return resp;
|
|
223
222
|
}
|
|
@@ -226,10 +225,10 @@ export class MetastoresClient {
|
|
|
226
225
|
async deleteAccountsMetastoreAssignment(
|
|
227
226
|
req: AccountsDeleteMetastoreAssignmentRequest,
|
|
228
227
|
options?: CallOptions
|
|
229
|
-
): Promise<
|
|
228
|
+
): Promise<AccountsDeleteMetastoreAssignmentResponse> {
|
|
230
229
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/metastores/${req.metastoreId ?? ''}`;
|
|
231
|
-
let resp:
|
|
232
|
-
const call
|
|
230
|
+
let resp: AccountsDeleteMetastoreAssignmentResponse | undefined;
|
|
231
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
233
232
|
const headers = new Headers();
|
|
234
233
|
headers.set('User-Agent', this.userAgent);
|
|
235
234
|
const httpReq = buildHttpRequest('DELETE', url, headers, callSignal);
|
|
@@ -240,12 +239,12 @@ export class MetastoresClient {
|
|
|
240
239
|
});
|
|
241
240
|
resp = parseResponse(
|
|
242
241
|
respBody,
|
|
243
|
-
|
|
242
|
+
unmarshalAccountsDeleteMetastoreAssignmentResponseSchema
|
|
244
243
|
);
|
|
245
244
|
};
|
|
246
245
|
await executeCall(call, options);
|
|
247
246
|
if (resp === undefined) {
|
|
248
|
-
throw new Error('
|
|
247
|
+
throw new Error('operation completed without a result.');
|
|
249
248
|
}
|
|
250
249
|
return resp;
|
|
251
250
|
}
|
|
@@ -254,10 +253,10 @@ export class MetastoresClient {
|
|
|
254
253
|
async getAccountsMetastore(
|
|
255
254
|
req: AccountsGetMetastoreRequest,
|
|
256
255
|
options?: CallOptions
|
|
257
|
-
): Promise<
|
|
256
|
+
): Promise<AccountsGetMetastoreResponse> {
|
|
258
257
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}`;
|
|
259
|
-
let resp:
|
|
260
|
-
const call
|
|
258
|
+
let resp: AccountsGetMetastoreResponse | undefined;
|
|
259
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
261
260
|
const headers = new Headers();
|
|
262
261
|
headers.set('User-Agent', this.userAgent);
|
|
263
262
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
@@ -268,12 +267,12 @@ export class MetastoresClient {
|
|
|
268
267
|
});
|
|
269
268
|
resp = parseResponse(
|
|
270
269
|
respBody,
|
|
271
|
-
|
|
270
|
+
unmarshalAccountsGetMetastoreResponseSchema
|
|
272
271
|
);
|
|
273
272
|
};
|
|
274
273
|
await executeCall(call, options);
|
|
275
274
|
if (resp === undefined) {
|
|
276
|
-
throw new Error('
|
|
275
|
+
throw new Error('operation completed without a result.');
|
|
277
276
|
}
|
|
278
277
|
return resp;
|
|
279
278
|
}
|
|
@@ -287,10 +286,10 @@ export class MetastoresClient {
|
|
|
287
286
|
async getMetastoreAssignment(
|
|
288
287
|
req: AccountsGetMetastoreAssignmentRequest,
|
|
289
288
|
options?: CallOptions
|
|
290
|
-
): Promise<
|
|
289
|
+
): Promise<AccountsGetMetastoreAssignmentResponse> {
|
|
291
290
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/metastore`;
|
|
292
|
-
let resp:
|
|
293
|
-
const call
|
|
291
|
+
let resp: AccountsGetMetastoreAssignmentResponse | undefined;
|
|
292
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
294
293
|
const headers = new Headers();
|
|
295
294
|
headers.set('User-Agent', this.userAgent);
|
|
296
295
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
@@ -301,12 +300,12 @@ export class MetastoresClient {
|
|
|
301
300
|
});
|
|
302
301
|
resp = parseResponse(
|
|
303
302
|
respBody,
|
|
304
|
-
|
|
303
|
+
unmarshalAccountsGetMetastoreAssignmentResponseSchema
|
|
305
304
|
);
|
|
306
305
|
};
|
|
307
306
|
await executeCall(call, options);
|
|
308
307
|
if (resp === undefined) {
|
|
309
|
-
throw new Error('
|
|
308
|
+
throw new Error('operation completed without a result.');
|
|
310
309
|
}
|
|
311
310
|
return resp;
|
|
312
311
|
}
|
|
@@ -315,10 +314,10 @@ export class MetastoresClient {
|
|
|
315
314
|
async listAccountsMetastores(
|
|
316
315
|
req: AccountsListMetastoresRequest,
|
|
317
316
|
options?: CallOptions
|
|
318
|
-
): Promise<
|
|
317
|
+
): Promise<AccountsListMetastoresResponse> {
|
|
319
318
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores`;
|
|
320
|
-
let resp:
|
|
321
|
-
const call
|
|
319
|
+
let resp: AccountsListMetastoresResponse | undefined;
|
|
320
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
322
321
|
const headers = new Headers();
|
|
323
322
|
headers.set('User-Agent', this.userAgent);
|
|
324
323
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
@@ -329,12 +328,12 @@ export class MetastoresClient {
|
|
|
329
328
|
});
|
|
330
329
|
resp = parseResponse(
|
|
331
330
|
respBody,
|
|
332
|
-
|
|
331
|
+
unmarshalAccountsListMetastoresResponseSchema
|
|
333
332
|
);
|
|
334
333
|
};
|
|
335
334
|
await executeCall(call, options);
|
|
336
335
|
if (resp === undefined) {
|
|
337
|
-
throw new Error('
|
|
336
|
+
throw new Error('operation completed without a result.');
|
|
338
337
|
}
|
|
339
338
|
return resp;
|
|
340
339
|
}
|
|
@@ -343,10 +342,10 @@ export class MetastoresClient {
|
|
|
343
342
|
async listMetastoreAssignments(
|
|
344
343
|
req: AccountsListWorkspaceIdsForMetastoreRequest,
|
|
345
344
|
options?: CallOptions
|
|
346
|
-
): Promise<
|
|
345
|
+
): Promise<AccountsListWorkspaceIdsForMetastoreResponse> {
|
|
347
346
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}/workspaces`;
|
|
348
|
-
let resp:
|
|
349
|
-
const call
|
|
347
|
+
let resp: AccountsListWorkspaceIdsForMetastoreResponse | undefined;
|
|
348
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
350
349
|
const headers = new Headers();
|
|
351
350
|
headers.set('User-Agent', this.userAgent);
|
|
352
351
|
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
@@ -357,12 +356,12 @@ export class MetastoresClient {
|
|
|
357
356
|
});
|
|
358
357
|
resp = parseResponse(
|
|
359
358
|
respBody,
|
|
360
|
-
|
|
359
|
+
unmarshalAccountsListWorkspaceIdsForMetastoreResponseSchema
|
|
361
360
|
);
|
|
362
361
|
};
|
|
363
362
|
await executeCall(call, options);
|
|
364
363
|
if (resp === undefined) {
|
|
365
|
-
throw new Error('
|
|
364
|
+
throw new Error('operation completed without a result.');
|
|
366
365
|
}
|
|
367
366
|
return resp;
|
|
368
367
|
}
|
|
@@ -371,14 +370,14 @@ export class MetastoresClient {
|
|
|
371
370
|
async updateAccountsMetastore(
|
|
372
371
|
req: AccountsUpdateMetastoreRequest,
|
|
373
372
|
options?: CallOptions
|
|
374
|
-
): Promise<
|
|
373
|
+
): Promise<AccountsUpdateMetastoreResponse> {
|
|
375
374
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/metastores/${req.metastoreId ?? ''}`;
|
|
376
375
|
const body = marshalRequest(
|
|
377
376
|
req,
|
|
378
377
|
marshalAccountsUpdateMetastoreRequestSchema
|
|
379
378
|
);
|
|
380
|
-
let resp:
|
|
381
|
-
const call
|
|
379
|
+
let resp: AccountsUpdateMetastoreResponse | undefined;
|
|
380
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
382
381
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
383
382
|
headers.set('User-Agent', this.userAgent);
|
|
384
383
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
@@ -389,12 +388,12 @@ export class MetastoresClient {
|
|
|
389
388
|
});
|
|
390
389
|
resp = parseResponse(
|
|
391
390
|
respBody,
|
|
392
|
-
|
|
391
|
+
unmarshalAccountsUpdateMetastoreResponseSchema
|
|
393
392
|
);
|
|
394
393
|
};
|
|
395
394
|
await executeCall(call, options);
|
|
396
395
|
if (resp === undefined) {
|
|
397
|
-
throw new Error('
|
|
396
|
+
throw new Error('operation completed without a result.');
|
|
398
397
|
}
|
|
399
398
|
return resp;
|
|
400
399
|
}
|
|
@@ -403,14 +402,14 @@ export class MetastoresClient {
|
|
|
403
402
|
async updateAccountsMetastoreAssignment(
|
|
404
403
|
req: AccountsUpdateMetastoreAssignmentRequest,
|
|
405
404
|
options?: CallOptions
|
|
406
|
-
): Promise<
|
|
405
|
+
): Promise<AccountsUpdateMetastoreAssignmentResponse> {
|
|
407
406
|
const url = `${this.host}/api/2.0/accounts/${req.accountId ?? this.accountId ?? ''}/workspaces/${String(req.workspaceId ?? '')}/metastores/${req.metastoreId ?? ''}`;
|
|
408
407
|
const body = marshalRequest(
|
|
409
408
|
req,
|
|
410
409
|
marshalAccountsUpdateMetastoreAssignmentRequestSchema
|
|
411
410
|
);
|
|
412
|
-
let resp:
|
|
413
|
-
const call
|
|
411
|
+
let resp: AccountsUpdateMetastoreAssignmentResponse | undefined;
|
|
412
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
414
413
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
415
414
|
headers.set('User-Agent', this.userAgent);
|
|
416
415
|
const httpReq = buildHttpRequest('PUT', url, headers, callSignal, body);
|
|
@@ -421,12 +420,12 @@ export class MetastoresClient {
|
|
|
421
420
|
});
|
|
422
421
|
resp = parseResponse(
|
|
423
422
|
respBody,
|
|
424
|
-
|
|
423
|
+
unmarshalAccountsUpdateMetastoreAssignmentResponseSchema
|
|
425
424
|
);
|
|
426
425
|
};
|
|
427
426
|
await executeCall(call, options);
|
|
428
427
|
if (resp === undefined) {
|
|
429
|
-
throw new Error('
|
|
428
|
+
throw new Error('operation completed without a result.');
|
|
430
429
|
}
|
|
431
430
|
return resp;
|
|
432
431
|
}
|
|
@@ -444,7 +443,7 @@ export class MetastoresClient {
|
|
|
444
443
|
const url = `${this.host}/api/2.1/unity-catalog/metastores`;
|
|
445
444
|
const body = marshalRequest(req, marshalCreateMetastoreRequestSchema);
|
|
446
445
|
let resp: MetastoreInfo | undefined;
|
|
447
|
-
const call
|
|
446
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
448
447
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
449
448
|
if (this.workspaceId !== undefined) {
|
|
450
449
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -460,7 +459,7 @@ export class MetastoresClient {
|
|
|
460
459
|
};
|
|
461
460
|
await executeCall(call, options);
|
|
462
461
|
if (resp === undefined) {
|
|
463
|
-
throw new Error('
|
|
462
|
+
throw new Error('operation completed without a result.');
|
|
464
463
|
}
|
|
465
464
|
return resp;
|
|
466
465
|
}
|
|
@@ -473,14 +472,14 @@ export class MetastoresClient {
|
|
|
473
472
|
async createMetastoreAssignment(
|
|
474
473
|
req: CreateMetastoreAssignmentRequest,
|
|
475
474
|
options?: CallOptions
|
|
476
|
-
): Promise<
|
|
475
|
+
): Promise<CreateMetastoreAssignmentResponse> {
|
|
477
476
|
const url = `${this.host}/api/2.1/unity-catalog/workspaces/${String(req.workspaceId ?? '')}/metastore`;
|
|
478
477
|
const body = marshalRequest(
|
|
479
478
|
req,
|
|
480
479
|
marshalCreateMetastoreAssignmentRequestSchema
|
|
481
480
|
);
|
|
482
|
-
let resp:
|
|
483
|
-
const call
|
|
481
|
+
let resp: CreateMetastoreAssignmentResponse | undefined;
|
|
482
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
484
483
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
485
484
|
if (this.workspaceId !== undefined) {
|
|
486
485
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -494,12 +493,12 @@ export class MetastoresClient {
|
|
|
494
493
|
});
|
|
495
494
|
resp = parseResponse(
|
|
496
495
|
respBody,
|
|
497
|
-
|
|
496
|
+
unmarshalCreateMetastoreAssignmentResponseSchema
|
|
498
497
|
);
|
|
499
498
|
};
|
|
500
499
|
await executeCall(call, options);
|
|
501
500
|
if (resp === undefined) {
|
|
502
|
-
throw new Error('
|
|
501
|
+
throw new Error('operation completed without a result.');
|
|
503
502
|
}
|
|
504
503
|
return resp;
|
|
505
504
|
}
|
|
@@ -508,7 +507,7 @@ export class MetastoresClient {
|
|
|
508
507
|
async deleteMetastore(
|
|
509
508
|
req: DeleteMetastoreRequest,
|
|
510
509
|
options?: CallOptions
|
|
511
|
-
): Promise<
|
|
510
|
+
): Promise<DeleteMetastoreResponse> {
|
|
512
511
|
const url = `${this.host}/api/2.1/unity-catalog/metastores/${req.id ?? ''}`;
|
|
513
512
|
const params = new URLSearchParams();
|
|
514
513
|
if (req.force !== undefined) {
|
|
@@ -516,8 +515,8 @@ export class MetastoresClient {
|
|
|
516
515
|
}
|
|
517
516
|
const query = params.toString();
|
|
518
517
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
519
|
-
let resp:
|
|
520
|
-
const call
|
|
518
|
+
let resp: DeleteMetastoreResponse | undefined;
|
|
519
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
521
520
|
const headers = new Headers();
|
|
522
521
|
if (this.workspaceId !== undefined) {
|
|
523
522
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -529,14 +528,11 @@ export class MetastoresClient {
|
|
|
529
528
|
httpClient: this.httpClient,
|
|
530
529
|
logger: this.logger,
|
|
531
530
|
});
|
|
532
|
-
resp = parseResponse(
|
|
533
|
-
respBody,
|
|
534
|
-
unmarshalDeleteMetastoreRequest_ResponseSchema
|
|
535
|
-
);
|
|
531
|
+
resp = parseResponse(respBody, unmarshalDeleteMetastoreResponseSchema);
|
|
536
532
|
};
|
|
537
533
|
await executeCall(call, options);
|
|
538
534
|
if (resp === undefined) {
|
|
539
|
-
throw new Error('
|
|
535
|
+
throw new Error('operation completed without a result.');
|
|
540
536
|
}
|
|
541
537
|
return resp;
|
|
542
538
|
}
|
|
@@ -545,7 +541,7 @@ export class MetastoresClient {
|
|
|
545
541
|
async deleteMetastoreAssignment(
|
|
546
542
|
req: DeleteMetastoreAssignmentRequest,
|
|
547
543
|
options?: CallOptions
|
|
548
|
-
): Promise<
|
|
544
|
+
): Promise<DeleteMetastoreAssignmentResponse> {
|
|
549
545
|
const url = `${this.host}/api/2.1/unity-catalog/workspaces/${String(req.workspaceId ?? '')}/metastore`;
|
|
550
546
|
const params = new URLSearchParams();
|
|
551
547
|
if (req.metastoreId !== undefined) {
|
|
@@ -553,8 +549,8 @@ export class MetastoresClient {
|
|
|
553
549
|
}
|
|
554
550
|
const query = params.toString();
|
|
555
551
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
556
|
-
let resp:
|
|
557
|
-
const call
|
|
552
|
+
let resp: DeleteMetastoreAssignmentResponse | undefined;
|
|
553
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
558
554
|
const headers = new Headers();
|
|
559
555
|
if (this.workspaceId !== undefined) {
|
|
560
556
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -568,12 +564,12 @@ export class MetastoresClient {
|
|
|
568
564
|
});
|
|
569
565
|
resp = parseResponse(
|
|
570
566
|
respBody,
|
|
571
|
-
|
|
567
|
+
unmarshalDeleteMetastoreAssignmentResponseSchema
|
|
572
568
|
);
|
|
573
569
|
};
|
|
574
570
|
await executeCall(call, options);
|
|
575
571
|
if (resp === undefined) {
|
|
576
|
-
throw new Error('
|
|
572
|
+
throw new Error('operation completed without a result.');
|
|
577
573
|
}
|
|
578
574
|
return resp;
|
|
579
575
|
}
|
|
@@ -585,7 +581,7 @@ export class MetastoresClient {
|
|
|
585
581
|
): Promise<MetastoreAssignment> {
|
|
586
582
|
const url = `${this.host}/api/2.1/unity-catalog/current-metastore-assignment`;
|
|
587
583
|
let resp: MetastoreAssignment | undefined;
|
|
588
|
-
const call
|
|
584
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
589
585
|
const headers = new Headers();
|
|
590
586
|
if (this.workspaceId !== undefined) {
|
|
591
587
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -601,7 +597,7 @@ export class MetastoresClient {
|
|
|
601
597
|
};
|
|
602
598
|
await executeCall(call, options);
|
|
603
599
|
if (resp === undefined) {
|
|
604
|
-
throw new Error('
|
|
600
|
+
throw new Error('operation completed without a result.');
|
|
605
601
|
}
|
|
606
602
|
return resp;
|
|
607
603
|
}
|
|
@@ -613,7 +609,7 @@ export class MetastoresClient {
|
|
|
613
609
|
): Promise<MetastoreInfo> {
|
|
614
610
|
const url = `${this.host}/api/2.1/unity-catalog/metastores/${req.id ?? ''}`;
|
|
615
611
|
let resp: MetastoreInfo | undefined;
|
|
616
|
-
const call
|
|
612
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
617
613
|
const headers = new Headers();
|
|
618
614
|
if (this.workspaceId !== undefined) {
|
|
619
615
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -629,7 +625,7 @@ export class MetastoresClient {
|
|
|
629
625
|
};
|
|
630
626
|
await executeCall(call, options);
|
|
631
627
|
if (resp === undefined) {
|
|
632
|
-
throw new Error('
|
|
628
|
+
throw new Error('operation completed without a result.');
|
|
633
629
|
}
|
|
634
630
|
return resp;
|
|
635
631
|
}
|
|
@@ -641,10 +637,10 @@ export class MetastoresClient {
|
|
|
641
637
|
async getMetastoreSummary(
|
|
642
638
|
_req: GetMetastoreSummaryRequest,
|
|
643
639
|
options?: CallOptions
|
|
644
|
-
): Promise<
|
|
640
|
+
): Promise<GetMetastoreSummaryResponse> {
|
|
645
641
|
const url = `${this.host}/api/2.1/unity-catalog/metastore_summary`;
|
|
646
|
-
let resp:
|
|
647
|
-
const call
|
|
642
|
+
let resp: GetMetastoreSummaryResponse | undefined;
|
|
643
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
648
644
|
const headers = new Headers();
|
|
649
645
|
if (this.workspaceId !== undefined) {
|
|
650
646
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -658,12 +654,12 @@ export class MetastoresClient {
|
|
|
658
654
|
});
|
|
659
655
|
resp = parseResponse(
|
|
660
656
|
respBody,
|
|
661
|
-
|
|
657
|
+
unmarshalGetMetastoreSummaryResponseSchema
|
|
662
658
|
);
|
|
663
659
|
};
|
|
664
660
|
await executeCall(call, options);
|
|
665
661
|
if (resp === undefined) {
|
|
666
|
-
throw new Error('
|
|
662
|
+
throw new Error('operation completed without a result.');
|
|
667
663
|
}
|
|
668
664
|
return resp;
|
|
669
665
|
}
|
|
@@ -680,7 +676,7 @@ export class MetastoresClient {
|
|
|
680
676
|
async listMetastores(
|
|
681
677
|
req: ListMetastoresRequest,
|
|
682
678
|
options?: CallOptions
|
|
683
|
-
): Promise<
|
|
679
|
+
): Promise<ListMetastoresResponse> {
|
|
684
680
|
const url = `${this.host}/api/2.1/unity-catalog/metastores`;
|
|
685
681
|
const params = new URLSearchParams();
|
|
686
682
|
if (req.maxResults !== undefined) {
|
|
@@ -691,8 +687,8 @@ export class MetastoresClient {
|
|
|
691
687
|
}
|
|
692
688
|
const query = params.toString();
|
|
693
689
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
694
|
-
let resp:
|
|
695
|
-
const call
|
|
690
|
+
let resp: ListMetastoresResponse | undefined;
|
|
691
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
696
692
|
const headers = new Headers();
|
|
697
693
|
if (this.workspaceId !== undefined) {
|
|
698
694
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -704,14 +700,11 @@ export class MetastoresClient {
|
|
|
704
700
|
httpClient: this.httpClient,
|
|
705
701
|
logger: this.logger,
|
|
706
702
|
});
|
|
707
|
-
resp = parseResponse(
|
|
708
|
-
respBody,
|
|
709
|
-
unmarshalListMetastoresRequest_ResponseSchema
|
|
710
|
-
);
|
|
703
|
+
resp = parseResponse(respBody, unmarshalListMetastoresResponseSchema);
|
|
711
704
|
};
|
|
712
705
|
await executeCall(call, options);
|
|
713
706
|
if (resp === undefined) {
|
|
714
|
-
throw new Error('
|
|
707
|
+
throw new Error('operation completed without a result.');
|
|
715
708
|
}
|
|
716
709
|
return resp;
|
|
717
710
|
}
|
|
@@ -745,7 +738,7 @@ export class MetastoresClient {
|
|
|
745
738
|
const url = `${this.host}/api/2.1/unity-catalog/metastores/${req.id ?? ''}`;
|
|
746
739
|
const body = marshalRequest(req, marshalUpdateMetastoreRequestSchema);
|
|
747
740
|
let resp: MetastoreInfo | undefined;
|
|
748
|
-
const call
|
|
741
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
749
742
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
750
743
|
if (this.workspaceId !== undefined) {
|
|
751
744
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -761,7 +754,7 @@ export class MetastoresClient {
|
|
|
761
754
|
};
|
|
762
755
|
await executeCall(call, options);
|
|
763
756
|
if (resp === undefined) {
|
|
764
|
-
throw new Error('
|
|
757
|
+
throw new Error('operation completed without a result.');
|
|
765
758
|
}
|
|
766
759
|
return resp;
|
|
767
760
|
}
|
|
@@ -774,14 +767,14 @@ export class MetastoresClient {
|
|
|
774
767
|
async updateMetastoreAssignment(
|
|
775
768
|
req: UpdateMetastoreAssignmentRequest,
|
|
776
769
|
options?: CallOptions
|
|
777
|
-
): Promise<
|
|
770
|
+
): Promise<UpdateMetastoreAssignmentResponse> {
|
|
778
771
|
const url = `${this.host}/api/2.1/unity-catalog/workspaces/${String(req.workspaceId ?? '')}/metastore`;
|
|
779
772
|
const body = marshalRequest(
|
|
780
773
|
req,
|
|
781
774
|
marshalUpdateMetastoreAssignmentRequestSchema
|
|
782
775
|
);
|
|
783
|
-
let resp:
|
|
784
|
-
const call
|
|
776
|
+
let resp: UpdateMetastoreAssignmentResponse | undefined;
|
|
777
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
785
778
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
786
779
|
if (this.workspaceId !== undefined) {
|
|
787
780
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -795,12 +788,12 @@ export class MetastoresClient {
|
|
|
795
788
|
});
|
|
796
789
|
resp = parseResponse(
|
|
797
790
|
respBody,
|
|
798
|
-
|
|
791
|
+
unmarshalUpdateMetastoreAssignmentResponseSchema
|
|
799
792
|
);
|
|
800
793
|
};
|
|
801
794
|
await executeCall(call, options);
|
|
802
795
|
if (resp === undefined) {
|
|
803
|
-
throw new Error('
|
|
796
|
+
throw new Error('operation completed without a result.');
|
|
804
797
|
}
|
|
805
798
|
return resp;
|
|
806
799
|
}
|