UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

151 lines (150 loc) 5.3 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * > Initialize provider with `alias = "account"`, and `host` pointing to the account URL, like, `host = "https://accounts.cloud.databricks.com"`. Use `provider = databricks.account` for all account-level resources. * * > This feature is in [Public Preview](https://docs.databricks.com/release-notes/release-types.html). * * This resource allows you to manage [Databricks Budgets](https://docs.databricks.com/en/admin/account-settings/budgets.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = new databricks.Budget("this", { * displayName: "databricks-workspace-budget", * alertConfigurations: [{ * timePeriod: "MONTH", * triggerType: "CUMULATIVE_SPENDING_EXCEEDED", * quantityType: "LIST_PRICE_DOLLARS_USD", * quantityThreshold: "840", * actionConfigurations: [{ * actionType: "EMAIL_NOTIFICATION", * target: "abc@gmail.com", * }], * }], * filter: { * workspaceId: { * operator: "IN", * values: [1234567890098765], * }, * tags: [ * { * key: "Team", * value: { * operator: "IN", * values: ["Data Science"], * }, * }, * { * key: "Environment", * value: { * operator: "IN", * values: ["Development"], * }, * }, * ], * }, * }); * ``` * * ## Related Resources * * The following resources are used in the context: * * * databricks.MwsWorkspaces to set up Databricks workspaces. * * ## Import * * This resource can be imported by Databricks account ID and Budget. * * ```sh * $ pulumi import databricks:index/budget:Budget this '<account_id>|<budget_configuration_id>' * ``` */ export declare class Budget extends pulumi.CustomResource { /** * Get an existing Budget resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BudgetState, opts?: pulumi.CustomResourceOptions): Budget; /** * Returns true if the given object is an instance of Budget. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Budget; /** * The ID of the Databricks Account. */ readonly accountId: pulumi.Output<string>; readonly alertConfigurations: pulumi.Output<outputs.BudgetAlertConfiguration[] | undefined>; /** * The ID of the budget configuration. */ readonly budgetConfigurationId: pulumi.Output<string>; readonly createTime: pulumi.Output<number>; /** * Name of the budget in Databricks Account. */ readonly displayName: pulumi.Output<string | undefined>; readonly filter: pulumi.Output<outputs.BudgetFilter | undefined>; readonly updateTime: pulumi.Output<number>; /** * Create a Budget resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: BudgetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Budget resources. */ export interface BudgetState { /** * The ID of the Databricks Account. */ accountId?: pulumi.Input<string>; alertConfigurations?: pulumi.Input<pulumi.Input<inputs.BudgetAlertConfiguration>[]>; /** * The ID of the budget configuration. */ budgetConfigurationId?: pulumi.Input<string>; createTime?: pulumi.Input<number>; /** * Name of the budget in Databricks Account. */ displayName?: pulumi.Input<string>; filter?: pulumi.Input<inputs.BudgetFilter>; updateTime?: pulumi.Input<number>; } /** * The set of arguments for constructing a Budget resource. */ export interface BudgetArgs { /** * The ID of the Databricks Account. */ accountId?: pulumi.Input<string>; alertConfigurations?: pulumi.Input<pulumi.Input<inputs.BudgetAlertConfiguration>[]>; /** * The ID of the budget configuration. */ budgetConfigurationId?: pulumi.Input<string>; createTime?: pulumi.Input<number>; /** * Name of the budget in Databricks Account. */ displayName?: pulumi.Input<string>; filter?: pulumi.Input<inputs.BudgetFilter>; updateTime?: pulumi.Input<number>; }