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

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

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

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)

TYPE: str | None | VariableType DEFAULT: None

target

The target of the action. For EMAIL_NOTIFICATION, this is the email address to send the notification to

TYPE: str | None | VariableType DEFAULT: None


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

Bases: BaseModel

PARAMETER DESCRIPTION
override_threshold

TYPE: str | None | VariableType DEFAULT: None

principal_id

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