<filename>sdk/dotnet/Quotas/QuotaAlarm.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;

namespace Pulumi.AliCloud.Quotas
{
    /// <summary>
    /// Provides a Quotas Quota Alarm resource.
    /// 
    /// For information about Quotas Quota Alarm and how to use it, see [What is Quota Alarm](https://help.aliyun.com/document_detail/184343.html).
    /// 
    /// &gt; **NOTE:** Available in v1.116.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new AliCloud.Quotas.QuotaAlarm("example", new()
    ///     {
    ///         ProductCode = "ecs",
    ///         QuotaActionCode = "q_prepaid-instance-count-per-once-purchase",
    ///         QuotaAlarmName = "tf-testAcc",
    ///         QuotaDimensions = new[]
    ///         {
    ///             new AliCloud.Quotas.Inputs.QuotaAlarmQuotaDimensionArgs
    ///             {
    ///                 Key = "regionId",
    ///                 Value = "cn-hangzhou",
    ///             },
    ///         },
    ///         Threshold = 100,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Quotas Quota Alarm can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:quotas/quotaAlarm:QuotaAlarm example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:quotas/quotaAlarm:QuotaAlarm")]
    public partial class QuotaAlarm : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The Product Code.
        /// </summary>
        [Output("productCode")]
        public Output<string> ProductCode { get; private set; } = null!;

        /// <summary>
        /// The Quota Action Code.
        /// </summary>
        [Output("quotaActionCode")]
        public Output<string> QuotaActionCode { get; private set; } = null!;

        /// <summary>
        /// The name of Quota Alarm.
        /// </summary>
        [Output("quotaAlarmName")]
        public Output<string> QuotaAlarmName { get; private set; } = null!;

        /// <summary>
        /// The Quota Dimensions.
        /// </summary>
        [Output("quotaDimensions")]
        public Output<ImmutableArray<Outputs.QuotaAlarmQuotaDimension>> QuotaDimensions { get; private set; } = null!;

        /// <summary>
        /// The threshold of Quota Alarm.
        /// </summary>
        [Output("threshold")]
        public Output<double?> Threshold { get; private set; } = null!;

        /// <summary>
        /// The threshold percent of Quota Alarm.
        /// </summary>
        [Output("thresholdPercent")]
        public Output<double?> ThresholdPercent { get; private set; } = null!;

        /// <summary>
        /// The WebHook of Quota Alarm.
        /// </summary>
        [Output("webHook")]
        public Output<string?> WebHook { get; private set; } = null!;


        /// <summary>
        /// Create a QuotaAlarm 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 QuotaAlarm(string name, QuotaAlarmArgs args, CustomResourceOptions? options = null)
            : base("alicloud:quotas/quotaAlarm:QuotaAlarm", name, args ?? new QuotaAlarmArgs(), MakeResourceOptions(options, ""))
        {
        }

        private QuotaAlarm(string name, Input<string> id, QuotaAlarmState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:quotas/quotaAlarm:QuotaAlarm", 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 QuotaAlarm 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 QuotaAlarm Get(string name, Input<string> id, QuotaAlarmState? state = null, CustomResourceOptions? options = null)
        {
            return new QuotaAlarm(name, id, state, options);
        }
    }

    public sealed class QuotaAlarmArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Product Code.
        /// </summary>
        [Input("productCode", required: true)]
        public Input<string> ProductCode { get; set; } = null!;

        /// <summary>
        /// The Quota Action Code.
        /// </summary>
        [Input("quotaActionCode", required: true)]
        public Input<string> QuotaActionCode { get; set; } = null!;

        /// <summary>
        /// The name of Quota Alarm.
        /// </summary>
        [Input("quotaAlarmName", required: true)]
        public Input<string> QuotaAlarmName { get; set; } = null!;

        [Input("quotaDimensions")]
        private InputList<Inputs.QuotaAlarmQuotaDimensionArgs>? _quotaDimensions;

        /// <summary>
        /// The Quota Dimensions.
        /// </summary>
        public InputList<Inputs.QuotaAlarmQuotaDimensionArgs> QuotaDimensions
        {
            get => _quotaDimensions ?? (_quotaDimensions = new InputList<Inputs.QuotaAlarmQuotaDimensionArgs>());
            set => _quotaDimensions = value;
        }

        /// <summary>
        /// The threshold of Quota Alarm.
        /// </summary>
        [Input("threshold")]
        public Input<double>? Threshold { get; set; }

        /// <summary>
        /// The threshold percent of Quota Alarm.
        /// </summary>
        [Input("thresholdPercent")]
        public Input<double>? ThresholdPercent { get; set; }

        /// <summary>
        /// The WebHook of Quota Alarm.
        /// </summary>
        [Input("webHook")]
        public Input<string>? WebHook { get; set; }

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

    public sealed class QuotaAlarmState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Product Code.
        /// </summary>
        [Input("productCode")]
        public Input<string>? ProductCode { get; set; }

        /// <summary>
        /// The Quota Action Code.
        /// </summary>
        [Input("quotaActionCode")]
        public Input<string>? QuotaActionCode { get; set; }

        /// <summary>
        /// The name of Quota Alarm.
        /// </summary>
        [Input("quotaAlarmName")]
        public Input<string>? QuotaAlarmName { get; set; }

        [Input("quotaDimensions")]
        private InputList<Inputs.QuotaAlarmQuotaDimensionGetArgs>? _quotaDimensions;

        /// <summary>
        /// The Quota Dimensions.
        /// </summary>
        public InputList<Inputs.QuotaAlarmQuotaDimensionGetArgs> QuotaDimensions
        {
            get => _quotaDimensions ?? (_quotaDimensions = new InputList<Inputs.QuotaAlarmQuotaDimensionGetArgs>());
            set => _quotaDimensions = value;
        }

        /// <summary>
        /// The threshold of Quota Alarm.
        /// </summary>
        [Input("threshold")]
        public Input<double>? Threshold { get; set; }

        /// <summary>
        /// The threshold percent of Quota Alarm.
        /// </summary>
        [Input("thresholdPercent")]
        public Input<double>? ThresholdPercent { get; set; }

        /// <summary>
        /// The WebHook of Quota Alarm.
        /// </summary>
        [Input("webHook")]
        public Input<string>? WebHook { get; set; }

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