terminate_cluster: Terminate a Databricks cluster.

View source: R/terminate_cluster.R

terminate_clusterR Documentation

Terminate a Databricks cluster.

Description

Will terminate an online Databricks cluster. This is distinct from the 'permanent-delete' API endpoint, which will remove the cluster from the clusters UI. Please note that any unsaved work will be lost unless persisted to a storage environment separate from the cluster. You can locate the cluster ID in the URL of the cluster configuration page. For example:

Usage

terminate_cluster(cluster_id, workspace, token = NULL, verbose = T, ...)

Arguments

cluster_id

A string containing the unique id for an online Databricks cluster

workspace

A string representing the web workspace of your Databricks instance. E.g., "https://eastus2.azuredatabricks.net" or "https://demo.cloud.databricks.com".

verbose

If TRUE, will print the API response to the console. Defaults to FALSE.

...

Additional options to be passed to data.table::fread which is used to parse the API response.

Details

https://mycompany.cloud.databricks.com/#/setting/clusters/xxxx-xxxxx-xxxxxx/

Where xxxx-xxxxx-xxxxxx is the cluster ID.

The API endpoint for terminating a cluster is '2.0/clusters/delete'. For all details on API calls please see the official documentation at https://docs.databricks.com/dev-tools/api/latest/.

Value

The API response

Examples

workspace <- "https://myworkspace.cloud.databricks.com"
cluster_id <- "0818-155203-cheese22"

terminate_cluster(workspace = workspace, cluster_id = cluster_id)

RafiKurlansik/bricksteR documentation built on Oct. 13, 2022, 6:58 a.m.