# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import _utilities, _tables

__all__ = ['AlarmContact']


class AlarmContact(pulumi.CustomResource):
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 alarm_contact_name: Optional[pulumi.Input[str]] = None,
                 channels_aliim: Optional[pulumi.Input[str]] = None,
                 channels_ding_web_hook: Optional[pulumi.Input[str]] = None,
                 channels_mail: Optional[pulumi.Input[str]] = None,
                 channels_sms: Optional[pulumi.Input[str]] = None,
                 describe: Optional[pulumi.Input[str]] = None,
                 lang: Optional[pulumi.Input[str]] = None,
                 __props__=None,
                 __name__=None,
                 __opts__=None):
        """
        Creates or modifies an alarm contact. For information about alarm contact and how to use it, see [What is alarm contact](https://www.alibabacloud.com/help/en/doc-detail/114923.htm).

        > **NOTE:** Available in v1.99.0+.

        ## Example Usage

        Basic Usage

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        # If you use this template, you need to activate the link before you can return to the alarm contact information, otherwise diff will appear in terraform. So please confirm the activation link as soon as possible.
        example = alicloud.cms.AlarmContact("example",
            alarm_contact_name="zhangsan",
            channels_mail="terraform.test.com",
            describe="For Test")
        ```

        ```python
        import pulumi
        import pulumi_alicloud as alicloud

        # If you use this template, you can ignore the diff of the alarm contact information by `lifestyle`. We recommend the above usage and activate the link in time.
        example = alicloud.cms.AlarmContact("example",
            alarm_contact_name="zhangsan",
            describe="For Test",
            channels_mail="terraform.test.com")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] alarm_contact_name: The name of the alarm contact.
        :param pulumi.Input[str] channels_aliim: The TradeManager ID of the alarm contact.
        :param pulumi.Input[str] channels_ding_web_hook: The webhook URL of the DingTalk chatbot.
        :param pulumi.Input[str] channels_mail: The email address of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
        :param pulumi.Input[str] channels_sms: The phone number of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
        :param pulumi.Input[str] describe: The description of the alarm contact.
        :param pulumi.Input[str] lang: The language type of the alarm. Valid values: `en`, `zh-cn`.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        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__ = dict()

            if alarm_contact_name is None:
                raise TypeError("Missing required property 'alarm_contact_name'")
            __props__['alarm_contact_name'] = alarm_contact_name
            __props__['channels_aliim'] = channels_aliim
            __props__['channels_ding_web_hook'] = channels_ding_web_hook
            __props__['channels_mail'] = channels_mail
            __props__['channels_sms'] = channels_sms
            if describe is None:
                raise TypeError("Missing required property 'describe'")
            __props__['describe'] = describe
            __props__['lang'] = lang
        super(AlarmContact, __self__).__init__(
            'alicloud:cms/alarmContact:AlarmContact',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            alarm_contact_name: Optional[pulumi.Input[str]] = None,
            channels_aliim: Optional[pulumi.Input[str]] = None,
            channels_ding_web_hook: Optional[pulumi.Input[str]] = None,
            channels_mail: Optional[pulumi.Input[str]] = None,
            channels_sms: Optional[pulumi.Input[str]] = None,
            describe: Optional[pulumi.Input[str]] = None,
            lang: Optional[pulumi.Input[str]] = None) -> 'AlarmContact':
        """
        Get an existing AlarmContact 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[str] alarm_contact_name: The name of the alarm contact.
        :param pulumi.Input[str] channels_aliim: The TradeManager ID of the alarm contact.
        :param pulumi.Input[str] channels_ding_web_hook: The webhook URL of the DingTalk chatbot.
        :param pulumi.Input[str] channels_mail: The email address of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
        :param pulumi.Input[str] channels_sms: The phone number of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
        :param pulumi.Input[str] describe: The description of the alarm contact.
        :param pulumi.Input[str] lang: The language type of the alarm. Valid values: `en`, `zh-cn`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["alarm_contact_name"] = alarm_contact_name
        __props__["channels_aliim"] = channels_aliim
        __props__["channels_ding_web_hook"] = channels_ding_web_hook
        __props__["channels_mail"] = channels_mail
        __props__["channels_sms"] = channels_sms
        __props__["describe"] = describe
        __props__["lang"] = lang
        return AlarmContact(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="alarmContactName")
    def alarm_contact_name(self) -> pulumi.Output[str]:
        """
        The name of the alarm contact.
        """
        return pulumi.get(self, "alarm_contact_name")

    @property
    @pulumi.getter(name="channelsAliim")
    def channels_aliim(self) -> pulumi.Output[Optional[str]]:
        """
        The TradeManager ID of the alarm contact.
        """
        return pulumi.get(self, "channels_aliim")

    @property
    @pulumi.getter(name="channelsDingWebHook")
    def channels_ding_web_hook(self) -> pulumi.Output[Optional[str]]:
        """
        The webhook URL of the DingTalk chatbot.
        """
        return pulumi.get(self, "channels_ding_web_hook")

    @property
    @pulumi.getter(name="channelsMail")
    def channels_mail(self) -> pulumi.Output[Optional[str]]:
        """
        The email address of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
        """
        return pulumi.get(self, "channels_mail")

    @property
    @pulumi.getter(name="channelsSms")
    def channels_sms(self) -> pulumi.Output[Optional[str]]:
        """
        The phone number of the alarm contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alarm contacts only after the recipient activates the email address.
        """
        return pulumi.get(self, "channels_sms")

    @property
    @pulumi.getter
    def describe(self) -> pulumi.Output[str]:
        """
        The description of the alarm contact.
        """
        return pulumi.get(self, "describe")

    @property
    @pulumi.getter
    def lang(self) -> pulumi.Output[Optional[str]]:
        """
        The language type of the alarm. Valid values: `en`, `zh-cn`.
        """
        return pulumi.get(self, "lang")

    def translate_output_property(self, prop):
        return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

