Liking cljdoc? Tell your friends :D

databricks-sdk.core


clusters-eventsclj

(clusters-events options)

Retrieve a list of events about the activity of a cluster. You can retrieve events from active clusters (running, pending, or reconfiguring) and terminated clusters. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use a cluster information, as below:
   {:cluster_id "1x2e34r5t"
    :start_time 1617238800000
    :end_time 1619485200000
    :order "DESC" "(If empty, default is DESC)"
    :offset 10
    :limit 25}

Output

   {:result {:events [{:cluster_id "1x2e34r5t", 
                 :timestamp 1642016862695, 
                 :type "DRIVER_HEALTHY", 
                 :details {}}], 
       :next_page {:cluster_id "1x2e34r5t", 
                   :end_time 1642016862695, 
                   :offset 1, 
                   :limit 1}, 
       :total_count 2283}}
Retrieve a list of events about the activity of a cluster. 
 You can retrieve events from active clusters (running, pending, or reconfiguring) and terminated clusters.
 **Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use a cluster information, as below:

```clojure
   {:cluster_id "1x2e34r5t"
    :start_time 1617238800000
    :end_time 1619485200000
    :order "DESC" "(If empty, default is DESC)"
    :offset 10
    :limit 25}
```
**Output**
 
 ```clojure 
    {:result {:events [{:cluster_id "1x2e34r5t", 
                  :timestamp 1642016862695, 
                  :type "DRIVER_HEALTHY", 
                  :details {}}], 
        :next_page {:cluster_id "1x2e34r5t", 
                    :end_time 1642016862695, 
                    :offset 1, 
                    :limit 1}, 
        :total_count 2283}}
 ``` 
sourceraw docstring

create-cluster!clj

(create-cluster! options)

Create a new cluster within a Databricks Account Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use a cluster information, as below:
   {:cluster_name "my-cluster"
    :spark_version "7.3.x-scala2.12"
    :node_type_id "i3.xlarge"
    :spark_conf {:spark.speculation true}
    :aws_attributes {:availability "SPOT"
                     :zone_id  "us-west-2a"}
    :num_workers 25}

Output

   {:result {:cluster_id "123"}}
Create a new cluster within a Databricks Account
 **Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use a cluster information, as below:

```clojure
   {:cluster_name "my-cluster"
    :spark_version "7.3.x-scala2.12"
    :node_type_id "i3.xlarge"
    :spark_conf {:spark.speculation true}
    :aws_attributes {:availability "SPOT"
                     :zone_id  "us-west-2a"}
    :num_workers 25}
```
**Output**
 
 ```clojure 
    {:result {:cluster_id "123"}}
 ``` 
sourceraw docstring

edit-cluster!clj

(edit-cluster! options)

Edit a specific cluster within a Databricks Account Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use a cluster information, as below:
   {:cluster_id "1x2e34r5t"
    :spark_version "7.3.x-scala2.12"
    :node_type_id "i3.xlarge"
    :num_workers 10}

Output

  {:result {:cluster_id "123"}}
Edit a specific cluster within a Databricks Account
  **Input**
  Must have at least [token timeout host body]
  - `:token` your databricks token to use the API
  - `:timeout` the time limit in milliseconds to wait for the response.
  - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
  - `:body` is your data to the request, in this case use a cluster information, as below:

 ```clojure
    {:cluster_id "1x2e34r5t"
     :spark_version "7.3.x-scala2.12"
     :node_type_id "i3.xlarge"
     :num_workers 10}
```
 **Output**
  
 ```clojure 
   {:result {:cluster_id "123"}}
 ``` 
sourceraw docstring

filter-user-by-user-nameclj

(filter-user-by-user-name options)

Retrieve one single user by their username in the Databricks workspace. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use the body as below:
 {:email "example@example.com"}

Output

  {:to-do}
Retrieve one single user by their username in the Databricks workspace.
 **Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use the body as below:

 ```clojure 
  {:email "example@example.com"}
```
 **Output**
 
```clojure 
  {:to-do}
``` 
sourceraw docstring

grant-cluster-permission!clj

(grant-cluster-permission! options)

Grant cluster permissions for one or more users, groups, or service principals. This request only grants (adds) permissions. To revoke, use the replace all cluster permissions function. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use a new permission to a specific user or group, as below:
   {:cluster_id "1x2e34r5t"
    :access_control_list [{:user_name "jsmith@example.com"
                           :permission_level "CAN_RESTART"}]}

Output

  {:result {:object_id "/clusters/0712-200003-rail519"
            :object_type "cluster"}
            :access_control_list []}
Grant cluster permissions for one or more users, groups, or service principals.
  This request only grants (adds) permissions. To revoke, use the replace all cluster permissions function.
  **Input**
  Must have at least [token timeout host body]
  - `:token` your databricks token to use the API
  - `:timeout` the time limit in milliseconds to wait for the response.
  - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
  - `:body` is your data to the request, in this case use a new permission to a specific user or group, as below:

 ```clojure
    {:cluster_id "1x2e34r5t"
     :access_control_list [{:user_name "jsmith@example.com"
                            :permission_level "CAN_RESTART"}]}
```
  **Output**
  
 ```clojure 
   {:result {:object_id "/clusters/0712-200003-rail519"
             :object_type "cluster"}
             :access_control_list []}
 ``` 
sourceraw docstring

install-cluster-library!clj

(install-cluster-library! options)

Install libraries on a cluster. The installation is asynchronous - it completes in the background after the request. The installation only happens when the cluster is running. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use the paths for the libs being installed, as below:
   {:cluster_id "1x2e34r5t"
    :libraries [{:jar "dbfs:/mnt/libraries/library.jar"}]}

Output

  {:to-do}
Install libraries on a cluster. The installation is asynchronous - it completes in the background after the request.
  The installation only happens when the cluster is running.
  **Input**
  Must have at least [token timeout host body]
  - `:token` your databricks token to use the API
  - `:timeout` the time limit in milliseconds to wait for the response.
  - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
  - `:body` is your data to the request, in this case use the paths for the libs being installed, as below:

 ```clojure
    {:cluster_id "1x2e34r5t"
     :libraries [{:jar "dbfs:/mnt/libraries/library.jar"}]}
```
  **Output**
  
 ```clojure 
   {:to-do}
 ``` 
sourceraw docstring

list-clustersclj

(list-clusters options)

List all clusters from a databrick account. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use empty {}

Output

   {:result {:clusters [{:cluster_id "123"}]}}
List all clusters from a databrick account.
**Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use empty {}

**Output**

```clojure 
   {:result {:clusters [{:cluster_id "123"}]}}
``` 
sourceraw docstring

list-usersclj

(list-users options)

Retrieve a list of all users in the Databricks workspace. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use empty {} Output
  {:to-do}
Retrieve a list of all users in the Databricks workspace.
 **Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use empty {}
 **Output**
 
```clojure 
  {:to-do}
``` 
sourceraw docstring

remove-role-from-user!clj

(remove-role-from-user! options)

Remove a specif permission to a specifc user Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use the body as below:
 {:databricks-user-id 1234567899
  :schemas {"urn:ietf:params:scim:api:messages:2.0:PatchOp"}
  :Operations [{:op "remove"
                :path "roles[value eq "arn:aws:iam::123456789012:role/my-role"]}]}

Output

  {:to-do}
Remove a specif permission to a specifc user
 **Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use the body as below:

 ```clojure 
  {:databricks-user-id 1234567899
   :schemas {"urn:ietf:params:scim:api:messages:2.0:PatchOp"}
   :Operations [{:op "remove"
                 :path "roles[value eq "arn:aws:iam::123456789012:role/my-role"]}]}
```
 **Output**
 
```clojure 
  {:to-do}
``` 
sourceraw docstring

start-cluster!clj

(start-cluster! options)

Start a specific cluster within a Databricks Account Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use a cluster id information, as below:
   {:cluster_id "1x2e34r5t"}

Output

   {:result {:cluster_id "123"}}
Start a specific cluster within a Databricks Account
  **Input**
  Must have at least [token timeout host body]
  - `:token` your databricks token to use the API
  - `:timeout` the time limit in milliseconds to wait for the response.
  - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
  - `:body` is your data to the request, in this case use a cluster id information, as below:

 ```clojure
    {:cluster_id "1x2e34r5t"}
```
  **Output**
  
 ```clojure 
    {:result {:cluster_id "123"}}
 ``` 
sourceraw docstring

status-cluster-libraryclj

(status-cluster-library options)

Get the status of libraries on a cluster. A status will be available for all libraries installed on the cluster via the API or the libraries UI as well as libraries set to be installed on all clusters via the libraries UI. Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use the cluster id as below:
 {:cluster_id "1x2e34r5t"}

Output

  {:cluster_id "1x2e34r5t"
    :library_statuses [{:library {:jar "dbfs:/mnt/libraries/library.jar"}
                        :status "INSTALLED"
                        :messages []
                        :is_library_for_all_clusters false}]}
Get the status of libraries on a cluster. 
 A status will be available for all libraries installed on the cluster via the API or the libraries UI as well as libraries set to be installed on all clusters via the libraries UI.
 **Input**
 Must have at least [token timeout host body]
 - `:token` your databricks token to use the API
 - `:timeout` the time limit in milliseconds to wait for the response.
 - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
 - `:body` is your data to the request, in this case use the cluster id as below:

 ```clojure 
  {:cluster_id "1x2e34r5t"}
```
 **Output**
 
```clojure 
  {:cluster_id "1x2e34r5t"
    :library_statuses [{:library {:jar "dbfs:/mnt/libraries/library.jar"}
                        :status "INSTALLED"
                        :messages []
                        :is_library_for_all_clusters false}]}
``` 
sourceraw docstring

terminate-cluster!clj

(terminate-cluster! options)

Terminate a specific cluster within a Databricks Account Input Must have at least [token timeout host body]

  • :token your databricks token to use the API
  • :timeout the time limit in milliseconds to wait for the response.
  • :host your account host, e.g. http://abc.cloud.databricks.com
  • :body is your data to the request, in this case use a cluster id information, as below:
   {:cluster_id "1x2e34r5t"}

Output

  {:result {:cluster_id "123"}}
Terminate a specific cluster within a Databricks Account
  **Input**
  Must have at least [token timeout host body]
  - `:token` your databricks token to use the API
  - `:timeout` the time limit in milliseconds to wait for the response.
  - `:host` your account host, e.g. `http://abc.cloud.databricks.com`
  - `:body` is your data to the request, in this case use a cluster id information, as below:

 ```clojure
    {:cluster_id "1x2e34r5t"}
```
  **Output**
  
 ```clojure 
   {:result {:cluster_id "123"}}
 ``` 
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close