# 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__ = ['DisableLegacyFeaturesSettingArgs', 'DisableLegacyFeaturesSetting']

@pulumi.input_type
class DisableLegacyFeaturesSettingArgs:
    def __init__(__self__, *,
                 disable_legacy_features: pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs'],
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['DisableLegacyFeaturesSettingProviderConfigArgs']] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a DisableLegacyFeaturesSetting resource.
        :param pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs'] disable_legacy_features: block with following attributes:
        """
        pulumi.set(__self__, "disable_legacy_features", disable_legacy_features)
        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="disableLegacyFeatures")
    def disable_legacy_features(self) -> pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs']:
        """
        block with following attributes:
        """
        return pulumi.get(self, "disable_legacy_features")

    @disable_legacy_features.setter
    def disable_legacy_features(self, value: pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs']):
        pulumi.set(self, "disable_legacy_features", 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['DisableLegacyFeaturesSettingProviderConfigArgs']]:
        return pulumi.get(self, "provider_config")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input['DisableLegacyFeaturesSettingProviderConfigArgs']]):
        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 _DisableLegacyFeaturesSettingState:
    def __init__(__self__, *,
                 disable_legacy_features: Optional[pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs']] = None,
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['DisableLegacyFeaturesSettingProviderConfigArgs']] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering DisableLegacyFeaturesSetting resources.
        :param pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs'] disable_legacy_features: block with following attributes:
        """
        if disable_legacy_features is not None:
            pulumi.set(__self__, "disable_legacy_features", disable_legacy_features)
        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="disableLegacyFeatures")
    def disable_legacy_features(self) -> Optional[pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs']]:
        """
        block with following attributes:
        """
        return pulumi.get(self, "disable_legacy_features")

    @disable_legacy_features.setter
    def disable_legacy_features(self, value: Optional[pulumi.Input['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs']]):
        pulumi.set(self, "disable_legacy_features", 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['DisableLegacyFeaturesSettingProviderConfigArgs']]:
        return pulumi.get(self, "provider_config")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input['DisableLegacyFeaturesSettingProviderConfigArgs']]):
        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/disableLegacyFeaturesSetting:DisableLegacyFeaturesSetting")
class DisableLegacyFeaturesSetting(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 disable_legacy_features: Optional[pulumi.Input[Union['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs', 'DisableLegacyFeaturesSettingDisableLegacyFeaturesArgsDict']]] = None,
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['DisableLegacyFeaturesSettingProviderConfigArgs', 'DisableLegacyFeaturesSettingProviderConfigArgsDict']]] = None,
                 setting_name: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        > This resource can only be used with an account-level provider!

        The `DisableLegacyFeaturesSetting` resource allows you to disable legacy features on newly created workspaces.

        > Before disabling legacy features, make sure that default catalog for the workspace is set to value different than `hive_metastore`!  You can set it using the DefaultNamespaceSetting resource.

        When this setting is on, the following applies to new workspaces:

        - Disables the use of DBFS root and mounts.
        - Hive Metastore will not be provisioned.
        - Disables the use of 'No-isolation clusters'.
        - Disables Databricks Runtime versions prior to 13.3LTS

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        # Change default catalog to anything than `hive_metastore`
        this = databricks.DefaultNamespaceSetting("this", namespace={
            "value": "default_catalog",
        })
        # Disable legacy features
        this_disable_legacy_features_setting = databricks.DisableLegacyFeaturesSetting("this", disable_legacy_features={
            "value": True,
        })
        ```

        ## Related Resources

        The following resources are often used in the same context:

        * DisableLegacyAccessSetting to disable legacy access, enabled by default when creating new workspaces with the `disable_legacy_features` account level setting turned on.
        * DisableLegacyDbfsSetting to disable legacy DBFS, enabled by default when creating new workspaces with the `disable_legacy_features` account level setting turned on.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs', 'DisableLegacyFeaturesSettingDisableLegacyFeaturesArgsDict']] disable_legacy_features: block with following attributes:
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: DisableLegacyFeaturesSettingArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        > This resource can only be used with an account-level provider!

        The `DisableLegacyFeaturesSetting` resource allows you to disable legacy features on newly created workspaces.

        > Before disabling legacy features, make sure that default catalog for the workspace is set to value different than `hive_metastore`!  You can set it using the DefaultNamespaceSetting resource.

        When this setting is on, the following applies to new workspaces:

        - Disables the use of DBFS root and mounts.
        - Hive Metastore will not be provisioned.
        - Disables the use of 'No-isolation clusters'.
        - Disables Databricks Runtime versions prior to 13.3LTS

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        # Change default catalog to anything than `hive_metastore`
        this = databricks.DefaultNamespaceSetting("this", namespace={
            "value": "default_catalog",
        })
        # Disable legacy features
        this_disable_legacy_features_setting = databricks.DisableLegacyFeaturesSetting("this", disable_legacy_features={
            "value": True,
        })
        ```

        ## Related Resources

        The following resources are often used in the same context:

        * DisableLegacyAccessSetting to disable legacy access, enabled by default when creating new workspaces with the `disable_legacy_features` account level setting turned on.
        * DisableLegacyDbfsSetting to disable legacy DBFS, enabled by default when creating new workspaces with the `disable_legacy_features` account level setting turned on.

        :param str resource_name: The name of the resource.
        :param DisableLegacyFeaturesSettingArgs 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(DisableLegacyFeaturesSettingArgs, 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_features: Optional[pulumi.Input[Union['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs', 'DisableLegacyFeaturesSettingDisableLegacyFeaturesArgsDict']]] = None,
                 etag: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['DisableLegacyFeaturesSettingProviderConfigArgs', 'DisableLegacyFeaturesSettingProviderConfigArgsDict']]] = 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__ = DisableLegacyFeaturesSettingArgs.__new__(DisableLegacyFeaturesSettingArgs)

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

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            disable_legacy_features: Optional[pulumi.Input[Union['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs', 'DisableLegacyFeaturesSettingDisableLegacyFeaturesArgsDict']]] = None,
            etag: Optional[pulumi.Input[_builtins.str]] = None,
            provider_config: Optional[pulumi.Input[Union['DisableLegacyFeaturesSettingProviderConfigArgs', 'DisableLegacyFeaturesSettingProviderConfigArgsDict']]] = None,
            setting_name: Optional[pulumi.Input[_builtins.str]] = None) -> 'DisableLegacyFeaturesSetting':
        """
        Get an existing DisableLegacyFeaturesSetting 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['DisableLegacyFeaturesSettingDisableLegacyFeaturesArgs', 'DisableLegacyFeaturesSettingDisableLegacyFeaturesArgsDict']] disable_legacy_features: block with following attributes:
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DisableLegacyFeaturesSettingState.__new__(_DisableLegacyFeaturesSettingState)

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

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

    @_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.DisableLegacyFeaturesSettingProviderConfig']]:
        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")

