# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetNotifierResult',
    'AwaitableGetNotifierResult',
    'get_notifier',
    'get_notifier_output',
]

@pulumi.output_type
class GetNotifierResult:
    """
    A collection of values returned by getNotifier.
    """
    def __init__(__self__, annotations=None, cluster_id=None, description=None, dingtalk_config=None, id=None, labels=None, msteams_config=None, name=None, pagerduty_config=None, slack_config=None, smtp_config=None, webhook_config=None, wechat_config=None):
        if annotations and not isinstance(annotations, dict):
            raise TypeError("Expected argument 'annotations' to be a dict")
        pulumi.set(__self__, "annotations", annotations)
        if cluster_id and not isinstance(cluster_id, str):
            raise TypeError("Expected argument 'cluster_id' to be a str")
        pulumi.set(__self__, "cluster_id", cluster_id)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if dingtalk_config and not isinstance(dingtalk_config, dict):
            raise TypeError("Expected argument 'dingtalk_config' to be a dict")
        pulumi.set(__self__, "dingtalk_config", dingtalk_config)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if labels and not isinstance(labels, dict):
            raise TypeError("Expected argument 'labels' to be a dict")
        pulumi.set(__self__, "labels", labels)
        if msteams_config and not isinstance(msteams_config, dict):
            raise TypeError("Expected argument 'msteams_config' to be a dict")
        pulumi.set(__self__, "msteams_config", msteams_config)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if pagerduty_config and not isinstance(pagerduty_config, dict):
            raise TypeError("Expected argument 'pagerduty_config' to be a dict")
        pulumi.set(__self__, "pagerduty_config", pagerduty_config)
        if slack_config and not isinstance(slack_config, dict):
            raise TypeError("Expected argument 'slack_config' to be a dict")
        pulumi.set(__self__, "slack_config", slack_config)
        if smtp_config and not isinstance(smtp_config, dict):
            raise TypeError("Expected argument 'smtp_config' to be a dict")
        pulumi.set(__self__, "smtp_config", smtp_config)
        if webhook_config and not isinstance(webhook_config, dict):
            raise TypeError("Expected argument 'webhook_config' to be a dict")
        pulumi.set(__self__, "webhook_config", webhook_config)
        if wechat_config and not isinstance(wechat_config, dict):
            raise TypeError("Expected argument 'wechat_config' to be a dict")
        pulumi.set(__self__, "wechat_config", wechat_config)

    @property
    @pulumi.getter
    def annotations(self) -> Mapping[str, Any]:
        """
        (Computed) Annotations for notifier object (map)
        """
        return pulumi.get(self, "annotations")

    @property
    @pulumi.getter(name="clusterId")
    def cluster_id(self) -> str:
        return pulumi.get(self, "cluster_id")

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        (Computed) The notifier description (string)
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="dingtalkConfig")
    def dingtalk_config(self) -> Optional['outputs.GetNotifierDingtalkConfigResult']:
        """
        (Computed) Dingtalk config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "dingtalk_config")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def labels(self) -> Mapping[str, Any]:
        """
        (Computed) Labels for notifier object (map)
        """
        return pulumi.get(self, "labels")

    @property
    @pulumi.getter(name="msteamsConfig")
    def msteams_config(self) -> Optional['outputs.GetNotifierMsteamsConfigResult']:
        """
        (Computed) MSTeams config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "msteams_config")

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="pagerdutyConfig")
    def pagerduty_config(self) -> 'outputs.GetNotifierPagerdutyConfigResult':
        """
        (Computed) Pagerduty config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "pagerduty_config")

    @property
    @pulumi.getter(name="slackConfig")
    def slack_config(self) -> 'outputs.GetNotifierSlackConfigResult':
        """
        (Computed) Slack config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "slack_config")

    @property
    @pulumi.getter(name="smtpConfig")
    def smtp_config(self) -> 'outputs.GetNotifierSmtpConfigResult':
        """
        (Computed) SMTP config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "smtp_config")

    @property
    @pulumi.getter(name="webhookConfig")
    def webhook_config(self) -> 'outputs.GetNotifierWebhookConfigResult':
        """
        (Computed) Webhook config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "webhook_config")

    @property
    @pulumi.getter(name="wechatConfig")
    def wechat_config(self) -> 'outputs.GetNotifierWechatConfigResult':
        """
        (Computed) Wechat config for notifier (list maxitems:1)
        """
        return pulumi.get(self, "wechat_config")


class AwaitableGetNotifierResult(GetNotifierResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetNotifierResult(
            annotations=self.annotations,
            cluster_id=self.cluster_id,
            description=self.description,
            dingtalk_config=self.dingtalk_config,
            id=self.id,
            labels=self.labels,
            msteams_config=self.msteams_config,
            name=self.name,
            pagerduty_config=self.pagerduty_config,
            slack_config=self.slack_config,
            smtp_config=self.smtp_config,
            webhook_config=self.webhook_config,
            wechat_config=self.wechat_config)


def get_notifier(cluster_id: Optional[str] = None,
                 dingtalk_config: Optional[pulumi.InputType['GetNotifierDingtalkConfigArgs']] = None,
                 msteams_config: Optional[pulumi.InputType['GetNotifierMsteamsConfigArgs']] = None,
                 name: Optional[str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNotifierResult:
    """
    Use this data source to retrieve information about a Rancher v2 notifier.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_rancher2 as rancher2

    foo = rancher2.get_notifier(name="foo",
        cluster_id="<cluster_id>")
    ```


    :param str cluster_id: The cluster id where create notifier (string)
    :param pulumi.InputType['GetNotifierDingtalkConfigArgs'] dingtalk_config: (Computed) Dingtalk config for notifier (list maxitems:1)
    :param pulumi.InputType['GetNotifierMsteamsConfigArgs'] msteams_config: (Computed) MSTeams config for notifier (list maxitems:1)
    :param str name: The name of the notifier (string)
    """
    __args__ = dict()
    __args__['clusterId'] = cluster_id
    __args__['dingtalkConfig'] = dingtalk_config
    __args__['msteamsConfig'] = msteams_config
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('rancher2:index/getNotifier:getNotifier', __args__, opts=opts, typ=GetNotifierResult).value

    return AwaitableGetNotifierResult(
        annotations=pulumi.get(__ret__, 'annotations'),
        cluster_id=pulumi.get(__ret__, 'cluster_id'),
        description=pulumi.get(__ret__, 'description'),
        dingtalk_config=pulumi.get(__ret__, 'dingtalk_config'),
        id=pulumi.get(__ret__, 'id'),
        labels=pulumi.get(__ret__, 'labels'),
        msteams_config=pulumi.get(__ret__, 'msteams_config'),
        name=pulumi.get(__ret__, 'name'),
        pagerduty_config=pulumi.get(__ret__, 'pagerduty_config'),
        slack_config=pulumi.get(__ret__, 'slack_config'),
        smtp_config=pulumi.get(__ret__, 'smtp_config'),
        webhook_config=pulumi.get(__ret__, 'webhook_config'),
        wechat_config=pulumi.get(__ret__, 'wechat_config'))


@_utilities.lift_output_func(get_notifier)
def get_notifier_output(cluster_id: Optional[pulumi.Input[str]] = None,
                        dingtalk_config: Optional[pulumi.Input[Optional[pulumi.InputType['GetNotifierDingtalkConfigArgs']]]] = None,
                        msteams_config: Optional[pulumi.Input[Optional[pulumi.InputType['GetNotifierMsteamsConfigArgs']]]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNotifierResult]:
    """
    Use this data source to retrieve information about a Rancher v2 notifier.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_rancher2 as rancher2

    foo = rancher2.get_notifier(name="foo",
        cluster_id="<cluster_id>")
    ```


    :param str cluster_id: The cluster id where create notifier (string)
    :param pulumi.InputType['GetNotifierDingtalkConfigArgs'] dingtalk_config: (Computed) Dingtalk config for notifier (list maxitems:1)
    :param pulumi.InputType['GetNotifierMsteamsConfigArgs'] msteams_config: (Computed) MSTeams config for notifier (list maxitems:1)
    :param str name: The name of the notifier (string)
    """
    ...
