<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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;

namespace Pulumi.AliCloud.Cms
{
    /// <summary>
    /// Provides a Cloud Monitor Service Dynamic Tag Group resource.
    /// 
    /// For information about Cloud Monitor Service Dynamic Tag Group and how to use it, see [What is Dynamic Tag Group](https://www.alibabacloud.com/help/doc-detail/150123.html).
    /// 
    /// &gt; **NOTE:** Available in v1.142.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("defaultAlarmContactGroup", new()
    ///     {
    ///         AlarmContactGroupName = "example_value",
    ///         Describe = "example_value",
    ///         EnableSubscribed = true,
    ///     });
    /// 
    ///     var defaultDynamicTagGroup = new AliCloud.Cms.DynamicTagGroup("defaultDynamicTagGroup", new()
    ///     {
    ///         ContactGroupLists = new[]
    ///         {
    ///             defaultAlarmContactGroup.Id,
    ///         },
    ///         TagKey = "your_tag_key",
    ///         MatchExpresses = new[]
    ///         {
    ///             new AliCloud.Cms.Inputs.DynamicTagGroupMatchExpressArgs
    ///             {
    ///                 TagValue = "your_tag_value",
    ///                 TagValueMatchFunction = "all",
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Cloud Monitor Service Dynamic Tag Group can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cms/dynamicTagGroup:DynamicTagGroup example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cms/dynamicTagGroup:DynamicTagGroup")]
    public partial class DynamicTagGroup : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
        /// </summary>
        [Output("contactGroupLists")]
        public Output<ImmutableArray<string>> ContactGroupLists { get; private set; } = null!;

        /// <summary>
        /// The relationship between conditional expressions. Valid values: `and`, `or`.
        /// </summary>
        [Output("matchExpressFilterRelation")]
        public Output<string> MatchExpressFilterRelation { get; private set; } = null!;

        /// <summary>
        /// The label generates a matching expression that applies the grouping. See the following `Block match_express`.
        /// </summary>
        [Output("matchExpresses")]
        public Output<ImmutableArray<Outputs.DynamicTagGroupMatchExpress>> MatchExpresses { get; private set; } = null!;

        /// <summary>
        /// The status of the resource. Valid values: `RUNNING`, `FINISH`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// The tag key of the tag.
        /// </summary>
        [Output("tagKey")]
        public Output<string> TagKey { get; private set; } = null!;

        /// <summary>
        /// Alarm template ID list.
        /// </summary>
        [Output("templateIdLists")]
        public Output<ImmutableArray<string>> TemplateIdLists { get; private set; } = null!;


        /// <summary>
        /// Create a DynamicTagGroup 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 DynamicTagGroup(string name, DynamicTagGroupArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cms/dynamicTagGroup:DynamicTagGroup", name, args ?? new DynamicTagGroupArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DynamicTagGroup(string name, Input<string> id, DynamicTagGroupState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cms/dynamicTagGroup:DynamicTagGroup", 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/rhysmdnz/pulumi-alicloud",
            };
            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 DynamicTagGroup 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 DynamicTagGroup Get(string name, Input<string> id, DynamicTagGroupState? state = null, CustomResourceOptions? options = null)
        {
            return new DynamicTagGroup(name, id, state, options);
        }
    }

    public sealed class DynamicTagGroupArgs : global::Pulumi.ResourceArgs
    {
        [Input("contactGroupLists", required: true)]
        private InputList<string>? _contactGroupLists;

        /// <summary>
        /// Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
        /// </summary>
        public InputList<string> ContactGroupLists
        {
            get => _contactGroupLists ?? (_contactGroupLists = new InputList<string>());
            set => _contactGroupLists = value;
        }

        /// <summary>
        /// The relationship between conditional expressions. Valid values: `and`, `or`.
        /// </summary>
        [Input("matchExpressFilterRelation")]
        public Input<string>? MatchExpressFilterRelation { get; set; }

        [Input("matchExpresses", required: true)]
        private InputList<Inputs.DynamicTagGroupMatchExpressArgs>? _matchExpresses;

        /// <summary>
        /// The label generates a matching expression that applies the grouping. See the following `Block match_express`.
        /// </summary>
        public InputList<Inputs.DynamicTagGroupMatchExpressArgs> MatchExpresses
        {
            get => _matchExpresses ?? (_matchExpresses = new InputList<Inputs.DynamicTagGroupMatchExpressArgs>());
            set => _matchExpresses = value;
        }

        /// <summary>
        /// The tag key of the tag.
        /// </summary>
        [Input("tagKey", required: true)]
        public Input<string> TagKey { get; set; } = null!;

        [Input("templateIdLists")]
        private InputList<string>? _templateIdLists;

        /// <summary>
        /// Alarm template ID list.
        /// </summary>
        public InputList<string> TemplateIdLists
        {
            get => _templateIdLists ?? (_templateIdLists = new InputList<string>());
            set => _templateIdLists = value;
        }

        public DynamicTagGroupArgs()
        {
        }
        public static new DynamicTagGroupArgs Empty => new DynamicTagGroupArgs();
    }

    public sealed class DynamicTagGroupState : global::Pulumi.ResourceArgs
    {
        [Input("contactGroupLists")]
        private InputList<string>? _contactGroupLists;

        /// <summary>
        /// Alarm contact group. The value range of N is 1~100. The alarm notification of the application group is sent to the alarm contact in the alarm contact group.
        /// </summary>
        public InputList<string> ContactGroupLists
        {
            get => _contactGroupLists ?? (_contactGroupLists = new InputList<string>());
            set => _contactGroupLists = value;
        }

        /// <summary>
        /// The relationship between conditional expressions. Valid values: `and`, `or`.
        /// </summary>
        [Input("matchExpressFilterRelation")]
        public Input<string>? MatchExpressFilterRelation { get; set; }

        [Input("matchExpresses")]
        private InputList<Inputs.DynamicTagGroupMatchExpressGetArgs>? _matchExpresses;

        /// <summary>
        /// The label generates a matching expression that applies the grouping. See the following `Block match_express`.
        /// </summary>
        public InputList<Inputs.DynamicTagGroupMatchExpressGetArgs> MatchExpresses
        {
            get => _matchExpresses ?? (_matchExpresses = new InputList<Inputs.DynamicTagGroupMatchExpressGetArgs>());
            set => _matchExpresses = value;
        }

        /// <summary>
        /// The status of the resource. Valid values: `RUNNING`, `FINISH`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The tag key of the tag.
        /// </summary>
        [Input("tagKey")]
        public Input<string>? TagKey { get; set; }

        [Input("templateIdLists")]
        private InputList<string>? _templateIdLists;

        /// <summary>
        /// Alarm template ID list.
        /// </summary>
        public InputList<string> TemplateIdLists
        {
            get => _templateIdLists ?? (_templateIdLists = new InputList<string>());
            set => _templateIdLists = value;
        }

        public DynamicTagGroupState()
        {
        }
        public static new DynamicTagGroupState Empty => new DynamicTagGroupState();
    }
}
