# 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
from . import outputs
from ._inputs import *

__all__ = ['EnvironmentsDefaultWorkspaceBaseEnvironmentArgs', 'EnvironmentsDefaultWorkspaceBaseEnvironment']

@pulumi.input_type
class EnvironmentsDefaultWorkspaceBaseEnvironmentArgs:
    def __init__(__self__, *,
                 cpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 gpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs']] = None):
        """
        The set of arguments for constructing a EnvironmentsDefaultWorkspaceBaseEnvironment resource.
        :param pulumi.Input[_builtins.str] cpu_workspace_base_environment: The default workspace base environment for CPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[_builtins.str] gpu_workspace_base_environment: The default workspace base environment for GPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs'] provider_config: Configure the provider for management through account provider.
        """
        if cpu_workspace_base_environment is not None:
            pulumi.set(__self__, "cpu_workspace_base_environment", cpu_workspace_base_environment)
        if gpu_workspace_base_environment is not None:
            pulumi.set(__self__, "gpu_workspace_base_environment", gpu_workspace_base_environment)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter(name="cpuWorkspaceBaseEnvironment")
    def cpu_workspace_base_environment(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The default workspace base environment for CPU compute.
        Format: workspace-base-environments/{workspace_base_environment}
        """
        return pulumi.get(self, "cpu_workspace_base_environment")

    @cpu_workspace_base_environment.setter
    def cpu_workspace_base_environment(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "cpu_workspace_base_environment", value)

    @_builtins.property
    @pulumi.getter(name="gpuWorkspaceBaseEnvironment")
    def gpu_workspace_base_environment(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The default workspace base environment for GPU compute.
        Format: workspace-base-environments/{workspace_base_environment}
        """
        return pulumi.get(self, "gpu_workspace_base_environment")

    @gpu_workspace_base_environment.setter
    def gpu_workspace_base_environment(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "gpu_workspace_base_environment", value)

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs']]:
        """
        Configure the provider for management through account provider.
        """
        return pulumi.get(self, "provider_config")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs']]):
        pulumi.set(self, "provider_config", value)


@pulumi.input_type
class _EnvironmentsDefaultWorkspaceBaseEnvironmentState:
    def __init__(__self__, *,
                 cpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 gpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs']] = None):
        """
        Input properties used for looking up and filtering EnvironmentsDefaultWorkspaceBaseEnvironment resources.
        :param pulumi.Input[_builtins.str] cpu_workspace_base_environment: The default workspace base environment for CPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[_builtins.str] gpu_workspace_base_environment: The default workspace base environment for GPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of this singleton resource.
               Format: default-workspace-base-environment
        :param pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs'] provider_config: Configure the provider for management through account provider.
        """
        if cpu_workspace_base_environment is not None:
            pulumi.set(__self__, "cpu_workspace_base_environment", cpu_workspace_base_environment)
        if gpu_workspace_base_environment is not None:
            pulumi.set(__self__, "gpu_workspace_base_environment", gpu_workspace_base_environment)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter(name="cpuWorkspaceBaseEnvironment")
    def cpu_workspace_base_environment(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The default workspace base environment for CPU compute.
        Format: workspace-base-environments/{workspace_base_environment}
        """
        return pulumi.get(self, "cpu_workspace_base_environment")

    @cpu_workspace_base_environment.setter
    def cpu_workspace_base_environment(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "cpu_workspace_base_environment", value)

    @_builtins.property
    @pulumi.getter(name="gpuWorkspaceBaseEnvironment")
    def gpu_workspace_base_environment(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The default workspace base environment for GPU compute.
        Format: workspace-base-environments/{workspace_base_environment}
        """
        return pulumi.get(self, "gpu_workspace_base_environment")

    @gpu_workspace_base_environment.setter
    def gpu_workspace_base_environment(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "gpu_workspace_base_environment", value)

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - The resource name of this singleton resource.
        Format: default-workspace-base-environment
        """
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs']]:
        """
        Configure the provider for management through account provider.
        """
        return pulumi.get(self, "provider_config")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs']]):
        pulumi.set(self, "provider_config", value)


@pulumi.type_token("databricks:index/environmentsDefaultWorkspaceBaseEnvironment:EnvironmentsDefaultWorkspaceBaseEnvironment")
class EnvironmentsDefaultWorkspaceBaseEnvironment(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 gpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs', 'EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgsDict']]] = None,
                 __props__=None):
        """
        [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

        The Default Workspace Base Environment is a singleton resource that configures which workspace base environments are applied by default to new notebooks in the workspace. Defaults can be set separately for CPU and GPU compute.

        Without a default configured, new notebooks do not use a workspace base environment by default.

        ## Example Usage

        ### Set Default for CPU Compute

        ```python
        import pulumi
        import pulumi_databricks as databricks

        cpu_env = databricks.index.WorkspaceBaseEnvironment("cpu_env",
            display_name=my-cpu-environment,
            filepath=/Volumes/catalog/schema/volume/cpu-environment.yaml)
        this = databricks.index.DefaultWorkspaceBaseEnvironment("this", cpu_workspace_base_environment=cpu_env.name)
        ```

        ### Set Defaults for Both CPU and GPU Compute

        ```python
        import pulumi
        import pulumi_databricks as databricks

        cpu_env = databricks.index.WorkspaceBaseEnvironment("cpu_env",
            display_name=my-cpu-environment,
            filepath=/Volumes/catalog/schema/volume/cpu-environment.yaml)
        gpu_env = databricks.index.WorkspaceBaseEnvironment("gpu_env",
            display_name=my-gpu-environment,
            filepath=/Volumes/catalog/schema/volume/gpu-environment.yaml,
            base_environment_type=GPU_LARGE)
        this = databricks.index.DefaultWorkspaceBaseEnvironment("this",
            cpu_workspace_base_environment=cpu_env.name,
            gpu_workspace_base_environment=gpu_env.name)
        ```

        ### Unset Both Defaults

        ```python
        import pulumi
        import pulumi_databricks as databricks

        this = databricks.index.DefaultWorkspaceBaseEnvironment("this")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] cpu_workspace_base_environment: The default workspace base environment for CPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[_builtins.str] gpu_workspace_base_environment: The default workspace base environment for GPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[Union['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs', 'EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[EnvironmentsDefaultWorkspaceBaseEnvironmentArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

        The Default Workspace Base Environment is a singleton resource that configures which workspace base environments are applied by default to new notebooks in the workspace. Defaults can be set separately for CPU and GPU compute.

        Without a default configured, new notebooks do not use a workspace base environment by default.

        ## Example Usage

        ### Set Default for CPU Compute

        ```python
        import pulumi
        import pulumi_databricks as databricks

        cpu_env = databricks.index.WorkspaceBaseEnvironment("cpu_env",
            display_name=my-cpu-environment,
            filepath=/Volumes/catalog/schema/volume/cpu-environment.yaml)
        this = databricks.index.DefaultWorkspaceBaseEnvironment("this", cpu_workspace_base_environment=cpu_env.name)
        ```

        ### Set Defaults for Both CPU and GPU Compute

        ```python
        import pulumi
        import pulumi_databricks as databricks

        cpu_env = databricks.index.WorkspaceBaseEnvironment("cpu_env",
            display_name=my-cpu-environment,
            filepath=/Volumes/catalog/schema/volume/cpu-environment.yaml)
        gpu_env = databricks.index.WorkspaceBaseEnvironment("gpu_env",
            display_name=my-gpu-environment,
            filepath=/Volumes/catalog/schema/volume/gpu-environment.yaml,
            base_environment_type=GPU_LARGE)
        this = databricks.index.DefaultWorkspaceBaseEnvironment("this",
            cpu_workspace_base_environment=cpu_env.name,
            gpu_workspace_base_environment=gpu_env.name)
        ```

        ### Unset Both Defaults

        ```python
        import pulumi
        import pulumi_databricks as databricks

        this = databricks.index.DefaultWorkspaceBaseEnvironment("this")
        ```

        :param str resource_name: The name of the resource.
        :param EnvironmentsDefaultWorkspaceBaseEnvironmentArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(EnvironmentsDefaultWorkspaceBaseEnvironmentArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 cpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 gpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs', 'EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgsDict']]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = EnvironmentsDefaultWorkspaceBaseEnvironmentArgs.__new__(EnvironmentsDefaultWorkspaceBaseEnvironmentArgs)

            __props__.__dict__["cpu_workspace_base_environment"] = cpu_workspace_base_environment
            __props__.__dict__["gpu_workspace_base_environment"] = gpu_workspace_base_environment
            __props__.__dict__["provider_config"] = provider_config
            __props__.__dict__["name"] = None
        super(EnvironmentsDefaultWorkspaceBaseEnvironment, __self__).__init__(
            'databricks:index/environmentsDefaultWorkspaceBaseEnvironment:EnvironmentsDefaultWorkspaceBaseEnvironment',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            cpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
            gpu_workspace_base_environment: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            provider_config: Optional[pulumi.Input[Union['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs', 'EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgsDict']]] = None) -> 'EnvironmentsDefaultWorkspaceBaseEnvironment':
        """
        Get an existing EnvironmentsDefaultWorkspaceBaseEnvironment resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] cpu_workspace_base_environment: The default workspace base environment for CPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[_builtins.str] gpu_workspace_base_environment: The default workspace base environment for GPU compute.
               Format: workspace-base-environments/{workspace_base_environment}
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of this singleton resource.
               Format: default-workspace-base-environment
        :param pulumi.Input[Union['EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgs', 'EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _EnvironmentsDefaultWorkspaceBaseEnvironmentState.__new__(_EnvironmentsDefaultWorkspaceBaseEnvironmentState)

        __props__.__dict__["cpu_workspace_base_environment"] = cpu_workspace_base_environment
        __props__.__dict__["gpu_workspace_base_environment"] = gpu_workspace_base_environment
        __props__.__dict__["name"] = name
        __props__.__dict__["provider_config"] = provider_config
        return EnvironmentsDefaultWorkspaceBaseEnvironment(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="cpuWorkspaceBaseEnvironment")
    def cpu_workspace_base_environment(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The default workspace base environment for CPU compute.
        Format: workspace-base-environments/{workspace_base_environment}
        """
        return pulumi.get(self, "cpu_workspace_base_environment")

    @_builtins.property
    @pulumi.getter(name="gpuWorkspaceBaseEnvironment")
    def gpu_workspace_base_environment(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        The default workspace base environment for GPU compute.
        Format: workspace-base-environments/{workspace_base_environment}
        """
        return pulumi.get(self, "gpu_workspace_base_environment")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - The resource name of this singleton resource.
        Format: default-workspace-base-environment
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> pulumi.Output[Optional['outputs.EnvironmentsDefaultWorkspaceBaseEnvironmentProviderConfig']]:
        """
        Configure the provider for management through account provider.
        """
        return pulumi.get(self, "provider_config")

