<reponame>Dwonczykj/gember_deploy<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.Postgresql
{
    public static class GetXlogs
    {
        /// <summary>
        /// Provide a datasource to query PostgreSQL Xlogs.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Postgresql.GetXlogs.InvokeAsync(new Tencentcloud.Postgresql.GetXlogsArgs
        ///         {
        ///             EndTime = "2022-01-07 01:02:03",
        ///             InstanceId = "postgres-xxxxxxxx",
        ///             StartTime = "2022-01-01 00:00:00",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetXlogsResult> InvokeAsync(GetXlogsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetXlogsResult>("tencentcloud:Postgresql/getXlogs:getXlogs", args ?? new GetXlogsArgs(), options.WithDefaults());

        /// <summary>
        /// Provide a datasource to query PostgreSQL Xlogs.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var foo = Output.Create(Tencentcloud.Postgresql.GetXlogs.InvokeAsync(new Tencentcloud.Postgresql.GetXlogsArgs
        ///         {
        ///             EndTime = "2022-01-07 01:02:03",
        ///             InstanceId = "postgres-xxxxxxxx",
        ///             StartTime = "2022-01-01 00:00:00",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetXlogsResult> Invoke(GetXlogsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetXlogsResult>("tencentcloud:Postgresql/getXlogs:getXlogs", args ?? new GetXlogsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetXlogsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Xlog end time, format `yyyy-MM-dd hh:mm:ss`.
        /// </summary>
        [Input("endTime")]
        public string? EndTime { get; set; }

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

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

        /// <summary>
        /// Xlog start time, format `yyyy-MM-dd hh:mm:ss`, start time cannot before 7 days ago.
        /// </summary>
        [Input("startTime")]
        public string? StartTime { get; set; }

        public GetXlogsArgs()
        {
        }
    }

    public sealed class GetXlogsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Xlog end time, format `yyyy-MM-dd hh:mm:ss`.
        /// </summary>
        [Input("endTime")]
        public Input<string>? EndTime { get; set; }

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

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

        /// <summary>
        /// Xlog start time, format `yyyy-MM-dd hh:mm:ss`, start time cannot before 7 days ago.
        /// </summary>
        [Input("startTime")]
        public Input<string>? StartTime { get; set; }

        public GetXlogsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetXlogsResult
    {
        /// <summary>
        /// Xlog file created end time.
        /// </summary>
        public readonly string? EndTime;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string InstanceId;
        /// <summary>
        /// List of Xlog query result.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetXlogsListResult> Lists;
        public readonly string? ResultOutputFile;
        /// <summary>
        /// Xlog file created start time.
        /// </summary>
        public readonly string? StartTime;

        [OutputConstructor]
        private GetXlogsResult(
            string? endTime,

            string id,

            string instanceId,

            ImmutableArray<Outputs.GetXlogsListResult> lists,

            string? resultOutputFile,

            string? startTime)
        {
            EndTime = endTime;
            Id = id;
            InstanceId = instanceId;
            Lists = lists;
            ResultOutputFile = resultOutputFile;
            StartTime = startTime;
        }
    }
}
