Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 tokens
command group within the Databricks CLI allows you to create, list, and revoke tokens that can be used to authenticate and access Databricks APIs and tools.
databricks tokens create
Create and returns a token for a user. If this call is made through token authentication, it creates a token with the same client ID as the authenticated token. If the user's token quota is exceeded, this call returns an error QUOTA_EXCEEDED
.
databricks tokens create [flags]
Options
--comment string
Optional description to attach to the token
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
--lifetime-seconds int
The lifetime of the token, in seconds
Examples
databricks tokens create --comment "My personal token" --lifetime-seconds 3600
databricks tokens delete
Revoke an access token.
If a token with the specified ID is not valid, this command returns an error RESOURCE_DOES_NOT_EXIST
.
databricks tokens delete TOKEN_ID [flags]
Arguments
TOKEN_ID
The ID of the token to be revoked
Options
--json JSON
The inline JSON string or the @path to the JSON file with the request body.
Examples
databricks tokens delete <token-id>
databricks tokens list
List all the valid tokens for a user-workspace pair.
databricks tokens list [flags]
Options
Examples
databricks tokens list
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