<filename>sdk/dotnet/Tencentcloud/Dbbrain/TdsqlAuditLog.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
{
    /// <summary>
    /// Provides a resource to create a dbbrain tdsql_audit_log
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using Pulumi;
    /// using Tencentcloud = TencentCloudIAC.PulumiPackage.Tencentcloud;
    /// 
    /// class MyStack : Stack
    /// {
    ///     public MyStack()
    ///     {
    ///         var myLog = new Tencentcloud.Dbbrain.TdsqlAuditLog("myLog", new Tencentcloud.Dbbrain.TdsqlAuditLogArgs
    ///         {
    ///             EndTime = "%s",
    ///             Filter = new Tencentcloud.Dbbrain.Inputs.TdsqlAuditLogFilterArgs
    ///             {
    ///                 Hosts = 
    ///                 {
    ///                     "%%",
    ///                     "127.0.0.1",
    ///                 },
    ///                 Users = 
    ///                 {
    ///                     "tf_test",
    ///                     "mysql",
    ///                 },
    ///             },
    ///             InstanceId = "%s",
    ///             NodeRequestType = "dcdb",
    ///             Product = "dcdb",
    ///             StartTime = "%s",
    ///         });
    ///     }
    /// 
    /// }
    /// ```
    /// </summary>
    [TencentcloudResourceType("tencentcloud:Dbbrain/tdsqlAuditLog:TdsqlAuditLog")]
    public partial class TdsqlAuditLog : Pulumi.CustomResource
    {
        /// <summary>
        /// Deadline time, such as `2019-09-11 10:13:14`.
        /// </summary>
        [Output("endTime")]
        public Output<string> EndTime { get; private set; } = null!;

        /// <summary>
        /// Filter conditions. Logs can be filtered according to the filter conditions set.
        /// </summary>
        [Output("filter")]
        public Output<Outputs.TdsqlAuditLogFilter?> Filter { get; private set; } = null!;

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

        /// <summary>
        /// Consistent with Product. For example: dcdb, mariadb.
        /// </summary>
        [Output("nodeRequestType")]
        public Output<string> NodeRequestType { get; private set; } = null!;

        /// <summary>
        /// Service product type, supported values include: dcdb - cloud database Tdsql, mariadb - cloud database MariaDB for MariaDB..
        /// </summary>
        [Output("product")]
        public Output<string> Product { get; private set; } = null!;

        /// <summary>
        /// Start time, such as `2019-09-10 12:13:14`.
        /// </summary>
        [Output("startTime")]
        public Output<string> StartTime { get; private set; } = null!;


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

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

    public sealed class TdsqlAuditLogArgs : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Deadline time, such as `2019-09-11 10:13:14`.
        /// </summary>
        [Input("endTime", required: true)]
        public Input<string> EndTime { get; set; } = null!;

        /// <summary>
        /// Filter conditions. Logs can be filtered according to the filter conditions set.
        /// </summary>
        [Input("filter")]
        public Input<Inputs.TdsqlAuditLogFilterArgs>? Filter { get; set; }

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

        /// <summary>
        /// Consistent with Product. For example: dcdb, mariadb.
        /// </summary>
        [Input("nodeRequestType", required: true)]
        public Input<string> NodeRequestType { get; set; } = null!;

        /// <summary>
        /// Service product type, supported values include: dcdb - cloud database Tdsql, mariadb - cloud database MariaDB for MariaDB..
        /// </summary>
        [Input("product", required: true)]
        public Input<string> Product { get; set; } = null!;

        /// <summary>
        /// Start time, such as `2019-09-10 12:13:14`.
        /// </summary>
        [Input("startTime", required: true)]
        public Input<string> StartTime { get; set; } = null!;

        public TdsqlAuditLogArgs()
        {
        }
    }

    public sealed class TdsqlAuditLogState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Deadline time, such as `2019-09-11 10:13:14`.
        /// </summary>
        [Input("endTime")]
        public Input<string>? EndTime { get; set; }

        /// <summary>
        /// Filter conditions. Logs can be filtered according to the filter conditions set.
        /// </summary>
        [Input("filter")]
        public Input<Inputs.TdsqlAuditLogFilterGetArgs>? Filter { get; set; }

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

        /// <summary>
        /// Consistent with Product. For example: dcdb, mariadb.
        /// </summary>
        [Input("nodeRequestType")]
        public Input<string>? NodeRequestType { get; set; }

        /// <summary>
        /// Service product type, supported values include: dcdb - cloud database Tdsql, mariadb - cloud database MariaDB for MariaDB..
        /// </summary>
        [Input("product")]
        public Input<string>? Product { get; set; }

        /// <summary>
        /// Start time, such as `2019-09-10 12:13:14`.
        /// </summary>
        [Input("startTime")]
        public Input<string>? StartTime { get; set; }

        public TdsqlAuditLogState()
        {
        }
    }
}
