// *** 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 GetDiagHistory
    {
        /// <summary>
        /// Use this data source to query detailed information of dbbrain diag_history
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var diagHistory = Output.Create(Tencentcloud.Dbbrain.GetDiagHistory.InvokeAsync(new Tencentcloud.Dbbrain.GetDiagHistoryArgs
        ///         {
        ///             EndTime = "%s",
        ///             InstanceId = "%s",
        ///             Product = "mysql",
        ///             StartTime = "%s",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetDiagHistoryResult> InvokeAsync(GetDiagHistoryArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetDiagHistoryResult>("tencentcloud:Dbbrain/getDiagHistory:getDiagHistory", args ?? new GetDiagHistoryArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of dbbrain diag_history
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var diagHistory = Output.Create(Tencentcloud.Dbbrain.GetDiagHistory.InvokeAsync(new Tencentcloud.Dbbrain.GetDiagHistoryArgs
        ///         {
        ///             EndTime = "%s",
        ///             InstanceId = "%s",
        ///             Product = "mysql",
        ///             StartTime = "%s",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetDiagHistoryResult> Invoke(GetDiagHistoryInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetDiagHistoryResult>("tencentcloud:Dbbrain/getDiagHistory:getDiagHistory", args ?? new GetDiagHistoryInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetDiagHistoryArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// End time, such as `2019-09-11 12:13:14`, the interval between the end time and the start time can be up to 2 days.
        /// </summary>
        [Input("endTime", required: true)]
        public string EndTime { get; set; } = null!;

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

        /// <summary>
        /// Service product type, supported values include: `mysql` - cloud database MySQL, `cynosdb` - cloud database CynosDB for MySQL, the default is `mysql`.
        /// </summary>
        [Input("product")]
        public string? Product { get; set; }

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

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

        public GetDiagHistoryArgs()
        {
        }
    }

    public sealed class GetDiagHistoryInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// End time, such as `2019-09-11 12:13:14`, the interval between the end time and the start time can be up to 2 days.
        /// </summary>
        [Input("endTime", required: true)]
        public Input<string> EndTime { get; set; } = null!;

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

        /// <summary>
        /// Service product type, supported values include: `mysql` - cloud database MySQL, `cynosdb` - cloud database CynosDB for MySQL, the default is `mysql`.
        /// </summary>
        [Input("product")]
        public Input<string>? Product { get; set; }

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

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

        public GetDiagHistoryInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetDiagHistoryResult
    {
        /// <summary>
        /// End Time.
        /// </summary>
        public readonly string EndTime;
        /// <summary>
        /// Event description.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDiagHistoryEventResult> Events;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// instance id.
        /// </summary>
        public readonly string InstanceId;
        public readonly string? Product;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// start Time.
        /// </summary>
        public readonly string StartTime;

        [OutputConstructor]
        private GetDiagHistoryResult(
            string endTime,

            ImmutableArray<Outputs.GetDiagHistoryEventResult> events,

            string id,

            string instanceId,

            string? product,

            string? resultOutputFile,

            string startTime)
        {
            EndTime = endTime;
            Events = events;
            Id = id;
            InstanceId = instanceId;
            Product = product;
            ResultOutputFile = resultOutputFile;
            StartTime = startTime;
        }
    }
}
