Skip to contents

List Clusters

Usage

db_cluster_list(
  host = db_host(),
  token = db_token(),
  perform_request = TRUE,
  page_size = 20,
  page_token = NULL
)

Arguments

host

Databricks workspace URL, defaults to calling db_host().

token

Databricks workspace token, defaults to calling db_token().

perform_request

If TRUE (default) the request is performed, if FALSE the httr2 request is returned without being performed.

page_size

Maximum number of clusters per page, from 1 to 100 (default: 20). Use NULL for the server default.

page_token

A next_page_token or prev_page_token from a previous response, or NULL for the first page.

Value

If perform_request = TRUE, returns the full single-page API response with class db_cluster_list, including pagination tokens when present. Each record in clusters has class db_cluster. If FALSE, returns an httr2_request.

Details

Retrieve one page of pinned and active clusters, and clusters terminated within the past 30 days. Use next_page_token to request subsequent pages. Extract $clusters to access the records; earlier versions returned these records directly without pagination metadata.

Examples

if (FALSE) { # \dontrun{
page <- db_cluster_list()
clusters <- page$clusters
if (!is.null(page$next_page_token) && nzchar(page$next_page_token)) {
  next_page <- db_cluster_list(page_token = page$next_page_token)
}
} # }