<reponame>Dwonczykj/gember_deploy<filename>sdk/dotnet/Tencentcloud/Monitor/AlarmNotice.cs// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace TencentCloudIAC.PulumiPackage.Tencentcloud.Monitor
{
    /// <summary>
    /// Provides a alarm notice resource for monitor.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var example = new Tencentcloud.Monitor.AlarmNotice("example", new Tencentcloud.Monitor.AlarmNoticeArgs
    ///         {
    ///             NoticeLanguage = "zh-CN",
    ///             NoticeType = "ALL",
    ///             UrlNotices = 
    ///             {
    ///                 new Tencentcloud.Monitor.Inputs.AlarmNoticeUrlNoticeArgs
    ///                 {
    ///                     EndTime = 0,
    ///                     StartTime = 1,
    ///                     Url = "https://www.mytest.com/validate",
    ///                     Weekdays = 
    ///                     {
    ///                         1,
    ///                         2,
    ///                         3,
    ///                         4,
    ///                         5,
    ///                         6,
    ///                         7,
    ///                     },
    ///                 },
    ///             },
    ///             UserNotices = 
    ///             {
    ///                 new Tencentcloud.Monitor.Inputs.AlarmNoticeUserNoticeArgs
    ///                 {
    ///                     EndTime = 1,
    ///                     GroupIds = {},
    ///                     NeedPhoneArriveNotice = 1,
    ///                     NoticeWays = 
    ///                     {
    ///                         "SMS",
    ///                         "EMAIL",
    ///                     },
    ///                     PhoneCallType = "CIRCLE",
    ///                     PhoneCircleInterval = 50,
    ///                     PhoneCircleTimes = 2,
    ///                     PhoneInnerInterval = 60,
    ///                     PhoneOrders = 
    ///                     {
    ///                         10001,
    ///                     },
    ///                     ReceiverType = "USER",
    ///                     StartTime = 0,
    ///                     UserIds = 
    ///                     {
    ///                         10001,
    ///                     },
    ///                     Weekdays = 
    ///                     {
    ///                         1,
    ///                         2,
    ///                         3,
    ///                         4,
    ///                         5,
    ///                         6,
    ///                         7,
    ///                     },
    ///                 },
    ///             },
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// Monitor Alarm Notice can be imported, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Monitor/alarmNotice:AlarmNotice import-test noticeId
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Monitor/alarmNotice:AlarmNotice")]
    public partial class AlarmNotice : Pulumi.CustomResource
    {
        /// <summary>
        /// A maximum of one alarm notification can be pushed to the CLS service.
        /// </summary>
        [Output("clsNotices")]
        public Output<ImmutableArray<Outputs.AlarmNoticeClsNotice>> ClsNotices { get; private set; } = null!;

        /// <summary>
        /// Whether it is the system default notification template 0=No 1=Yes.
        /// </summary>
        [Output("isPreset")]
        public Output<int> IsPreset { get; private set; } = null!;

        /// <summary>
        /// Notification template name within 60.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Notification language zh-CN=Chinese en-US=English.
        /// </summary>
        [Output("noticeLanguage")]
        public Output<string> NoticeLanguage { get; private set; } = null!;

        /// <summary>
        /// Alarm notification type ALARM=Notification not restored OK=Notification restored ALL.
        /// </summary>
        [Output("noticeType")]
        public Output<string> NoticeType { get; private set; } = null!;

        /// <summary>
        /// List of alarm policy IDs bound to the alarm notification template.
        /// </summary>
        [Output("policyIds")]
        public Output<ImmutableArray<string>> PolicyIds { get; private set; } = null!;

        /// <summary>
        /// Last modified time.
        /// </summary>
        [Output("updatedAt")]
        public Output<string> UpdatedAt { get; private set; } = null!;

        /// <summary>
        /// Last Modified By.
        /// </summary>
        [Output("updatedBy")]
        public Output<string> UpdatedBy { get; private set; } = null!;

        /// <summary>
        /// The maximum number of callback notifications is 3.
        /// </summary>
        [Output("urlNotices")]
        public Output<ImmutableArray<Outputs.AlarmNoticeUrlNotice>> UrlNotices { get; private set; } = null!;

        /// <summary>
        /// Alarm notification template list.(At most five).
        /// </summary>
        [Output("userNotices")]
        public Output<ImmutableArray<Outputs.AlarmNoticeUserNotice>> UserNotices { get; private set; } = null!;


        /// <summary>
        /// Create a AlarmNotice resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public AlarmNotice(string name, AlarmNoticeArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Monitor/alarmNotice:AlarmNotice", name, args ?? new AlarmNoticeArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AlarmNotice(string name, Input<string> id, AlarmNoticeState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Monitor/alarmNotice:AlarmNotice", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/tencentcloudstack",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing AlarmNotice resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static AlarmNotice Get(string name, Input<string> id, AlarmNoticeState? state = null, CustomResourceOptions? options = null)
        {
            return new AlarmNotice(name, id, state, options);
        }
    }

    public sealed class AlarmNoticeArgs : Pulumi.ResourceArgs
    {
        [Input("clsNotices")]
        private InputList<Inputs.AlarmNoticeClsNoticeArgs>? _clsNotices;

        /// <summary>
        /// A maximum of one alarm notification can be pushed to the CLS service.
        /// </summary>
        public InputList<Inputs.AlarmNoticeClsNoticeArgs> ClsNotices
        {
            get => _clsNotices ?? (_clsNotices = new InputList<Inputs.AlarmNoticeClsNoticeArgs>());
            set => _clsNotices = value;
        }

        /// <summary>
        /// Notification template name within 60.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Notification language zh-CN=Chinese en-US=English.
        /// </summary>
        [Input("noticeLanguage", required: true)]
        public Input<string> NoticeLanguage { get; set; } = null!;

        /// <summary>
        /// Alarm notification type ALARM=Notification not restored OK=Notification restored ALL.
        /// </summary>
        [Input("noticeType", required: true)]
        public Input<string> NoticeType { get; set; } = null!;

        [Input("urlNotices")]
        private InputList<Inputs.AlarmNoticeUrlNoticeArgs>? _urlNotices;

        /// <summary>
        /// The maximum number of callback notifications is 3.
        /// </summary>
        public InputList<Inputs.AlarmNoticeUrlNoticeArgs> UrlNotices
        {
            get => _urlNotices ?? (_urlNotices = new InputList<Inputs.AlarmNoticeUrlNoticeArgs>());
            set => _urlNotices = value;
        }

        [Input("userNotices")]
        private InputList<Inputs.AlarmNoticeUserNoticeArgs>? _userNotices;

        /// <summary>
        /// Alarm notification template list.(At most five).
        /// </summary>
        public InputList<Inputs.AlarmNoticeUserNoticeArgs> UserNotices
        {
            get => _userNotices ?? (_userNotices = new InputList<Inputs.AlarmNoticeUserNoticeArgs>());
            set => _userNotices = value;
        }

        public AlarmNoticeArgs()
        {
        }
    }

    public sealed class AlarmNoticeState : Pulumi.ResourceArgs
    {
        [Input("clsNotices")]
        private InputList<Inputs.AlarmNoticeClsNoticeGetArgs>? _clsNotices;

        /// <summary>
        /// A maximum of one alarm notification can be pushed to the CLS service.
        /// </summary>
        public InputList<Inputs.AlarmNoticeClsNoticeGetArgs> ClsNotices
        {
            get => _clsNotices ?? (_clsNotices = new InputList<Inputs.AlarmNoticeClsNoticeGetArgs>());
            set => _clsNotices = value;
        }

        /// <summary>
        /// Whether it is the system default notification template 0=No 1=Yes.
        /// </summary>
        [Input("isPreset")]
        public Input<int>? IsPreset { get; set; }

        /// <summary>
        /// Notification template name within 60.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Notification language zh-CN=Chinese en-US=English.
        /// </summary>
        [Input("noticeLanguage")]
        public Input<string>? NoticeLanguage { get; set; }

        /// <summary>
        /// Alarm notification type ALARM=Notification not restored OK=Notification restored ALL.
        /// </summary>
        [Input("noticeType")]
        public Input<string>? NoticeType { get; set; }

        [Input("policyIds")]
        private InputList<string>? _policyIds;

        /// <summary>
        /// List of alarm policy IDs bound to the alarm notification template.
        /// </summary>
        public InputList<string> PolicyIds
        {
            get => _policyIds ?? (_policyIds = new InputList<string>());
            set => _policyIds = value;
        }

        /// <summary>
        /// Last modified time.
        /// </summary>
        [Input("updatedAt")]
        public Input<string>? UpdatedAt { get; set; }

        /// <summary>
        /// Last Modified By.
        /// </summary>
        [Input("updatedBy")]
        public Input<string>? UpdatedBy { get; set; }

        [Input("urlNotices")]
        private InputList<Inputs.AlarmNoticeUrlNoticeGetArgs>? _urlNotices;

        /// <summary>
        /// The maximum number of callback notifications is 3.
        /// </summary>
        public InputList<Inputs.AlarmNoticeUrlNoticeGetArgs> UrlNotices
        {
            get => _urlNotices ?? (_urlNotices = new InputList<Inputs.AlarmNoticeUrlNoticeGetArgs>());
            set => _urlNotices = value;
        }

        [Input("userNotices")]
        private InputList<Inputs.AlarmNoticeUserNoticeGetArgs>? _userNotices;

        /// <summary>
        /// Alarm notification template list.(At most five).
        /// </summary>
        public InputList<Inputs.AlarmNoticeUserNoticeGetArgs> UserNotices
        {
            get => _userNotices ?? (_userNotices = new InputList<Inputs.AlarmNoticeUserNoticeGetArgs>());
            set => _userNotices = value;
        }

        public AlarmNoticeState()
        {
        }
    }
}
