# 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__ = ['DataClassificationCatalogConfigArgs', 'DataClassificationCatalogConfig']

@pulumi.input_type
class DataClassificationCatalogConfigArgs:
    def __init__(__self__, *,
                 parent: pulumi.Input[_builtins.str],
                 auto_tag_configs: Optional[pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]]] = None,
                 included_schemas: Optional[pulumi.Input['DataClassificationCatalogConfigIncludedSchemasArgs']] = None,
                 provider_config: Optional[pulumi.Input['DataClassificationCatalogConfigProviderConfigArgs']] = None):
        """
        The set of arguments for constructing a DataClassificationCatalogConfig resource.
        :param pulumi.Input[_builtins.str] parent: Parent resource in the format: catalogs/{catalog_name}
        :param pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]] auto_tag_configs: List of auto-tagging configurations for this catalog.
               Empty list means no auto-tagging is enabled
        :param pulumi.Input['DataClassificationCatalogConfigIncludedSchemasArgs'] included_schemas: Schemas to include in the scan. Empty list is not supported as it results in a no-op
               scan. If `included_schemas` is not set, all schemas are scanned
        :param pulumi.Input['DataClassificationCatalogConfigProviderConfigArgs'] provider_config: Configure the provider for management through account provider.
        """
        pulumi.set(__self__, "parent", parent)
        if auto_tag_configs is not None:
            pulumi.set(__self__, "auto_tag_configs", auto_tag_configs)
        if included_schemas is not None:
            pulumi.set(__self__, "included_schemas", included_schemas)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter
    def parent(self) -> pulumi.Input[_builtins.str]:
        """
        Parent resource in the format: catalogs/{catalog_name}
        """
        return pulumi.get(self, "parent")

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

    @_builtins.property
    @pulumi.getter(name="autoTagConfigs")
    def auto_tag_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]]]:
        """
        List of auto-tagging configurations for this catalog.
        Empty list means no auto-tagging is enabled
        """
        return pulumi.get(self, "auto_tag_configs")

    @auto_tag_configs.setter
    def auto_tag_configs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]]]):
        pulumi.set(self, "auto_tag_configs", value)

    @_builtins.property
    @pulumi.getter(name="includedSchemas")
    def included_schemas(self) -> Optional[pulumi.Input['DataClassificationCatalogConfigIncludedSchemasArgs']]:
        """
        Schemas to include in the scan. Empty list is not supported as it results in a no-op
        scan. If `included_schemas` is not set, all schemas are scanned
        """
        return pulumi.get(self, "included_schemas")

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

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input['DataClassificationCatalogConfigProviderConfigArgs']]:
        """
        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['DataClassificationCatalogConfigProviderConfigArgs']]):
        pulumi.set(self, "provider_config", value)


@pulumi.input_type
class _DataClassificationCatalogConfigState:
    def __init__(__self__, *,
                 auto_tag_configs: Optional[pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]]] = None,
                 included_schemas: Optional[pulumi.Input['DataClassificationCatalogConfigIncludedSchemasArgs']] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['DataClassificationCatalogConfigProviderConfigArgs']] = None):
        """
        Input properties used for looking up and filtering DataClassificationCatalogConfig resources.
        :param pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]] auto_tag_configs: List of auto-tagging configurations for this catalog.
               Empty list means no auto-tagging is enabled
        :param pulumi.Input['DataClassificationCatalogConfigIncludedSchemasArgs'] included_schemas: Schemas to include in the scan. Empty list is not supported as it results in a no-op
               scan. If `included_schemas` is not set, all schemas are scanned
        :param pulumi.Input[_builtins.str] name: (string) - Resource name in the format: catalogs/{catalog_name}/config
        :param pulumi.Input[_builtins.str] parent: Parent resource in the format: catalogs/{catalog_name}
        :param pulumi.Input['DataClassificationCatalogConfigProviderConfigArgs'] provider_config: Configure the provider for management through account provider.
        """
        if auto_tag_configs is not None:
            pulumi.set(__self__, "auto_tag_configs", auto_tag_configs)
        if included_schemas is not None:
            pulumi.set(__self__, "included_schemas", included_schemas)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if parent is not None:
            pulumi.set(__self__, "parent", parent)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter(name="autoTagConfigs")
    def auto_tag_configs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]]]:
        """
        List of auto-tagging configurations for this catalog.
        Empty list means no auto-tagging is enabled
        """
        return pulumi.get(self, "auto_tag_configs")

    @auto_tag_configs.setter
    def auto_tag_configs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['DataClassificationCatalogConfigAutoTagConfigArgs']]]]):
        pulumi.set(self, "auto_tag_configs", value)

    @_builtins.property
    @pulumi.getter(name="includedSchemas")
    def included_schemas(self) -> Optional[pulumi.Input['DataClassificationCatalogConfigIncludedSchemasArgs']]:
        """
        Schemas to include in the scan. Empty list is not supported as it results in a no-op
        scan. If `included_schemas` is not set, all schemas are scanned
        """
        return pulumi.get(self, "included_schemas")

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

    @_builtins.property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - Resource name in the format: catalogs/{catalog_name}/config
        """
        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
    def parent(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        Parent resource in the format: catalogs/{catalog_name}
        """
        return pulumi.get(self, "parent")

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

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input['DataClassificationCatalogConfigProviderConfigArgs']]:
        """
        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['DataClassificationCatalogConfigProviderConfigArgs']]):
        pulumi.set(self, "provider_config", value)


@pulumi.type_token("databricks:index/dataClassificationCatalogConfig:DataClassificationCatalogConfig")
class DataClassificationCatalogConfig(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 auto_tag_configs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DataClassificationCatalogConfigAutoTagConfigArgs', 'DataClassificationCatalogConfigAutoTagConfigArgsDict']]]]] = None,
                 included_schemas: Optional[pulumi.Input[Union['DataClassificationCatalogConfigIncludedSchemasArgs', 'DataClassificationCatalogConfigIncludedSchemasArgsDict']]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['DataClassificationCatalogConfigProviderConfigArgs', 'DataClassificationCatalogConfigProviderConfigArgsDict']]] = None,
                 __props__=None):
        """
        [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

        This resource allows you to manage the Data Classification configuration for Unity Catalog catalogs.

        Data Classification automatically identifies and tags sensitive data (personally identifiable information, or PII) in Unity Catalog tables. Creating this resource enables Data Classification for the specified catalog, while deleting it disables Data Classification.

        To manage Data Classification configuration, you must either:
        1. be an owner of the catalog, OR
        2. have **USE_CATALOG** and **MANAGE** permissions on the catalog

        > **Note** This resource can only be used with a workspace-level provider.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        # Enable Data Classification for a set of schemas in a catalog
        example = databricks.DataClassificationCatalogConfig("example",
            name="catalogs/prod_catalog/config",
            included_schemas={
                "names": [
                    "sales",
                    "marketing",
                    "customer_data",
                ],
            },
            auto_tag_configs=[
                {
                    "classification_tag": "class.credit_card",
                    "auto_tagging_mode": "AUTO_TAGGING_ENABLED",
                },
                {
                    "classification_tag": "class.email",
                    "auto_tagging_mode": "AUTO_TAGGING_ENABLED",
                },
            ])
        # Enable Data Classification for the entire catalog (all current and future schemas)
        all_schemas = databricks.DataClassificationCatalogConfig("all_schemas", name="catalogs/staging_catalog/config")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Sequence[pulumi.Input[Union['DataClassificationCatalogConfigAutoTagConfigArgs', 'DataClassificationCatalogConfigAutoTagConfigArgsDict']]]] auto_tag_configs: List of auto-tagging configurations for this catalog.
               Empty list means no auto-tagging is enabled
        :param pulumi.Input[Union['DataClassificationCatalogConfigIncludedSchemasArgs', 'DataClassificationCatalogConfigIncludedSchemasArgsDict']] included_schemas: Schemas to include in the scan. Empty list is not supported as it results in a no-op
               scan. If `included_schemas` is not set, all schemas are scanned
        :param pulumi.Input[_builtins.str] parent: Parent resource in the format: catalogs/{catalog_name}
        :param pulumi.Input[Union['DataClassificationCatalogConfigProviderConfigArgs', 'DataClassificationCatalogConfigProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: DataClassificationCatalogConfigArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Private Preview](https://img.shields.io/badge/Release_Stage-Private_Preview-blueviolet)](https://docs.databricks.com/aws/en/release-notes/release-types)

        This resource allows you to manage the Data Classification configuration for Unity Catalog catalogs.

        Data Classification automatically identifies and tags sensitive data (personally identifiable information, or PII) in Unity Catalog tables. Creating this resource enables Data Classification for the specified catalog, while deleting it disables Data Classification.

        To manage Data Classification configuration, you must either:
        1. be an owner of the catalog, OR
        2. have **USE_CATALOG** and **MANAGE** permissions on the catalog

        > **Note** This resource can only be used with a workspace-level provider.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        # Enable Data Classification for a set of schemas in a catalog
        example = databricks.DataClassificationCatalogConfig("example",
            name="catalogs/prod_catalog/config",
            included_schemas={
                "names": [
                    "sales",
                    "marketing",
                    "customer_data",
                ],
            },
            auto_tag_configs=[
                {
                    "classification_tag": "class.credit_card",
                    "auto_tagging_mode": "AUTO_TAGGING_ENABLED",
                },
                {
                    "classification_tag": "class.email",
                    "auto_tagging_mode": "AUTO_TAGGING_ENABLED",
                },
            ])
        # Enable Data Classification for the entire catalog (all current and future schemas)
        all_schemas = databricks.DataClassificationCatalogConfig("all_schemas", name="catalogs/staging_catalog/config")
        ```

        :param str resource_name: The name of the resource.
        :param DataClassificationCatalogConfigArgs 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(DataClassificationCatalogConfigArgs, 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,
                 auto_tag_configs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DataClassificationCatalogConfigAutoTagConfigArgs', 'DataClassificationCatalogConfigAutoTagConfigArgsDict']]]]] = None,
                 included_schemas: Optional[pulumi.Input[Union['DataClassificationCatalogConfigIncludedSchemasArgs', 'DataClassificationCatalogConfigIncludedSchemasArgsDict']]] = None,
                 parent: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['DataClassificationCatalogConfigProviderConfigArgs', 'DataClassificationCatalogConfigProviderConfigArgsDict']]] = 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__ = DataClassificationCatalogConfigArgs.__new__(DataClassificationCatalogConfigArgs)

            __props__.__dict__["auto_tag_configs"] = auto_tag_configs
            __props__.__dict__["included_schemas"] = included_schemas
            if parent is None and not opts.urn:
                raise TypeError("Missing required property 'parent'")
            __props__.__dict__["parent"] = parent
            __props__.__dict__["provider_config"] = provider_config
            __props__.__dict__["name"] = None
        super(DataClassificationCatalogConfig, __self__).__init__(
            'databricks:index/dataClassificationCatalogConfig:DataClassificationCatalogConfig',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            auto_tag_configs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['DataClassificationCatalogConfigAutoTagConfigArgs', 'DataClassificationCatalogConfigAutoTagConfigArgsDict']]]]] = None,
            included_schemas: Optional[pulumi.Input[Union['DataClassificationCatalogConfigIncludedSchemasArgs', 'DataClassificationCatalogConfigIncludedSchemasArgsDict']]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            parent: Optional[pulumi.Input[_builtins.str]] = None,
            provider_config: Optional[pulumi.Input[Union['DataClassificationCatalogConfigProviderConfigArgs', 'DataClassificationCatalogConfigProviderConfigArgsDict']]] = None) -> 'DataClassificationCatalogConfig':
        """
        Get an existing DataClassificationCatalogConfig 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[Sequence[pulumi.Input[Union['DataClassificationCatalogConfigAutoTagConfigArgs', 'DataClassificationCatalogConfigAutoTagConfigArgsDict']]]] auto_tag_configs: List of auto-tagging configurations for this catalog.
               Empty list means no auto-tagging is enabled
        :param pulumi.Input[Union['DataClassificationCatalogConfigIncludedSchemasArgs', 'DataClassificationCatalogConfigIncludedSchemasArgsDict']] included_schemas: Schemas to include in the scan. Empty list is not supported as it results in a no-op
               scan. If `included_schemas` is not set, all schemas are scanned
        :param pulumi.Input[_builtins.str] name: (string) - Resource name in the format: catalogs/{catalog_name}/config
        :param pulumi.Input[_builtins.str] parent: Parent resource in the format: catalogs/{catalog_name}
        :param pulumi.Input[Union['DataClassificationCatalogConfigProviderConfigArgs', 'DataClassificationCatalogConfigProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _DataClassificationCatalogConfigState.__new__(_DataClassificationCatalogConfigState)

        __props__.__dict__["auto_tag_configs"] = auto_tag_configs
        __props__.__dict__["included_schemas"] = included_schemas
        __props__.__dict__["name"] = name
        __props__.__dict__["parent"] = parent
        __props__.__dict__["provider_config"] = provider_config
        return DataClassificationCatalogConfig(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="autoTagConfigs")
    def auto_tag_configs(self) -> pulumi.Output[Optional[Sequence['outputs.DataClassificationCatalogConfigAutoTagConfig']]]:
        """
        List of auto-tagging configurations for this catalog.
        Empty list means no auto-tagging is enabled
        """
        return pulumi.get(self, "auto_tag_configs")

    @_builtins.property
    @pulumi.getter(name="includedSchemas")
    def included_schemas(self) -> pulumi.Output[Optional['outputs.DataClassificationCatalogConfigIncludedSchemas']]:
        """
        Schemas to include in the scan. Empty list is not supported as it results in a no-op
        scan. If `included_schemas` is not set, all schemas are scanned
        """
        return pulumi.get(self, "included_schemas")

    @_builtins.property
    @pulumi.getter
    def name(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - Resource name in the format: catalogs/{catalog_name}/config
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter
    def parent(self) -> pulumi.Output[_builtins.str]:
        """
        Parent resource in the format: catalogs/{catalog_name}
        """
        return pulumi.get(self, "parent")

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

