# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
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

__all__ = [
    'GetWarehousesDefaultWarehouseOverrideResult',
    'AwaitableGetWarehousesDefaultWarehouseOverrideResult',
    'get_warehouses_default_warehouse_override',
    'get_warehouses_default_warehouse_override_output',
]

@pulumi.output_type
class GetWarehousesDefaultWarehouseOverrideResult:
    """
    A collection of values returned by getWarehousesDefaultWarehouseOverride.
    """
    def __init__(__self__, default_warehouse_override_id=None, id=None, name=None, type=None, warehouse_id=None):
        if default_warehouse_override_id and not isinstance(default_warehouse_override_id, str):
            raise TypeError("Expected argument 'default_warehouse_override_id' to be a str")
        pulumi.set(__self__, "default_warehouse_override_id", default_warehouse_override_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if warehouse_id and not isinstance(warehouse_id, str):
            raise TypeError("Expected argument 'warehouse_id' to be a str")
        pulumi.set(__self__, "warehouse_id", warehouse_id)

    @_builtins.property
    @pulumi.getter(name="defaultWarehouseOverrideId")
    def default_warehouse_override_id(self) -> _builtins.str:
        """
        (string) - The ID component of the resource name (user ID)
        """
        return pulumi.get(self, "default_warehouse_override_id")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        (string) - The resource name of the default warehouse override.
        Format: default-warehouse-overrides/{default_warehouse_override_id}
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def type(self) -> _builtins.str:
        """
        (string) - The type of override behavior. Possible values are: `CUSTOM`, `LAST_SELECTED`
        """
        return pulumi.get(self, "type")

    @_builtins.property
    @pulumi.getter(name="warehouseId")
    def warehouse_id(self) -> _builtins.str:
        """
        (string) - The specific warehouse ID when type is CUSTOM.
        Not set for LAST_SELECTED type
        """
        return pulumi.get(self, "warehouse_id")


class AwaitableGetWarehousesDefaultWarehouseOverrideResult(GetWarehousesDefaultWarehouseOverrideResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetWarehousesDefaultWarehouseOverrideResult(
            default_warehouse_override_id=self.default_warehouse_override_id,
            id=self.id,
            name=self.name,
            type=self.type,
            warehouse_id=self.warehouse_id)


def get_warehouses_default_warehouse_override(name: Optional[_builtins.str] = None,
                                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetWarehousesDefaultWarehouseOverrideResult:
    """
    [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

    The Default Warehouse Override data source allows you to retrieve information about a user's default warehouse selection configuration in Databricks SQL.

    You can use this data source to:
    - Retrieve the current default warehouse override configuration for a user
    - Check whether a user has a custom warehouse configured or uses last-selected behavior
    - Get the warehouse ID if a custom warehouse is configured

    > **Note** The resource name format is `default-warehouse-overrides/{default_warehouse_override_id}`, where `default_warehouse_override_id` represents a user ID.

    ## Example Usage


    :param _builtins.str name: The resource name of the default warehouse override.
           Format: default-warehouse-overrides/{default_warehouse_override_id}
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getWarehousesDefaultWarehouseOverride:getWarehousesDefaultWarehouseOverride', __args__, opts=opts, typ=GetWarehousesDefaultWarehouseOverrideResult).value

    return AwaitableGetWarehousesDefaultWarehouseOverrideResult(
        default_warehouse_override_id=pulumi.get(__ret__, 'default_warehouse_override_id'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        type=pulumi.get(__ret__, 'type'),
        warehouse_id=pulumi.get(__ret__, 'warehouse_id'))
def get_warehouses_default_warehouse_override_output(name: Optional[pulumi.Input[_builtins.str]] = None,
                                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetWarehousesDefaultWarehouseOverrideResult]:
    """
    [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

    The Default Warehouse Override data source allows you to retrieve information about a user's default warehouse selection configuration in Databricks SQL.

    You can use this data source to:
    - Retrieve the current default warehouse override configuration for a user
    - Check whether a user has a custom warehouse configured or uses last-selected behavior
    - Get the warehouse ID if a custom warehouse is configured

    > **Note** The resource name format is `default-warehouse-overrides/{default_warehouse_override_id}`, where `default_warehouse_override_id` represents a user ID.

    ## Example Usage


    :param _builtins.str name: The resource name of the default warehouse override.
           Format: default-warehouse-overrides/{default_warehouse_override_id}
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getWarehousesDefaultWarehouseOverride:getWarehousesDefaultWarehouseOverride', __args__, opts=opts, typ=GetWarehousesDefaultWarehouseOverrideResult)
    return __ret__.apply(lambda __response__: GetWarehousesDefaultWarehouseOverrideResult(
        default_warehouse_override_id=pulumi.get(__response__, 'default_warehouse_override_id'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        type=pulumi.get(__response__, 'type'),
        warehouse_id=pulumi.get(__response__, 'warehouse_id')))
