# 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__ = ['DisableLegacyDbfsSettingArgs', 'DisableLegacyDbfsSetting']

@pulumi.input_type
class DisableLegacyDbfsSettingArgs:
    def __init__(__self__, *,
                 disable_legacy_dbfs: pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs'],
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['DisableLegacyDbfsSettingProviderConfigArgs']] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a DisableLegacyDbfsSetting resource.
        :param pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs'] disable_legacy_dbfs: block with following attributes:
        :param pulumi.Input['DisableLegacyDbfsSettingProviderConfigArgs'] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
        """
        pulumi.set(__self__, "disable_legacy_dbfs", disable_legacy_dbfs)
        if etag is not None:
            pulumi.set(__self__, "etag", etag)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)
        if setting_name is not None:
            pulumi.set(__self__, "setting_name", setting_name)

    @_builtins.property
    @pulumi.getter(name="disableLegacyDbfs")
    def disable_legacy_dbfs(self) -> pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs']:
        """
        block with following attributes:
        """
        return pulumi.get(self, "disable_legacy_dbfs")

    @disable_legacy_dbfs.setter
    def disable_legacy_dbfs(self, value: pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs']):
        pulumi.set(self, "disable_legacy_dbfs", value)

    @_builtins.property
    @pulumi.getter
    def etag(self) -> Optional[pulumi.Input[_builtins.str]]:
        return pulumi.get(self, "etag")

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

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

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

    @_builtins.property
    @pulumi.getter(name="settingName")
    def setting_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        return pulumi.get(self, "setting_name")

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


@pulumi.input_type
class _DisableLegacyDbfsSettingState:
    def __init__(__self__, *,
                 disable_legacy_dbfs: Optional[pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs']] = None,
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['DisableLegacyDbfsSettingProviderConfigArgs']] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering DisableLegacyDbfsSetting resources.
        :param pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs'] disable_legacy_dbfs: block with following attributes:
        :param pulumi.Input['DisableLegacyDbfsSettingProviderConfigArgs'] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
        """
        if disable_legacy_dbfs is not None:
            pulumi.set(__self__, "disable_legacy_dbfs", disable_legacy_dbfs)
        if etag is not None:
            pulumi.set(__self__, "etag", etag)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)
        if setting_name is not None:
            pulumi.set(__self__, "setting_name", setting_name)

    @_builtins.property
    @pulumi.getter(name="disableLegacyDbfs")
    def disable_legacy_dbfs(self) -> Optional[pulumi.Input['DisableLegacyDbfsSettingDisableLegacyDbfsArgs']]:
        """
        block with following attributes:
        """
        return pulumi.get(self, "disable_legacy_dbfs")

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

    @_builtins.property
    @pulumi.getter
    def etag(self) -> Optional[pulumi.Input[_builtins.str]]:
        return pulumi.get(self, "etag")

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

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

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

    @_builtins.property
    @pulumi.getter(name="settingName")
    def setting_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        return pulumi.get(self, "setting_name")

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


@pulumi.type_token("databricks:index/disableLegacyDbfsSetting:DisableLegacyDbfsSetting")
class DisableLegacyDbfsSetting(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 disable_legacy_dbfs: Optional[pulumi.Input[Union['DisableLegacyDbfsSettingDisableLegacyDbfsArgs', 'DisableLegacyDbfsSettingDisableLegacyDbfsArgsDict']]] = None,
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['DisableLegacyDbfsSettingProviderConfigArgs', 'DisableLegacyDbfsSettingProviderConfigArgsDict']]] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        The `DisableLegacyDbfsSetting` resource allows you to disable legacy DBFS.

        > This resource can only be used with a workspace-level provider!

        Disabling legacy DBFS has the following implications:

        1. Access to DBFS root and DBFS mounts is disallowed (as well as the creation of new mounts).
        2. Disables Databricks Runtime versions prior to 13.3LTS.

        When the setting is off, all DBFS functionality is enabled and no restrictions are imposed on Databricks Runtime versions. This setting can take up to 20 minutes to take effect and requires a manual restart of all-purpose compute clusters and SQL warehouses.

        Refer to official docs for more details:

        - [Azure](https://learn.microsoft.com/azure/databricks/dbfs/disable-dbfs-root-mounts)
        - [AWS](https://docs.databricks.com/aws/dbfs/disable-dbfs-root-mounts)
        - [GCP](https://docs.gcp.databricks.com/dbfs/disable-dbfs-root-mounts)

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        this = databricks.DisableLegacyDbfsSetting("this", disable_legacy_dbfs={
            "value": True,
        })
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['DisableLegacyDbfsSettingDisableLegacyDbfsArgs', 'DisableLegacyDbfsSettingDisableLegacyDbfsArgsDict']] disable_legacy_dbfs: block with following attributes:
        :param pulumi.Input[Union['DisableLegacyDbfsSettingProviderConfigArgs', 'DisableLegacyDbfsSettingProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: DisableLegacyDbfsSettingArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The `DisableLegacyDbfsSetting` resource allows you to disable legacy DBFS.

        > This resource can only be used with a workspace-level provider!

        Disabling legacy DBFS has the following implications:

        1. Access to DBFS root and DBFS mounts is disallowed (as well as the creation of new mounts).
        2. Disables Databricks Runtime versions prior to 13.3LTS.

        When the setting is off, all DBFS functionality is enabled and no restrictions are imposed on Databricks Runtime versions. This setting can take up to 20 minutes to take effect and requires a manual restart of all-purpose compute clusters and SQL warehouses.

        Refer to official docs for more details:

        - [Azure](https://learn.microsoft.com/azure/databricks/dbfs/disable-dbfs-root-mounts)
        - [AWS](https://docs.databricks.com/aws/dbfs/disable-dbfs-root-mounts)
        - [GCP](https://docs.gcp.databricks.com/dbfs/disable-dbfs-root-mounts)

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        this = databricks.DisableLegacyDbfsSetting("this", disable_legacy_dbfs={
            "value": True,
        })
        ```

        :param str resource_name: The name of the resource.
        :param DisableLegacyDbfsSettingArgs 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(DisableLegacyDbfsSettingArgs, 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,
                 disable_legacy_dbfs: Optional[pulumi.Input[Union['DisableLegacyDbfsSettingDisableLegacyDbfsArgs', 'DisableLegacyDbfsSettingDisableLegacyDbfsArgsDict']]] = None,
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['DisableLegacyDbfsSettingProviderConfigArgs', 'DisableLegacyDbfsSettingProviderConfigArgsDict']]] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = 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__ = DisableLegacyDbfsSettingArgs.__new__(DisableLegacyDbfsSettingArgs)

            if disable_legacy_dbfs is None and not opts.urn:
                raise TypeError("Missing required property 'disable_legacy_dbfs'")
            __props__.__dict__["disable_legacy_dbfs"] = disable_legacy_dbfs
            __props__.__dict__["etag"] = etag
            __props__.__dict__["provider_config"] = provider_config
            __props__.__dict__["setting_name"] = setting_name
        super(DisableLegacyDbfsSetting, __self__).__init__(
            'databricks:index/disableLegacyDbfsSetting:DisableLegacyDbfsSetting',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            disable_legacy_dbfs: Optional[pulumi.Input[Union['DisableLegacyDbfsSettingDisableLegacyDbfsArgs', 'DisableLegacyDbfsSettingDisableLegacyDbfsArgsDict']]] = None,
            etag: Optional[pulumi.Input[_builtins.str]] = None,
            provider_config: Optional[pulumi.Input[Union['DisableLegacyDbfsSettingProviderConfigArgs', 'DisableLegacyDbfsSettingProviderConfigArgsDict']]] = None,
            setting_name: Optional[pulumi.Input[_builtins.str]] = None) -> 'DisableLegacyDbfsSetting':
        """
        Get an existing DisableLegacyDbfsSetting 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[Union['DisableLegacyDbfsSettingDisableLegacyDbfsArgs', 'DisableLegacyDbfsSettingDisableLegacyDbfsArgsDict']] disable_legacy_dbfs: block with following attributes:
        :param pulumi.Input[Union['DisableLegacyDbfsSettingProviderConfigArgs', 'DisableLegacyDbfsSettingProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider. This block consists of the following fields:
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DisableLegacyDbfsSettingState.__new__(_DisableLegacyDbfsSettingState)

        __props__.__dict__["disable_legacy_dbfs"] = disable_legacy_dbfs
        __props__.__dict__["etag"] = etag
        __props__.__dict__["provider_config"] = provider_config
        __props__.__dict__["setting_name"] = setting_name
        return DisableLegacyDbfsSetting(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="disableLegacyDbfs")
    def disable_legacy_dbfs(self) -> pulumi.Output['outputs.DisableLegacyDbfsSettingDisableLegacyDbfs']:
        """
        block with following attributes:
        """
        return pulumi.get(self, "disable_legacy_dbfs")

    @_builtins.property
    @pulumi.getter
    def etag(self) -> pulumi.Output[_builtins.str]:
        return pulumi.get(self, "etag")

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

    @_builtins.property
    @pulumi.getter(name="settingName")
    def setting_name(self) -> pulumi.Output[_builtins.str]:
        return pulumi.get(self, "setting_name")

