# coding=utf-8
# *** 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! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetBudgetPolicyResult',
    'AwaitableGetBudgetPolicyResult',
    'get_budget_policy',
    'get_budget_policy_output',
]

@pulumi.output_type
class GetBudgetPolicyResult:
    """
    A collection of values returned by getBudgetPolicy.
    """
    def __init__(__self__, binding_workspace_ids=None, custom_tags=None, id=None, policy_id=None, policy_name=None):
        if binding_workspace_ids and not isinstance(binding_workspace_ids, list):
            raise TypeError("Expected argument 'binding_workspace_ids' to be a list")
        pulumi.set(__self__, "binding_workspace_ids", binding_workspace_ids)
        if custom_tags and not isinstance(custom_tags, list):
            raise TypeError("Expected argument 'custom_tags' to be a list")
        pulumi.set(__self__, "custom_tags", custom_tags)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if policy_id and not isinstance(policy_id, str):
            raise TypeError("Expected argument 'policy_id' to be a str")
        pulumi.set(__self__, "policy_id", policy_id)
        if policy_name and not isinstance(policy_name, str):
            raise TypeError("Expected argument 'policy_name' to be a str")
        pulumi.set(__self__, "policy_name", policy_name)

    @property
    @pulumi.getter(name="bindingWorkspaceIds")
    def binding_workspace_ids(self) -> Optional[Sequence[builtins.int]]:
        return pulumi.get(self, "binding_workspace_ids")

    @property
    @pulumi.getter(name="customTags")
    def custom_tags(self) -> Optional[Sequence['outputs.GetBudgetPolicyCustomTagResult']]:
        return pulumi.get(self, "custom_tags")

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="policyId")
    def policy_id(self) -> builtins.str:
        """
        The id of the budget policy.
        """
        return pulumi.get(self, "policy_id")

    @property
    @pulumi.getter(name="policyName")
    def policy_name(self) -> Optional[builtins.str]:
        """
        The name of the budget policy.
        """
        return pulumi.get(self, "policy_name")


class AwaitableGetBudgetPolicyResult(GetBudgetPolicyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBudgetPolicyResult(
            binding_workspace_ids=self.binding_workspace_ids,
            custom_tags=self.custom_tags,
            id=self.id,
            policy_id=self.policy_id,
            policy_name=self.policy_name)


def get_budget_policy(binding_workspace_ids: Optional[Sequence[builtins.int]] = None,
                      custom_tags: Optional[Sequence[Union['GetBudgetPolicyCustomTagArgs', 'GetBudgetPolicyCustomTagArgsDict']]] = None,
                      policy_name: Optional[builtins.str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBudgetPolicyResult:
    """
    This data source can be used to get a single budget policy.

    > This data source can only be used with an account-level provider!


    :param builtins.str policy_name: The name of the budget policy.
    """
    __args__ = dict()
    __args__['bindingWorkspaceIds'] = binding_workspace_ids
    __args__['customTags'] = custom_tags
    __args__['policyName'] = policy_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getBudgetPolicy:getBudgetPolicy', __args__, opts=opts, typ=GetBudgetPolicyResult).value

    return AwaitableGetBudgetPolicyResult(
        binding_workspace_ids=pulumi.get(__ret__, 'binding_workspace_ids'),
        custom_tags=pulumi.get(__ret__, 'custom_tags'),
        id=pulumi.get(__ret__, 'id'),
        policy_id=pulumi.get(__ret__, 'policy_id'),
        policy_name=pulumi.get(__ret__, 'policy_name'))
def get_budget_policy_output(binding_workspace_ids: Optional[pulumi.Input[Optional[Sequence[builtins.int]]]] = None,
                             custom_tags: Optional[pulumi.Input[Optional[Sequence[Union['GetBudgetPolicyCustomTagArgs', 'GetBudgetPolicyCustomTagArgsDict']]]]] = None,
                             policy_name: Optional[pulumi.Input[Optional[builtins.str]]] = None,
                             opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetBudgetPolicyResult]:
    """
    This data source can be used to get a single budget policy.

    > This data source can only be used with an account-level provider!


    :param builtins.str policy_name: The name of the budget policy.
    """
    __args__ = dict()
    __args__['bindingWorkspaceIds'] = binding_workspace_ids
    __args__['customTags'] = custom_tags
    __args__['policyName'] = policy_name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getBudgetPolicy:getBudgetPolicy', __args__, opts=opts, typ=GetBudgetPolicyResult)
    return __ret__.apply(lambda __response__: GetBudgetPolicyResult(
        binding_workspace_ids=pulumi.get(__response__, 'binding_workspace_ids'),
        custom_tags=pulumi.get(__response__, 'custom_tags'),
        id=pulumi.get(__response__, 'id'),
        policy_id=pulumi.get(__response__, 'policy_id'),
        policy_name=pulumi.get(__response__, 'policy_name')))
