Databricks v1.76.0 published on Thursday, Sep 18, 2025 by Pulumi
databricks.getBudgetPolicy
This data source can be used to get a single budget policy.
Note This data source can only be used with an account-level provider!
Example Usage
Referring to a budget policy by id:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = databricks.getBudgetPolicy({
    policyId: "test",
});
import pulumi
import pulumi_databricks as databricks
this = databricks.get_budget_policy(policy_id="test")
package main
import (
	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databricks.LookupBudgetPolicy(ctx, &databricks.LookupBudgetPolicyArgs{
			PolicyId: pulumi.StringRef("test"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() => 
{
    var @this = Databricks.GetBudgetPolicy.Invoke(new()
    {
        PolicyId = "test",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetBudgetPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var this = DatabricksFunctions.getBudgetPolicy(GetBudgetPolicyArgs.builder()
            .policyId("test")
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: databricks:getBudgetPolicy
      arguments:
        policyId: test
Using getBudgetPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBudgetPolicy(args: GetBudgetPolicyArgs, opts?: InvokeOptions): Promise<GetBudgetPolicyResult>
function getBudgetPolicyOutput(args: GetBudgetPolicyOutputArgs, opts?: InvokeOptions): Output<GetBudgetPolicyResult>def get_budget_policy(binding_workspace_ids: Optional[Sequence[int]] = None,
                      custom_tags: Optional[Sequence[GetBudgetPolicyCustomTag]] = None,
                      policy_id: Optional[str] = None,
                      policy_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetBudgetPolicyResult
def get_budget_policy_output(binding_workspace_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
                      custom_tags: Optional[pulumi.Input[Sequence[pulumi.Input[GetBudgetPolicyCustomTagArgs]]]] = None,
                      policy_id: Optional[pulumi.Input[str]] = None,
                      policy_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetBudgetPolicyResult]func LookupBudgetPolicy(ctx *Context, args *LookupBudgetPolicyArgs, opts ...InvokeOption) (*LookupBudgetPolicyResult, error)
func LookupBudgetPolicyOutput(ctx *Context, args *LookupBudgetPolicyOutputArgs, opts ...InvokeOption) LookupBudgetPolicyResultOutput> Note: This function is named LookupBudgetPolicy in the Go SDK.
public static class GetBudgetPolicy 
{
    public static Task<GetBudgetPolicyResult> InvokeAsync(GetBudgetPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetBudgetPolicyResult> Invoke(GetBudgetPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBudgetPolicyResult> getBudgetPolicy(GetBudgetPolicyArgs args, InvokeOptions options)
public static Output<GetBudgetPolicyResult> getBudgetPolicy(GetBudgetPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: databricks:index/getBudgetPolicy:getBudgetPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- BindingWorkspace List<int>Ids 
- (list of integer) - 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
- 
List<GetBudget Policy Custom Tag> 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- PolicyId string
- The Id of the policy. This field is generated by Databricks and globally unique
- PolicyName string
- (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
 
- BindingWorkspace []intIds 
- (list of integer) - 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
- 
[]GetBudget Policy Custom Tag 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- PolicyId string
- The Id of the policy. This field is generated by Databricks and globally unique
- PolicyName string
- (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
 
- bindingWorkspace List<Integer>Ids 
- (list of integer) - 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
- 
List<GetBudget Policy Custom Tag> 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policyId String
- The Id of the policy. This field is generated by Databricks and globally unique
- policyName String
- (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
 
- bindingWorkspace number[]Ids 
- (list of integer) - 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
- 
GetBudget Policy Custom Tag[] 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policyId string
- The Id of the policy. This field is generated by Databricks and globally unique
- policyName string
- (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
 
- binding_workspace_ Sequence[int]ids 
- (list of integer) - 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
- 
Sequence[GetBudget Policy Custom Tag] 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policy_id str
- The Id of the policy. This field is generated by Databricks and globally unique
- policy_name str
- (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
 
- bindingWorkspace List<Number>Ids 
- (list of integer) - 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
- List<Property Map>
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policyId String
- The Id of the policy. This field is generated by Databricks and globally unique
- policyName String
- (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
 
getBudgetPolicy Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- PolicyId string
- (string) - The Id of the policy. This field is generated by Databricks and globally unique
- BindingWorkspace List<int>Ids 
- (list of integer) - 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
- 
List<GetBudget Policy Custom Tag> 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- PolicyName string
- (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
 
- Id string
- The provider-assigned unique ID for this managed resource.
- PolicyId string
- (string) - The Id of the policy. This field is generated by Databricks and globally unique
- BindingWorkspace []intIds 
- (list of integer) - 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
- 
[]GetBudget Policy Custom Tag 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- PolicyName string
- (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
 
- id String
- The provider-assigned unique ID for this managed resource.
- policyId String
- (string) - The Id of the policy. This field is generated by Databricks and globally unique
- bindingWorkspace List<Integer>Ids 
- (list of integer) - 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
- 
List<GetBudget Policy Custom Tag> 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policyName String
- (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
 
- id string
- The provider-assigned unique ID for this managed resource.
- policyId string
- (string) - The Id of the policy. This field is generated by Databricks and globally unique
- bindingWorkspace number[]Ids 
- (list of integer) - 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
- 
GetBudget Policy Custom Tag[] 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policyName string
- (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
 
- id str
- The provider-assigned unique ID for this managed resource.
- policy_id str
- (string) - The Id of the policy. This field is generated by Databricks and globally unique
- binding_workspace_ Sequence[int]ids 
- (list of integer) - 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
- 
Sequence[GetBudget Policy Custom Tag] 
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policy_name str
- (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
 
- id String
- The provider-assigned unique ID for this managed resource.
- policyId String
- (string) - The Id of the policy. This field is generated by Databricks and globally unique
- bindingWorkspace List<Number>Ids 
- (list of integer) - 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
- List<Property Map>
- (list of CustomPolicyTag) - A list of tags defined by the customer. At most 20 entries are allowed per policy
- policyName String
- (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
 
Supporting Types
GetBudgetPolicyCustomTag    
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the databricksTerraform Provider.
