<gh_stars>0// *** 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.Dbbrain
{
    /// <summary>
    /// Provides a resource to create a dbbrain sql_filter.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = Pulumi.Tencentcloud;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var config = new Config();
    ///         var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
    ///         var region = config.Get("region") ?? "ap-guangzhou";
    ///         var mysql = Output.Create(Tencentcloud.Mysql.GetInstance.InvokeAsync(new Tencentcloud.Mysql.GetInstanceArgs
    ///         {
    ///             InstanceName = "instance_name",
    ///         }));
    ///         var mysqlId = mysql.Apply(mysql =&gt; mysql.InstanceLists?[0]?.MysqlId);
    ///         var sqlFilter = new Tencentcloud.Dbbrain.SqlFilter("sqlFilter", new Tencentcloud.Dbbrain.SqlFilterArgs
    ///         {
    ///             InstanceId = mysqlId,
    ///             SessionToken = new Tencentcloud.Dbbrain.Inputs.SqlFilterSessionTokenArgs
    ///             {
    ///                 User = "test",
    ///                 Password = "===password===",
    ///             },
    ///             SqlType = "SELECT",
    ///             FilterKey = "filter_key",
    ///             MaxConcurrency = 10,
    ///             Duration = 3600,
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Dbbrain/sqlFilter:SqlFilter")]
    public partial class SqlFilter : Pulumi.CustomResource
    {
        /// <summary>
        /// filter duration.
        /// </summary>
        [Output("duration")]
        public Output<int> Duration { get; private set; } = null!;

        /// <summary>
        /// filter id.
        /// </summary>
        [Output("filterId")]
        public Output<int> FilterId { get; private set; } = null!;

        /// <summary>
        /// filter key.
        /// </summary>
        [Output("filterKey")]
        public Output<string> FilterKey { get; private set; } = null!;

        /// <summary>
        /// instance id.
        /// </summary>
        [Output("instanceId")]
        public Output<string> InstanceId { get; private set; } = null!;

        /// <summary>
        /// maximum concurreny.
        /// </summary>
        [Output("maxConcurrency")]
        public Output<int> MaxConcurrency { get; private set; } = null!;

        /// <summary>
        /// product, optional value is &amp;amp;#39;mysql&amp;amp;#39;, &amp;amp;#39;cynosdb&amp;amp;#39;.
        /// </summary>
        [Output("product")]
        public Output<string?> Product { get; private set; } = null!;

        /// <summary>
        /// session token.
        /// </summary>
        [Output("sessionToken")]
        public Output<Outputs.SqlFilterSessionToken> SessionToken { get; private set; } = null!;

        /// <summary>
        /// sql type, optional value is SELECT, UPDATE, DELETE, INSERT, REPLACE.
        /// </summary>
        [Output("sqlType")]
        public Output<string> SqlType { get; private set; } = null!;

        /// <summary>
        /// filter status.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;


        /// <summary>
        /// Create a SqlFilter 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 SqlFilter(string name, SqlFilterArgs args, CustomResourceOptions? options = null)
            : base("tencentcloud:Dbbrain/sqlFilter:SqlFilter", name, args ?? new SqlFilterArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class SqlFilterArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// filter duration.
        /// </summary>
        [Input("duration", required: true)]
        public Input<int> Duration { get; set; } = null!;

        /// <summary>
        /// filter key.
        /// </summary>
        [Input("filterKey", required: true)]
        public Input<string> FilterKey { get; set; } = null!;

        /// <summary>
        /// instance id.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

        /// <summary>
        /// maximum concurreny.
        /// </summary>
        [Input("maxConcurrency", required: true)]
        public Input<int> MaxConcurrency { get; set; } = null!;

        /// <summary>
        /// product, optional value is &amp;amp;#39;mysql&amp;amp;#39;, &amp;amp;#39;cynosdb&amp;amp;#39;.
        /// </summary>
        [Input("product")]
        public Input<string>? Product { get; set; }

        /// <summary>
        /// session token.
        /// </summary>
        [Input("sessionToken", required: true)]
        public Input<Inputs.SqlFilterSessionTokenArgs> SessionToken { get; set; } = null!;

        /// <summary>
        /// sql type, optional value is SELECT, UPDATE, DELETE, INSERT, REPLACE.
        /// </summary>
        [Input("sqlType", required: true)]
        public Input<string> SqlType { get; set; } = null!;

        /// <summary>
        /// filter status.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        public SqlFilterArgs()
        {
        }
    }

    public sealed class SqlFilterState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// filter duration.
        /// </summary>
        [Input("duration")]
        public Input<int>? Duration { get; set; }

        /// <summary>
        /// filter id.
        /// </summary>
        [Input("filterId")]
        public Input<int>? FilterId { get; set; }

        /// <summary>
        /// filter key.
        /// </summary>
        [Input("filterKey")]
        public Input<string>? FilterKey { get; set; }

        /// <summary>
        /// instance id.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        /// <summary>
        /// maximum concurreny.
        /// </summary>
        [Input("maxConcurrency")]
        public Input<int>? MaxConcurrency { get; set; }

        /// <summary>
        /// product, optional value is &amp;amp;#39;mysql&amp;amp;#39;, &amp;amp;#39;cynosdb&amp;amp;#39;.
        /// </summary>
        [Input("product")]
        public Input<string>? Product { get; set; }

        /// <summary>
        /// session token.
        /// </summary>
        [Input("sessionToken")]
        public Input<Inputs.SqlFilterSessionTokenGetArgs>? SessionToken { get; set; }

        /// <summary>
        /// sql type, optional value is SELECT, UPDATE, DELETE, INSERT, REPLACE.
        /// </summary>
        [Input("sqlType")]
        public Input<string>? SqlType { get; set; }

        /// <summary>
        /// filter status.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        public SqlFilterState()
        {
        }
    }
}
