Skip to main content

Policy

View as Markdown

Cancel Pending Cluster Enforcement GA

POST /api/2.0/policies/clusters:cancelPendingClusterEnforcement

Cancels a pending enforcement on a cluster. After canceling the pending enforcement, the cluster will no longer update on the next termination or restart. Pending enforcements cannot be canceled when a cluster is in TERMINATING state. Only workspace admins can cancel pending enforcements.

API scopes: clusters

Request body

cluster_idstring

The ID of the cluster to cancel the pending enforcement for.

allow_missingboolean

If true and no pending enforcement exists, the request will succeed but no action will be taken.

Default: false

Enforce Policy Compliance For Cluster GA

POST /api/2.0/policies/clusters/enforce-compliance

Updates a cluster to be compliant with the current version of its policy.

If a cluster is updated while in a TERMINATED state, it will remain TERMINATED. The next time the cluster is started, the new attributes will take effect.

For clusters in other states, the behavior depends on the enforce_mode used.

Clusters created by the Databricks Jobs, SDP, or Models services cannot be enforced by this API. Instead, use the "Enforce job policy compliance" API to enforce policy compliance on jobs.

API scopes: clusters

Request body

cluster_idstring

The ID of the cluster you want to enforce policy compliance on.

validate_onlyboolean

If set, previews the changes that would be made to a cluster to enforce compliance but does not update the cluster.

Default: false

enforce_modestring

Determines how changes should be made to clusters that are not in TERMINATED state.

  • ENFORCE_IMMEDIATELY: If the cluster is in a RUNNING state, it will be restarted so that the new attributes can take effect. For other states aside from TERMINATED state, the request will be rejected.
  • WAIT_FOR_TERMINATION: The cluster is not immediately edited. Instead, a pending enforcement is scheduled to update the cluster when it terminates or restarts. When this occurs, enforce_result will contain DEFERRED. Only workspace admins can use this mode.

Regardless of the enforce mode, clusters in TERMINATED state are immediately edited.

Default: ENFORCE_IMMEDIATELY

Values: ENFORCE_MODE_UNSPECIFIED, ENFORCE_IMMEDIATELY, WAIT_FOR_TERMINATION

Response

has_changesboolean

Whether any changes have been made to the cluster settings for the cluster to become compliant with its policy.

changesarray of object

A list of changes that have been made to the cluster settings for the cluster to become compliant with its policy.

Show child attributesHide child attributes
fieldstring

The field where this change would be made.

Example: spark_version

previous_valuestring

The previous value of this field before enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The type of the field can be retrieved by reading the settings field in the API response.

Example: 10.4.x-scala2.12

new_valuestring

The new value of this field after enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The typed new value of this field can be retrieved by reading the settings field in the API response.

Example: 14.3.x-scala2.12

enforce_resultstring

Describes whether changes have been applied to the cluster.

Values: ENFORCE_RESULT_UNSPECIFIED, NO_CHANGES, APPLIED, DEFERRED

Get Policy Compliance For Cluster GA

GET /api/2.0/policies/clusters/get-compliance

Returns the policy compliance status of a cluster. Clusters could be out of compliance if their policy was updated after the cluster was last edited.

API scopes: clusters

Parameters

cluster_idstringquery

The ID of the cluster to get the compliance status

Response

is_compliantboolean

Whether the cluster is compliant with its policy or not. Clusters could be out of compliance if the policy was updated after the cluster was last edited.

violationsobject

An object containing key-value mappings representing the first 200 policy validation errors. The keys indicate the path where the policy validation error is occurring. The values indicate an error message describing the policy validation error.

pending_enforcementobject

Information about the pending enforcement for the cluster. Only present if a pending enforcement is scheduled for the cluster.

Show child attributesHide child attributes
target_specobject

The new configuration to apply upon cluster termination or restart.

Show child attributesHide child attributes
cluster_namestring

Cluster name requested by the user. This doesn't have to be unique. If not specified at creation, the cluster name will be an empty string. For job clusters, the cluster name is automatically set based on the job and job run IDs.

spark_versionstring

The Spark version of the cluster, e.g. 3.3.x-scala2.11. A list of available Spark versions can be retrieved by using the clusters/sparkVersions API call.

spark_confobject

An object containing a set of optional, user-specified Spark configuration key-value pairs. Users can also pass in a string of extra JVM options to the driver and the executors via spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively.

aws_attributesobject

Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used.

Show child attributesHide child attributes
first_on_demandint32

The first first_on_demand nodes of the cluster will be placed on on-demand instances. If this value is greater than 0, the cluster driver node in particular will be placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the remainder will be placed on availability instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster.

Default: 0

availabilitystring

Default: SPOT_WITH_FALLBACK

Values: SPOT, ON_DEMAND, SPOT_WITH_FALLBACK

zone_idstring

Identifier for the availability zone/datacenter in which the cluster resides. This string will be of a form like "us-west-2a". The provided availability zone must be in the same region as the <Databricks> deployment. For example, "us-west-2a" is not a valid zone id if the <Databricks> deployment resides in the "us-east-1" region. This is an optional field at cluster creation, and if not specified, the zone "auto" will be used. If the zone specified is "auto", will try to place cluster in a zone with high availability, and will retry placement in a different AZ if there is not enough capacity.

The list of available zones as well as the default value can be found by using the List Zones method.

instance_profile_arnstring

Nodes for this cluster will only be placed on AWS instances with this instance profile. If ommitted, nodes will be placed on instances without an IAM instance profile. The instance profile must have previously been added to the <Databricks> environment by an account administrator.

This feature may only be available to certain customer plans.

spot_bid_price_percentint32

The bid price for AWS spot instances, as a percentage of the corresponding instance type's on-demand price. For example, if this field is set to 50, and the cluster needs a new r3.xlarge spot instance, then the bid price is half of the price of on-demand r3.xlarge instances. Similarly, if this field is set to 200, the bid price is twice the price of on-demand r3.xlarge instances. If not specified, the default value is 100. When spot instances are requested for this cluster, only spot instances whose bid price percentage matches this field will be considered. Note that, for safety, we enforce this field to be no more than 10000.

Default: 100

ebs_volume_typestring

The type of EBS volumes that will be launched with this cluster.

Values: GENERAL_PURPOSE_SSD, THROUGHPUT_OPTIMIZED_HDD

ebs_volume_countint32

The number of volumes launched for each instance. Users can choose up to 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster creation will fail.

These EBS volumes will be mounted at /ebs0, /ebs1, and etc. Instance store volumes will be mounted at /local_disk0, /local_disk1, and etc.

If EBS volumes are attached, <Databricks> will configure Spark to use only the EBS volumes for scratch storage because heterogenously sized scratch devices can lead to inefficient disk utilization. If no EBS volumes are attached, <Databricks> will configure Spark to use instance store volumes.

Please note that if EBS volumes are specified, then the Spark configuration spark.local.dir will be overridden.

Default: 0

ebs_volume_sizeint32

The size of each EBS volume (in GiB) launched for each instance. For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this value must be within the range 500 - 4096.

ebs_volume_iopsint32

If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used.

ebs_volume_throughputint32

If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used.

azure_attributesobject

Attributes related to clusters running on Microsoft Azure. If not specified at cluster creation, a set of default values will be used.

Show child attributesHide child attributes
log_analytics_infoobject

Defines values necessary to configure and run Azure Log Analytics agent

first_on_demandint32

The first first_on_demand nodes of the cluster will be placed on on-demand instances. This value should be greater than 0, to make sure the cluster driver node is placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the remainder will be placed on availability instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster.

Default: 1

availabilitystring

Availability type used for all subsequent nodes past the first_on_demand ones. Note: If first_on_demand is zero, this availability type will be used for the entire cluster.

Default: ON_DEMAND_AZURE

Values: SPOT_AZURE, ON_DEMAND_AZURE, SPOT_WITH_FALLBACK_AZURE

spot_bid_max_pricedouble

The max bid price to be used for Azure spot instances. The Max price for the bid cannot be higher than the on-demand price of the instance. If not specified, the default value is -1, which specifies that the instance cannot be evicted on the basis of price, and only on the basis of availability. Further, the value should > 0 or -1.

Default: -1

capacity_reservation_groupstring

The Azure capacity reservation group resource ID to use for launching VMs. When specified, VMs will be launched using the provided capacity reservation.

Capacity reservations can only be specified when the workspace uses injected vnet (i.e. customer defined vnet not managed by databricks). Ensure the databricks-login-prod Enterprise Application is granted the following four permissions:

  1. Microsoft.Compute/capacityReservationGroups/read
  2. Microsoft.Compute/capacityReservationGroups/deploy/action
  3. Microsoft.Compute/capacityReservationGroups/capacityReservations/read
  4. Microsoft.Compute/capacityReservationGroups/capacityReservations/deploy/action

Format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}

gcp_attributesobject

Attributes related to clusters running on Google Cloud Platform. If not specified at cluster creation, a set of default values will be used.

Show child attributesHide child attributes
use_preemptible_executorsboolean

This field determines whether the spark executors will be scheduled to run on preemptible VMs (when set to true) versus standard compute engine VMs (when set to false; default). Note: Soon to be deprecated, use the 'availability' field instead.

Default: false

google_service_accountstring

If provided, the cluster will impersonate the google service account when accessing gcloud services (like GCS). The google service account must have previously been added to the <Databricks> environment by an account administrator.

boot_disk_sizeint32

Boot disk size in GB

availabilitystring

This field determines whether the spark executors will be scheduled to run on preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable.

Default: ON_DEMAND_GCP

Values: PREEMPTIBLE_GCP, ON_DEMAND_GCP, PREEMPTIBLE_WITH_FALLBACK_GCP

zone_idstring

Identifier for the availability zone in which the cluster resides. This can be one of the following:

  • "HA" => High availability, spread nodes across availability zones for a <Databricks> deployment region [default].
  • "AUTO" => <Databricks> picks an availability zone to schedule the cluster on.
  • A GCP availability zone => Pick One of the available zones for (machine type + region) from https://cloud.google.com/compute/docs/regions-zones.

Default: HA

local_ssd_countint32

If provided, each node (workers and driver) in the cluster will have this number of local SSDs attached. Each local SSD is 375GB in size. Refer to GCP documentation for the supported number of local SSDs for each instance type.

first_on_demandint32

The first first_on_demand nodes of the cluster will be placed on on-demand instances. This value should be greater than 0, to make sure the cluster driver node is placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the remainder will be placed on availability instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster.

Default: 1

node_type_idstring

This field encodes, through a single value, the resources available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or compute intensive workloads. A list of available node types can be retrieved by using the clusters/listNodeTypes API call.

driver_node_type_idstring

The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as node_type_id defined above.

This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence.

worker_node_type_flexibilityobject

Flexible node type configuration for worker nodes.

Show child attributesHide child attributes
alternate_node_type_idsarray of string

A list of node type IDs to use as fallbacks when the primary node type is unavailable.

driver_node_type_flexibilityobject

Flexible node type configuration for the driver node.

Show child attributesHide child attributes
alternate_node_type_idsarray of string

A list of node type IDs to use as fallbacks when the primary node type is unavailable.

ssh_public_keysarray of string

SSH public key contents that will be added to each Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. Up to 10 keys can be specified.

custom_tagsobject

Additional tags for cluster resources. <Databricks> will tag all cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to default_tags. Notes:

  • Currently, <Databricks> allows at most 45 custom tags

  • Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags

cluster_log_confobject

The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every 5 mins. The destination of driver logs is $destination/$clusterId/driver, while the destination of executor logs is $destination/$clusterId/executor.

Show child attributesHide child attributes
dbfsobjectRequired

destination needs to be provided. e.g. { "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }

s3objectRequired

destination and either the region or endpoint need to be provided. e.g. { "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } } Cluster iam role is used to access s3, please make sure the cluster iam role in instance_profile_arn has permission to write data to the s3 destination.

volumesobjectRequired

destination needs to be provided, e.g. { "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }

spark_env_varsobject

An object containing a set of optional, user-specified environment variable key-value pairs. Please note that key-value pair of the form (X,Y) will be exported as is (i.e., export X='Y') while launching the driver and workers.

In order to specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them to $SPARK_DAEMON_JAVA_OPTS as shown in the example below. This ensures that all default databricks managed environmental variables are included as well.

Example Spark environment variables: {"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"} or {"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}

autotermination_minutesint32

Automatically terminates the cluster after it is inactive for this time in minutes. If not set, this cluster will not be automatically terminated. If specified, the threshold must be between 10 and 10000 minutes. Users can also set this value to 0 to explicitly disable automatic termination.

enable_elastic_diskboolean

Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space.

AWS

Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space. This feature requires specific AWS permissions to function correctly - refer to the User Guide for more details.

init_scriptsarray of object

The configuration for storing init scripts. Any number of destinations can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, init script logs are sent to <destination>/<cluster-ID>/init_scripts.

Show child attributesHide child attributes
dbfsobjectRequired

destination needs to be provided. e.g. { "dbfs": { "destination" : "dbfs:/home/cluster_log" } }

s3objectRequired

destination and either the region or endpoint need to be provided. e.g. { \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } } Cluster iam role is used to access s3, please make sure the cluster iam role in instance_profile_arn has permission to write data to the s3 destination.

fileobjectRequired

destination needs to be provided, e.g. { "file": { "destination": "file:/my/local/file.sh" } }

gcsobjectRequired

destination needs to be provided, e.g. { "gcs": { "destination": "gs://my-bucket/file.sh" } }

abfssobjectRequired

destination needs to be provided, e.g. abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/<directory-name>

workspaceobjectRequired

destination needs to be provided, e.g. { "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }

volumesobjectRequired

destination needs to be provided. e.g. { \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }

docker_imageobject

Custom docker image BYOC

Show child attributesHide child attributes
urlstring

URL of the docker image.

basic_authobjectRequired

Basic auth with username and password

instance_pool_idstring

The optional ID of the instance pool to which the cluster belongs.

single_user_namestring

Single user name if data_security_mode is SINGLE_USER

policy_idstring

The ID of the cluster policy used to create the cluster if applicable.

enable_local_disk_encryptionboolean

Whether to enable LUKS on cluster VMs' local disks

driver_instance_pool_idstring

The optional ID of the instance pool for the driver of the cluster belongs. The pool cluster uses the instance pool with id (instance_pool_id) if the driver pool is not assigned.

workload_typeobject
Show child attributesHide child attributes
clientsobject

defined what type of clients can use the cluster. E.g. Notebooks, Jobs

data_security_modestring

Values: NONE, SINGLE_USER, USER_ISOLATION, LEGACY_TABLE_ACL, LEGACY_PASSTHROUGH, LEGACY_SINGLE_USER, LEGACY_SINGLE_USER_STANDARD, DATA_SECURITY_MODE_STANDARD, DATA_SECURITY_MODE_DEDICATED, DATA_SECURITY_MODE_AUTO

runtime_enginestring

Determines the cluster's runtime engine, either standard or Photon.

This field is not compatible with legacy spark_version values that contain -photon-. Remove -photon- from the spark_version and set runtime_engine to PHOTON.

If left unspecified, the runtime engine defaults to standard unless the spark_version contains -photon-, in which case Photon will be used.

Values: NULL, STANDARD, PHOTON

kindstring

Values: COMPUTE_KIND_UNSPECIFIED, CLASSIC_PREVIEW

use_ml_runtimeboolean

This field can only be used when kind = CLASSIC_PREVIEW.

effective_spark_version is determined by spark_version (DBR release), this field use_ml_runtime, and whether node_type_id is gpu node or not.

is_single_nodeboolean

This field can only be used when kind = CLASSIC_PREVIEW.

When set to true, <Databricks> will automatically set single node related custom_tags, spark_conf, and num_workers

remote_disk_throughputint32

If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks.

total_initial_remote_disk_sizeint32

If set, what the total initial volume size (in GB) of the remote disks should be. Supported for GCP.

dependency_modestringBeta

Controls dependency configuration for the cluster.

Values: DEPENDENCY_MODE_UNSPECIFIED, DEPENDENCY_MODE_ENVIRONMENTS, DEPENDENCY_MODE_CLUSTER_LIBRARIES, DEPENDENCY_MODE_AUTO

num_workersint32Required

Number of worker nodes that this cluster should have. A cluster has one Spark Driver and num_workers Executors for a total of num_workers + 1 Spark nodes.

Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in spark_info will gradually increase from 5 to 10 as the new nodes are provisioned.

autoscaleobjectRequired

Parameters needed in order to automatically scale clusters up and down based on load. Note: autoscaling works best with DB runtime versions 3.0 or later.

Show child attributesHide child attributes
min_workersint32

The minimum number of workers to which the cluster can scale down when underutilized. It is also the initial number of workers the cluster will have after creation.

max_workersint32

The maximum number of workers to which the cluster can scale up when overloaded. Note that max_workers must be strictly greater than min_workers.

initiate_timestring

The time the pending enforcement was initiated.

enforcement_statusstring

Whether the pending enforcement will be applied. A pending enforcement begins in ACTIVE state. If the enforcement fails to apply too many times, the state transitions to INACTIVE. Afterwards, the enforcement must be re-scheduled to become ACTIVE again.

Values: ENFORCEMENT_STATUS_UNSPECIFIED, ACTIVE, INACTIVE

target_changesarray of object

A list of changes that will be made to the cluster configuration when the pending enforcement is applied.

Show child attributesHide child attributes
fieldstring

The field where this change would be made.

Example: spark_version

previous_valuestring

The previous value of this field before enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The type of the field can be retrieved by reading the settings field in the API response.

Example: 10.4.x-scala2.12

new_valuestring

The new value of this field after enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The typed new value of this field can be retrieved by reading the settings field in the API response.

Example: 14.3.x-scala2.12

initiator_userstring

The user who initiated the pending enforcement.

List Cluster Compliance For Policy GA

GET /api/2.0/policies/clusters/list-compliance

Returns the policy compliance status of all clusters that use a given policy. Clusters could be out of compliance if their policy was updated after the cluster was last edited.

API scopes: clusters

Parameters

policy_idstringquery

Canonical unique identifier for the cluster policy.

page_tokenstringquery

A page token that can be used to navigate to the next page or previous page as returned by next_page_token or prev_page_token.

page_sizeint32query

Use this field to specify the maximum number of results to be returned by the server. The server may further constrain the maximum number of results returned in a single page.

Default: 20

Constraints: [ 1 .. 100 ]

Response

clustersarray of object

A list of clusters and their policy compliance statuses.

Show child attributesHide child attributes
cluster_idstring

Canonical unique identifier for a cluster.

is_compliantboolean

Whether this cluster is in compliance with the latest version of its policy.

violationsobject

An object containing key-value mappings representing the first 200 policy validation errors. The keys indicate the path where the policy validation error is occurring. The values indicate an error message describing the policy validation error.

pending_enforcementobject

Information about the pending enforcement for the cluster. Only present if a pending enforcement is scheduled for the cluster.

Show child attributesHide child attributes
target_specobject

The new configuration to apply upon cluster termination or restart.

Show child attributesHide child attributes
cluster_namestring

Cluster name requested by the user. This doesn't have to be unique. If not specified at creation, the cluster name will be an empty string. For job clusters, the cluster name is automatically set based on the job and job run IDs.

spark_versionstring

The Spark version of the cluster, e.g. 3.3.x-scala2.11. A list of available Spark versions can be retrieved by using the clusters/sparkVersions API call.

spark_confobject

An object containing a set of optional, user-specified Spark configuration key-value pairs. Users can also pass in a string of extra JVM options to the driver and the executors via spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively.

aws_attributesobject

Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used.

azure_attributesobject

Attributes related to clusters running on Microsoft Azure. If not specified at cluster creation, a set of default values will be used.

gcp_attributesobject

Attributes related to clusters running on Google Cloud Platform. If not specified at cluster creation, a set of default values will be used.

node_type_idstring

This field encodes, through a single value, the resources available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or compute intensive workloads. A list of available node types can be retrieved by using the clusters/listNodeTypes API call.

driver_node_type_idstring

The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as node_type_id defined above.

This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence.

worker_node_type_flexibilityobject

Flexible node type configuration for worker nodes.

driver_node_type_flexibilityobject

Flexible node type configuration for the driver node.

ssh_public_keysarray of string

SSH public key contents that will be added to each Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. Up to 10 keys can be specified.

custom_tagsobject

Additional tags for cluster resources. <Databricks> will tag all cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to default_tags. Notes:

  • Currently, <Databricks> allows at most 45 custom tags

  • Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags

cluster_log_confobject

The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every 5 mins. The destination of driver logs is $destination/$clusterId/driver, while the destination of executor logs is $destination/$clusterId/executor.

spark_env_varsobject

An object containing a set of optional, user-specified environment variable key-value pairs. Please note that key-value pair of the form (X,Y) will be exported as is (i.e., export X='Y') while launching the driver and workers.

In order to specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them to $SPARK_DAEMON_JAVA_OPTS as shown in the example below. This ensures that all default databricks managed environmental variables are included as well.

Example Spark environment variables: {"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"} or {"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}

autotermination_minutesint32

Automatically terminates the cluster after it is inactive for this time in minutes. If not set, this cluster will not be automatically terminated. If specified, the threshold must be between 10 and 10000 minutes. Users can also set this value to 0 to explicitly disable automatic termination.

enable_elastic_diskboolean

Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space.

AWS

Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space. This feature requires specific AWS permissions to function correctly - refer to the User Guide for more details.

init_scriptsarray of object

The configuration for storing init scripts. Any number of destinations can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, init script logs are sent to <destination>/<cluster-ID>/init_scripts.

docker_imageobject

Custom docker image BYOC

instance_pool_idstring

The optional ID of the instance pool to which the cluster belongs.

single_user_namestring

Single user name if data_security_mode is SINGLE_USER

policy_idstring

The ID of the cluster policy used to create the cluster if applicable.

enable_local_disk_encryptionboolean

Whether to enable LUKS on cluster VMs' local disks

driver_instance_pool_idstring

The optional ID of the instance pool for the driver of the cluster belongs. The pool cluster uses the instance pool with id (instance_pool_id) if the driver pool is not assigned.

workload_typeobject
data_security_modestring

Values: NONE, SINGLE_USER, USER_ISOLATION, LEGACY_TABLE_ACL, LEGACY_PASSTHROUGH, LEGACY_SINGLE_USER, LEGACY_SINGLE_USER_STANDARD, DATA_SECURITY_MODE_STANDARD, DATA_SECURITY_MODE_DEDICATED, DATA_SECURITY_MODE_AUTO

runtime_enginestring

Determines the cluster's runtime engine, either standard or Photon.

This field is not compatible with legacy spark_version values that contain -photon-. Remove -photon- from the spark_version and set runtime_engine to PHOTON.

If left unspecified, the runtime engine defaults to standard unless the spark_version contains -photon-, in which case Photon will be used.

Values: NULL, STANDARD, PHOTON

kindstring

Values: COMPUTE_KIND_UNSPECIFIED, CLASSIC_PREVIEW

use_ml_runtimeboolean

This field can only be used when kind = CLASSIC_PREVIEW.

effective_spark_version is determined by spark_version (DBR release), this field use_ml_runtime, and whether node_type_id is gpu node or not.

is_single_nodeboolean

This field can only be used when kind = CLASSIC_PREVIEW.

When set to true, <Databricks> will automatically set single node related custom_tags, spark_conf, and num_workers

remote_disk_throughputint32

If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks.

total_initial_remote_disk_sizeint32

If set, what the total initial volume size (in GB) of the remote disks should be. Supported for GCP.

dependency_modestringBeta

Controls dependency configuration for the cluster.

Values: DEPENDENCY_MODE_UNSPECIFIED, DEPENDENCY_MODE_ENVIRONMENTS, DEPENDENCY_MODE_CLUSTER_LIBRARIES, DEPENDENCY_MODE_AUTO

num_workersint32Required

Number of worker nodes that this cluster should have. A cluster has one Spark Driver and num_workers Executors for a total of num_workers + 1 Spark nodes.

Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in spark_info will gradually increase from 5 to 10 as the new nodes are provisioned.

autoscaleobjectRequired

Parameters needed in order to automatically scale clusters up and down based on load. Note: autoscaling works best with DB runtime versions 3.0 or later.

initiate_timestring

The time the pending enforcement was initiated.

enforcement_statusstring

Whether the pending enforcement will be applied. A pending enforcement begins in ACTIVE state. If the enforcement fails to apply too many times, the state transitions to INACTIVE. Afterwards, the enforcement must be re-scheduled to become ACTIVE again.

Values: ENFORCEMENT_STATUS_UNSPECIFIED, ACTIVE, INACTIVE

target_changesarray of object

A list of changes that will be made to the cluster configuration when the pending enforcement is applied.

Show child attributesHide child attributes
fieldstring

The field where this change would be made.

Example: spark_version

previous_valuestring

The previous value of this field before enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The type of the field can be retrieved by reading the settings field in the API response.

Example: 10.4.x-scala2.12

new_valuestring

The new value of this field after enforcing policy compliance (either a number, a boolean, or a string) converted to a string. This is intended to be read by a human. The typed new value of this field can be retrieved by reading the settings field in the API response.

Example: 14.3.x-scala2.12

initiator_userstring

The user who initiated the pending enforcement.

next_page_tokenstring

This field represents the pagination token to retrieve the next page of results. If the value is "", it means no further results for the request.

prev_page_tokenstring

This field represents the pagination token to retrieve the previous page of results. If the value is "", it means no further results for the request.