Share via


groups command group

Note

This information applies to Databricks CLI versions 0.205 and above. The Databricks CLI is in Public Preview.

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

The groups command group within the Databricks CLI allows you to manage groups in the Databricks workspace. Groups simplify identity management, making it easier to assign access to Databricks workspace, data, and other securable objects. See Groups.

databricks groups create

Create a group in the Databricks workspace with a unique name, using the specified group details.

databricks groups create [flags]

Options

--display-name string

    String that represents a human-readable group name.

--external-id string

    External ID for the group

--id string

    Databricks group ID

--json JSON

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

Global flags

Examples

The following example creates a new group with a display name:

databricks groups create --display-name "Data Scientists"

The following example creates a new group using JSON:

databricks groups create --json '{"displayName": "Data Scientists"}'

databricks groups delete

Delete a group from the Databricks workspace.

databricks groups delete ID [flags]

Arguments

ID

    Unique ID for a group in the Databricks workspace.

Options

Global flags

Examples

The following example deletes a group by ID:

databricks groups delete 12345

databricks groups get

Get the information for a specific group in the Databricks workspace.

databricks groups get ID [flags]

Arguments

ID

    Unique ID for a group in the Databricks workspace.

Options

Global flags

Examples

The following example gets details for a specific group:

databricks groups get 12345

databricks groups list

List all details of the groups associated with the Databricks workspace.

databricks groups list [flags]

Options

--attributes string

    Comma-separated list of attributes to return in response.

--count int

    Desired number of results per page.

--excluded-attributes string

    Comma-separated list of attributes to exclude in response.

--filter string

    Query by which the results have to be filtered.

--sort-by string

    Attribute to sort the results.

--sort-order ListSortOrder

    The order to sort the results. Supported values: ascending, descending

--start-index int

    Specifies the index of the first result.

Global flags

Examples

The following example lists all groups:

databricks groups list

The following example lists groups with filtering:

databricks groups list --filter "displayName eq 'Data Scientists'"

The following example lists groups with pagination:

databricks groups list --count 10 --start-index 0

databricks groups patch

Partially update the details of a group.

databricks groups patch ID [flags]

Arguments

ID

    Unique ID in the Databricks workspace.

Options

--json JSON

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

Global flags

Examples

The following example partially updates a group using JSON:

databricks groups patch 12345 --json '{"displayName": "Updated Group Name"}'

databricks groups update

Update the details of a group by replacing the entire group entity.

databricks groups update ID [flags]

Arguments

ID

    Databricks group ID

Options

--display-name string

    String that represents a human-readable group name.

--external-id string

    External ID for the group

--id string

    Databricks group ID.

--json JSON

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

Global flags

Examples

The following example updates a group with a new display name:

databricks groups update 12345 --display-name "Updated Group Name"

The following example updates a group using JSON:

databricks groups update 12345 --json '{"displayName": "Updated Group Name", "id": "12345"}'

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