แชร์ผ่าน


account users 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 account users command group within the Databricks CLI contains commands to perform create, get, list, update, and delete operations on users. User identities are recognized by Databricks and represented by email addresses. See Manage users.

databricks account users create

Create a new user in the Databricks account.

databricks account users create [flags]

Options

--active

    If this user is active.

--display-name string

    String that represents a concatenation of given and family names.

--external-id string

    External ID (not currently supported).

--id string

    Databricks user ID.

--user-name string

    Email address of the Databricks user.

--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 user using command-line flags:

databricks account users create --user-name "user@example.com" --display-name "Jane Doe"

The following example creates a user using JSON:

databricks account users create --json '{"userName": "user@example.com", "displayName": "Jane Doe", "active": true}'

The following example creates a user using a JSON file:

databricks account users create --json @user.json

databricks account users delete

Delete a user from the Databricks account. Deleting a user also removes objects associated with the user.

databricks account users delete ID [flags]

Arguments

ID

    Unique ID for a user in the Databricks account.

Options

Global flags

Examples

The following example deletes a user by ID:

databricks account users delete 12345

databricks account users get

Get information for a specific user in Databricks account.

databricks account users get ID [flags]

Arguments

ID

    Unique ID for a user in the Databricks account.

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 GetSortOrder

    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 gets a user by ID:

databricks account users get 12345

The following example gets a user with specific attributes:

databricks account users get 12345 --attributes "userName,displayName"

databricks account users list

Get details for all users associated with a Databricks account.

databricks account users 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 users:

databricks account users list

The following example lists users with pagination:

databricks account users list --count 10 --start-index 0

The following example lists users with a filter:

databricks account users list --filter "userName eq \"user@example.com\""

databricks account users patch

Partially update a user resource by applying the supplied operations on specific user attributes.

databricks account users 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 patches a user using JSON:

databricks account users patch 12345 --json '{"displayName": "Jane Smith"}'

The following example patches a user using a JSON file:

databricks account users patch 12345 --json @patch-user.json

databricks account users update

Replace a user's information with the data supplied in request.

databricks account users update ID [flags]

Arguments

ID

    Databricks user ID.

Options

--active

    If this user is active.

--display-name string

    String that represents a concatenation of given and family names.

--external-id string

    External ID (not currently supported).

--id string

    Databricks user ID.

--user-name string

    Email address of the Databricks user.

--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 user using command-line flags:

databricks account users update 12345 --display-name "Jane Smith" --active

The following example updates a user using JSON:

databricks account users update 12345 --json '{"userName": "user@example.com", "displayName": "Jane Smith", "active": true}'

The following example updates a user using a JSON file:

databricks account users update 12345 --json @update-user.json

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