@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
85 lines • 3.6 kB
JavaScript
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.BudgetPolicy = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* 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.
*
* > 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",
* }],
* });
* ```
*
* ## Access Control
*
* * databricks.AccessControlRuleSet can control which groups or individual users can manage or use the given budget policy.
*
* ## Import
*
* This resource can be imported by ID.
*
* ```sh
* $ pulumi import databricks:index/budgetPolicy:BudgetPolicy this policy_id
* ```
*/
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, id, state, opts) {
return new BudgetPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === BudgetPolicy.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["customTags"] = state ? state.customTags : undefined;
resourceInputs["policyId"] = state ? state.policyId : undefined;
resourceInputs["policyName"] = state ? state.policyName : undefined;
}
else {
const args = argsOrState;
resourceInputs["customTags"] = args ? args.customTags : undefined;
resourceInputs["policyName"] = args ? args.policyName : undefined;
resourceInputs["policyId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(BudgetPolicy.__pulumiType, name, resourceInputs, opts);
}
}
exports.BudgetPolicy = BudgetPolicy;
/** @internal */
BudgetPolicy.__pulumiType = 'databricks:index/budgetPolicy:BudgetPolicy';
//# sourceMappingURL=budgetPolicy.js.map
;