# 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__ = ['RfaAccessRequestDestinationsArgs', 'RfaAccessRequestDestinations']

@pulumi.input_type
class RfaAccessRequestDestinationsArgs:
    def __init__(__self__, *,
                 securable: pulumi.Input['RfaAccessRequestDestinationsSecurableArgs'],
                 destinations: Optional[pulumi.Input[Sequence[pulumi.Input['RfaAccessRequestDestinationsDestinationArgs']]]] = None):
        """
        The set of arguments for constructing a RfaAccessRequestDestinations resource.
        :param pulumi.Input['RfaAccessRequestDestinationsSecurableArgs'] securable: The securable for which the access request destinations are being modified or read
        :param pulumi.Input[Sequence[pulumi.Input['RfaAccessRequestDestinationsDestinationArgs']]] destinations: The access request destinations for the securable
        """
        pulumi.set(__self__, "securable", securable)
        if destinations is not None:
            pulumi.set(__self__, "destinations", destinations)

    @_builtins.property
    @pulumi.getter
    def securable(self) -> pulumi.Input['RfaAccessRequestDestinationsSecurableArgs']:
        """
        The securable for which the access request destinations are being modified or read
        """
        return pulumi.get(self, "securable")

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

    @_builtins.property
    @pulumi.getter
    def destinations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RfaAccessRequestDestinationsDestinationArgs']]]]:
        """
        The access request destinations for the securable
        """
        return pulumi.get(self, "destinations")

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


@pulumi.input_type
class _RfaAccessRequestDestinationsState:
    def __init__(__self__, *,
                 are_any_destinations_hidden: Optional[pulumi.Input[_builtins.bool]] = None,
                 destination_source_securable: Optional[pulumi.Input['RfaAccessRequestDestinationsDestinationSourceSecurableArgs']] = None,
                 destinations: Optional[pulumi.Input[Sequence[pulumi.Input['RfaAccessRequestDestinationsDestinationArgs']]]] = None,
                 full_name: Optional[pulumi.Input[_builtins.str]] = None,
                 securable: Optional[pulumi.Input['RfaAccessRequestDestinationsSecurableArgs']] = None,
                 securable_type: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering RfaAccessRequestDestinations resources.
        :param pulumi.Input[_builtins.bool] are_any_destinations_hidden: (boolean) - Indicates whether any destinations are hidden from the caller due to a lack of permissions.
               This value is true if the caller does not have permission to see all destinations
        :param pulumi.Input['RfaAccessRequestDestinationsDestinationSourceSecurableArgs'] destination_source_securable: (Securable) - The source securable from which the destinations are inherited. Either the same value as securable (if destination
               is set directly on the securable) or the nearest parent securable with destinations set
        :param pulumi.Input[Sequence[pulumi.Input['RfaAccessRequestDestinationsDestinationArgs']]] destinations: The access request destinations for the securable
        :param pulumi.Input[_builtins.str] full_name: (string) - The full name of the securable. Redundant with the name in the securable object, but necessary for Pulumi integration
        :param pulumi.Input['RfaAccessRequestDestinationsSecurableArgs'] securable: The securable for which the access request destinations are being modified or read
        :param pulumi.Input[_builtins.str] securable_type: (string) - The type of the securable. Redundant with the type in the securable object, but necessary for Pulumi integration
        """
        if are_any_destinations_hidden is not None:
            pulumi.set(__self__, "are_any_destinations_hidden", are_any_destinations_hidden)
        if destination_source_securable is not None:
            pulumi.set(__self__, "destination_source_securable", destination_source_securable)
        if destinations is not None:
            pulumi.set(__self__, "destinations", destinations)
        if full_name is not None:
            pulumi.set(__self__, "full_name", full_name)
        if securable is not None:
            pulumi.set(__self__, "securable", securable)
        if securable_type is not None:
            pulumi.set(__self__, "securable_type", securable_type)

    @_builtins.property
    @pulumi.getter(name="areAnyDestinationsHidden")
    def are_any_destinations_hidden(self) -> Optional[pulumi.Input[_builtins.bool]]:
        """
        (boolean) - Indicates whether any destinations are hidden from the caller due to a lack of permissions.
        This value is true if the caller does not have permission to see all destinations
        """
        return pulumi.get(self, "are_any_destinations_hidden")

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

    @_builtins.property
    @pulumi.getter(name="destinationSourceSecurable")
    def destination_source_securable(self) -> Optional[pulumi.Input['RfaAccessRequestDestinationsDestinationSourceSecurableArgs']]:
        """
        (Securable) - The source securable from which the destinations are inherited. Either the same value as securable (if destination
        is set directly on the securable) or the nearest parent securable with destinations set
        """
        return pulumi.get(self, "destination_source_securable")

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

    @_builtins.property
    @pulumi.getter
    def destinations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RfaAccessRequestDestinationsDestinationArgs']]]]:
        """
        The access request destinations for the securable
        """
        return pulumi.get(self, "destinations")

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

    @_builtins.property
    @pulumi.getter(name="fullName")
    def full_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - The full name of the securable. Redundant with the name in the securable object, but necessary for Pulumi integration
        """
        return pulumi.get(self, "full_name")

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

    @_builtins.property
    @pulumi.getter
    def securable(self) -> Optional[pulumi.Input['RfaAccessRequestDestinationsSecurableArgs']]:
        """
        The securable for which the access request destinations are being modified or read
        """
        return pulumi.get(self, "securable")

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

    @_builtins.property
    @pulumi.getter(name="securableType")
    def securable_type(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - The type of the securable. Redundant with the type in the securable object, but necessary for Pulumi integration
        """
        return pulumi.get(self, "securable_type")

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


@pulumi.type_token("databricks:index/rfaAccessRequestDestinations:RfaAccessRequestDestinations")
class RfaAccessRequestDestinations(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RfaAccessRequestDestinationsDestinationArgs', 'RfaAccessRequestDestinationsDestinationArgsDict']]]]] = None,
                 securable: Optional[pulumi.Input[Union['RfaAccessRequestDestinationsSecurableArgs', 'RfaAccessRequestDestinationsSecurableArgsDict']]] = None,
                 __props__=None):
        """
        [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types)

        Request for Access (RFA) access request destinations allow you to configure where notifications are sent when users request access to securable objects in Unity Catalog. This resource enables you to manage access request destinations for specific securable objects, such as tables, catalogs, or schemas.

        When a user requests access to a securable object, notifications can be sent to various destinations including email addresses, Slack channels, or Microsoft Teams channels. This resource allows you to configure these destinations to ensure that the appropriate stakeholders are notified of access requests.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        customer_data_table = databricks.RfaAccessRequestDestinations("customer_data_table",
            destinations=[
                {
                    "destination_id": "john.doe@databricks.com",
                    "destination_type": "EMAIL",
                },
                {
                    "destination_id": "https://www.databricks.com/",
                    "destination_type": "URL",
                },
                {
                    "destination_id": "456e7890-e89b-12d3-a456-426614174001",
                    "destination_type": "SLACK",
                },
                {
                    "destination_id": "789e0123-e89b-12d3-a456-426614174002",
                    "destination_type": "MICROSOFT_TEAMS",
                },
                {
                    "destination_id": "012e3456-e89b-12d3-a456-426614174003",
                    "destination_type": "GENERIC_WEBHOOK",
                },
            ],
            securable={
                "type": "SCHEMA",
                "full_name": "main.customer_data",
            },
            are_any_destinations_hidden=False)
        ```

        ## Import

        As of Pulumi v1.5, resources can be imported through configuration.

        hcl

        import {

          id = "securable_type,full_name"

          to = databricks_rfa_access_request_destinations.this

        }

        If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:

        ```sh
        $ pulumi import databricks:index/rfaAccessRequestDestinations:RfaAccessRequestDestinations this "securable_type,full_name"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Sequence[pulumi.Input[Union['RfaAccessRequestDestinationsDestinationArgs', 'RfaAccessRequestDestinationsDestinationArgsDict']]]] destinations: The access request destinations for the securable
        :param pulumi.Input[Union['RfaAccessRequestDestinationsSecurableArgs', 'RfaAccessRequestDestinationsSecurableArgsDict']] securable: The securable for which the access request destinations are being modified or read
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: RfaAccessRequestDestinationsArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Public Preview](https://img.shields.io/badge/Release_Stage-Public_Preview-yellowgreen)](https://docs.databricks.com/aws/en/release-notes/release-types)

        Request for Access (RFA) access request destinations allow you to configure where notifications are sent when users request access to securable objects in Unity Catalog. This resource enables you to manage access request destinations for specific securable objects, such as tables, catalogs, or schemas.

        When a user requests access to a securable object, notifications can be sent to various destinations including email addresses, Slack channels, or Microsoft Teams channels. This resource allows you to configure these destinations to ensure that the appropriate stakeholders are notified of access requests.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_databricks as databricks

        customer_data_table = databricks.RfaAccessRequestDestinations("customer_data_table",
            destinations=[
                {
                    "destination_id": "john.doe@databricks.com",
                    "destination_type": "EMAIL",
                },
                {
                    "destination_id": "https://www.databricks.com/",
                    "destination_type": "URL",
                },
                {
                    "destination_id": "456e7890-e89b-12d3-a456-426614174001",
                    "destination_type": "SLACK",
                },
                {
                    "destination_id": "789e0123-e89b-12d3-a456-426614174002",
                    "destination_type": "MICROSOFT_TEAMS",
                },
                {
                    "destination_id": "012e3456-e89b-12d3-a456-426614174003",
                    "destination_type": "GENERIC_WEBHOOK",
                },
            ],
            securable={
                "type": "SCHEMA",
                "full_name": "main.customer_data",
            },
            are_any_destinations_hidden=False)
        ```

        ## Import

        As of Pulumi v1.5, resources can be imported through configuration.

        hcl

        import {

          id = "securable_type,full_name"

          to = databricks_rfa_access_request_destinations.this

        }

        If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:

        ```sh
        $ pulumi import databricks:index/rfaAccessRequestDestinations:RfaAccessRequestDestinations this "securable_type,full_name"
        ```

        :param str resource_name: The name of the resource.
        :param RfaAccessRequestDestinationsArgs 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(RfaAccessRequestDestinationsArgs, 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,
                 destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RfaAccessRequestDestinationsDestinationArgs', 'RfaAccessRequestDestinationsDestinationArgsDict']]]]] = None,
                 securable: Optional[pulumi.Input[Union['RfaAccessRequestDestinationsSecurableArgs', 'RfaAccessRequestDestinationsSecurableArgsDict']]] = 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__ = RfaAccessRequestDestinationsArgs.__new__(RfaAccessRequestDestinationsArgs)

            __props__.__dict__["destinations"] = destinations
            if securable is None and not opts.urn:
                raise TypeError("Missing required property 'securable'")
            __props__.__dict__["securable"] = securable
            __props__.__dict__["are_any_destinations_hidden"] = None
            __props__.__dict__["destination_source_securable"] = None
            __props__.__dict__["full_name"] = None
            __props__.__dict__["securable_type"] = None
        super(RfaAccessRequestDestinations, __self__).__init__(
            'databricks:index/rfaAccessRequestDestinations:RfaAccessRequestDestinations',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            are_any_destinations_hidden: Optional[pulumi.Input[_builtins.bool]] = None,
            destination_source_securable: Optional[pulumi.Input[Union['RfaAccessRequestDestinationsDestinationSourceSecurableArgs', 'RfaAccessRequestDestinationsDestinationSourceSecurableArgsDict']]] = None,
            destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RfaAccessRequestDestinationsDestinationArgs', 'RfaAccessRequestDestinationsDestinationArgsDict']]]]] = None,
            full_name: Optional[pulumi.Input[_builtins.str]] = None,
            securable: Optional[pulumi.Input[Union['RfaAccessRequestDestinationsSecurableArgs', 'RfaAccessRequestDestinationsSecurableArgsDict']]] = None,
            securable_type: Optional[pulumi.Input[_builtins.str]] = None) -> 'RfaAccessRequestDestinations':
        """
        Get an existing RfaAccessRequestDestinations 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.bool] are_any_destinations_hidden: (boolean) - Indicates whether any destinations are hidden from the caller due to a lack of permissions.
               This value is true if the caller does not have permission to see all destinations
        :param pulumi.Input[Union['RfaAccessRequestDestinationsDestinationSourceSecurableArgs', 'RfaAccessRequestDestinationsDestinationSourceSecurableArgsDict']] destination_source_securable: (Securable) - The source securable from which the destinations are inherited. Either the same value as securable (if destination
               is set directly on the securable) or the nearest parent securable with destinations set
        :param pulumi.Input[Sequence[pulumi.Input[Union['RfaAccessRequestDestinationsDestinationArgs', 'RfaAccessRequestDestinationsDestinationArgsDict']]]] destinations: The access request destinations for the securable
        :param pulumi.Input[_builtins.str] full_name: (string) - The full name of the securable. Redundant with the name in the securable object, but necessary for Pulumi integration
        :param pulumi.Input[Union['RfaAccessRequestDestinationsSecurableArgs', 'RfaAccessRequestDestinationsSecurableArgsDict']] securable: The securable for which the access request destinations are being modified or read
        :param pulumi.Input[_builtins.str] securable_type: (string) - The type of the securable. Redundant with the type in the securable object, but necessary for Pulumi integration
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _RfaAccessRequestDestinationsState.__new__(_RfaAccessRequestDestinationsState)

        __props__.__dict__["are_any_destinations_hidden"] = are_any_destinations_hidden
        __props__.__dict__["destination_source_securable"] = destination_source_securable
        __props__.__dict__["destinations"] = destinations
        __props__.__dict__["full_name"] = full_name
        __props__.__dict__["securable"] = securable
        __props__.__dict__["securable_type"] = securable_type
        return RfaAccessRequestDestinations(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="areAnyDestinationsHidden")
    def are_any_destinations_hidden(self) -> pulumi.Output[_builtins.bool]:
        """
        (boolean) - Indicates whether any destinations are hidden from the caller due to a lack of permissions.
        This value is true if the caller does not have permission to see all destinations
        """
        return pulumi.get(self, "are_any_destinations_hidden")

    @_builtins.property
    @pulumi.getter(name="destinationSourceSecurable")
    def destination_source_securable(self) -> pulumi.Output['outputs.RfaAccessRequestDestinationsDestinationSourceSecurable']:
        """
        (Securable) - The source securable from which the destinations are inherited. Either the same value as securable (if destination
        is set directly on the securable) or the nearest parent securable with destinations set
        """
        return pulumi.get(self, "destination_source_securable")

    @_builtins.property
    @pulumi.getter
    def destinations(self) -> pulumi.Output[Optional[Sequence['outputs.RfaAccessRequestDestinationsDestination']]]:
        """
        The access request destinations for the securable
        """
        return pulumi.get(self, "destinations")

    @_builtins.property
    @pulumi.getter(name="fullName")
    def full_name(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - The full name of the securable. Redundant with the name in the securable object, but necessary for Pulumi integration
        """
        return pulumi.get(self, "full_name")

    @_builtins.property
    @pulumi.getter
    def securable(self) -> pulumi.Output['outputs.RfaAccessRequestDestinationsSecurable']:
        """
        The securable for which the access request destinations are being modified or read
        """
        return pulumi.get(self, "securable")

    @_builtins.property
    @pulumi.getter(name="securableType")
    def securable_type(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - The type of the securable. Redundant with the type in the securable object, but necessary for Pulumi integration
        """
        return pulumi.get(self, "securable_type")

