@databricks/sdk-warehouses 0.1.0-dev.2 → 0.1.0-dev.4

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/model.ts DELETED
@@ -1,2008 +0,0 @@
1
- // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
-
3
- import {FieldMask} from '@databricks/sdk-core/wkt';
4
- import type {FieldMaskSchema} from '@databricks/sdk-core/wkt';
5
- import {z} from 'zod';
6
-
7
- export enum ChannelName {
8
- CHANNEL_NAME_UNSPECIFIED = 'CHANNEL_NAME_UNSPECIFIED',
9
- CHANNEL_NAME_PREVIEW = 'CHANNEL_NAME_PREVIEW',
10
- CHANNEL_NAME_CURRENT = 'CHANNEL_NAME_CURRENT',
11
- CHANNEL_NAME_PREVIOUS = 'CHANNEL_NAME_PREVIOUS',
12
- CHANNEL_NAME_CUSTOM = 'CHANNEL_NAME_CUSTOM',
13
- }
14
-
15
- /** Type of default warehouse override behavior. */
16
- export enum DefaultWarehouseOverrideType {
17
- /** Unspecified default warehouse override type. */
18
- DEFAULT_WAREHOUSE_OVERRIDE_TYPE_UNSPECIFIED = 'DEFAULT_WAREHOUSE_OVERRIDE_TYPE_UNSPECIFIED',
19
- /** The user should remember their last-selected warehouse. */
20
- LAST_SELECTED = 'LAST_SELECTED',
21
- /** The user should use a specific warehouse. */
22
- CUSTOM = 'CUSTOM',
23
- }
24
-
25
- /** Security policy to be used for warehouses */
26
- export enum EndpointSecurityPolicy {
27
- /** No passthrough or Table ACLs support */
28
- NONE = 'NONE',
29
- /** Support only Table ACLs */
30
- DATA_ACCESS_CONTROL = 'DATA_ACCESS_CONTROL',
31
- /** Support only ADLS / IAM passthrough */
32
- PASSTHROUGH = 'PASSTHROUGH',
33
- }
34
-
35
- /**
36
- * EndpointSpotInstancePolicy configures whether the endpoint should use spot
37
- * instances.
38
- *
39
- * The breakdown of how the EndpointSpotInstancePolicy converts to per cloud
40
- * configurations is:
41
- *
42
- * +-------+--------------------------------------+--------------------------------+
43
- * | Cloud | COST_OPTIMIZED | RELIABILITY_OPTIMIZED |
44
- * +-------+--------------------------------------+--------------------------------+
45
- * | AWS | On Demand Driver with Spot Executors | On Demand Driver and
46
- * Executors | | AZURE | On Demand Driver and Executors | On Demand Driver
47
- * and Executors |
48
- * +-------+--------------------------------------+--------------------------------+
49
- *
50
- * While including "spot" in the enum name may limit the the future
51
- * extensibility of this field because it limits this enum to denoting "spot or
52
- * not", this is the field that PM recommends after discussion with customers
53
- * per SC-48783.
54
- */
55
- export enum EndpointSpotInstancePolicy {
56
- /**
57
- * UNSPECIFIED if no value is set by the caller.
58
- * Consult endpoint docs to learn about the defaults that kick in if
59
- * UNSPECIFIED.
60
- *
61
- * Protobuf enums should start with INVALID/UNSPECIFIED=0
62
- * (https://github.com/uber/prototool/tree/dev/style#enums), but since proto
63
- * enum values must be unique within a proto package so protobuf recommends
64
- * prefixing enum with enum name
65
- * (https://buf.build/docs/lint-checkers/#enum_value_prefix). We do not want
66
- * to do that because it makes for unergonomic customer facing JSON api
67
- * {"spot_instance_policy": "ENDPOINT_SPOT_INSTANCE_POLICY_UNSPECIFIED"}.
68
- *
69
- * As a compromise between protobuf rules (i.e., package unique enum values)
70
- * and JSON friendliness, we prevent UNSPECIFIED collision but hope that the
71
- * rest of the enums do not collide.
72
- *
73
- * This follows Google APIs:
74
- * https://cloud.google.com/apis/design/design_patterns#enum_default_value.
75
- */
76
- POLICY_UNSPECIFIED = 'POLICY_UNSPECIFIED',
77
- /** COST_OPTIMIZED to prefer spot instance. */
78
- COST_OPTIMIZED = 'COST_OPTIMIZED',
79
- /** RELIABILITY_OPTIMIZED to prefer on demand instance. */
80
- RELIABILITY_OPTIMIZED = 'RELIABILITY_OPTIMIZED',
81
- }
82
-
83
- /**
84
- * *
85
- * State of a warehouse.
86
- */
87
- export enum EndpointState {
88
- /** Indicates that the endpoint is in the process of starting */
89
- STARTING = 'STARTING',
90
- /** Indicates the starting process is done, and the endpoint is ready to use */
91
- RUNNING = 'RUNNING',
92
- /** Indicates the endpoint is in the process of destroying */
93
- STOPPING = 'STOPPING',
94
- /** Indicates the endpoint is stopped, but can be started by calling start */
95
- STOPPED = 'STOPPED',
96
- /** Indicates the endpoint is in the process of destroying */
97
- DELETING = 'DELETING',
98
- /** Indicates an endpoint is deleted, and can not be recovered */
99
- DELETED = 'DELETED',
100
- }
101
-
102
- /** The status code indicating why the cluster was terminated */
103
- export enum TerminationCode {
104
- /** Default when there is no termination code. */
105
- UNKNOWN = 'UNKNOWN',
106
- /**
107
- * A user terminated the cluster directly. Parameters should include a ``username`` field
108
- * that indicates the specific user who terminated the cluster.
109
- */
110
- USER_REQUEST = 'USER_REQUEST',
111
- /** This cluster was launched by a Job, and terminated when the Job completed. */
112
- JOB_FINISHED = 'JOB_FINISHED',
113
- /** This cluster was terminated since it was idle. */
114
- INACTIVITY = 'INACTIVITY',
115
- /**
116
- * The instance that hosted the spark driver was terminated by the cloud provider. In AWS, for
117
- * example, AWS may retire instances and directly shut them down.
118
- * Parameters should include an ``aws_instance_state_reason`` field indicating the AWS-provided
119
- * reason why the instance was terminated.
120
- */
121
- CLOUD_PROVIDER_SHUTDOWN = 'CLOUD_PROVIDER_SHUTDOWN',
122
- /**
123
- * Databricks may lose connection to services on the driver instance. One such case is when
124
- * problems arise in cloud networking infrastructure, or when the instance itself becomes
125
- * unhealthy.
126
- */
127
- COMMUNICATION_LOST = 'COMMUNICATION_LOST',
128
- /**
129
- * Databricks may hit cloud provider failures when requesting instances to launch clusters.
130
- * For example, AWS limits the number of running instances and EBS volumes. If you ask Databricks
131
- * to launch a cluster that requires instances or EBS volumes that exceed your AWS limit, the
132
- * cluster will fail with this status code.
133
- * Parameters should include one of ``aws_api_error_code``, ``aws_instance_state_reason``, or
134
- * ``aws_spot_request_status`` to indicate the AWS-provided reason why Databricks could not
135
- * request the required instances for the cluster.
136
- */
137
- CLOUD_PROVIDER_LAUNCH_FAILURE = 'CLOUD_PROVIDER_LAUNCH_FAILURE',
138
- /**
139
- * Databricks cannot load and execute a cluster-scoped init script on one of the cluster's nodes,
140
- * or the init script terminates with a non-zero exit code or there was a general failure during
141
- * the loading/executing of init scripts that does not pertain to any specific script.
142
- */
143
- INIT_SCRIPT_FAILURE = 'INIT_SCRIPT_FAILURE',
144
- /**
145
- * The Spark driver failed to start. Possible reasons may include incompatible libraries and
146
- * initialization scripts that corrupted the Spark container.
147
- */
148
- SPARK_STARTUP_FAILURE = 'SPARK_STARTUP_FAILURE',
149
- /**
150
- * Cannot launch the cluster because the user specified an invalid argument. For example,
151
- * the use might specify an invalid spark version for the cluster.
152
- */
153
- INVALID_ARGUMENT = 'INVALID_ARGUMENT',
154
- /**
155
- * While launching this cluster, Databricks failed to complete critical setup steps, terminating
156
- * the cluster.
157
- */
158
- UNEXPECTED_LAUNCH_FAILURE = 'UNEXPECTED_LAUNCH_FAILURE',
159
- /**
160
- * Databricks encountered an unexpected error which forced the running cluster to be terminated.
161
- * Please contact Databricks support for additional details.
162
- */
163
- INTERNAL_ERROR = 'INTERNAL_ERROR',
164
- /**
165
- * Databricks was not able to access instances in order to start the cluster. This can be a
166
- * transient networking issue. If the problem persists, this usually indicates a networking
167
- * environment misconfiguration.
168
- */
169
- INSTANCE_UNREACHABLE = 'INSTANCE_UNREACHABLE',
170
- /**
171
- * Blocked upsize requests for the workspace according to
172
- * https://databricks.atlassian.net/wiki/spaces/UN/pages/934088320/Banning+Workspace+Upsize+Runbook
173
- */
174
- REQUEST_REJECTED = 'REQUEST_REJECTED',
175
- /** The cluster was terminated because it was running in a trial workspace that expired. */
176
- TRIAL_EXPIRED = 'TRIAL_EXPIRED',
177
- /**
178
- * The cluster was terminated because no response from the chauffeur could be received. We name
179
- * this "DRIVER_" instead of "CHAUFFEUR_" since chauffeur is non-external terminology
180
- */
181
- DRIVER_UNREACHABLE = 'DRIVER_UNREACHABLE',
182
- /** Spark error on startup */
183
- SPARK_ERROR = 'SPARK_ERROR',
184
- /** Driver unresponsive */
185
- DRIVER_UNRESPONSIVE = 'DRIVER_UNRESPONSIVE',
186
- /** Metastore component unhealthy */
187
- METASTORE_COMPONENT_UNHEALTHY = 'METASTORE_COMPONENT_UNHEALTHY',
188
- /** DBFS component unhealthy */
189
- DBFS_COMPONENT_UNHEALTHY = 'DBFS_COMPONENT_UNHEALTHY',
190
- /** Execution component unhealthy */
191
- EXECUTION_COMPONENT_UNHEALTHY = 'EXECUTION_COMPONENT_UNHEALTHY',
192
- /**
193
- * Databricks may hit the azure resource manager request limit. Which will keep the Azure SDK
194
- * from issuing any read or write request to Azure resource manager. The request limit is applied
195
- * to each subscription every hour, thus retry after an hour or changing to a smaller cluster size
196
- * might help to resolve the issue. Please check the following link for more information:
197
- * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits
198
- */
199
- AZURE_RESOURCE_MANAGER_THROTTLING = 'AZURE_RESOURCE_MANAGER_THROTTLING',
200
- /**
201
- * Databricks may hit the azure resource provider request limit. Specifically, the API request
202
- * rate to the specific resource type (Compute, Network, etc..) can't exceed the limit. Retry
203
- * might help to resolve the issue. Please check the following link for more information:
204
- * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/
205
- * troubleshooting-throttling-errors
206
- */
207
- AZURE_RESOURCE_PROVIDER_THROTTLING = 'AZURE_RESOURCE_PROVIDER_THROTTLING',
208
- /** The cluster was terminated due to an error in the network configuration. */
209
- NETWORK_CONFIGURATION_FAILURE = 'NETWORK_CONFIGURATION_FAILURE',
210
- /**
211
- * Databricks encountered an unexpected error while launching containers on worker nodes for the
212
- * cluster, terminating the cluster.
213
- */
214
- CONTAINER_LAUNCH_FAILURE = 'CONTAINER_LAUNCH_FAILURE',
215
- /** Instance pool backed cluster specific failure */
216
- INSTANCE_POOL_CLUSTER_FAILURE = 'INSTANCE_POOL_CLUSTER_FAILURE',
217
- /** Cluster start successfully completed but skipped some instances which were slow to launch */
218
- SKIPPED_SLOW_NODES = 'SKIPPED_SLOW_NODES',
219
- /** Attach projects failure */
220
- ATTACH_PROJECT_FAILURE = 'ATTACH_PROJECT_FAILURE',
221
- /** Attach projects failure */
222
- UPDATE_INSTANCE_PROFILE_FAILURE = 'UPDATE_INSTANCE_PROFILE_FAILURE',
223
- /** Cluster terminated due to database failure */
224
- DATABASE_CONNECTION_FAILURE = 'DATABASE_CONNECTION_FAILURE',
225
- /**
226
- * Databricks cannot handle the request at this moment. Please try again later
227
- * and contact Databricks if the problem persists.
228
- */
229
- REQUEST_THROTTLED = 'REQUEST_THROTTLED',
230
- /** SelfBootstrap failure. Either self-bootstrap fast fail or node daemon ping timeout */
231
- SELF_BOOTSTRAP_FAILURE = 'SELF_BOOTSTRAP_FAILURE',
232
- /**
233
- * Databricks cannot load and execute a global init script on one of the cluster's nodes,
234
- * or the init script terminates with a non-zero exit code.
235
- */
236
- GLOBAL_INIT_SCRIPT_FAILURE = 'GLOBAL_INIT_SCRIPT_FAILURE',
237
- /**
238
- * Container launch timed out downloading the spark image. This can happen if the customer
239
- * has byo-vpc/vnet and the download of large files is being throttled.
240
- */
241
- SLOW_IMAGE_DOWNLOAD = 'SLOW_IMAGE_DOWNLOAD',
242
- /** Container setup failed due to an invalid Spark image. */
243
- INVALID_SPARK_IMAGE = 'INVALID_SPARK_IMAGE',
244
- /**
245
- * If the ngrok tunnel token provisioning fails for any reason, for example hitting the
246
- * max capacity of allowed ngrok tokens. (ES-32083)
247
- */
248
- NPIP_TUNNEL_TOKEN_FAILURE = 'NPIP_TUNNEL_TOKEN_FAILURE',
249
- /** Hive Metastore provisioning failue in launch container step */
250
- HIVE_METASTORE_PROVISIONING_FAILURE = 'HIVE_METASTORE_PROVISIONING_FAILURE',
251
- /**
252
- * Occurs when the deployment template we submit to Azure violates their requirements.
253
- * Typical scenarios:
254
- * - Wrong parameter key/value used
255
- * - Exceed the limit for certain parameter
256
- */
257
- AZURE_INVALID_DEPLOYMENT_TEMPLATE = 'AZURE_INVALID_DEPLOYMENT_TEMPLATE',
258
- /**
259
- * The set of un-categorized failure responses from Azure when we launch instance resources
260
- * using deployment template
261
- */
262
- AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE = 'AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE',
263
- /** Subnet (typically Azure vnet injected) has run out of ip addresses */
264
- SUBNET_EXHAUSTED_FAILURE = 'SUBNET_EXHAUSTED_FAILURE',
265
- /**
266
- * Timeout to ping the nodeDaemon, possible reason: nodeDaemon didn't start (configuration issue),
267
- * network connectivity issue
268
- */
269
- BOOTSTRAP_TIMEOUT = 'BOOTSTRAP_TIMEOUT',
270
- /** Bootstrap timeout due to script download failure */
271
- STORAGE_DOWNLOAD_FAILURE = 'STORAGE_DOWNLOAD_FAILURE',
272
- /** Bootstrap timeout due to get runbook failure */
273
- CONTROL_PLANE_REQUEST_FAILURE = 'CONTROL_PLANE_REQUEST_FAILURE',
274
- /** Bootstrap timeout due to Azure Extension Service Failure */
275
- BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION = 'BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION',
276
- /** Could not find enough of the requested instance type in the requested AZ. Often related to Auto AZ. */
277
- AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE = 'AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE',
278
- /** Container setup failure due to docker image pulling failure */
279
- DOCKER_IMAGE_PULL_FAILURE = 'DOCKER_IMAGE_PULL_FAILURE',
280
- /**
281
- * Failures during azure vnet configuration. For example, a workspace with VNet injection had
282
- * incorrect DNS settings that blocked access to worker artifacts.
283
- */
284
- AZURE_VNET_CONFIGURATION_FAILURE = 'AZURE_VNET_CONFIGURATION_FAILURE',
285
- /**
286
- * Bootstrap failure due to Ngrok tunnel setup timeout or failure. For example, if the worker
287
- * node is unable to reach the Ngrok tunnel domain.
288
- */
289
- NPIP_TUNNEL_SETUP_FAILURE = 'NPIP_TUNNEL_SETUP_FAILURE',
290
- /**
291
- * Lack authorization for cluster operation.
292
- * For example, awsApiErrorCode: 'AccessDenied' or 'UnauthorizedOperation'.
293
- */
294
- AWS_AUTHORIZATION_FAILURE = 'AWS_AUTHORIZATION_FAILURE',
295
- /** request comes form Nephos resource pool auto management */
296
- NEPHOS_RESOURCE_MANAGEMENT = 'NEPHOS_RESOURCE_MANAGEMENT',
297
- /**
298
- * Container setup failed during container registration to security daemon due to STS endpoint
299
- * connection error.
300
- */
301
- STS_CLIENT_SETUP_FAILURE = 'STS_CLIENT_SETUP_FAILURE',
302
- /** Container setup failed during registration to security daemon due to an unspecified error. */
303
- SECURITY_DAEMON_REGISTRATION_EXCEPTION = 'SECURITY_DAEMON_REGISTRATION_EXCEPTION',
304
- /** The maximum request rate permitted by the Amazon EC2 APIs has been exceeded for your account. */
305
- AWS_REQUEST_LIMIT_EXCEEDED = 'AWS_REQUEST_LIMIT_EXCEEDED',
306
- /** We don't have enough addresses in the subnet for the instances in the request. */
307
- AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE = 'AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE',
308
- /** The request is not supported (This is a vague error code that can be thrown for a lot of reasons.) */
309
- AWS_UNSUPPORTED_FAILURE = 'AWS_UNSUPPORTED_FAILURE',
310
- /** Could not find enough azure resources to fulfill the request. */
311
- AZURE_QUOTA_EXCEEDED_EXCEPTION = 'AZURE_QUOTA_EXCEEDED_EXCEPTION',
312
- /** NOTE: This is currently used by exceptions with messages that are classified as user errors. */
313
- AZURE_OPERATION_NOT_ALLOWED_EXCEPTION = 'AZURE_OPERATION_NOT_ALLOWED_EXCEPTION',
314
- /** Failure when mounting remote NFS to container */
315
- NFS_MOUNT_FAILURE = 'NFS_MOUNT_FAILURE',
316
- /** K8S failed to upscale to acquire new nodes */
317
- K8S_AUTOSCALING_FAILURE = 'K8S_AUTOSCALING_FAILURE',
318
- /** DBR Cluster launched on K8s (i.e. CMv2) has failed to start up in time */
319
- K8S_DBR_CLUSTER_LAUNCH_TIMEOUT = 'K8S_DBR_CLUSTER_LAUNCH_TIMEOUT',
320
- /**
321
- * Container launch failed while downloading the spark image. Catch all for if anything
322
- * goes wrong while downloading and extracting the spark tarball.
323
- */
324
- SPARK_IMAGE_DOWNLOAD_FAILURE = 'SPARK_IMAGE_DOWNLOAD_FAILURE',
325
- /** Azure VM Extension failure during instance bootstrap */
326
- AZURE_VM_EXTENSION_FAILURE = 'AZURE_VM_EXTENSION_FAILURE',
327
- /** Workspace was cancelled hence deny/terminate the cluster */
328
- WORKSPACE_CANCELLED_ERROR = 'WORKSPACE_CANCELLED_ERROR',
329
- /** The spot instance count in an account has exceeded the limit */
330
- AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE = 'AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE',
331
- /**
332
- * Cluster is terminated because the services are temporarily unavailable.
333
- * This normally happens when CM is restarting and draining execution contexts,
334
- * or IM/Delegate is overloaded, so that it will not be able to retry the instance launch request.
335
- */
336
- TEMPORARILY_UNAVAILABLE = 'TEMPORARILY_UNAVAILABLE',
337
- /**
338
- * Bootstrap failure due to error during worker setup, usually due to an issue with
339
- * disk or gpu setup. See SetupCommandBuilder for other possible causes
340
- */
341
- WORKER_SETUP_FAILURE = 'WORKER_SETUP_FAILURE',
342
- /**
343
- * Cluster failure due to IP space exhaustion. For example on CMv2, Kubernetes will fail to scale
344
- * up new nodes if the pod IP CIDR block is exhausted.
345
- */
346
- IP_EXHAUSTION_FAILURE = 'IP_EXHAUSTION_FAILURE',
347
- /**
348
- * Could not find enough GCP resources to fulfill the request.
349
- * TODO: It's very unfortunate that we have per-cloud termination reasons while we should have
350
- * cloud-agnostic termination reasons. For example, we should consolidate
351
- * {AZURE_QUOTA_EXCEEDED_EXCEPTION, AWS_REQUEST_LIMIT_EXCEEDED and GCP_QUOTA_EXCEEDED},
352
- * {AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE, IP_EXHAUSTION_FAILURE}, etc.
353
- */
354
- GCP_QUOTA_EXCEEDED = 'GCP_QUOTA_EXCEEDED',
355
- /** Cloud provider is undergoing a transient resource throttling. This is retryable. */
356
- CLOUD_PROVIDER_RESOURCE_STOCKOUT = 'CLOUD_PROVIDER_RESOURCE_STOCKOUT',
357
- /** The GCP service account associated with the DBR cluster is deleted. */
358
- GCP_SERVICE_ACCOUNT_DELETED = 'GCP_SERVICE_ACCOUNT_DELETED',
359
- /** Legit cluster termination in Azure caused by customer revoking the key permission used for managed-disks encryption */
360
- AZURE_BYOK_KEY_PERMISSION_FAILURE = 'AZURE_BYOK_KEY_PERMISSION_FAILURE',
361
- /** Termination because of spot instance terminated by cloud provider */
362
- SPOT_INSTANCE_TERMINATION = 'SPOT_INSTANCE_TERMINATION',
363
- /** Termination because of unsupported azure ephemeral os disk setup */
364
- AZURE_EPHEMERAL_DISK_FAILURE = 'AZURE_EPHEMERAL_DISK_FAILURE',
365
- /**
366
- * The cluster was terminated because we detected an abusive runtime behavior that violated
367
- * Terms of Service or Acceptable Use Policy.
368
- */
369
- ABUSE_DETECTED = 'ABUSE_DETECTED',
370
- /** Failed to pull DBR images due to permission error. */
371
- IMAGE_PULL_PERMISSION_DENIED = 'IMAGE_PULL_PERMISSION_DENIED',
372
- /** Workspace configuration is in error state due to configuration issue or ACL modification by the customer side */
373
- WORKSPACE_CONFIGURATION_ERROR = 'WORKSPACE_CONFIGURATION_ERROR',
374
- /**
375
- * Catch all error for all secret resolution issues in cluster launch. This should be alerted on,
376
- * and is considered a server error. This can be split out into other cases if there are client
377
- * errors - for e.g. INVALID_ARGUMENT is used for secrets that don't exist and permission issues
378
- */
379
- SECRET_RESOLUTION_ERROR = 'SECRET_RESOLUTION_ERROR',
380
- /**
381
- * Failure due to an instance being of an unsupported type. This is used when an instance in
382
- * an EC2 fleet is of an unrecognized type, or an invalid type (i.e. graviton when we don't
383
- * want graviton instances). This should be alerted on.
384
- */
385
- UNSUPPORTED_INSTANCE_TYPE = 'UNSUPPORTED_INSTANCE_TYPE',
386
- /** Failed during instance bootstrap with error code Cannot convert NVMe-based dev id */
387
- CLOUD_PROVIDER_DISK_SETUP_FAILURE = 'CLOUD_PROVIDER_DISK_SETUP_FAILURE',
388
- /** Exception when setting up instances using ssh bootstrap */
389
- SSH_BOOTSTRAP_FAILURE = 'SSH_BOOTSTRAP_FAILURE',
390
- /** Failed during instance bootstrap with error code Cannot convert NVMe-based dev id */
391
- AWS_INACCESSIBLE_KMS_KEY_FAILURE = 'AWS_INACCESSIBLE_KMS_KEY_FAILURE',
392
- /**
393
- * The bootstrapping init-containers in Spark failed or timed out, blocking the Spark container
394
- * from bootstrapping. This is a refinement of `SPARK_STARTUP_FAILURE`.
395
- * (init-containers are a bootstrapping step owned by Databricks)
396
- */
397
- INIT_CONTAINER_NOT_FINISHED = 'INIT_CONTAINER_NOT_FINISHED',
398
- /**
399
- * Container launch failed due to storage servers throttling our download of spark images. Can
400
- * happen due to transient spikes of downloads overloading storage servers or gradual increase in
401
- * usage. In the latter case we need to increase the number of storage servers in the region to
402
- * help spread load.
403
- */
404
- SPARK_IMAGE_DOWNLOAD_THROTTLED = 'SPARK_IMAGE_DOWNLOAD_THROTTLED',
405
- /**
406
- * The spark image specified for the cluster was not found when attempting to download. Usually
407
- * due to the customer custom specifying a bad image.
408
- */
409
- SPARK_IMAGE_NOT_FOUND = 'SPARK_IMAGE_NOT_FOUND',
410
- /**
411
- * Indicates that the cloud provider operations performed for the cluster were dropped due to
412
- * an influx in load in the cloud provider and had to be dropped from our end to alleviate
413
- * pressure within the DelegateRpcClient. Please see go/cmloadshedding for more.
414
- */
415
- CLUSTER_OPERATION_THROTTLED = 'CLUSTER_OPERATION_THROTTLED',
416
- /**
417
- * The error code can be used to indicate a request misses its deadline. Can be used for either request timeouts
418
- * or missed deadlines (i.e. a request is not completed as it was processed after its specified deadline)
419
- */
420
- CLUSTER_OPERATION_TIMEOUT = 'CLUSTER_OPERATION_TIMEOUT',
421
- /**
422
- * This error code is used to terminate long-running Generic compute jobs in Serverless Environment
423
- * as part of the NephosLongRunning watcher running in Cluster Monitor Service.
424
- */
425
- SERVERLESS_LONG_RUNNING_TERMINATED = 'SERVERLESS_LONG_RUNNING_TERMINATED',
426
- /**
427
- * This error code is used when the cluster is terminated due to its instances fail with partial failure from Azure
428
- * packed deployments. In Azure, we might pack multiple launch requests in one deployment template in order
429
- * to avoid the 800 templates limit on Azure side. If the packed deployment fails multiple times, the cluster could
430
- * be terminated by this [[AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE]] termination code.
431
- */
432
- AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE = 'AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE',
433
- /**
434
- * The instances acquired from a pool in IMv2 do not have a valid worker image to be used in the
435
- * cluster launch. This usually occurs after AMI/VHD upgrades, worker branch updates, etc.
436
- */
437
- INVALID_WORKER_IMAGE_FAILURE = 'INVALID_WORKER_IMAGE_FAILURE',
438
- /** Worker environment version was changed due to workspace network or CMK update. */
439
- WORKSPACE_UPDATE = 'WORKSPACE_UPDATE',
440
- /** The parameter user specified or the user account to create the cluster is invalid according to AWS. */
441
- INVALID_AWS_PARAMETER = 'INVALID_AWS_PARAMETER',
442
- /**
443
- * ** Only relevant on k8s dataplanes (i.e. clusters launched with CMv2 - not CMv1).
444
- *
445
- * k8s evicted the driver pod due to disk pressure on the driver node. This is likely due to a
446
- * customer job consuming too much disk and so this is classified as a customer issue.
447
- */
448
- DRIVER_OUT_OF_DISK = 'DRIVER_OUT_OF_DISK',
449
- /**
450
- * ** Only relevant on k8s dataplanes (i.e. clusters launched with CMv2 - not CMv1).
451
- *
452
- * k8s evicted the driver pod due to memory pressure on the driver node. A customer job consuming
453
- * significant amounts of memory should not be able to trigger this as the driver container would
454
- * OOM first (we set memory limits on our pods). Thus this termination reason will be considered
455
- * a databricks issue.
456
- */
457
- DRIVER_OUT_OF_MEMORY = 'DRIVER_OUT_OF_MEMORY',
458
- /**
459
- * ** Only relevant on k8s dataplanes (i.e. clusters launched with CMv2 - not CMv1).
460
- * Original driver pod took too long to become ready and timed out.
461
- */
462
- DRIVER_LAUNCH_TIMEOUT = 'DRIVER_LAUNCH_TIMEOUT',
463
- /**
464
- * ** Only relevant on k8s dataplanes (i.e. clusters launched with CMv2 - not CMv1).
465
- * Unexpected failure during driver pod launch.
466
- */
467
- DRIVER_UNEXPECTED_FAILURE = 'DRIVER_UNEXPECTED_FAILURE',
468
- /**
469
- * ** Only relevant on k8s dataplanes (i.e. clusters launched with CMv2 - not CMv1).
470
- * Unexpected new driver pod created
471
- */
472
- UNEXPECTED_POD_RECREATION = 'UNEXPECTED_POD_RECREATION',
473
- /** Failure due to disabled or inaccessible CMK. */
474
- GCP_INACCESSIBLE_KMS_KEY_FAILURE = 'GCP_INACCESSIBLE_KMS_KEY_FAILURE',
475
- /** Failure due to missing/incorrect permission setup on CMK. */
476
- GCP_KMS_KEY_PERMISSION_DENIED = 'GCP_KMS_KEY_PERMISSION_DENIED',
477
- /** Driver pod evicted in Nephos */
478
- DRIVER_EVICTION = 'DRIVER_EVICTION',
479
- /** User request for termination directly to cloud */
480
- USER_INITIATED_VM_TERMINATION = 'USER_INITIATED_VM_TERMINATION',
481
- /** GCP Specific IAM API timeout issues during Workload Idenitity (Cluster Identity) binding process */
482
- GCP_IAM_TIMEOUT = 'GCP_IAM_TIMEOUT',
483
- /** Could not find enough AWS resources to fulfill the request */
484
- AWS_RESOURCE_QUOTA_EXCEEDED = 'AWS_RESOURCE_QUOTA_EXCEEDED',
485
- /** Cloud account setup has some error (e.g. pending email verification, blocked) */
486
- CLOUD_ACCOUNT_SETUP_FAILURE = 'CLOUD_ACCOUNT_SETUP_FAILURE',
487
- /** The specified key pair name does not exist. */
488
- AWS_INVALID_KEY_PAIR = 'AWS_INVALID_KEY_PAIR',
489
- /** Driver pod creation failure in nephos */
490
- DRIVER_POD_CREATION_FAILURE = 'DRIVER_POD_CREATION_FAILURE',
491
- /** Cluster terminated manually by on-call due to emergency maintenance */
492
- MAINTENANCE_MODE = 'MAINTENANCE_MODE',
493
- /** Nephos internal error due to insufficient provisioned k8s capacity or insufficient cloud quota */
494
- INTERNAL_CAPACITY_FAILURE = 'INTERNAL_CAPACITY_FAILURE',
495
- /** Nephos: could not acquire executor pods from pod pool */
496
- EXECUTOR_POD_UNSCHEDULED = 'EXECUTOR_POD_UNSCHEDULED',
497
- /** Artifact download failed because it was too slow */
498
- STORAGE_DOWNLOAD_FAILURE_SLOW = 'STORAGE_DOWNLOAD_FAILURE_SLOW',
499
- /** Artifact download failed because it was throttled by the download server */
500
- STORAGE_DOWNLOAD_FAILURE_THROTTLED = 'STORAGE_DOWNLOAD_FAILURE_THROTTLED',
501
- /** The cluster was terminated because the size of the dynamic spark conf exceeded the limit. */
502
- DYNAMIC_SPARK_CONF_SIZE_EXCEEDED = 'DYNAMIC_SPARK_CONF_SIZE_EXCEEDED',
503
- /** Failure to update the instance profile for the cluster. */
504
- AWS_INSTANCE_PROFILE_UPDATE_FAILURE = 'AWS_INSTANCE_PROFILE_UPDATE_FAILURE',
505
- /** The instance pool did not exist when the cluster was launched. */
506
- INSTANCE_POOL_NOT_FOUND = 'INSTANCE_POOL_NOT_FOUND',
507
- /** Attempting to launch more instances was rejected as it would exceed the pool's max capacity. */
508
- INSTANCE_POOL_MAX_CAPACITY_REACHED = 'INSTANCE_POOL_MAX_CAPACITY_REACHED',
509
- /** The KMS key provided is in an incorrect state. */
510
- AWS_INVALID_KMS_KEY_STATE = 'AWS_INVALID_KMS_KEY_STATE',
511
- /** Insufficient capacity failure from GCE API. */
512
- GCP_INSUFFICIENT_CAPACITY = 'GCP_INSUFFICIENT_CAPACITY',
513
- /** Rate quota exceeded for GCP API (e.g. Read requests per minute per region). */
514
- GCP_API_RATE_QUOTA_EXCEEDED = 'GCP_API_RATE_QUOTA_EXCEEDED',
515
- /** Resource quota exceeded (e.g. # of n1 vCPUs in a region). */
516
- GCP_RESOURCE_QUOTA_EXCEEDED = 'GCP_RESOURCE_QUOTA_EXCEEDED',
517
- /** Subnet IP space exhausted. */
518
- GCP_IP_SPACE_EXHAUSTED = 'GCP_IP_SPACE_EXHAUSTED',
519
- /** Missing permissions to launch VM with service account. */
520
- GCP_SERVICE_ACCOUNT_ACCESS_DENIED = 'GCP_SERVICE_ACCOUNT_ACCESS_DENIED',
521
- /** VM attempting to launch with non-existent service account. */
522
- GCP_SERVICE_ACCOUNT_NOT_FOUND = 'GCP_SERVICE_ACCOUNT_NOT_FOUND',
523
- /** Forbidden (403) returned by GCP API. */
524
- GCP_FORBIDDEN = 'GCP_FORBIDDEN',
525
- /** Not found (404) returned by GCP API. */
526
- GCP_NOT_FOUND = 'GCP_NOT_FOUND',
527
- /** Gatekeeper indicated the cluster should be shutdown */
528
- RESOURCE_USAGE_BLOCKED = 'RESOURCE_USAGE_BLOCKED',
529
- /** The data access config of the workspace has changed, and clusters using outdated config will be terminated. */
530
- DATA_ACCESS_CONFIG_CHANGED = 'DATA_ACCESS_CONFIG_CHANGED',
531
- /** Failed to fetch internal PAT token required for init script installation from WSFS/UC volumes */
532
- ACCESS_TOKEN_FAILURE = 'ACCESS_TOKEN_FAILURE',
533
- /**
534
- * It indicates there is a placement v2 protocol rollout/rollback event for the corresponding workspace when
535
- * processing the placement session on the instance-manager side. A retry will fix the issue by switching back
536
- * to the correct placement protocol.
537
- */
538
- INVALID_INSTANCE_PLACEMENT_PROTOCOL = 'INVALID_INSTANCE_PLACEMENT_PROTOCOL',
539
- /** The cluster was terminated as it failed to resolve budget policy. */
540
- BUDGET_POLICY_RESOLUTION_FAILURE = 'BUDGET_POLICY_RESOLUTION_FAILURE',
541
- /**
542
- * This customer/error combination is a known issue and is intentionally excluded from termination
543
- * metrics
544
- */
545
- IN_PENALTY_BOX = 'IN_PENALTY_BOX',
546
- /**
547
- * The cluster was terminated when the primary workspace failed over to the secondary workspace.
548
- * This is expected because there is no data plane in the secondary workspace.
549
- */
550
- DISASTER_RECOVERY_REPLICATION = 'DISASTER_RECOVERY_REPLICATION',
551
- /** A bootstrap timeout that was caused by misconfiguration on the customer's side */
552
- BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG = 'BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG',
553
- /** Instance unreachable, but due to misconfiguration on the customer's side */
554
- INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG = 'INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG',
555
- /** Bootstrap timeout due to script download failure, but due to misconfiguration on the customer's side */
556
- STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG = 'STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG',
557
- /** CPRF, but due to misconfiguration on the customer's side */
558
- CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG = 'CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG',
559
- /** CPLF, but due to misconfiguration on the customer's side */
560
- CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG = 'CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG',
561
- /** GCP subnet is in transient "resourceNotReady" state. */
562
- GCP_SUBNET_NOT_READY = 'GCP_SUBNET_NOT_READY',
563
- /** The operation on the cloud provider was cancelled. Possibly due to a user action. */
564
- CLOUD_OPERATION_CANCELLED = 'CLOUD_OPERATION_CANCELLED',
565
- /**
566
- * If cloud provider indicates instance creation was a success, yet the instance is never created.
567
- * This can happen in certain edge cases like quota exhaustion on GCP. We have an open bug here:
568
- * https://partnerissuetracker.corp.google.com/issues/339061883
569
- */
570
- CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED = 'CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED',
571
- /** GCP Databricks VM Machine Image is blocked by customer organization policy. */
572
- GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED = 'GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED',
573
- /** cluster terminate can happened when a budget policy limit enforcement activated */
574
- BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED = 'BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED',
575
- EOS_SPARK_IMAGE = 'EOS_SPARK_IMAGE',
576
- /** Serverless only. There are no eligible K8s for the cluster. */
577
- NO_MATCHED_K8S = 'NO_MATCHED_K8S',
578
- /** Lazy allocation timeout. Timeout before any internal DBR clusters were allocated. */
579
- LAZY_ALLOCATION_TIMEOUT = 'LAZY_ALLOCATION_TIMEOUT',
580
- /** CMv2 unable to contact chauffeur or node-daemon on the driver node. */
581
- DRIVER_NODE_UNREACHABLE = 'DRIVER_NODE_UNREACHABLE',
582
- /** Dynamic secret generation failed. */
583
- SECRET_CREATION_FAILURE = 'SECRET_CREATION_FAILURE',
584
- /** Driver or executor pod failed to be scheduled. */
585
- POD_SCHEDULING_FAILURE = 'POD_SCHEDULING_FAILURE',
586
- /** Driver or executor pod failed to finish assigning. */
587
- POD_ASSIGNMENT_FAILURE = 'POD_ASSIGNMENT_FAILURE',
588
- /** Lazy allocation timeout with unknown reason. */
589
- ALLOCATION_TIMEOUT = 'ALLOCATION_TIMEOUT',
590
- /** Lazy allocation timeout. Maps to NoUnallocatedDbrCluster. */
591
- ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS = 'ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS',
592
- /** Lazy allocation timeout. Maps to NoMatchedUnallocatedDbrCluster. */
593
- ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS = 'ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS',
594
- /** Lazy allocation timeout. Maps to NoUnallocatedReadyDbrCluster. */
595
- ALLOCATION_TIMEOUT_NO_READY_CLUSTERS = 'ALLOCATION_TIMEOUT_NO_READY_CLUSTERS',
596
- /** Lazy allocation timeout. Maps to NoMatchedUnallocatedWarmedUpDbrCluster. */
597
- ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS = 'ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS',
598
- /** Lazy allocation timeout. Maps to NoCandidatesWithNodeDaemonK8sReady. */
599
- ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY = 'ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY',
600
- /** Lazy allocation timeout. Maps to NoCandidatesHealthy. */
601
- ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS = 'ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS',
602
- /**
603
- * When nephos blocking wait for netvisor setup ready signal, terminated by timeout.
604
- * This error code only applies to clusters with the attribute should_block_for_network_readiness: true
605
- */
606
- NETVISOR_SETUP_TIMEOUT = 'NETVISOR_SETUP_TIMEOUT',
607
- /** Serverless only. The preselected K8s for the cluster is not eligible. */
608
- NO_MATCHED_K8S_TESTING_TAG = 'NO_MATCHED_K8S_TESTING_TAG',
609
- /** The customer's repeatedly attempting to launch clusters with some configuration that the CSP's not able to provide */
610
- CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG = 'CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG',
611
- /** For the GCP CMv1 Migration, we will terminate all CMv2 based clusters with this failure. */
612
- GKE_BASED_CLUSTER_TERMINATION = 'GKE_BASED_CLUSTER_TERMINATION',
613
- /** Lazy allocation timeout. Maps to NoCandidatesHealthyAndWarmedUp. */
614
- ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS = 'ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS',
615
- /** Docker container's OS was not valid. */
616
- DOCKER_INVALID_OS_EXCEPTION = 'DOCKER_INVALID_OS_EXCEPTION',
617
- /** Something went wrong during the creation of the docker container. */
618
- DOCKER_CONTAINER_CREATION_EXCEPTION = 'DOCKER_CONTAINER_CREATION_EXCEPTION',
619
- /** Customer passed in a docker image that's too large for the instance. */
620
- DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION = 'DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION',
621
- /** The cluster was terminated because the DNS resolution failed. */
622
- DNS_RESOLUTION_ERROR = 'DNS_RESOLUTION_ERROR',
623
- /** Org policy is preventing a GCE API operation from being executed. */
624
- GCP_DENIED_BY_ORG_POLICY = 'GCP_DENIED_BY_ORG_POLICY',
625
- /** Customer passed in a secret that they do not have permissions to resolve. */
626
- SECRET_PERMISSION_DENIED = 'SECRET_PERMISSION_DENIED',
627
- /** Start of network health check generated failures */
628
- NETWORK_CHECK_NIC_FAILURE = 'NETWORK_CHECK_NIC_FAILURE',
629
- NETWORK_CHECK_DNS_SERVER_FAILURE = 'NETWORK_CHECK_DNS_SERVER_FAILURE',
630
- NETWORK_CHECK_STORAGE_FAILURE = 'NETWORK_CHECK_STORAGE_FAILURE',
631
- NETWORK_CHECK_METADATA_ENDPOINT_FAILURE = 'NETWORK_CHECK_METADATA_ENDPOINT_FAILURE',
632
- NETWORK_CHECK_CONTROL_PLANE_FAILURE = 'NETWORK_CHECK_CONTROL_PLANE_FAILURE',
633
- NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE = 'NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE',
634
- /** Driver has been down or unresponsive for an extended period of time */
635
- DRIVER_UNHEALTHY = 'DRIVER_UNHEALTHY',
636
- /** cluster request is denied due to disallowed usage policy entitlement */
637
- USAGE_POLICY_ENTITLEMENT_DENIED = 'USAGE_POLICY_ENTITLEMENT_DENIED',
638
- /** Request exceeded MAX_ACTIVE_DBR_PODS_PER_K8S_CLUSTER quota - too many active pods on the K8s cluster */
639
- K8S_ACTIVE_POD_QUOTA_EXCEEDED = 'K8S_ACTIVE_POD_QUOTA_EXCEEDED',
640
- /** Request exceeded MAX_PODS_PER_CLOUD_ACCOUNT quota - subscription/cloud account pod limit reached */
641
- CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED = 'CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED',
642
- /** Start of network health check generated failures due to misconfiguration */
643
- NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG = 'NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG',
644
- NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG = 'NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG',
645
- NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG = 'NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG',
646
- NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG = 'NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG',
647
- NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG = 'NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG',
648
- NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG = 'NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG',
649
- /**
650
- * CMv2 could not resolve the DBR image for versionless workloads (REPL, GENERIC).
651
- * This typically happens when no spark version is found from the channel mapping
652
- * and the workload is versionless-enabled.
653
- */
654
- DBR_IMAGE_RESOLUTION_FAILURE = 'DBR_IMAGE_RESOLUTION_FAILURE',
655
- CONTROL_PLANE_CONNECTION_FAILURE = 'CONTROL_PLANE_CONNECTION_FAILURE',
656
- CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG = 'CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG',
657
- RATE_LIMITED = 'RATE_LIMITED',
658
- /** The cluster was terminated because mutual TLS port 8443 check failed. */
659
- MTLS_PORT_CONNECTIVITY_FAILURE = 'MTLS_PORT_CONNECTIVITY_FAILURE',
660
- /** The cluster was terminated because hivemetastore connectivity check failed. */
661
- HIVEMETASTORE_CONNECTIVITY_FAILURE = 'HIVEMETASTORE_CONNECTIVITY_FAILURE',
662
- }
663
-
664
- /** type of the termination */
665
- export enum TerminationType {
666
- /** Termination succeeded normally */
667
- SUCCESS = 'SUCCESS',
668
- /** Non-retryable. Client must fix parameters before reattempting the cluster creation */
669
- CLIENT_ERROR = 'CLIENT_ERROR',
670
- /** Databricks service issue. Clients may retry */
671
- SERVICE_FAULT = 'SERVICE_FAULT',
672
- /** AWS or Azure infrastructure issue. Clients may retry after the underlying cloud issue is resolved */
673
- CLOUD_FAILURE = 'CLOUD_FAILURE',
674
- }
675
-
676
- export enum WarehouseType {
677
- /** UNDOCUMENTED. Indicates no value is specified. */
678
- TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',
679
- /** Classic warehouse type */
680
- CLASSIC = 'CLASSIC',
681
- /** Pro warehouse type */
682
- PRO = 'PRO',
683
- }
684
-
685
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested enum name.
686
- export enum EndpointHealth_Status {
687
- /** UNDOCUMENTED. Indicates no value is specified. An implementation detail. */
688
- STATUS_UNSPECIFIED = 'STATUS_UNSPECIFIED',
689
- /** Endpoint is functioning normally and there are no known issues. */
690
- HEALTHY = 'HEALTHY',
691
- /**
692
- * Endpoint might be functional, but there are some known issues.
693
- * Performance might be affected.
694
- */
695
- DEGRADED = 'DEGRADED',
696
- /** Endpoint is severely affected. Likely will not be able to serve queries. */
697
- FAILED = 'FAILED',
698
- }
699
-
700
- /** Configures the channel name and DBSQL version of the warehouse. CHANNEL_NAME_CUSTOM should be chosen only when `dbsql_version` is specified. */
701
- export interface Channel {
702
- name?: ChannelName | undefined;
703
- dbsqlVersion?: string | undefined;
704
- }
705
-
706
- /** Request message for CreateDefaultWarehouseOverride. */
707
- export interface CreateDefaultWarehouseOverrideRequest {
708
- /**
709
- * Required. The ID to use for the override, which will become the final component
710
- * of the override's resource name.
711
- * Can be a numeric user ID or the literal string "me" for the current user.
712
- */
713
- defaultWarehouseOverrideId?: string | undefined;
714
- /** Required. The default warehouse override to create. */
715
- defaultWarehouseOverride?: DefaultWarehouseOverride | undefined;
716
- }
717
-
718
- /** Creates a new SQL warehouse. */
719
- export interface CreateWarehouseRequest {
720
- /**
721
- * Logical name for the cluster.
722
- *
723
- * Supported values:
724
- * - Must be unique within an org.
725
- * - Must be less than 100 characters.
726
- */
727
- name?: string | undefined;
728
- /**
729
- * Size of the clusters allocated for this warehouse.
730
- * Increasing the size of a spark cluster allows you to run larger queries on
731
- * it. If you want to increase the number of concurrent queries, please tune
732
- * max_num_clusters.
733
- *
734
- * Supported values:
735
- * - 2X-Small
736
- * - X-Small
737
- * - Small
738
- * - Medium
739
- * - Large
740
- * - X-Large
741
- * - 2X-Large
742
- * - 3X-Large
743
- * - 4X-Large
744
- * - 5X-Large
745
- */
746
- clusterSize?: string | undefined;
747
- /**
748
- * Minimum number of available clusters that will be maintained for this SQL
749
- * warehouse. Increasing this will ensure that a larger number of clusters are
750
- * always running and therefore may reduce the cold start time for new
751
- * queries. This is similar to reserved vs. revocable cores in a resource
752
- * manager.
753
- *
754
- * Supported values:
755
- * - Must be > 0
756
- * - Must be <= min(max_num_clusters, 30)
757
- *
758
- * Defaults to 1
759
- */
760
- minNumClusters?: number | undefined;
761
- /**
762
- * Maximum number of clusters that the autoscaler will create to handle
763
- * concurrent queries.
764
- *
765
- * Supported values:
766
- * - Must be >= min_num_clusters
767
- * - Must be <= 40.
768
- *
769
- * Defaults to min_clusters if unset.
770
- */
771
- maxNumClusters?: number | undefined;
772
- /**
773
- * The amount of time in minutes that a SQL warehouse must be idle (i.e., no
774
- * RUNNING queries) before it is automatically stopped.
775
- *
776
- * Supported values:
777
- * - Must be == 0 or >= 10 mins
778
- * - 0 indicates no autostop.
779
- *
780
- * Defaults to 120 mins
781
- */
782
- autoStopMins?: number | undefined;
783
- /** warehouse creator name */
784
- creatorName?: string | undefined;
785
- /** Deprecated. Instance profile used to pass IAM role to the cluster */
786
- instanceProfileArn?: string | undefined;
787
- /**
788
- * A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated
789
- * with this SQL warehouse.
790
- *
791
- * Supported values:
792
- * - Number of tags < 45.
793
- */
794
- tags?: EndpointTags | undefined;
795
- /** Configurations whether the endpoint should use spot instances. */
796
- spotInstancePolicy?: EndpointSpotInstancePolicy | undefined;
797
- /**
798
- * Configures whether the warehouse should use Photon optimized clusters.
799
- *
800
- * Defaults to true.
801
- */
802
- enablePhoton?: boolean | undefined;
803
- /** Channel Details */
804
- channel?: Channel | undefined;
805
- /** Configures whether the warehouse should use serverless compute */
806
- enableServerlessCompute?: boolean | undefined;
807
- /**
808
- * Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute,
809
- * you must set to `PRO` and also set the field `enable_serverless_compute` to `true`.
810
- */
811
- warehouseType?: WarehouseType | undefined;
812
- }
813
-
814
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
815
- export interface CreateWarehouseRequest_Response {
816
- /**
817
- * Id for the SQL warehouse.
818
- * This value is unique across all SQL warehouses.
819
- */
820
- id?: string | undefined;
821
- }
822
-
823
- /**
824
- * Represents a per-user default warehouse override configuration.
825
- * This resource allows users or administrators to customize how a user's
826
- * default warehouse is selected for SQL operations.
827
- * If no override exists for a user, the workspace default warehouse will be used.
828
- */
829
- export interface DefaultWarehouseOverride {
830
- /**
831
- * The resource name of the default warehouse override.
832
- * Format: default-warehouse-overrides/{default_warehouse_override_id}
833
- */
834
- name?: string | undefined;
835
- /** The ID component of the resource name (user ID). */
836
- defaultWarehouseOverrideId?: string | undefined;
837
- /** The type of override behavior. */
838
- type?: DefaultWarehouseOverrideType | undefined;
839
- /**
840
- * The specific warehouse ID when type is CUSTOM.
841
- * Not set for LAST_SELECTED type.
842
- */
843
- warehouseId?: string | undefined;
844
- }
845
-
846
- /** Request message for DeleteDefaultWarehouseOverride. */
847
- export interface DeleteDefaultWarehouseOverrideRequest {
848
- /**
849
- * Required. The resource name of the default warehouse override to delete.
850
- * Format: default-warehouse-overrides/{default_warehouse_override_id}
851
- * The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.
852
- */
853
- name?: string | undefined;
854
- }
855
-
856
- /**
857
- * This is an incremental edit functionality, so all fields except id are optional. If a field is set, the corresponding
858
- * configuration in the SQL warehouse is modified. If a field is unset, the existing configuration value in the SQL
859
- * warehouse is retained. Thus, this API is not idempotent.
860
- */
861
- export interface EditWarehouseRequest {
862
- /** Required. Id of the warehouse to configure. */
863
- id?: string | undefined;
864
- /**
865
- * Logical name for the cluster.
866
- *
867
- * Supported values:
868
- * - Must be unique within an org.
869
- * - Must be less than 100 characters.
870
- */
871
- name?: string | undefined;
872
- /**
873
- * Size of the clusters allocated for this warehouse.
874
- * Increasing the size of a spark cluster allows you to run larger queries on
875
- * it. If you want to increase the number of concurrent queries, please tune
876
- * max_num_clusters.
877
- *
878
- * Supported values:
879
- * - 2X-Small
880
- * - X-Small
881
- * - Small
882
- * - Medium
883
- * - Large
884
- * - X-Large
885
- * - 2X-Large
886
- * - 3X-Large
887
- * - 4X-Large
888
- * - 5X-Large
889
- */
890
- clusterSize?: string | undefined;
891
- /**
892
- * Minimum number of available clusters that will be maintained for this SQL
893
- * warehouse. Increasing this will ensure that a larger number of clusters are
894
- * always running and therefore may reduce the cold start time for new
895
- * queries. This is similar to reserved vs. revocable cores in a resource
896
- * manager.
897
- *
898
- * Supported values:
899
- * - Must be > 0
900
- * - Must be <= min(max_num_clusters, 30)
901
- *
902
- * Defaults to 1
903
- */
904
- minNumClusters?: number | undefined;
905
- /**
906
- * Maximum number of clusters that the autoscaler will create to handle
907
- * concurrent queries.
908
- *
909
- * Supported values:
910
- * - Must be >= min_num_clusters
911
- * - Must be <= 40.
912
- *
913
- * Defaults to min_clusters if unset.
914
- */
915
- maxNumClusters?: number | undefined;
916
- /**
917
- * The amount of time in minutes that a SQL warehouse must be idle (i.e., no
918
- * RUNNING queries) before it is automatically stopped.
919
- *
920
- * Supported values:
921
- * - Must be == 0 or >= 10 mins
922
- * - 0 indicates no autostop.
923
- *
924
- * Defaults to 120 mins
925
- */
926
- autoStopMins?: number | undefined;
927
- /** warehouse creator name */
928
- creatorName?: string | undefined;
929
- /** Deprecated. Instance profile used to pass IAM role to the cluster */
930
- instanceProfileArn?: string | undefined;
931
- /**
932
- * A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated
933
- * with this SQL warehouse.
934
- *
935
- * Supported values:
936
- * - Number of tags < 45.
937
- */
938
- tags?: EndpointTags | undefined;
939
- /** Configurations whether the endpoint should use spot instances. */
940
- spotInstancePolicy?: EndpointSpotInstancePolicy | undefined;
941
- /**
942
- * Configures whether the warehouse should use Photon optimized clusters.
943
- *
944
- * Defaults to true.
945
- */
946
- enablePhoton?: boolean | undefined;
947
- /** Channel Details */
948
- channel?: Channel | undefined;
949
- /** Configures whether the warehouse should use serverless compute */
950
- enableServerlessCompute?: boolean | undefined;
951
- /**
952
- * Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute,
953
- * you must set to `PRO` and also set the field `enable_serverless_compute` to `true`.
954
- */
955
- warehouseType?: WarehouseType | undefined;
956
- }
957
-
958
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
959
- export interface EditWarehouseRequest_Response {}
960
-
961
- export interface EndpointConfPair {
962
- key?: string | undefined;
963
- value?: string | undefined;
964
- }
965
-
966
- export interface EndpointHealth {
967
- /** Health status of the endpoint. */
968
- status?: EndpointHealth_Status | undefined;
969
- /** Deprecated. split into summary and details for security */
970
- message?: string | undefined;
971
- /** The reason for failure to bring up clusters for this warehouse. This is available when status is 'FAILED' and sometimes when it is DEGRADED. */
972
- failureReason?: TerminationReason | undefined;
973
- /** A short summary of the health status in case of degraded/failed warehouses. */
974
- summary?: string | undefined;
975
- /** Details about errors that are causing current degraded/failed status. */
976
- details?: string | undefined;
977
- }
978
-
979
- export interface EndpointInfo {
980
- /** unique identifier for warehouse */
981
- id?: string | undefined;
982
- /**
983
- * Logical name for the cluster.
984
- *
985
- * Supported values:
986
- * - Must be unique within an org.
987
- * - Must be less than 100 characters.
988
- */
989
- name?: string | undefined;
990
- /**
991
- * Size of the clusters allocated for this warehouse.
992
- * Increasing the size of a spark cluster allows you to run larger queries on
993
- * it. If you want to increase the number of concurrent queries, please tune
994
- * max_num_clusters.
995
- *
996
- * Supported values:
997
- * - 2X-Small
998
- * - X-Small
999
- * - Small
1000
- * - Medium
1001
- * - Large
1002
- * - X-Large
1003
- * - 2X-Large
1004
- * - 3X-Large
1005
- * - 4X-Large
1006
- * - 5X-Large
1007
- */
1008
- clusterSize?: string | undefined;
1009
- /**
1010
- * Minimum number of available clusters that will be maintained for this SQL
1011
- * warehouse. Increasing this will ensure that a larger number of clusters are
1012
- * always running and therefore may reduce the cold start time for new
1013
- * queries. This is similar to reserved vs. revocable cores in a resource
1014
- * manager.
1015
- *
1016
- * Supported values:
1017
- * - Must be > 0
1018
- * - Must be <= min(max_num_clusters, 30)
1019
- *
1020
- * Defaults to 1
1021
- */
1022
- minNumClusters?: number | undefined;
1023
- /**
1024
- * Maximum number of clusters that the autoscaler will create to handle
1025
- * concurrent queries.
1026
- *
1027
- * Supported values:
1028
- * - Must be >= min_num_clusters
1029
- * - Must be <= 40.
1030
- *
1031
- * Defaults to min_clusters if unset.
1032
- */
1033
- maxNumClusters?: number | undefined;
1034
- /**
1035
- * The amount of time in minutes that a SQL warehouse must be idle (i.e., no
1036
- * RUNNING queries) before it is automatically stopped.
1037
- *
1038
- * Supported values:
1039
- * - Must be == 0 or >= 10 mins
1040
- * - 0 indicates no autostop.
1041
- *
1042
- * Defaults to 120 mins
1043
- */
1044
- autoStopMins?: number | undefined;
1045
- /** warehouse creator name */
1046
- creatorName?: string | undefined;
1047
- /** Deprecated. Instance profile used to pass IAM role to the cluster */
1048
- instanceProfileArn?: string | undefined;
1049
- /**
1050
- * A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated
1051
- * with this SQL warehouse.
1052
- *
1053
- * Supported values:
1054
- * - Number of tags < 45.
1055
- */
1056
- tags?: EndpointTags | undefined;
1057
- /** Configurations whether the endpoint should use spot instances. */
1058
- spotInstancePolicy?: EndpointSpotInstancePolicy | undefined;
1059
- /**
1060
- * Configures whether the warehouse should use Photon optimized clusters.
1061
- *
1062
- * Defaults to true.
1063
- */
1064
- enablePhoton?: boolean | undefined;
1065
- /** Channel Details */
1066
- channel?: Channel | undefined;
1067
- /** Configures whether the warehouse should use serverless compute */
1068
- enableServerlessCompute?: boolean | undefined;
1069
- /**
1070
- * Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute,
1071
- * you must set to `PRO` and also set the field `enable_serverless_compute` to `true`.
1072
- */
1073
- warehouseType?: WarehouseType | undefined;
1074
- /** current number of clusters running for the service */
1075
- numClusters?: number | undefined;
1076
- /** Deprecated. current number of active sessions for the warehouse */
1077
- numActiveSessions?: bigint | undefined;
1078
- /** state of the endpoint */
1079
- state?: EndpointState | undefined;
1080
- /** the jdbc connection string for this warehouse */
1081
- jdbcUrl?: string | undefined;
1082
- /** ODBC parameters for the SQL warehouse */
1083
- odbcParams?: OdbcParams | undefined;
1084
- /** Optional health status. Assume the warehouse is healthy if this field is not set. */
1085
- health?: EndpointHealth | undefined;
1086
- }
1087
-
1088
- export interface EndpointTagPair {
1089
- key?: string | undefined;
1090
- value?: string | undefined;
1091
- }
1092
-
1093
- export interface EndpointTags {
1094
- customTags?: EndpointTagPair[] | undefined;
1095
- }
1096
-
1097
- /** Request message for GetDefaultWarehouseOverride. */
1098
- export interface GetDefaultWarehouseOverrideRequest {
1099
- /**
1100
- * Required. The resource name of the default warehouse override to retrieve.
1101
- * Format: default-warehouse-overrides/{default_warehouse_override_id}
1102
- * The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.
1103
- */
1104
- name?: string | undefined;
1105
- }
1106
-
1107
- /** Fetches the warehouse info for a single SQL warehouse. */
1108
- export interface GetWarehouseRequest {
1109
- /** Required. Id of the SQL warehouse. */
1110
- id?: string | undefined;
1111
- }
1112
-
1113
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1114
- export interface GetWarehouseRequest_Response {
1115
- /** unique identifier for warehouse */
1116
- id?: string | undefined;
1117
- /**
1118
- * Logical name for the cluster.
1119
- *
1120
- * Supported values:
1121
- * - Must be unique within an org.
1122
- * - Must be less than 100 characters.
1123
- */
1124
- name?: string | undefined;
1125
- /**
1126
- * Size of the clusters allocated for this warehouse.
1127
- * Increasing the size of a spark cluster allows you to run larger queries on
1128
- * it. If you want to increase the number of concurrent queries, please tune
1129
- * max_num_clusters.
1130
- *
1131
- * Supported values:
1132
- * - 2X-Small
1133
- * - X-Small
1134
- * - Small
1135
- * - Medium
1136
- * - Large
1137
- * - X-Large
1138
- * - 2X-Large
1139
- * - 3X-Large
1140
- * - 4X-Large
1141
- * - 5X-Large
1142
- */
1143
- clusterSize?: string | undefined;
1144
- /**
1145
- * Minimum number of available clusters that will be maintained for this SQL
1146
- * warehouse. Increasing this will ensure that a larger number of clusters are
1147
- * always running and therefore may reduce the cold start time for new
1148
- * queries. This is similar to reserved vs. revocable cores in a resource
1149
- * manager.
1150
- *
1151
- * Supported values:
1152
- * - Must be > 0
1153
- * - Must be <= min(max_num_clusters, 30)
1154
- *
1155
- * Defaults to 1
1156
- */
1157
- minNumClusters?: number | undefined;
1158
- /**
1159
- * Maximum number of clusters that the autoscaler will create to handle
1160
- * concurrent queries.
1161
- *
1162
- * Supported values:
1163
- * - Must be >= min_num_clusters
1164
- * - Must be <= 40.
1165
- *
1166
- * Defaults to min_clusters if unset.
1167
- */
1168
- maxNumClusters?: number | undefined;
1169
- /**
1170
- * The amount of time in minutes that a SQL warehouse must be idle (i.e., no
1171
- * RUNNING queries) before it is automatically stopped.
1172
- *
1173
- * Supported values:
1174
- * - Must be == 0 or >= 10 mins
1175
- * - 0 indicates no autostop.
1176
- *
1177
- * Defaults to 120 mins
1178
- */
1179
- autoStopMins?: number | undefined;
1180
- /** warehouse creator name */
1181
- creatorName?: string | undefined;
1182
- /** Deprecated. Instance profile used to pass IAM role to the cluster */
1183
- instanceProfileArn?: string | undefined;
1184
- /**
1185
- * A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated
1186
- * with this SQL warehouse.
1187
- *
1188
- * Supported values:
1189
- * - Number of tags < 45.
1190
- */
1191
- tags?: EndpointTags | undefined;
1192
- /** Configurations whether the endpoint should use spot instances. */
1193
- spotInstancePolicy?: EndpointSpotInstancePolicy | undefined;
1194
- /**
1195
- * Configures whether the warehouse should use Photon optimized clusters.
1196
- *
1197
- * Defaults to true.
1198
- */
1199
- enablePhoton?: boolean | undefined;
1200
- /** Channel Details */
1201
- channel?: Channel | undefined;
1202
- /** Configures whether the warehouse should use serverless compute */
1203
- enableServerlessCompute?: boolean | undefined;
1204
- /**
1205
- * Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute,
1206
- * you must set to `PRO` and also set the field `enable_serverless_compute` to `true`.
1207
- */
1208
- warehouseType?: WarehouseType | undefined;
1209
- /** current number of clusters running for the service */
1210
- numClusters?: number | undefined;
1211
- /** Deprecated. current number of active sessions for the warehouse */
1212
- numActiveSessions?: bigint | undefined;
1213
- /** state of the endpoint */
1214
- state?: EndpointState | undefined;
1215
- /** the jdbc connection string for this warehouse */
1216
- jdbcUrl?: string | undefined;
1217
- /** ODBC parameters for the SQL warehouse */
1218
- odbcParams?: OdbcParams | undefined;
1219
- /** Optional health status. Assume the warehouse is healthy if this field is not set. */
1220
- health?: EndpointHealth | undefined;
1221
- }
1222
-
1223
- /**
1224
- * Fetches the workspace level SQL warehouse configurations. These are the configurations that are set centrally and
1225
- * shared by all SQL warehouses in a workspace.
1226
- */
1227
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1228
- export interface GetWorkspaceWarehouseConfigRequest {}
1229
-
1230
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1231
- export interface GetWorkspaceWarehouseConfigRequest_Response {
1232
- /** Security policy for warehouses */
1233
- securityPolicy?: EndpointSecurityPolicy | undefined;
1234
- /**
1235
- * Spark confs for external hive metastore configuration
1236
- * JSON serialized size must be less than <= 512K
1237
- */
1238
- dataAccessConfig?: EndpointConfPair[] | undefined;
1239
- /**
1240
- * AWS Only: The instance profile used to pass an IAM role to the SQL
1241
- * warehouses. This configuration is also applied to the workspace's
1242
- * serverless compute for notebooks and jobs.
1243
- */
1244
- instanceProfileArn?: string | undefined;
1245
- /** Optional: Channel selection details */
1246
- channel?: Channel | undefined;
1247
- /** Deprecated: only setting this to true is allowed. */
1248
- enableServerlessCompute?: boolean | undefined;
1249
- /** Deprecated: Use sql_configuration_parameters */
1250
- globalParam?: RepeatedEndpointConfPairs | undefined;
1251
- /** Deprecated: Use sql_configuration_parameters */
1252
- configParam?: RepeatedEndpointConfPairs | undefined;
1253
- /** SQL configuration parameters */
1254
- sqlConfigurationParameters?: RepeatedEndpointConfPairs | undefined;
1255
- /**
1256
- * GCP only: Google Service Account used to pass to cluster to access Google
1257
- * Cloud Storage
1258
- */
1259
- googleServiceAccount?: string | undefined;
1260
- /**
1261
- * List of Warehouse Types allowed in this workspace (limits allowed value of
1262
- * the type field in CreateWarehouse and EditWarehouse). Note: Some types
1263
- * cannot be disabled, they don't need to be specified
1264
- * in SetWorkspaceWarehouseConfig.
1265
- * Note: Disabling a type may cause existing warehouses to be converted to
1266
- * another type. Used by frontend to save specific type availability in the
1267
- * warehouse create and edit form UI.
1268
- */
1269
- enabledWarehouseTypes?: WarehouseTypePair[] | undefined;
1270
- }
1271
-
1272
- /** Request message for ListDefaultWarehouseOverrides. */
1273
- export interface ListDefaultWarehouseOverridesRequest {
1274
- /**
1275
- * The maximum number of overrides to return. The service may return fewer than
1276
- * this value.
1277
- * If unspecified, at most 100 overrides will be returned.
1278
- * The maximum value is 1000; values above 1000 will be coerced to 1000.
1279
- */
1280
- pageSize?: number | undefined;
1281
- /**
1282
- * A page token, received from a previous `ListDefaultWarehouseOverrides` call.
1283
- * Provide this to retrieve the subsequent page.
1284
- *
1285
- * When paginating, all other parameters provided to `ListDefaultWarehouseOverrides`
1286
- * must match the call that provided the page token.
1287
- */
1288
- pageToken?: string | undefined;
1289
- }
1290
-
1291
- /** Response message for ListDefaultWarehouseOverrides. */
1292
- export interface ListDefaultWarehouseOverridesResponse {
1293
- /** The default warehouse overrides in the workspace. */
1294
- defaultWarehouseOverrides?: DefaultWarehouseOverride[] | undefined;
1295
- /**
1296
- * A token, which can be sent as `page_token` to retrieve the next page.
1297
- * If this field is omitted, there are no subsequent pages.
1298
- */
1299
- nextPageToken?: string | undefined;
1300
- }
1301
-
1302
- export interface OdbcParams {
1303
- hostname?: string | undefined;
1304
- path?: string | undefined;
1305
- protocol?: string | undefined;
1306
- port?: number | undefined;
1307
- }
1308
-
1309
- export interface RepeatedEndpointConfPairs {
1310
- /** Deprecated: Use configuration_pairs */
1311
- configPair?: EndpointConfPair[] | undefined;
1312
- configurationPairs?: EndpointConfPair[] | undefined;
1313
- }
1314
-
1315
- /**
1316
- * Sets the workspace level warehouse configuration that is shared by all SQL warehouses in this workspace.
1317
- *
1318
- * This is idempotent.
1319
- */
1320
- export interface SetWorkspaceWarehouseConfigRequest {
1321
- /** Security policy for warehouses */
1322
- securityPolicy?: EndpointSecurityPolicy | undefined;
1323
- /**
1324
- * Spark confs for external hive metastore configuration
1325
- * JSON serialized size must be less than <= 512K
1326
- */
1327
- dataAccessConfig?: EndpointConfPair[] | undefined;
1328
- /**
1329
- * AWS Only: The instance profile used to pass an IAM role to the SQL
1330
- * warehouses. This configuration is also applied to the workspace's
1331
- * serverless compute for notebooks and jobs.
1332
- */
1333
- instanceProfileArn?: string | undefined;
1334
- /** Optional: Channel selection details */
1335
- channel?: Channel | undefined;
1336
- /** Deprecated: only setting this to true is allowed. */
1337
- enableServerlessCompute?: boolean | undefined;
1338
- /** Deprecated: Use sql_configuration_parameters */
1339
- globalParam?: RepeatedEndpointConfPairs | undefined;
1340
- /** Deprecated: Use sql_configuration_parameters */
1341
- configParam?: RepeatedEndpointConfPairs | undefined;
1342
- /** SQL configuration parameters */
1343
- sqlConfigurationParameters?: RepeatedEndpointConfPairs | undefined;
1344
- /**
1345
- * GCP only: Google Service Account used to pass to cluster to access Google
1346
- * Cloud Storage
1347
- */
1348
- googleServiceAccount?: string | undefined;
1349
- /**
1350
- * List of Warehouse Types allowed in this workspace (limits allowed value of
1351
- * the type field in CreateWarehouse and EditWarehouse). Note: Some types
1352
- * cannot be disabled, they don't need to be specified
1353
- * in SetWorkspaceWarehouseConfig.
1354
- * Note: Disabling a type may cause existing warehouses to be converted to
1355
- * another type. Used by frontend to save specific type availability in the
1356
- * warehouse create and edit form UI.
1357
- */
1358
- enabledWarehouseTypes?: WarehouseTypePair[] | undefined;
1359
- }
1360
-
1361
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
1362
- export interface SetWorkspaceWarehouseConfigRequest_Response {}
1363
-
1364
- export interface TerminationReason {
1365
- /** status code indicating why the cluster was terminated */
1366
- code?: TerminationCode | undefined;
1367
- /** type of the termination */
1368
- type?: TerminationType | undefined;
1369
- /** list of parameters that provide additional information about why the cluster was terminated */
1370
- parameters?: Record<string, string> | undefined;
1371
- }
1372
-
1373
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1374
- export interface TerminationReason_ParametersEntry {
1375
- key?: string | undefined;
1376
- value?: string | undefined;
1377
- }
1378
-
1379
- /** Request message for UpdateDefaultWarehouseOverride. */
1380
- export interface UpdateDefaultWarehouseOverrideRequest {
1381
- /**
1382
- * Required. The default warehouse override to update.
1383
- * The name field must be set in the format: default-warehouse-overrides/{default_warehouse_override_id}
1384
- * The default_warehouse_override_id can be a numeric user ID or the literal string "me" for the current user.
1385
- */
1386
- defaultWarehouseOverride?: DefaultWarehouseOverride | undefined;
1387
- /**
1388
- * Required. Field mask specifying which fields to update.
1389
- * Only the fields specified in the mask will be updated.
1390
- * Use "*" to update all fields.
1391
- * When allow_missing is true, this field is ignored and all fields are applied.
1392
- */
1393
- updateMask?: FieldMask<DefaultWarehouseOverride> | undefined;
1394
- /**
1395
- * If set to true, and the override is not found, a new override will be created.
1396
- * In this situation, `update_mask` is ignored and all fields are applied.
1397
- * Defaults to false.
1398
- */
1399
- allowMissing?: boolean | undefined;
1400
- }
1401
-
1402
- /**
1403
- * *
1404
- * Configuration values to enable or disable the access to specific warehouse
1405
- * types in the workspace.
1406
- */
1407
- export interface WarehouseTypePair {
1408
- warehouseType?: WarehouseType | undefined;
1409
- /**
1410
- * If set to false the specific warehouse type will not be be allowed as a
1411
- * value for warehouse_type in CreateWarehouse and EditWarehouse
1412
- */
1413
- enabled?: boolean | undefined;
1414
- }
1415
-
1416
- /**
1417
- * Deletes a warehouse.
1418
- * This API is idempotent.
1419
- */
1420
- export interface DeleteWarehouseRequest {
1421
- /** Required. Id of the SQL warehouse. */
1422
- id?: string | undefined;
1423
- }
1424
-
1425
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
1426
- export interface DeleteWarehouseRequest_Response {}
1427
-
1428
- /**
1429
- * Lists all of the SQL warehouses.
1430
- * TODO: consider paginating to limit the number of warehouses returned.
1431
- */
1432
- export interface ListWarehousesRequest {
1433
- /**
1434
- * Deprecated: this field is ignored by the server.
1435
- * Service Principal which will be used to fetch the list of endpoints.
1436
- * If not specified, SQL Gateway will use the user from the session header.
1437
- */
1438
- runAsUserId?: bigint | undefined;
1439
- /** The max number of warehouses to return. */
1440
- pageSize?: number | undefined;
1441
- /**
1442
- * A page token, received from a previous `ListWarehouses` call.
1443
- * Provide this to retrieve the subsequent page; otherwise the first
1444
- * will be retrieved.
1445
- *
1446
- * When paginating, all other parameters provided to `ListWarehouses` must match
1447
- * the call that provided the page token.
1448
- */
1449
- pageToken?: string | undefined;
1450
- }
1451
-
1452
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1453
- export interface ListWarehousesRequest_Response {
1454
- /** A list of warehouses and their configurations. */
1455
- warehouses?: EndpointInfo[] | undefined;
1456
- /**
1457
- * A token, which can be sent as `page_token` to retrieve the next page.
1458
- * If this field is omitted, there are no subsequent pages.
1459
- */
1460
- nextPageToken?: string | undefined;
1461
- }
1462
-
1463
- /**
1464
- * Starts a SQL warehouse.
1465
- * This API is idempotent.
1466
- */
1467
- export interface StartRequest {
1468
- /** Required. Id of the SQL warehouse. */
1469
- id?: string | undefined;
1470
- }
1471
-
1472
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
1473
- export interface StartRequest_Response {}
1474
-
1475
- /**
1476
- * Stops a SQL warehouse.
1477
- * This API is idempotent.
1478
- */
1479
- export interface StopRequest {
1480
- /** Required. Id of the SQL warehouse. */
1481
- id?: string | undefined;
1482
- }
1483
-
1484
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
1485
- export interface StopRequest_Response {}
1486
-
1487
- export const unmarshalChannelSchema: z.ZodType<Channel> = z
1488
- .object({
1489
- name: z.enum(ChannelName).optional(),
1490
- dbsql_version: z.string().optional(),
1491
- })
1492
- .transform(d => ({
1493
- name: d.name,
1494
- dbsqlVersion: d.dbsql_version,
1495
- }));
1496
-
1497
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1498
- export const unmarshalCreateWarehouseRequest_ResponseSchema: z.ZodType<CreateWarehouseRequest_Response> =
1499
- z
1500
- .object({
1501
- id: z.string().optional(),
1502
- })
1503
- .transform(d => ({
1504
- id: d.id,
1505
- }));
1506
-
1507
- export const unmarshalDefaultWarehouseOverrideSchema: z.ZodType<DefaultWarehouseOverride> =
1508
- z
1509
- .object({
1510
- name: z.string().optional(),
1511
- default_warehouse_override_id: z.string().optional(),
1512
- type: z.enum(DefaultWarehouseOverrideType).optional(),
1513
- warehouse_id: z.string().optional(),
1514
- })
1515
- .transform(d => ({
1516
- name: d.name,
1517
- defaultWarehouseOverrideId: d.default_warehouse_override_id,
1518
- type: d.type,
1519
- warehouseId: d.warehouse_id,
1520
- }));
1521
-
1522
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1523
- export const unmarshalEditWarehouseRequest_ResponseSchema: z.ZodType<EditWarehouseRequest_Response> =
1524
- z.object({});
1525
-
1526
- export const unmarshalEndpointConfPairSchema: z.ZodType<EndpointConfPair> = z
1527
- .object({
1528
- key: z.string().optional(),
1529
- value: z.string().optional(),
1530
- })
1531
- .transform(d => ({
1532
- key: d.key,
1533
- value: d.value,
1534
- }));
1535
-
1536
- export const unmarshalEndpointHealthSchema: z.ZodType<EndpointHealth> = z
1537
- .object({
1538
- status: z.enum(EndpointHealth_Status).optional(),
1539
- message: z.string().optional(),
1540
- failure_reason: z.lazy(() => unmarshalTerminationReasonSchema).optional(),
1541
- summary: z.string().optional(),
1542
- details: z.string().optional(),
1543
- })
1544
- .transform(d => ({
1545
- status: d.status,
1546
- message: d.message,
1547
- failureReason: d.failure_reason,
1548
- summary: d.summary,
1549
- details: d.details,
1550
- }));
1551
-
1552
- export const unmarshalEndpointInfoSchema: z.ZodType<EndpointInfo> = z
1553
- .object({
1554
- id: z.string().optional(),
1555
- name: z.string().optional(),
1556
- cluster_size: z.string().optional(),
1557
- min_num_clusters: z.number().optional(),
1558
- max_num_clusters: z.number().optional(),
1559
- auto_stop_mins: z.number().optional(),
1560
- creator_name: z.string().optional(),
1561
- instance_profile_arn: z.string().optional(),
1562
- tags: z.lazy(() => unmarshalEndpointTagsSchema).optional(),
1563
- spot_instance_policy: z.enum(EndpointSpotInstancePolicy).optional(),
1564
- enable_photon: z.boolean().optional(),
1565
- channel: z.lazy(() => unmarshalChannelSchema).optional(),
1566
- enable_serverless_compute: z.boolean().optional(),
1567
- warehouse_type: z.enum(WarehouseType).optional(),
1568
- num_clusters: z.number().optional(),
1569
- num_active_sessions: z
1570
- .union([z.number(), z.bigint()])
1571
- .transform(v => BigInt(v))
1572
- .optional(),
1573
- state: z.enum(EndpointState).optional(),
1574
- jdbc_url: z.string().optional(),
1575
- odbc_params: z.lazy(() => unmarshalOdbcParamsSchema).optional(),
1576
- health: z.lazy(() => unmarshalEndpointHealthSchema).optional(),
1577
- })
1578
- .transform(d => ({
1579
- id: d.id,
1580
- name: d.name,
1581
- clusterSize: d.cluster_size,
1582
- minNumClusters: d.min_num_clusters,
1583
- maxNumClusters: d.max_num_clusters,
1584
- autoStopMins: d.auto_stop_mins,
1585
- creatorName: d.creator_name,
1586
- instanceProfileArn: d.instance_profile_arn,
1587
- tags: d.tags,
1588
- spotInstancePolicy: d.spot_instance_policy,
1589
- enablePhoton: d.enable_photon,
1590
- channel: d.channel,
1591
- enableServerlessCompute: d.enable_serverless_compute,
1592
- warehouseType: d.warehouse_type,
1593
- numClusters: d.num_clusters,
1594
- numActiveSessions: d.num_active_sessions,
1595
- state: d.state,
1596
- jdbcUrl: d.jdbc_url,
1597
- odbcParams: d.odbc_params,
1598
- health: d.health,
1599
- }));
1600
-
1601
- export const unmarshalEndpointTagPairSchema: z.ZodType<EndpointTagPair> = z
1602
- .object({
1603
- key: z.string().optional(),
1604
- value: z.string().optional(),
1605
- })
1606
- .transform(d => ({
1607
- key: d.key,
1608
- value: d.value,
1609
- }));
1610
-
1611
- export const unmarshalEndpointTagsSchema: z.ZodType<EndpointTags> = z
1612
- .object({
1613
- custom_tags: z
1614
- .array(z.lazy(() => unmarshalEndpointTagPairSchema))
1615
- .optional(),
1616
- })
1617
- .transform(d => ({
1618
- customTags: d.custom_tags,
1619
- }));
1620
-
1621
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1622
- export const unmarshalGetWarehouseRequest_ResponseSchema: z.ZodType<GetWarehouseRequest_Response> =
1623
- z
1624
- .object({
1625
- id: z.string().optional(),
1626
- name: z.string().optional(),
1627
- cluster_size: z.string().optional(),
1628
- min_num_clusters: z.number().optional(),
1629
- max_num_clusters: z.number().optional(),
1630
- auto_stop_mins: z.number().optional(),
1631
- creator_name: z.string().optional(),
1632
- instance_profile_arn: z.string().optional(),
1633
- tags: z.lazy(() => unmarshalEndpointTagsSchema).optional(),
1634
- spot_instance_policy: z.enum(EndpointSpotInstancePolicy).optional(),
1635
- enable_photon: z.boolean().optional(),
1636
- channel: z.lazy(() => unmarshalChannelSchema).optional(),
1637
- enable_serverless_compute: z.boolean().optional(),
1638
- warehouse_type: z.enum(WarehouseType).optional(),
1639
- num_clusters: z.number().optional(),
1640
- num_active_sessions: z
1641
- .union([z.number(), z.bigint()])
1642
- .transform(v => BigInt(v))
1643
- .optional(),
1644
- state: z.enum(EndpointState).optional(),
1645
- jdbc_url: z.string().optional(),
1646
- odbc_params: z.lazy(() => unmarshalOdbcParamsSchema).optional(),
1647
- health: z.lazy(() => unmarshalEndpointHealthSchema).optional(),
1648
- })
1649
- .transform(d => ({
1650
- id: d.id,
1651
- name: d.name,
1652
- clusterSize: d.cluster_size,
1653
- minNumClusters: d.min_num_clusters,
1654
- maxNumClusters: d.max_num_clusters,
1655
- autoStopMins: d.auto_stop_mins,
1656
- creatorName: d.creator_name,
1657
- instanceProfileArn: d.instance_profile_arn,
1658
- tags: d.tags,
1659
- spotInstancePolicy: d.spot_instance_policy,
1660
- enablePhoton: d.enable_photon,
1661
- channel: d.channel,
1662
- enableServerlessCompute: d.enable_serverless_compute,
1663
- warehouseType: d.warehouse_type,
1664
- numClusters: d.num_clusters,
1665
- numActiveSessions: d.num_active_sessions,
1666
- state: d.state,
1667
- jdbcUrl: d.jdbc_url,
1668
- odbcParams: d.odbc_params,
1669
- health: d.health,
1670
- }));
1671
-
1672
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1673
- export const unmarshalGetWorkspaceWarehouseConfigRequest_ResponseSchema: z.ZodType<GetWorkspaceWarehouseConfigRequest_Response> =
1674
- z
1675
- .object({
1676
- security_policy: z.enum(EndpointSecurityPolicy).optional(),
1677
- data_access_config: z
1678
- .array(z.lazy(() => unmarshalEndpointConfPairSchema))
1679
- .optional(),
1680
- instance_profile_arn: z.string().optional(),
1681
- channel: z.lazy(() => unmarshalChannelSchema).optional(),
1682
- enable_serverless_compute: z.boolean().optional(),
1683
- global_param: z
1684
- .lazy(() => unmarshalRepeatedEndpointConfPairsSchema)
1685
- .optional(),
1686
- config_param: z
1687
- .lazy(() => unmarshalRepeatedEndpointConfPairsSchema)
1688
- .optional(),
1689
- sql_configuration_parameters: z
1690
- .lazy(() => unmarshalRepeatedEndpointConfPairsSchema)
1691
- .optional(),
1692
- google_service_account: z.string().optional(),
1693
- enabled_warehouse_types: z
1694
- .array(z.lazy(() => unmarshalWarehouseTypePairSchema))
1695
- .optional(),
1696
- })
1697
- .transform(d => ({
1698
- securityPolicy: d.security_policy,
1699
- dataAccessConfig: d.data_access_config,
1700
- instanceProfileArn: d.instance_profile_arn,
1701
- channel: d.channel,
1702
- enableServerlessCompute: d.enable_serverless_compute,
1703
- globalParam: d.global_param,
1704
- configParam: d.config_param,
1705
- sqlConfigurationParameters: d.sql_configuration_parameters,
1706
- googleServiceAccount: d.google_service_account,
1707
- enabledWarehouseTypes: d.enabled_warehouse_types,
1708
- }));
1709
-
1710
- export const unmarshalListDefaultWarehouseOverridesResponseSchema: z.ZodType<ListDefaultWarehouseOverridesResponse> =
1711
- z
1712
- .object({
1713
- default_warehouse_overrides: z
1714
- .array(z.lazy(() => unmarshalDefaultWarehouseOverrideSchema))
1715
- .optional(),
1716
- next_page_token: z.string().optional(),
1717
- })
1718
- .transform(d => ({
1719
- defaultWarehouseOverrides: d.default_warehouse_overrides,
1720
- nextPageToken: d.next_page_token,
1721
- }));
1722
-
1723
- export const unmarshalOdbcParamsSchema: z.ZodType<OdbcParams> = z
1724
- .object({
1725
- hostname: z.string().optional(),
1726
- path: z.string().optional(),
1727
- protocol: z.string().optional(),
1728
- port: z.number().optional(),
1729
- })
1730
- .transform(d => ({
1731
- hostname: d.hostname,
1732
- path: d.path,
1733
- protocol: d.protocol,
1734
- port: d.port,
1735
- }));
1736
-
1737
- export const unmarshalRepeatedEndpointConfPairsSchema: z.ZodType<RepeatedEndpointConfPairs> =
1738
- z
1739
- .object({
1740
- config_pair: z
1741
- .array(z.lazy(() => unmarshalEndpointConfPairSchema))
1742
- .optional(),
1743
- configuration_pairs: z
1744
- .array(z.lazy(() => unmarshalEndpointConfPairSchema))
1745
- .optional(),
1746
- })
1747
- .transform(d => ({
1748
- configPair: d.config_pair,
1749
- configurationPairs: d.configuration_pairs,
1750
- }));
1751
-
1752
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1753
- export const unmarshalSetWorkspaceWarehouseConfigRequest_ResponseSchema: z.ZodType<SetWorkspaceWarehouseConfigRequest_Response> =
1754
- z.object({});
1755
-
1756
- export const unmarshalTerminationReasonSchema: z.ZodType<TerminationReason> = z
1757
- .object({
1758
- code: z.enum(TerminationCode).optional(),
1759
- type: z.enum(TerminationType).optional(),
1760
- parameters: z.record(z.string(), z.string()).optional(),
1761
- })
1762
- .transform(d => ({
1763
- code: d.code,
1764
- type: d.type,
1765
- parameters: d.parameters,
1766
- }));
1767
-
1768
- export const unmarshalWarehouseTypePairSchema: z.ZodType<WarehouseTypePair> = z
1769
- .object({
1770
- warehouse_type: z.enum(WarehouseType).optional(),
1771
- enabled: z.boolean().optional(),
1772
- })
1773
- .transform(d => ({
1774
- warehouseType: d.warehouse_type,
1775
- enabled: d.enabled,
1776
- }));
1777
-
1778
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1779
- export const unmarshalDeleteWarehouseRequest_ResponseSchema: z.ZodType<DeleteWarehouseRequest_Response> =
1780
- z.object({});
1781
-
1782
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1783
- export const unmarshalListWarehousesRequest_ResponseSchema: z.ZodType<ListWarehousesRequest_Response> =
1784
- z
1785
- .object({
1786
- warehouses: z.array(z.lazy(() => unmarshalEndpointInfoSchema)).optional(),
1787
- next_page_token: z.string().optional(),
1788
- })
1789
- .transform(d => ({
1790
- warehouses: d.warehouses,
1791
- nextPageToken: d.next_page_token,
1792
- }));
1793
-
1794
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1795
- export const unmarshalStartRequest_ResponseSchema: z.ZodType<StartRequest_Response> =
1796
- z.object({});
1797
-
1798
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
1799
- export const unmarshalStopRequest_ResponseSchema: z.ZodType<StopRequest_Response> =
1800
- z.object({});
1801
-
1802
- export const marshalChannelSchema: z.ZodType = z
1803
- .object({
1804
- name: z.enum(ChannelName).optional(),
1805
- dbsqlVersion: z.string().optional(),
1806
- })
1807
- .transform(d => ({
1808
- name: d.name,
1809
- dbsql_version: d.dbsqlVersion,
1810
- }));
1811
-
1812
- export const marshalCreateWarehouseRequestSchema: z.ZodType = z
1813
- .object({
1814
- name: z.string().optional(),
1815
- clusterSize: z.string().optional(),
1816
- minNumClusters: z.number().optional(),
1817
- maxNumClusters: z.number().optional(),
1818
- autoStopMins: z.number().optional(),
1819
- creatorName: z.string().optional(),
1820
- instanceProfileArn: z.string().optional(),
1821
- tags: z.lazy(() => marshalEndpointTagsSchema).optional(),
1822
- spotInstancePolicy: z.enum(EndpointSpotInstancePolicy).optional(),
1823
- enablePhoton: z.boolean().optional(),
1824
- channel: z.lazy(() => marshalChannelSchema).optional(),
1825
- enableServerlessCompute: z.boolean().optional(),
1826
- warehouseType: z.enum(WarehouseType).optional(),
1827
- })
1828
- .transform(d => ({
1829
- name: d.name,
1830
- cluster_size: d.clusterSize,
1831
- min_num_clusters: d.minNumClusters,
1832
- max_num_clusters: d.maxNumClusters,
1833
- auto_stop_mins: d.autoStopMins,
1834
- creator_name: d.creatorName,
1835
- instance_profile_arn: d.instanceProfileArn,
1836
- tags: d.tags,
1837
- spot_instance_policy: d.spotInstancePolicy,
1838
- enable_photon: d.enablePhoton,
1839
- channel: d.channel,
1840
- enable_serverless_compute: d.enableServerlessCompute,
1841
- warehouse_type: d.warehouseType,
1842
- }));
1843
-
1844
- export const marshalDefaultWarehouseOverrideSchema: z.ZodType = z
1845
- .object({
1846
- name: z.string().optional(),
1847
- defaultWarehouseOverrideId: z.string().optional(),
1848
- type: z.enum(DefaultWarehouseOverrideType).optional(),
1849
- warehouseId: z.string().optional(),
1850
- })
1851
- .transform(d => ({
1852
- name: d.name,
1853
- default_warehouse_override_id: d.defaultWarehouseOverrideId,
1854
- type: d.type,
1855
- warehouse_id: d.warehouseId,
1856
- }));
1857
-
1858
- export const marshalEditWarehouseRequestSchema: z.ZodType = z
1859
- .object({
1860
- id: z.string().optional(),
1861
- name: z.string().optional(),
1862
- clusterSize: z.string().optional(),
1863
- minNumClusters: z.number().optional(),
1864
- maxNumClusters: z.number().optional(),
1865
- autoStopMins: z.number().optional(),
1866
- creatorName: z.string().optional(),
1867
- instanceProfileArn: z.string().optional(),
1868
- tags: z.lazy(() => marshalEndpointTagsSchema).optional(),
1869
- spotInstancePolicy: z.enum(EndpointSpotInstancePolicy).optional(),
1870
- enablePhoton: z.boolean().optional(),
1871
- channel: z.lazy(() => marshalChannelSchema).optional(),
1872
- enableServerlessCompute: z.boolean().optional(),
1873
- warehouseType: z.enum(WarehouseType).optional(),
1874
- })
1875
- .transform(d => ({
1876
- id: d.id,
1877
- name: d.name,
1878
- cluster_size: d.clusterSize,
1879
- min_num_clusters: d.minNumClusters,
1880
- max_num_clusters: d.maxNumClusters,
1881
- auto_stop_mins: d.autoStopMins,
1882
- creator_name: d.creatorName,
1883
- instance_profile_arn: d.instanceProfileArn,
1884
- tags: d.tags,
1885
- spot_instance_policy: d.spotInstancePolicy,
1886
- enable_photon: d.enablePhoton,
1887
- channel: d.channel,
1888
- enable_serverless_compute: d.enableServerlessCompute,
1889
- warehouse_type: d.warehouseType,
1890
- }));
1891
-
1892
- export const marshalEndpointConfPairSchema: z.ZodType = z
1893
- .object({
1894
- key: z.string().optional(),
1895
- value: z.string().optional(),
1896
- })
1897
- .transform(d => ({
1898
- key: d.key,
1899
- value: d.value,
1900
- }));
1901
-
1902
- export const marshalEndpointTagPairSchema: z.ZodType = z
1903
- .object({
1904
- key: z.string().optional(),
1905
- value: z.string().optional(),
1906
- })
1907
- .transform(d => ({
1908
- key: d.key,
1909
- value: d.value,
1910
- }));
1911
-
1912
- export const marshalEndpointTagsSchema: z.ZodType = z
1913
- .object({
1914
- customTags: z.array(z.lazy(() => marshalEndpointTagPairSchema)).optional(),
1915
- })
1916
- .transform(d => ({
1917
- custom_tags: d.customTags,
1918
- }));
1919
-
1920
- export const marshalRepeatedEndpointConfPairsSchema: z.ZodType = z
1921
- .object({
1922
- configPair: z.array(z.lazy(() => marshalEndpointConfPairSchema)).optional(),
1923
- configurationPairs: z
1924
- .array(z.lazy(() => marshalEndpointConfPairSchema))
1925
- .optional(),
1926
- })
1927
- .transform(d => ({
1928
- config_pair: d.configPair,
1929
- configuration_pairs: d.configurationPairs,
1930
- }));
1931
-
1932
- export const marshalSetWorkspaceWarehouseConfigRequestSchema: z.ZodType = z
1933
- .object({
1934
- securityPolicy: z.enum(EndpointSecurityPolicy).optional(),
1935
- dataAccessConfig: z
1936
- .array(z.lazy(() => marshalEndpointConfPairSchema))
1937
- .optional(),
1938
- instanceProfileArn: z.string().optional(),
1939
- channel: z.lazy(() => marshalChannelSchema).optional(),
1940
- enableServerlessCompute: z.boolean().optional(),
1941
- globalParam: z
1942
- .lazy(() => marshalRepeatedEndpointConfPairsSchema)
1943
- .optional(),
1944
- configParam: z
1945
- .lazy(() => marshalRepeatedEndpointConfPairsSchema)
1946
- .optional(),
1947
- sqlConfigurationParameters: z
1948
- .lazy(() => marshalRepeatedEndpointConfPairsSchema)
1949
- .optional(),
1950
- googleServiceAccount: z.string().optional(),
1951
- enabledWarehouseTypes: z
1952
- .array(z.lazy(() => marshalWarehouseTypePairSchema))
1953
- .optional(),
1954
- })
1955
- .transform(d => ({
1956
- security_policy: d.securityPolicy,
1957
- data_access_config: d.dataAccessConfig,
1958
- instance_profile_arn: d.instanceProfileArn,
1959
- channel: d.channel,
1960
- enable_serverless_compute: d.enableServerlessCompute,
1961
- global_param: d.globalParam,
1962
- config_param: d.configParam,
1963
- sql_configuration_parameters: d.sqlConfigurationParameters,
1964
- google_service_account: d.googleServiceAccount,
1965
- enabled_warehouse_types: d.enabledWarehouseTypes,
1966
- }));
1967
-
1968
- export const marshalWarehouseTypePairSchema: z.ZodType = z
1969
- .object({
1970
- warehouseType: z.enum(WarehouseType).optional(),
1971
- enabled: z.boolean().optional(),
1972
- })
1973
- .transform(d => ({
1974
- warehouse_type: d.warehouseType,
1975
- enabled: d.enabled,
1976
- }));
1977
-
1978
- export const marshalStartRequestSchema: z.ZodType = z
1979
- .object({
1980
- id: z.string().optional(),
1981
- })
1982
- .transform(d => ({
1983
- id: d.id,
1984
- }));
1985
-
1986
- export const marshalStopRequestSchema: z.ZodType = z
1987
- .object({
1988
- id: z.string().optional(),
1989
- })
1990
- .transform(d => ({
1991
- id: d.id,
1992
- }));
1993
-
1994
- const defaultWarehouseOverrideFieldMaskSchema: FieldMaskSchema = {
1995
- defaultWarehouseOverrideId: {wire: 'default_warehouse_override_id'},
1996
- name: {wire: 'name'},
1997
- type: {wire: 'type'},
1998
- warehouseId: {wire: 'warehouse_id'},
1999
- };
2000
-
2001
- export function defaultWarehouseOverrideFieldMask(
2002
- ...paths: string[]
2003
- ): FieldMask<DefaultWarehouseOverride> {
2004
- return FieldMask.build<DefaultWarehouseOverride>(
2005
- paths,
2006
- defaultWarehouseOverrideFieldMaskSchema
2007
- );
2008
- }