@databricks/sdk-environments 0.0.0-dev → 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.
@@ -0,0 +1,925 @@
1
+ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
+
3
+ import {Temporal} from '@js-temporal/polyfill';
4
+ import {FieldMask} from '@databricks/sdk-core/wkt';
5
+ import type {FieldMaskSchema} from '@databricks/sdk-core/wkt';
6
+ import {z} from 'zod';
7
+
8
+ /** If changed, also update estore/namespaces/defaultbaseenvironments/latest.proto */
9
+ export enum BaseEnvironmentType {
10
+ BASE_ENVIRONMENT_TYPE_UNSPECIFIED = 'BASE_ENVIRONMENT_TYPE_UNSPECIFIED',
11
+ CPU = 'CPU',
12
+ GPU = 'GPU',
13
+ }
14
+
15
+ /** Error codes returned by Databricks APIs to indicate specific failure conditions. */
16
+ export enum ErrorCode {
17
+ /**
18
+ * Unknown error. This error generally should not be returned explicitly, but will be used
19
+ * as a fallback if the error enum is missing from the message for some reason.
20
+ *
21
+ * It's assigned tag 0 to follow the best practice from
22
+ * https://developers.google.com/protocol-buffers/docs/style#enums
23
+ *
24
+ * TODO(PLAT-55898): Add custom option to declare HTTP and gRPC mappings.
25
+ * Maps to:
26
+ * - google.rpc.Code: UNKNOWN = 2;
27
+ * - HTTP code: 500 Internal Server Error
28
+ */
29
+ UNKNOWN = 'UNKNOWN',
30
+ /**
31
+ * Internal error. This means that some invariants expected by the underlying system have been
32
+ * broken. This error code is reserved for serious errors, which generally cannot be resolved
33
+ * by the user.
34
+ *
35
+ * Prefer this over all kinds of detailed error messages (e.g IO_ERROR), unless there's some
36
+ * automation that relies on the custom error code.
37
+ *
38
+ * Maps to:
39
+ * - google.rpc.Code: INTERNAL = 13;
40
+ * - HTTP code: 500 Internal Server Error
41
+ */
42
+ INTERNAL_ERROR = 'INTERNAL_ERROR',
43
+ /**
44
+ * The service is currently unavailable. This is most likely a transient condition, which can be
45
+ * corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent
46
+ * operations.
47
+ *
48
+ * Prefer this over SERVICE_UNDER_MAINTENANCE, WORKSPACE_TEMPORARILY_UNAVAILABLE.
49
+ *
50
+ * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
51
+ * for guideline on how to pick this vs RESOURCE_EXHAUSTED.
52
+ *
53
+ * Maps to:
54
+ * - google.rpc.Code: UNAVAILABLE = 14;
55
+ * - HTTP code: 503 Service Unavailable
56
+ */
57
+ TEMPORARILY_UNAVAILABLE = 'TEMPORARILY_UNAVAILABLE',
58
+ /**
59
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
60
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
61
+ * Indicates that an IOException has been internally thrown.
62
+ */
63
+ IO_ERROR = 'IO_ERROR',
64
+ /**
65
+ * The request is invalid. Prefer more specific error code whenever possible.
66
+ * Also see similar recommendation for the google.rpc.Code.FAILED_PRECONDITION.
67
+ *
68
+ * Prefer this error code over MALFORMED_REQUEST, INVALID_STATE, UNPARSEABLE_HTTP_ERROR.
69
+ *
70
+ * Maps to:
71
+ * - google.rpc.Code: FAILED_PRECONDITION = 9;
72
+ * - HTTP code: 400 Bad Request
73
+ */
74
+ BAD_REQUEST = 'BAD_REQUEST',
75
+ /**
76
+ * An external service is unavailable temporarily as it is being updated/re-deployed. Indicates
77
+ * gateway proxy to safely retry the request.
78
+ */
79
+ SERVICE_UNDER_MAINTENANCE = 'SERVICE_UNDER_MAINTENANCE',
80
+ /** A workspace is temporarily unavailable as the workspace is being re-assigned. */
81
+ WORKSPACE_TEMPORARILY_UNAVAILABLE = 'WORKSPACE_TEMPORARILY_UNAVAILABLE',
82
+ /**
83
+ * The deadline expired before the operation could complete. For operations that change the state
84
+ * of the system, this error may be returned even if the operation has completed successfully.
85
+ * For example, a successful response from a server could have been delayed long enough for
86
+ * the deadline to expire. When possible - implementations should make sure further processing of
87
+ * the request is aborted, e.g. by throwing an exception instead of making the RPC request,
88
+ * making the database query, etc.
89
+ *
90
+ * Maps to:
91
+ * - google.rpc.Code: DEADLINE_EXCEEDED = 4;
92
+ * - HTTP code: 504 Gateway Timeout
93
+ */
94
+ DEADLINE_EXCEEDED = 'DEADLINE_EXCEEDED',
95
+ /**
96
+ * The operation was canceled by the caller. An example - client closed the connection without
97
+ * waiting for a response.
98
+ *
99
+ * Maps to:
100
+ * - google.rpc.Code: CANCELLED = 1;
101
+ * - HTTP code: 499 Client Closed Request
102
+ */
103
+ CANCELLED = 'CANCELLED',
104
+ /**
105
+ * The operation is rejected because of either rate limiting or resource quota,
106
+ * such as the client has sent too many requests recently or the client has allocated too many
107
+ * resources.
108
+ *
109
+ * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
110
+ * for guideline on how to pick this vs TEMPORARILY_UNAVAILABLE.
111
+ *
112
+ * Maps to:
113
+ * - google.rpc.Code: RESOURCE_EXHAUSTED = 8;
114
+ * - HTTP code: 429 Too Many Requests
115
+ */
116
+ RESOURCE_EXHAUSTED = 'RESOURCE_EXHAUSTED',
117
+ /**
118
+ * The operation was aborted, typically due to a concurrency issue such as a sequencer
119
+ * check failure, transaction abort, or transaction conflict.
120
+ *
121
+ * Maps to:
122
+ * - google.rpc.Code: ABORTED = 10;
123
+ * - HTTP code: 409 Conflict
124
+ */
125
+ ABORTED = 'ABORTED',
126
+ /**
127
+ * Operation was performed on a resource that does not exist,
128
+ * e.g. file or directory was not found.
129
+ *
130
+ * Maps to:
131
+ * - google.rpc.Code: NOT_FOUND = 5;
132
+ * - HTTP code: 404 Not Found
133
+ */
134
+ NOT_FOUND = 'NOT_FOUND',
135
+ /**
136
+ * Operation was rejected due a conflict with an existing resource, e.g. attempted to create
137
+ * file or directory that already exists.
138
+ *
139
+ * Prefer this over RESOURCE_CONFLICT.
140
+ *
141
+ * Maps to:
142
+ * - google.rpc.Code: ALREADY_EXISTS = 6;
143
+ * - HTTP code: 409 Conflict
144
+ */
145
+ ALREADY_EXISTS = 'ALREADY_EXISTS',
146
+ /**
147
+ * The request does not have valid authentication (AuthN) credentials for the operation.
148
+ *
149
+ * Prefer this over CUSTOMER_UNAUTHORIZED, unless you need to keep consistent behavior with legacy
150
+ * code.
151
+ * For authorization (AuthZ) errors use PERMISSION_DENIED.
152
+ *
153
+ * Maps to:
154
+ * - google.rpc.Code: UNAUTHENTICATED = 16;
155
+ * - HTTP code: 401 Unauthorized
156
+ */
157
+ UNAUTHENTICATED = 'UNAUTHENTICATED',
158
+ /**
159
+ * The service is currently unavailable. Please note that the unavailability may or may not be transient.
160
+ * That means if this is a non-transient condition, retrying it does not work. If the unavailability
161
+ * is certainly a transient condition, pleases use `TEMPORARILY_UNAVAILABLE` which signals its transient
162
+ * nature explicitly.
163
+ * An example of this error code’s use case is that when DNS resolution fails, the DNS resolver does
164
+ * not know whether it is because the domain name is completely wrong (non-transient situation) or
165
+ * the domain name is valid but the DNS server does not have an entry for this domain name yet (transient
166
+ * situation). Hence, `UNAVAILABLE` is suitable for this case.
167
+ *
168
+ * Maps to:
169
+ * - google.rpc.Code: UNAVAILABLE = 14;
170
+ * - HTTP code: 503 Service Unavailable
171
+ */
172
+ UNAVAILABLE = 'UNAVAILABLE',
173
+ /**
174
+ * Supplied value for a parameter was invalid (e.g., giving a number for a string parameter).
175
+ *
176
+ * Maps to:
177
+ * - google.rpc.Code: INVALID_ARGUMENT = 3;
178
+ * - HTTP code: 400 Bad Request
179
+ */
180
+ INVALID_PARAMETER_VALUE = 'INVALID_PARAMETER_VALUE',
181
+ /**
182
+ * Indicates that the given API endpoint does not exist. Legacy, when possible - NOT_IMPLEMENTED
183
+ * should be used instead to indicate that API doesn't exist.
184
+ *
185
+ * Maps to:
186
+ * - google.rpc.Code: NOT_FOUND = 5;
187
+ * - HTTP code: 404 Not Found
188
+ */
189
+ ENDPOINT_NOT_FOUND = 'ENDPOINT_NOT_FOUND',
190
+ /** Indicates that the given API request was malformed. */
191
+ MALFORMED_REQUEST = 'MALFORMED_REQUEST',
192
+ /**
193
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
194
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
195
+ * If one or more of the inputs to a given RPC are not in a valid state for the action.
196
+ */
197
+ INVALID_STATE = 'INVALID_STATE',
198
+ /**
199
+ * The caller does not have permission to execute the specified operation.
200
+ * PERMISSION_DENIED must not be used for rejections caused by exhausting some resource,
201
+ * use RESOURCE_EXHAUSTED instead for those errors.
202
+ * PERMISSION_DENIED must not be used if the caller can not be identified,
203
+ * use CUSTOMER_UNAUTHORIZED instead for those errors.
204
+ * This error code does not imply the request is valid or the requested entity exists or
205
+ * satisfies other pre-conditions.
206
+ *
207
+ * Maps to:
208
+ * - google.rpc.Code: PERMISSION_DENIED = 7;
209
+ * - HTTP code: 403 Forbidden
210
+ */
211
+ PERMISSION_DENIED = 'PERMISSION_DENIED',
212
+ /**
213
+ * NOTE: Deprecated due to inconsistent mapping in legacy code, see
214
+ * https://docs.google.com/document/d/17TZIKX_Y39cJMBr333lc-d5dTvvBLSu3DPUyGU5eMJg/edit?disco=AAAAzVGt6FA.
215
+ * Prefer using NOT_FOUND or PERMISSION_DENIED.
216
+ *
217
+ * If a given user/entity is trying to use a feature which has been disabled.
218
+ *
219
+ * Maps to:
220
+ * - google.rpc.Code: NOT_FOUND = 5;
221
+ * - HTTP code: 404 Not Found
222
+ */
223
+ FEATURE_DISABLED = 'FEATURE_DISABLED',
224
+ /**
225
+ * The request does not have valid authentication (AuthN) credentials for the operation.
226
+ *
227
+ * For authentication (AuthN) errors prefer using UNAUTHENTICATED, unless you need to keep
228
+ * consistent behavior with legacy code.
229
+ * For authorization (AuthZ) errors use PERMISSION_DENIED.
230
+ *
231
+ * Important: name is confusing, this error code is for authentication (AuthN) errors, not
232
+ * authorization (AuthZ) errors. It maps to 401 Unauthorized and suffers from the same confusing
233
+ * naming. See https://datatracker.ietf.org/doc/html/rfc7235#section-3.1 - "[...] status code
234
+ * indicates that the request has not been applied because it lacks valid authentication
235
+ * credentials for the target resource. [...] If the request included authentication credentials,
236
+ * then the 401 response indicates that authorization has been refused for those credentials."
237
+ *
238
+ * Also, see https://stackoverflow.com/a/6937030/16352922, it covers it pretty well.
239
+ *
240
+ * Maps to:
241
+ * - google.rpc.Code: UNAUTHENTICATED = 16;
242
+ * - HTTP code: 401 Unauthorized
243
+ */
244
+ CUSTOMER_UNAUTHORIZED = 'CUSTOMER_UNAUTHORIZED',
245
+ /**
246
+ * The operation is rejected because of request rate limit, for example rate limiting applied to
247
+ * users, workspaces, IP addresses, etc.
248
+ *
249
+ * Prefer a more generic RESOURCE_EXHAUSTED for the new use cases.
250
+ *
251
+ * See https://docs.google.com/document/d/1FL8p2sbYWqBPL-UvhzI7uXAw4EoLG7Rj6PAOQWZRSOk/edit#
252
+ * for guideline on the rate limiting vs throttling.
253
+ *
254
+ * Maps to:
255
+ * - google.rpc.Code: RESOURCE_EXHAUSTED = 8;
256
+ * - HTTP code: 429 Too Many Requests
257
+ */
258
+ REQUEST_LIMIT_EXCEEDED = 'REQUEST_LIMIT_EXCEEDED',
259
+ /** Indicates API request was rejected due a conflict with an existing resource. */
260
+ RESOURCE_CONFLICT = 'RESOURCE_CONFLICT',
261
+ /**
262
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
263
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
264
+ * Indicates that the HTTP response cannot be correctly deserialized.
265
+ * This currently is only used in DUST test clients, and not by any real service code.
266
+ */
267
+ UNPARSEABLE_HTTP_ERROR = 'UNPARSEABLE_HTTP_ERROR',
268
+ /**
269
+ * The operation is not implemented or is not supported/enabled in this service.
270
+ *
271
+ * Maps to:
272
+ * - google.rpc.Code: UNIMPLEMENTED = 12;
273
+ * - HTTP code: 501 Not Implemented
274
+ */
275
+ NOT_IMPLEMENTED = 'NOT_IMPLEMENTED',
276
+ /**
277
+ * Unrecoverable data loss or corruption.
278
+ *
279
+ * One of the major use cases is to indicate that server failed to validate the integrity of
280
+ * the request. This error can occur when the checksum specified in the `X-Databricks-Checksum`
281
+ * request header (or trailer) doesn't match the actual request content checksum.
282
+ *
283
+ * Note, in case of the severe corruption that results in a malformed request, the server may
284
+ * send a generic `400 Bad Request` response rather than sending this error code.
285
+ *
286
+ * Maps to:
287
+ * - google.rpc.Code: DATA_LOSS = 15;
288
+ * - HTTP code: 500 Internal Server Error
289
+ */
290
+ DATA_LOSS = 'DATA_LOSS',
291
+ /** If the user attempts to perform an invalid state transition on a shard. */
292
+ INVALID_STATE_TRANSITION = 'INVALID_STATE_TRANSITION',
293
+ /**
294
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
295
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
296
+ * Unable to perform the operation because the shard was locked by some other operation.
297
+ */
298
+ COULD_NOT_ACQUIRE_LOCK = 'COULD_NOT_ACQUIRE_LOCK',
299
+ /**
300
+ * NOTE: Deprecated, prefer using ALREADY_EXISTS.
301
+ * Unlike ALREADY_EXISTS - this maps to HTTP code 400 Bad Request due to legacy reasons,
302
+ * remapping will be a backwards incompatible change.
303
+ *
304
+ * Operation was performed on a resource that already exists.
305
+ */
306
+ RESOURCE_ALREADY_EXISTS = 'RESOURCE_ALREADY_EXISTS',
307
+ /**
308
+ * NOTE: Deprecated, prefer using NOT_FOUND - see the note for the RESOURCE_ALREADY_EXISTS,
309
+ * because this pair of codes is related and RESOURCE_ALREADY_EXISTS has bad mapping to the HTTP
310
+ * codes we added new error codes NOT_FOUND and ALREADY_EXISTS, and recommend to use them instead.
311
+ *
312
+ * Operation was performed on a resource that does not exist.
313
+ */
314
+ RESOURCE_DOES_NOT_EXIST = 'RESOURCE_DOES_NOT_EXIST',
315
+ /**
316
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
317
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
318
+ */
319
+ QUOTA_EXCEEDED = 'QUOTA_EXCEEDED',
320
+ /**
321
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
322
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
323
+ */
324
+ MAX_BLOCK_SIZE_EXCEEDED = 'MAX_BLOCK_SIZE_EXCEEDED',
325
+ /**
326
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
327
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
328
+ */
329
+ MAX_READ_SIZE_EXCEEDED = 'MAX_READ_SIZE_EXCEEDED',
330
+ PARTIAL_DELETE = 'PARTIAL_DELETE',
331
+ MAX_LIST_SIZE_EXCEEDED = 'MAX_LIST_SIZE_EXCEEDED',
332
+ /**
333
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
334
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
335
+ */
336
+ DRY_RUN_FAILED = 'DRY_RUN_FAILED',
337
+ /**
338
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
339
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
340
+ * Cluster request was rejected because it would exceed a resource limit.
341
+ */
342
+ RESOURCE_LIMIT_EXCEEDED = 'RESOURCE_LIMIT_EXCEEDED',
343
+ /**
344
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
345
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
346
+ */
347
+ DIRECTORY_NOT_EMPTY = 'DIRECTORY_NOT_EMPTY',
348
+ /**
349
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
350
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
351
+ */
352
+ DIRECTORY_PROTECTED = 'DIRECTORY_PROTECTED',
353
+ /**
354
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
355
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
356
+ */
357
+ MAX_NOTEBOOK_SIZE_EXCEEDED = 'MAX_NOTEBOOK_SIZE_EXCEEDED',
358
+ MAX_CHILD_NODE_SIZE_EXCEEDED = 'MAX_CHILD_NODE_SIZE_EXCEEDED',
359
+ /**
360
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
361
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
362
+ */
363
+ SEARCH_QUERY_TOO_LONG = 'SEARCH_QUERY_TOO_LONG',
364
+ /**
365
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
366
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
367
+ */
368
+ SEARCH_QUERY_TOO_SHORT = 'SEARCH_QUERY_TOO_SHORT',
369
+ /**
370
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
371
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
372
+ */
373
+ MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST = 'MANAGED_RESOURCE_GROUP_DOES_NOT_EXIST',
374
+ /**
375
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
376
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
377
+ */
378
+ PERMISSION_NOT_PROPAGATED = 'PERMISSION_NOT_PROPAGATED',
379
+ /**
380
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
381
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
382
+ */
383
+ DEPLOYMENT_TIMEOUT = 'DEPLOYMENT_TIMEOUT',
384
+ /**
385
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
386
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
387
+ */
388
+ GIT_CONFLICT = 'GIT_CONFLICT',
389
+ /**
390
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
391
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
392
+ */
393
+ GIT_UNKNOWN_REF = 'GIT_UNKNOWN_REF',
394
+ /**
395
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
396
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
397
+ */
398
+ GIT_SENSITIVE_TOKEN_DETECTED = 'GIT_SENSITIVE_TOKEN_DETECTED',
399
+ /**
400
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
401
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
402
+ */
403
+ GIT_URL_NOT_ON_ALLOW_LIST = 'GIT_URL_NOT_ON_ALLOW_LIST',
404
+ /**
405
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
406
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
407
+ */
408
+ GIT_REMOTE_ERROR = 'GIT_REMOTE_ERROR',
409
+ /**
410
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
411
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
412
+ */
413
+ PROJECTS_OPERATION_TIMEOUT = 'PROJECTS_OPERATION_TIMEOUT',
414
+ /**
415
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
416
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
417
+ */
418
+ IPYNB_FILE_IN_REPO = 'IPYNB_FILE_IN_REPO',
419
+ /**
420
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
421
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
422
+ */
423
+ INSECURE_PARTNER_RESPONSE = 'INSECURE_PARTNER_RESPONSE',
424
+ /**
425
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
426
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
427
+ */
428
+ MALFORMED_PARTNER_RESPONSE = 'MALFORMED_PARTNER_RESPONSE',
429
+ METASTORE_DOES_NOT_EXIST = 'METASTORE_DOES_NOT_EXIST',
430
+ /**
431
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
432
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
433
+ */
434
+ DAC_DOES_NOT_EXIST = 'DAC_DOES_NOT_EXIST',
435
+ CATALOG_DOES_NOT_EXIST = 'CATALOG_DOES_NOT_EXIST',
436
+ SCHEMA_DOES_NOT_EXIST = 'SCHEMA_DOES_NOT_EXIST',
437
+ TABLE_DOES_NOT_EXIST = 'TABLE_DOES_NOT_EXIST',
438
+ SHARE_DOES_NOT_EXIST = 'SHARE_DOES_NOT_EXIST',
439
+ RECIPIENT_DOES_NOT_EXIST = 'RECIPIENT_DOES_NOT_EXIST',
440
+ STORAGE_CREDENTIAL_DOES_NOT_EXIST = 'STORAGE_CREDENTIAL_DOES_NOT_EXIST',
441
+ EXTERNAL_LOCATION_DOES_NOT_EXIST = 'EXTERNAL_LOCATION_DOES_NOT_EXIST',
442
+ PRINCIPAL_DOES_NOT_EXIST = 'PRINCIPAL_DOES_NOT_EXIST',
443
+ PROVIDER_DOES_NOT_EXIST = 'PROVIDER_DOES_NOT_EXIST',
444
+ /**
445
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
446
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
447
+ */
448
+ METASTORE_ALREADY_EXISTS = 'METASTORE_ALREADY_EXISTS',
449
+ /**
450
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
451
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
452
+ */
453
+ DAC_ALREADY_EXISTS = 'DAC_ALREADY_EXISTS',
454
+ /**
455
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
456
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
457
+ */
458
+ CATALOG_ALREADY_EXISTS = 'CATALOG_ALREADY_EXISTS',
459
+ /**
460
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
461
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
462
+ */
463
+ SCHEMA_ALREADY_EXISTS = 'SCHEMA_ALREADY_EXISTS',
464
+ /**
465
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
466
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
467
+ */
468
+ TABLE_ALREADY_EXISTS = 'TABLE_ALREADY_EXISTS',
469
+ /**
470
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
471
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
472
+ */
473
+ SHARE_ALREADY_EXISTS = 'SHARE_ALREADY_EXISTS',
474
+ /**
475
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
476
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
477
+ */
478
+ RECIPIENT_ALREADY_EXISTS = 'RECIPIENT_ALREADY_EXISTS',
479
+ /**
480
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
481
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
482
+ */
483
+ STORAGE_CREDENTIAL_ALREADY_EXISTS = 'STORAGE_CREDENTIAL_ALREADY_EXISTS',
484
+ /**
485
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
486
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
487
+ */
488
+ EXTERNAL_LOCATION_ALREADY_EXISTS = 'EXTERNAL_LOCATION_ALREADY_EXISTS',
489
+ /**
490
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
491
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
492
+ */
493
+ PROVIDER_ALREADY_EXISTS = 'PROVIDER_ALREADY_EXISTS',
494
+ /**
495
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
496
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
497
+ */
498
+ CATALOG_NOT_EMPTY = 'CATALOG_NOT_EMPTY',
499
+ /**
500
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
501
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
502
+ */
503
+ SCHEMA_NOT_EMPTY = 'SCHEMA_NOT_EMPTY',
504
+ /**
505
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
506
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
507
+ */
508
+ METASTORE_NOT_EMPTY = 'METASTORE_NOT_EMPTY',
509
+ /**
510
+ * NOTE: Deprecated and kept to maintain backwards compatibility for public APIs that use it,
511
+ * avoid using it in the new APIs, refer error codes listed in the http://go/error-codes.
512
+ */
513
+ PROVIDER_SHARE_NOT_ACCESSIBLE = 'PROVIDER_SHARE_NOT_ACCESSIBLE',
514
+ }
515
+
516
+ /** Status of the environment materialization. */
517
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
518
+ export enum WorkspaceBaseEnvironmentCache_Status {
519
+ STATUS_UNSPECIFIED = 'STATUS_UNSPECIFIED',
520
+ /** Materialized environment creation is pending. */
521
+ PENDING = 'PENDING',
522
+ /** Materialized environment has been successfully created. */
523
+ CREATED = 'CREATED',
524
+ /** Materialized environment creation failed. */
525
+ FAILED = 'FAILED',
526
+ /** Materialized environment has expired. */
527
+ EXPIRED = 'EXPIRED',
528
+ /** Materialized environment is invalid. */
529
+ INVALID = 'INVALID',
530
+ /** Materialized environment is being refreshed. */
531
+ REFRESHING = 'REFRESHING',
532
+ }
533
+
534
+ /** Request message for CreateWorkspaceBaseEnvironment. */
535
+ export interface CreateWorkspaceBaseEnvironmentRequest {
536
+ /** Required. The workspace base environment to create. */
537
+ workspaceBaseEnvironment?: WorkspaceBaseEnvironment | undefined;
538
+ /**
539
+ * The ID to use for the workspace base environment, which will become the final component of
540
+ * the resource name.
541
+ * This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.
542
+ */
543
+ workspaceBaseEnvironmentId?: string | undefined;
544
+ /**
545
+ * A unique identifier for this request. A random UUID is recommended.
546
+ * This request is only idempotent if a request_id is provided.
547
+ */
548
+ requestId?: string | undefined;
549
+ }
550
+
551
+ /** Databricks Error that is returned by all Databricks APIs. */
552
+ export interface DatabricksServiceExceptionWithDetailsProto {
553
+ errorCode?: ErrorCode | undefined;
554
+ message?: string | undefined;
555
+ stackTrace?: string | undefined;
556
+ details?: Record<string, unknown>[] | undefined;
557
+ }
558
+
559
+ /**
560
+ * A singleton resource representing the default workspace base environment configuration.
561
+ * This resource contains the workspace base environments that are used as defaults
562
+ * for serverless notebooks and jobs in the workspace, for both CPU and GPU compute types.
563
+ */
564
+ export interface DefaultWorkspaceBaseEnvironment {
565
+ /**
566
+ * The resource name of this singleton resource.
567
+ * Format: default-workspace-base-environment
568
+ */
569
+ name?: string | undefined;
570
+ /**
571
+ * The default workspace base environment for CPU compute.
572
+ * Format: workspace-base-environments/{workspace_base_environment}
573
+ */
574
+ cpuWorkspaceBaseEnvironment?: string | undefined;
575
+ /**
576
+ * The default workspace base environment for GPU compute.
577
+ * Format: workspace-base-environments/{workspace_base_environment}
578
+ */
579
+ gpuWorkspaceBaseEnvironment?: string | undefined;
580
+ }
581
+
582
+ /** Request message for DeleteWorkspaceBaseEnvironment. */
583
+ export interface DeleteWorkspaceBaseEnvironmentRequest {
584
+ /**
585
+ * Required. The resource name of the workspace base environment to delete.
586
+ * Format: workspace-base-environments/{workspace_base_environment}
587
+ */
588
+ name?: string | undefined;
589
+ }
590
+
591
+ /** Request message for GetDefaultWorkspaceBaseEnvironment. */
592
+ export interface GetDefaultWorkspaceBaseEnvironmentRequest {
593
+ /**
594
+ * A static resource name of the default workspace base environment.
595
+ * Format: default-workspace-base-environment
596
+ */
597
+ name?: string | undefined;
598
+ }
599
+
600
+ /** The request message for `GetOperation` method. */
601
+ export interface GetOperationRequest {
602
+ /** The name of the operation resource. */
603
+ name?: string | undefined;
604
+ }
605
+
606
+ /** Request message for GetWorkspaceBaseEnvironment. */
607
+ export interface GetWorkspaceBaseEnvironmentRequest {
608
+ /**
609
+ * Required. The resource name of the workspace base environment to retrieve.
610
+ * Format: workspace-base-environments/{workspace_base_environment}
611
+ */
612
+ name?: string | undefined;
613
+ }
614
+
615
+ /** Request message for ListWorkspaceBaseEnvironments. */
616
+ export interface ListWorkspaceBaseEnvironmentsRequest {
617
+ /**
618
+ * The maximum number of environments to return per page.
619
+ * Default is 1000.
620
+ */
621
+ pageSize?: number | undefined;
622
+ /** Page token for pagination. Received from a previous ListWorkspaceBaseEnvironments call. */
623
+ pageToken?: string | undefined;
624
+ }
625
+
626
+ /** Response message for ListWorkspaceBaseEnvironments. */
627
+ export interface ListWorkspaceBaseEnvironmentsResponse {
628
+ /** The list of workspace base environments. */
629
+ workspaceBaseEnvironments?: WorkspaceBaseEnvironment[] | undefined;
630
+ /**
631
+ * Token to retrieve the next page of results.
632
+ * Empty if there are no more results.
633
+ */
634
+ nextPageToken?: string | undefined;
635
+ }
636
+
637
+ /**
638
+ * This resource represents a long-running operation that is the result of a
639
+ * network API call.
640
+ */
641
+ export interface Operation {
642
+ /**
643
+ * The server-assigned name, which is only unique within the same service that
644
+ * originally returns it. If you use the default HTTP mapping, the
645
+ * `name` should be a resource name ending with `operations/{unique_id}`.
646
+ */
647
+ name?: string | undefined;
648
+ /**
649
+ * Service-specific metadata associated with the operation. It typically
650
+ * contains progress information and common metadata such as create time.
651
+ * Some services might not provide such metadata.
652
+ */
653
+ metadata?: Record<string, unknown> | undefined;
654
+ /**
655
+ * If the value is `false`, it means the operation is still in progress.
656
+ * If `true`, the operation is completed, and either `error` or `response` is
657
+ * available.
658
+ */
659
+ done?: boolean | undefined;
660
+ /**
661
+ * The operation result, which can be either an `error` or a valid `response`.
662
+ * If `done` == `false`, neither `error` nor `response` is set.
663
+ * If `done` == `true`, exactly one of `error` or `response` can be set.
664
+ * Some services might not provide the result.
665
+ */
666
+ result?:
667
+ | {
668
+ $case: 'error';
669
+ /** The error result of the operation in case of failure or cancellation. */
670
+ error: DatabricksServiceExceptionWithDetailsProto;
671
+ }
672
+ | {
673
+ $case: 'response';
674
+ /** The normal, successful response of the operation. */
675
+ response: Record<string, unknown>;
676
+ }
677
+ | undefined;
678
+ }
679
+
680
+ /** Request message for RefreshWorkspaceBaseEnvironments. */
681
+ export interface RefreshWorkspaceBaseEnvironmentRequest {
682
+ /**
683
+ * Required. The resource name of the workspace base environment to delete.
684
+ * Format: workspace-base-environments/{workspace_base_environment}
685
+ */
686
+ name?: string | undefined;
687
+ }
688
+
689
+ /** Request message for UpdateDefaultWorkspaceBaseEnvironment. */
690
+ export interface UpdateDefaultWorkspaceBaseEnvironmentRequest {
691
+ /** Required. The default workspace base environment configuration to update. */
692
+ defaultWorkspaceBaseEnvironment?: DefaultWorkspaceBaseEnvironment | undefined;
693
+ /**
694
+ * Field mask specifying which fields to update. Use comma as the separator for multiple fields (no space).
695
+ * The special value '*' indicates that all fields should be updated (full replacement).
696
+ * Valid field paths: cpu_workspace_base_environment, gpu_workspace_base_environment
697
+ *
698
+ * To unset one or both defaults, include the field path(s) in the mask and omit them from the request body.
699
+ * To unset both, you must list both paths explicitly — the wildcard '*' cannot be used to unset fields.
700
+ */
701
+ updateMask?: FieldMask<DefaultWorkspaceBaseEnvironment> | undefined;
702
+ }
703
+
704
+ /** Request message for UpdateWorkspaceBaseEnvironment. */
705
+ export interface UpdateWorkspaceBaseEnvironmentRequest {
706
+ name?: string | undefined;
707
+ /**
708
+ * Required. The workspace base environment with updated fields.
709
+ * The name field is used to identify the environment to update.
710
+ */
711
+ workspaceBaseEnvironment?: WorkspaceBaseEnvironment | undefined;
712
+ }
713
+
714
+ /**
715
+ * A WorkspaceBaseEnvironment defines a workspace-level environment configuration
716
+ * consisting of an environment version and a list of dependencies.
717
+ */
718
+ export interface WorkspaceBaseEnvironment {
719
+ /**
720
+ * The resource name of the workspace base environment.
721
+ * Format: workspace-base-environments/{workspace-base-environment}
722
+ */
723
+ name?: string | undefined;
724
+ /** Human-readable display name for the workspace base environment. */
725
+ displayName?: string | undefined;
726
+ /** The WSFS or UC Volumes path to the environment YAML file. */
727
+ filepath?: string | undefined;
728
+ /** User ID of the creator. */
729
+ creatorUserId?: string | undefined;
730
+ /** Timestamp when the environment was created. */
731
+ createTime?: Temporal.Instant | undefined;
732
+ /** User ID of the last user who updated the environment. */
733
+ lastUpdatedUserId?: string | undefined;
734
+ /** Timestamp when the environment was last updated. */
735
+ updateTime?: Temporal.Instant | undefined;
736
+ /** The status of the materialized workspace base environment. */
737
+ status?: WorkspaceBaseEnvironmentCache_Status | undefined;
738
+ /** Status message providing additional details about the environment status. */
739
+ message?: string | undefined;
740
+ /** Whether this is the default environment for the workspace. */
741
+ isDefault?: boolean | undefined;
742
+ /** The type of base environment (CPU or GPU). */
743
+ baseEnvironmentType?: BaseEnvironmentType | undefined;
744
+ }
745
+
746
+ /** Materialized environment information for a WorkspaceBaseEnvironment. */
747
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
748
+ export interface WorkspaceBaseEnvironmentCache {}
749
+
750
+ /**
751
+ * Metadata for the WorkspaceBaseEnvironment long-running operations.
752
+ * This message tracks the progress of the workspace base environment long-running process.
753
+ */
754
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
755
+ export interface WorkspaceBaseEnvironmentOperationMetadata {}
756
+
757
+ export const unmarshalDatabricksServiceExceptionWithDetailsProtoSchema: z.ZodType<DatabricksServiceExceptionWithDetailsProto> =
758
+ z
759
+ .object({
760
+ error_code: z.enum(ErrorCode).optional(),
761
+ message: z.string().optional(),
762
+ stack_trace: z.string().optional(),
763
+ details: z.array(z.record(z.string(), z.unknown())).optional(),
764
+ })
765
+ .transform(d => ({
766
+ errorCode: d.error_code,
767
+ message: d.message,
768
+ stackTrace: d.stack_trace,
769
+ details: d.details,
770
+ }));
771
+
772
+ export const unmarshalDefaultWorkspaceBaseEnvironmentSchema: z.ZodType<DefaultWorkspaceBaseEnvironment> =
773
+ z
774
+ .object({
775
+ name: z.string().optional(),
776
+ cpu_workspace_base_environment: z.string().optional(),
777
+ gpu_workspace_base_environment: z.string().optional(),
778
+ })
779
+ .transform(d => ({
780
+ name: d.name,
781
+ cpuWorkspaceBaseEnvironment: d.cpu_workspace_base_environment,
782
+ gpuWorkspaceBaseEnvironment: d.gpu_workspace_base_environment,
783
+ }));
784
+
785
+ export const unmarshalListWorkspaceBaseEnvironmentsResponseSchema: z.ZodType<ListWorkspaceBaseEnvironmentsResponse> =
786
+ z
787
+ .object({
788
+ workspace_base_environments: z
789
+ .array(z.lazy(() => unmarshalWorkspaceBaseEnvironmentSchema))
790
+ .optional(),
791
+ next_page_token: z.string().optional(),
792
+ })
793
+ .transform(d => ({
794
+ workspaceBaseEnvironments: d.workspace_base_environments,
795
+ nextPageToken: d.next_page_token,
796
+ }));
797
+
798
+ export const unmarshalOperationSchema: z.ZodType<Operation> = z
799
+ .object({
800
+ name: z.string().optional(),
801
+ metadata: z.record(z.string(), z.unknown()).optional(),
802
+ done: z.boolean().optional(),
803
+ error: z
804
+ .lazy(() => unmarshalDatabricksServiceExceptionWithDetailsProtoSchema)
805
+ .optional(),
806
+ response: z.record(z.string(), z.unknown()).optional(),
807
+ })
808
+ .transform(d => ({
809
+ name: d.name,
810
+ metadata: d.metadata,
811
+ done: d.done,
812
+ result:
813
+ d.error !== undefined
814
+ ? {$case: 'error' as const, error: d.error}
815
+ : d.response !== undefined
816
+ ? {$case: 'response' as const, response: d.response}
817
+ : undefined,
818
+ }));
819
+
820
+ export const unmarshalWorkspaceBaseEnvironmentSchema: z.ZodType<WorkspaceBaseEnvironment> =
821
+ z
822
+ .object({
823
+ name: z.string().optional(),
824
+ display_name: z.string().optional(),
825
+ filepath: z.string().optional(),
826
+ creator_user_id: z.string().optional(),
827
+ create_time: z
828
+ .string()
829
+ .transform(s => Temporal.Instant.from(s))
830
+ .optional(),
831
+ last_updated_user_id: z.string().optional(),
832
+ update_time: z
833
+ .string()
834
+ .transform(s => Temporal.Instant.from(s))
835
+ .optional(),
836
+ status: z.enum(WorkspaceBaseEnvironmentCache_Status).optional(),
837
+ message: z.string().optional(),
838
+ is_default: z.boolean().optional(),
839
+ base_environment_type: z.enum(BaseEnvironmentType).optional(),
840
+ })
841
+ .transform(d => ({
842
+ name: d.name,
843
+ displayName: d.display_name,
844
+ filepath: d.filepath,
845
+ creatorUserId: d.creator_user_id,
846
+ createTime: d.create_time,
847
+ lastUpdatedUserId: d.last_updated_user_id,
848
+ updateTime: d.update_time,
849
+ status: d.status,
850
+ message: d.message,
851
+ isDefault: d.is_default,
852
+ baseEnvironmentType: d.base_environment_type,
853
+ }));
854
+
855
+ export const unmarshalWorkspaceBaseEnvironmentOperationMetadataSchema: z.ZodType<WorkspaceBaseEnvironmentOperationMetadata> =
856
+ z.object({});
857
+
858
+ export const marshalDefaultWorkspaceBaseEnvironmentSchema: z.ZodType = z
859
+ .object({
860
+ name: z.string().optional(),
861
+ cpuWorkspaceBaseEnvironment: z.string().optional(),
862
+ gpuWorkspaceBaseEnvironment: z.string().optional(),
863
+ })
864
+ .transform(d => ({
865
+ name: d.name,
866
+ cpu_workspace_base_environment: d.cpuWorkspaceBaseEnvironment,
867
+ gpu_workspace_base_environment: d.gpuWorkspaceBaseEnvironment,
868
+ }));
869
+
870
+ export const marshalRefreshWorkspaceBaseEnvironmentRequestSchema: z.ZodType = z
871
+ .object({
872
+ name: z.string().optional(),
873
+ })
874
+ .transform(d => ({
875
+ name: d.name,
876
+ }));
877
+
878
+ export const marshalWorkspaceBaseEnvironmentSchema: z.ZodType = z
879
+ .object({
880
+ name: z.string().optional(),
881
+ displayName: z.string().optional(),
882
+ filepath: z.string().optional(),
883
+ creatorUserId: z.string().optional(),
884
+ createTime: z
885
+ .any()
886
+ .transform((d: Temporal.Instant) => d.toString())
887
+ .optional(),
888
+ lastUpdatedUserId: z.string().optional(),
889
+ updateTime: z
890
+ .any()
891
+ .transform((d: Temporal.Instant) => d.toString())
892
+ .optional(),
893
+ status: z.enum(WorkspaceBaseEnvironmentCache_Status).optional(),
894
+ message: z.string().optional(),
895
+ isDefault: z.boolean().optional(),
896
+ baseEnvironmentType: z.enum(BaseEnvironmentType).optional(),
897
+ })
898
+ .transform(d => ({
899
+ name: d.name,
900
+ display_name: d.displayName,
901
+ filepath: d.filepath,
902
+ creator_user_id: d.creatorUserId,
903
+ create_time: d.createTime,
904
+ last_updated_user_id: d.lastUpdatedUserId,
905
+ update_time: d.updateTime,
906
+ status: d.status,
907
+ message: d.message,
908
+ is_default: d.isDefault,
909
+ base_environment_type: d.baseEnvironmentType,
910
+ }));
911
+
912
+ const defaultWorkspaceBaseEnvironmentFieldMaskSchema: FieldMaskSchema = {
913
+ cpuWorkspaceBaseEnvironment: {wire: 'cpu_workspace_base_environment'},
914
+ gpuWorkspaceBaseEnvironment: {wire: 'gpu_workspace_base_environment'},
915
+ name: {wire: 'name'},
916
+ };
917
+
918
+ export function defaultWorkspaceBaseEnvironmentFieldMask(
919
+ ...paths: string[]
920
+ ): FieldMask<DefaultWorkspaceBaseEnvironment> {
921
+ return FieldMask.build<DefaultWorkspaceBaseEnvironment>(
922
+ paths,
923
+ defaultWorkspaceBaseEnvironmentFieldMaskSchema
924
+ );
925
+ }