@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
145 lines (144 loc) • 5.82 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
*
* Administrators can use budget policies to ensure that the correct tags appear automatically on serverless resources without depending on users to attach tags manually, allowing for customized cost reporting and chargebacks.
*
* Budget policies consist of tags that are applied to any serverless compute activity incurred by a user assigned to the policy.
*
* The tags are logged in your billing records, allowing you to attribute serverless usage to specific budgets.
*
* > **Note** This resource can only be used with an account-level provider!
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.BudgetPolicy("this", {
* policyName: "my-budget-policy",
* customTags: [{
* key: "mykey",
* value: "myvalue",
* }],
* });
* ```
*
* ## Import
*
* As of Pulumi v1.5, resources can be imported through configuration.
*
* hcl
*
* import {
*
* id = "policy_id"
*
* to = databricks_budget_policy.this
*
* }
*
* If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:
*
* ```sh
* $ pulumi import databricks:index/budgetPolicy:BudgetPolicy this "policy_id"
* ```
*/
export declare class BudgetPolicy extends pulumi.CustomResource {
/**
* Get an existing BudgetPolicy 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?: BudgetPolicyState, opts?: pulumi.CustomResourceOptions): BudgetPolicy;
/**
* Returns true if the given object is an instance of BudgetPolicy. 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 BudgetPolicy;
/**
* List of workspaces that this budget policy will be exclusively bound to.
* An empty binding implies that this budget policy is open to any workspace in the account
*/
readonly bindingWorkspaceIds: pulumi.Output<number[] | undefined>;
/**
* A list of tags defined by the customer. At most 20 entries are allowed per policy
*/
readonly customTags: pulumi.Output<outputs.BudgetPolicyCustomTag[] | undefined>;
/**
* (string) - The Id of the policy. This field is generated by Databricks and globally unique
*/
readonly policyId: pulumi.Output<string>;
/**
* The name of the policy.
* - Must be unique among active policies.
* - Can contain only characters from the ISO 8859-1 (latin1) set.
* - Can't start with reserved keywords such as `databricks:default-policy`
*/
readonly policyName: pulumi.Output<string | undefined>;
/**
* Create a BudgetPolicy 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?: BudgetPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering BudgetPolicy resources.
*/
export interface BudgetPolicyState {
/**
* List of workspaces that this budget policy will be exclusively bound to.
* An empty binding implies that this budget policy is open to any workspace in the account
*/
bindingWorkspaceIds?: pulumi.Input<pulumi.Input<number>[]>;
/**
* A list of tags defined by the customer. At most 20 entries are allowed per policy
*/
customTags?: pulumi.Input<pulumi.Input<inputs.BudgetPolicyCustomTag>[]>;
/**
* (string) - The Id of the policy. This field is generated by Databricks and globally unique
*/
policyId?: pulumi.Input<string>;
/**
* The name of the policy.
* - Must be unique among active policies.
* - Can contain only characters from the ISO 8859-1 (latin1) set.
* - Can't start with reserved keywords such as `databricks:default-policy`
*/
policyName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a BudgetPolicy resource.
*/
export interface BudgetPolicyArgs {
/**
* List of workspaces that this budget policy will be exclusively bound to.
* An empty binding implies that this budget policy is open to any workspace in the account
*/
bindingWorkspaceIds?: pulumi.Input<pulumi.Input<number>[]>;
/**
* A list of tags defined by the customer. At most 20 entries are allowed per policy
*/
customTags?: pulumi.Input<pulumi.Input<inputs.BudgetPolicyCustomTag>[]>;
/**
* (string) - The Id of the policy. This field is generated by Databricks and globally unique
*/
policyId?: pulumi.Input<string>;
/**
* The name of the policy.
* - Must be unique among active policies.
* - Can contain only characters from the ISO 8859-1 (latin1) set.
* - Can't start with reserved keywords such as `databricks:default-policy`
*/
policyName?: pulumi.Input<string>;
}