Skip to main content

account budget-policy 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 budget-policy command group within the Databricks CLI contains commands to manage budget policies for your account. Budget policies help you monitor and control costs by setting spending thresholds and alerts.

databricks account budget-policy create

Create a new budget policy.

databricks account budget-policy create [flags]

Options

--request-id string

    A unique identifier for this request.

--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 budget policy using JSON:

Bash
databricks account budget-policy create --json '{"policy_name": "Monthly Budget", "budget_configuration": {"amount": 10000, "period": "MONTHLY"}}'

The following example creates a budget policy using a JSON file:

Bash
databricks account budget-policy create --json @budget-policy.json

The following example creates a budget policy with a request ID:

Bash
databricks account budget-policy create --request-id "unique-request-id" --json @budget-policy.json

databricks account budget-policy delete

Delete a budget policy.

databricks account budget-policy delete POLICY_ID [flags]

Arguments

POLICY_ID

    The ID of the budget policy.

Options

Global flags

Examples

The following example deletes a budget policy by ID:

Bash
databricks account budget-policy delete policy-abc123

databricks account budget-policy get

Retrieve a budget policy by its ID.

databricks account budget-policy get POLICY_ID [flags]

Arguments

POLICY_ID

    The ID of the budget policy.

Options

Global flags

Examples

The following example gets a budget policy by ID:

Bash
databricks account budget-policy get policy-abc123

databricks account budget-policy list

List all budget policies. Policies are returned in the alphabetically ascending order of their names.

databricks account budget-policy list [flags]

Options

--page-size int

    The maximum number of budget policies to return.

--page-token string

    A page token, received from a previous list budget policies call.

Global flags

Examples

The following example lists all budget policies:

Bash
databricks account budget-policy list

The following example lists budget policies with pagination:

Bash
databricks account budget-policy list --page-size 10

The following example lists the next page of budget policies:

Bash
databricks account budget-policy list --page-token "next_page_token"

databricks account budget-policy update

Update a budget policy.

databricks account budget-policy update POLICY_ID [flags]

Arguments

POLICY_ID

    The ID of the budget policy. This field is generated by Databricks and globally unique.

Options

--policy-name string

    The name of the budget policy.

--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 budget policy name:

Bash
databricks account budget-policy update policy-abc123 --policy-name "Updated Monthly Budget"

The following example updates a budget policy using JSON:

Bash
databricks account budget-policy update policy-abc123 --json '{"policy_name": "Updated Monthly Budget", "budget_configuration": {"amount": 15000}}'

The following example updates a budget policy using a JSON file:

Bash
databricks account budget-policy update policy-abc123 --json @update-budget-policy.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