<filename>sdk/dotnet/Tencentcloud/Mongodb/GetInstanceSlowLog.cs<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.Mongodb
{
    public static class GetInstanceSlowLog
    {
        /// <summary>
        /// Use this data source to query detailed information of mongodb instance_slow_log
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var instanceSlowLog = Output.Create(Tencentcloud.Mongodb.GetInstanceSlowLog.InvokeAsync(new Tencentcloud.Mongodb.GetInstanceSlowLogArgs
        ///         {
        ///             EndTime = "2019-06-02 12:00:00",
        ///             Format = "json",
        ///             InstanceId = "cmgo-9d0p6umb",
        ///             SlowMS = 100,
        ///             StartTime = "2019-06-01 10:00:00",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetInstanceSlowLogResult> InvokeAsync(GetInstanceSlowLogArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetInstanceSlowLogResult>("tencentcloud:Mongodb/getInstanceSlowLog:getInstanceSlowLog", args ?? new GetInstanceSlowLogArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query detailed information of mongodb instance_slow_log
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var instanceSlowLog = Output.Create(Tencentcloud.Mongodb.GetInstanceSlowLog.InvokeAsync(new Tencentcloud.Mongodb.GetInstanceSlowLogArgs
        ///         {
        ///             EndTime = "2019-06-02 12:00:00",
        ///             Format = "json",
        ///             InstanceId = "cmgo-9d0p6umb",
        ///             SlowMS = 100,
        ///             StartTime = "2019-06-01 10:00:00",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetInstanceSlowLogResult> Invoke(GetInstanceSlowLogInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetInstanceSlowLogResult>("tencentcloud:Mongodb/getInstanceSlowLog:getInstanceSlowLog", args ?? new GetInstanceSlowLogInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetInstanceSlowLogArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
        /// </summary>
        [Input("endTime", required: true)]
        public string EndTime { get; set; } = null!;

        /// <summary>
        /// Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
        /// </summary>
        [Input("format")]
        public string? Format { get; set; }

        /// <summary>
        /// Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

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

        /// <summary>
        /// Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
        /// </summary>
        [Input("slowMs", required: true)]
        public int SlowMs { get; set; }

        /// <summary>
        /// Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
        /// </summary>
        [Input("startTime", required: true)]
        public string StartTime { get; set; } = null!;

        public GetInstanceSlowLogArgs()
        {
        }
    }

    public sealed class GetInstanceSlowLogInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Slow log termination time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-02 12:00:00.The time interval between the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
        /// </summary>
        [Input("endTime", required: true)]
        public Input<string> EndTime { get; set; } = null!;

        /// <summary>
        /// Slow log return format. By default, the original slow log format is returned,and versions 4.4 and above can be set to json.
        /// </summary>
        [Input("format")]
        public Input<string>? Format { get; set; }

        /// <summary>
        /// Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
        /// </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; }

        /// <summary>
        /// Slow log execution time threshold, return slow logs whose execution time exceeds this threshold,the unit is milliseconds (ms), and the minimum is 100 milliseconds.
        /// </summary>
        [Input("slowMs", required: true)]
        public Input<int> SlowMs { get; set; } = null!;

        /// <summary>
        /// Slow log start time, format: yyyy-mm-dd hh:mm:ss, such as: 2019-06-01 10:00:00. The time intervalbetween the start and end of the query cannot exceed 24 hours,and only slow logs within the last 7 days are allowed to be queried.
        /// </summary>
        [Input("startTime", required: true)]
        public Input<string> StartTime { get; set; } = null!;

        public GetInstanceSlowLogInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetInstanceSlowLogResult
    {
        public readonly string EndTime;
        public readonly string? Format;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// details of slow logs.
        /// </summary>
        public readonly ImmutableArray<string> SlowLogs;
        public readonly int SlowMs;
        public readonly string StartTime;

        [OutputConstructor]
        private GetInstanceSlowLogResult(
            string endTime,

            string? format,

            string id,

            string instanceId,

            string? resultOutputFile,

            ImmutableArray<string> slowLogs,

            int slowMs,

            string startTime)
        {
            EndTime = endTime;
            Format = format;
            Id = id;
            InstanceId = instanceId;
            ResultOutputFile = resultOutputFile;
            SlowLogs = slowLogs;
            SlowMs = slowMs;
            StartTime = startTime;
        }
    }
}
