Skip to content

Budget

laktory.models.resources.databricks.Budget ¤

Bases: BudgetBase

Databricks budget

Examples:

import io

from laktory import models

budget_yaml = '''
display_name: databricks-workspace-budget
alert_configurations:
  - time_period: MONTH
    trigger_type: CUMULATIVE_SPENDING_EXCEEDED
    quantity_type: LIST_PRICE_DOLLARS_USD
    quantity_threshold: "840"
    action_configurations:
      - action_type: EMAIL_NOTIFICATION
        target: abc@gmail.com
'''
budget = models.resources.databricks.Budget.model_validate_yaml(
    io.StringIO(budget_yaml)
)
References
BASE DESCRIPTION
account_id

The ID of the Databricks Account

TYPE: str | None | VariableType DEFAULT: None

alert_configurations

TYPE: list[BudgetAlertConfigurations] | None | VariableType DEFAULT: None

budget_configuration_id

The ID of the budget configuration

TYPE: str | None | VariableType DEFAULT: None

create_time

TYPE: int | None | VariableType DEFAULT: None

display_name

Name of the budget in Databricks Account

TYPE: str | None | VariableType DEFAULT: None

filter

TYPE: BudgetFilter | None | VariableType DEFAULT: None

resource_type

The resource scope for this budget. Determines whether the budget tracks all resources or a specific resource. (Enum: BUDGET_RESOURCE_TYPE_ALL_RESOURCES, BUDGET_RESOURCE_TYPE_UNITY_AI_GATEWAY)

TYPE: str | None | VariableType DEFAULT: None

update_time

TYPE: int | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetAlertConfigurations ¤

Bases: BaseModel

PARAMETER DESCRIPTION
action_configurations

List of action configurations to take when the budget alert is triggered. Consists of the following fields:

TYPE: list[BudgetAlertConfigurationsActionConfigurations] | None | VariableType DEFAULT: None

alert_configuration_id

TYPE: str | None | VariableType DEFAULT: None

principal_overrides

Per-principal threshold overrides for this alert. Only applies to per-user alerts (scope_type = ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER); ignored for shared alerts. Consists of the following fields:

TYPE: list[BudgetAlertConfigurationsPrincipalOverrides] | None | VariableType DEFAULT: None

quantity_threshold

The threshold for the budget alert to determine if it is in a triggered state. The number is evaluated based on quantity_type

TYPE: str | None | VariableType DEFAULT: None

quantity_type

The way to calculate cost for this budget alert. This is what quantity_threshold is measured in. (Enum: LIST_PRICE_DOLLARS_USD)

TYPE: str | None | VariableType DEFAULT: None

scope_type

How the alert threshold is evaluated. Determines whether spend is tracked in aggregate or per individual user. (Enum: ALERT_CONFIGURATION_SCOPE_TYPE_SHARED, ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER)

TYPE: str | None | VariableType DEFAULT: None

time_period

The time window of usage data for the budget. (Enum: MONTH)

TYPE: str | None | VariableType DEFAULT: None

trigger_type

The evaluation method to determine when this budget alert is in a triggered state. (Enum: CUMULATIVE_SPENDING_EXCEEDED)

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetAlertConfigurationsActionConfigurations ¤

Bases: BaseModel

PARAMETER DESCRIPTION
action_configuration_id

TYPE: str | None | VariableType DEFAULT: None

action_type

The type of action to take when the budget alert is triggered. (Enum: EMAIL_NOTIFICATION, BLOCK_USAGE). Note: BLOCK_USAGE action type is only supported on AI Gateway-scoped budgets

TYPE: str | None | VariableType DEFAULT: None

target

For EMAIL_NOTIFICATION action type, this is the email address to send the notification to. Required if the action_type is EMAIL_NOTIFICATION. Does not apply to the BLOCK_USAGE action type, and this field must be omitted in that case

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetAlertConfigurationsPrincipalOverrides ¤

Bases: BaseModel

PARAMETER DESCRIPTION
override_threshold

Dollar amount that overrides the parent alert's quantity_threshold for this principal

TYPE: str | None | VariableType DEFAULT: None

principal_id

Account-level principal id (user, group, or service principal)

TYPE: int | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetFilter ¤

Bases: BaseModel

PARAMETER DESCRIPTION
tags

List of tags to filter by. Consists of the following fields:

TYPE: list[BudgetFilterTags] | None | VariableType DEFAULT: None

workspace_id

Filter by workspace ID (if empty, include usage all usage for this account). Consists of the following fields:

TYPE: BudgetFilterWorkspaceId | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetFilterTags ¤

Bases: BaseModel

PARAMETER DESCRIPTION
key

The key of the tag

TYPE: str | None | VariableType DEFAULT: None

value

Consists of the following fields:

TYPE: BudgetFilterTagsValue | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetFilterTagsValue ¤

Bases: BaseModel

PARAMETER DESCRIPTION
operator

The operator to use for the filter. (Enum: IN)

TYPE: str | None | VariableType DEFAULT: None

values

The values to filter by

TYPE: list[str] | None | VariableType DEFAULT: None


laktory.models.resources.databricks.budget.BudgetFilterWorkspaceId ¤

Bases: BaseModel

PARAMETER DESCRIPTION
operator

The operator to use for the filter. (Enum: IN)

TYPE: str | None | VariableType DEFAULT: None

values

The values to filter by

TYPE: list[int] | None | VariableType DEFAULT: None