workspace-bindings command group

Note

Databricks CLI use is subject to the Databricks License and Databricks Privacy Notice, including any Usage Data provisions.

The workspace-bindings command group within the Databricks CLI contains commands to configure (bind) securables in Unity Catalog. A securable in Databricks can be configured as OPEN or ISOLATED. An OPEN securable can be accessed from any workspace, while an ISOLATED securable can only be accessed from a configured list of workspaces.

Securable types that support binding: catalog, storage_credential, credential, external_location.

databricks workspace-bindings get

Get workspace bindings of the catalog. The caller must be a metastore admin or an owner of the catalog.

databricks workspace-bindings get NAME [flags]

Arguments

NAME

    The name of the catalog.

Options

Global flags

Examples

The following example gets workspace bindings for a catalog:

databricks workspace-bindings get my_catalog

databricks workspace-bindings get-bindings

Get workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.

databricks workspace-bindings get-bindings SECURABLE_TYPE SECURABLE_NAME [flags]

Arguments

SECURABLE_TYPE

    The type of the securable to bind to a workspace (catalog, storage_credential, credential, or external_location).

SECURABLE_NAME

    The name of the securable.

Options

--max-results int

    Maximum number of workspace bindings to return.

--page-token string

    Opaque pagination token to go to next page based on previous query.

Global flags

Examples

The following example gets workspace bindings for a catalog:

databricks workspace-bindings get-bindings catalog my_catalog

The following example gets workspace bindings for a storage credential with pagination:

databricks workspace-bindings get-bindings storage_credential my_storage_credential --max-results 10

The following example gets workspace bindings for an external location:

databricks workspace-bindings get-bindings external_location my_external_location

databricks workspace-bindings update

Update workspace bindings of the catalog. The caller must be a metastore admin or an owner of the catalog.

databricks workspace-bindings update NAME [flags]

Arguments

NAME

    The name of the catalog.

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

Global flags

Examples

The following example updates workspace bindings for a catalog using JSON:

databricks workspace-bindings update my_catalog --json '{"bindings": [{"workspace_id": 123456789, "binding_type": "BINDING_TYPE_READ_WRITE"}]}'

The following example updates workspace bindings using a JSON file:

databricks workspace-bindings update my_catalog --json @bindings.json

databricks workspace-bindings update-bindings

Update workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable.

databricks workspace-bindings update-bindings SECURABLE_TYPE SECURABLE_NAME [flags]

Arguments

SECURABLE_TYPE

    The type of the securable to bind to a workspace (catalog, storage_credential, credential, or external_location).

SECURABLE_NAME

    The name of the securable.

Options

--json JSON

    The inline JSON string or the @path to the JSON file with the request body.

Global flags

Examples

The following example updates workspace bindings for a catalog:

databricks workspace-bindings update-bindings catalog my_catalog --json '{"bindings": [{"workspace_id": 123456789, "binding_type": "BINDING_TYPE_READ_WRITE"}]}'

Global flags

--debug

  Whether to enable debug logging.

-h or --help

    Display help for the Databricks CLI or the related command group or the related command.

--log-file string

    A string representing the file to write output logs to. If this flag is not specified then the default is to write output logs to stderr.

--log-format format

    The log format type, text or json. The default value is text.

--log-level string

    A string representing the log format level. If not specified then the log format level is disabled.

-o, --output type

    The command output type, text or json. The default value is text.

-p, --profile string

    The name of the profile in the ~/.databrickscfg file to use to run the command. If this flag is not specified then if it exists, the profile named DEFAULT is used.

--progress-format format

    The format to display progress logs: default, append, inplace, or json

-t, --target string

    If applicable, the bundle target to use