<filename>sdk/dotnet/Tencentcloud/Dbbrain/GetSqlFilters.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.Dbbrain
{
    public static class GetSqlFilters
    {
        /// <summary>
        /// Use this data source to query detailed information of dbbrain sqlFilters
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var sqlFilter = new Tencentcloud.Dbbrain.SqlFilter("sqlFilter", new Tencentcloud.Dbbrain.SqlFilterArgs
        ///         {
        ///             InstanceId = "mysql_ins_id",
        ///             SessionToken = new Tencentcloud.Dbbrain.Inputs.SqlFilterSessionTokenArgs
        ///             {
        ///                 User = "user",
        ///                 Password = "password",
        ///             },
        ///             SqlType = "SELECT",
        ///             FilterKey = "test",
        ///             MaxConcurrency = 10,
        ///             Duration = 3600,
        ///         });
        ///         var sqlFilters = Tencentcloud.Dbbrain.GetSqlFilters.Invoke(new Tencentcloud.Dbbrain.GetSqlFiltersInvokeArgs
        ///         {
        ///             InstanceId = "mysql_ins_id",
        ///             FilterIds = 
        ///             {
        ///                 sqlFilter.FilterId,
        ///             },
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetSqlFiltersResult> InvokeAsync(GetSqlFiltersArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetSqlFiltersResult>("tencentcloud:Dbbrain/getSqlFilters:getSqlFilters", args ?? new GetSqlFiltersArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of dbbrain sqlFilters
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var sqlFilter = new Tencentcloud.Dbbrain.SqlFilter("sqlFilter", new Tencentcloud.Dbbrain.SqlFilterArgs
        ///         {
        ///             InstanceId = "mysql_ins_id",
        ///             SessionToken = new Tencentcloud.Dbbrain.Inputs.SqlFilterSessionTokenArgs
        ///             {
        ///                 User = "user",
        ///                 Password = "password",
        ///             },
        ///             SqlType = "SELECT",
        ///             FilterKey = "test",
        ///             MaxConcurrency = 10,
        ///             Duration = 3600,
        ///         });
        ///         var sqlFilters = Tencentcloud.Dbbrain.GetSqlFilters.Invoke(new Tencentcloud.Dbbrain.GetSqlFiltersInvokeArgs
        ///         {
        ///             InstanceId = "mysql_ins_id",
        ///             FilterIds = 
        ///             {
        ///                 sqlFilter.FilterId,
        ///             },
        ///         });
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetSqlFiltersResult> Invoke(GetSqlFiltersInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetSqlFiltersResult>("tencentcloud:Dbbrain/getSqlFilters:getSqlFilters", args ?? new GetSqlFiltersInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetSqlFiltersArgs : Pulumi.InvokeArgs
    {
        [Input("filterIds")]
        private List<int>? _filterIds;

        /// <summary>
        /// filter id list.
        /// </summary>
        public List<int> FilterIds
        {
            get => _filterIds ?? (_filterIds = new List<int>());
            set => _filterIds = value;
        }

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

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public string? ResultOutputFile { get; set; }

        [Input("statuses")]
        private List<string>? _statuses;

        /// <summary>
        /// status list.
        /// </summary>
        public List<string> Statuses
        {
            get => _statuses ?? (_statuses = new List<string>());
            set => _statuses = value;
        }

        public GetSqlFiltersArgs()
        {
        }
    }

    public sealed class GetSqlFiltersInvokeArgs : Pulumi.InvokeArgs
    {
        [Input("filterIds")]
        private InputList<int>? _filterIds;

        /// <summary>
        /// filter id list.
        /// </summary>
        public InputList<int> FilterIds
        {
            get => _filterIds ?? (_filterIds = new InputList<int>());
            set => _filterIds = value;
        }

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

        /// <summary>
        /// Used to save results.
        /// </summary>
        [Input("resultOutputFile")]
        public Input<string>? ResultOutputFile { get; set; }

        [Input("statuses")]
        private InputList<string>? _statuses;

        /// <summary>
        /// status list.
        /// </summary>
        public InputList<string> Statuses
        {
            get => _statuses ?? (_statuses = new InputList<string>());
            set => _statuses = value;
        }

        public GetSqlFiltersInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetSqlFiltersResult
    {
        public readonly ImmutableArray<int> FilterIds;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        /// <summary>
        /// sql filter list.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetSqlFiltersListResult> Lists;
        public readonly string? ResultOutputFile;
        public readonly ImmutableArray<string> Statuses;

        [OutputConstructor]
        private GetSqlFiltersResult(
            ImmutableArray<int> filterIds,

            string id,

            string instanceId,

            ImmutableArray<Outputs.GetSqlFiltersListResult> lists,

            string? resultOutputFile,

            ImmutableArray<string> statuses)
        {
            FilterIds = filterIds;
            Id = id;
            InstanceId = instanceId;
            Lists = lists;
            ResultOutputFile = resultOutputFile;
            Statuses = statuses;
        }
    }
}
