// *** 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.Tsf
{
    /// <summary>
    /// Provides a resource to create a tsf api_rate_limit_rule
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var apiRateLimitRule = new Tencentcloud.Tsf.ApiRateLimitRule("apiRateLimitRule", new Tencentcloud.Tsf.ApiRateLimitRuleArgs
    ///         {
    ///             ApiId = "api-xxxxxx",
    ///             MaxQps = 10,
    ///             UsableStatus = "enable",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// 
    /// ## Import
    /// 
    /// tsf api_rate_limit_rule can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import tencentcloud:Tsf/apiRateLimitRule:ApiRateLimitRule api_rate_limit_rule api_rate_limit_rule_id
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Tsf/apiRateLimitRule:ApiRateLimitRule")]
    public partial class ApiRateLimitRule : Pulumi.CustomResource
    {
        /// <summary>
        /// Api Id.
        /// </summary>
        [Output("apiId")]
        public Output<string> ApiId { get; private set; } = null!;

        /// <summary>
        /// creation time.
        /// </summary>
        [Output("createdTime")]
        public Output<string> CreatedTime { get; private set; } = null!;

        /// <summary>
        /// describe.
        /// </summary>
        [Output("description")]
        public Output<string> Description { get; private set; } = null!;

        /// <summary>
        /// qps value.
        /// </summary>
        [Output("maxQps")]
        public Output<int> MaxQps { get; private set; } = null!;

        /// <summary>
        /// Rule content.
        /// </summary>
        [Output("ruleContent")]
        public Output<string> RuleContent { get; private set; } = null!;

        /// <summary>
        /// rule Id.
        /// </summary>
        [Output("ruleId")]
        public Output<string> RuleId { get; private set; } = null!;

        /// <summary>
        /// Current limit name.
        /// </summary>
        [Output("ruleName")]
        public Output<string> RuleName { get; private set; } = null!;

        /// <summary>
        /// Tsf Rule ID.
        /// </summary>
        [Output("tsfRuleId")]
        public Output<string> TsfRuleId { get; private set; } = null!;

        /// <summary>
        /// update time.
        /// </summary>
        [Output("updatedTime")]
        public Output<string> UpdatedTime { get; private set; } = null!;

        /// <summary>
        /// Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
        /// </summary>
        [Output("usableStatus")]
        public Output<string> UsableStatus { get; private set; } = null!;


        /// <summary>
        /// Create a ApiRateLimitRule 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 ApiRateLimitRule(string name, ApiRateLimitRuleArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Tsf/apiRateLimitRule:ApiRateLimitRule", name, args ?? new ApiRateLimitRuleArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ApiRateLimitRule(string name, Input<string> id, ApiRateLimitRuleState? state = null, CustomResourceOptions? options = null)
            : base("tencentcloud:Tsf/apiRateLimitRule:ApiRateLimitRule", 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 ApiRateLimitRule 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 ApiRateLimitRule Get(string name, Input<string> id, ApiRateLimitRuleState? state = null, CustomResourceOptions? options = null)
        {
            return new ApiRateLimitRule(name, id, state, options);
        }
    }

    public sealed class ApiRateLimitRuleArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Api Id.
        /// </summary>
        [Input("apiId", required: true)]
        public Input<string> ApiId { get; set; } = null!;

        /// <summary>
        /// qps value.
        /// </summary>
        [Input("maxQps", required: true)]
        public Input<int> MaxQps { get; set; } = null!;

        /// <summary>
        /// Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
        /// </summary>
        [Input("usableStatus")]
        public Input<string>? UsableStatus { get; set; }

        public ApiRateLimitRuleArgs()
        {
        }
    }

    public sealed class ApiRateLimitRuleState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Api Id.
        /// </summary>
        [Input("apiId")]
        public Input<string>? ApiId { get; set; }

        /// <summary>
        /// creation time.
        /// </summary>
        [Input("createdTime")]
        public Input<string>? CreatedTime { get; set; }

        /// <summary>
        /// describe.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// qps value.
        /// </summary>
        [Input("maxQps")]
        public Input<int>? MaxQps { get; set; }

        /// <summary>
        /// Rule content.
        /// </summary>
        [Input("ruleContent")]
        public Input<string>? RuleContent { get; set; }

        /// <summary>
        /// rule Id.
        /// </summary>
        [Input("ruleId")]
        public Input<string>? RuleId { get; set; }

        /// <summary>
        /// Current limit name.
        /// </summary>
        [Input("ruleName")]
        public Input<string>? RuleName { get; set; }

        /// <summary>
        /// Tsf Rule ID.
        /// </summary>
        [Input("tsfRuleId")]
        public Input<string>? TsfRuleId { get; set; }

        /// <summary>
        /// update time.
        /// </summary>
        [Input("updatedTime")]
        public Input<string>? UpdatedTime { get; set; }

        /// <summary>
        /// Enabled/disabled, enabled/disabled, if not passed, it is enabled by default.
        /// </summary>
        [Input("usableStatus")]
        public Input<string>? UsableStatus { get; set; }

        public ApiRateLimitRuleState()
        {
        }
    }
}
