<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.Mysql
{
    public static class GetBackupList
    {
        /// <summary>
        /// Use this data source to query the list of backup databases.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var @default = Output.Create(Tencentcloud.Mysql.GetBackupList.InvokeAsync(new Tencentcloud.Mysql.GetBackupListArgs
        ///         {
        ///             MaxNumber = 10,
        ///             MysqlId = "my-test-database",
        ///             ResultOutputFile = "mytestpath",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetBackupListResult> InvokeAsync(GetBackupListArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetBackupListResult>("tencentcloud:Mysql/getBackupList:getBackupList", args ?? new GetBackupListArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query the list of backup databases.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var @default = Output.Create(Tencentcloud.Mysql.GetBackupList.InvokeAsync(new Tencentcloud.Mysql.GetBackupListArgs
        ///         {
        ///             MaxNumber = 10,
        ///             MysqlId = "my-test-database",
        ///             ResultOutputFile = "mytestpath",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetBackupListResult> Invoke(GetBackupListInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetBackupListResult>("tencentcloud:Mysql/getBackupList:getBackupList", args ?? new GetBackupListInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetBackupListArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// The latest files to list, rang from 1 to 10000. And the default value is `10`.
        /// </summary>
        [Input("maxNumber")]
        public int? MaxNumber { get; set; }

        /// <summary>
        /// Instance ID, such as `cdb-c1nl9rpv`. It is identical to the instance ID displayed in the database console page.
        /// </summary>
        [Input("mysqlId", required: true)]
        public string MysqlId { get; set; } = null!;

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

        public GetBackupListArgs()
        {
        }
    }

    public sealed class GetBackupListInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// The latest files to list, rang from 1 to 10000. And the default value is `10`.
        /// </summary>
        [Input("maxNumber")]
        public Input<int>? MaxNumber { get; set; }

        /// <summary>
        /// Instance ID, such as `cdb-c1nl9rpv`. It is identical to the instance ID displayed in the database console page.
        /// </summary>
        [Input("mysqlId", required: true)]
        public Input<string> MysqlId { get; set; } = null!;

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

        public GetBackupListInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetBackupListResult
    {
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of MySQL backup. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetBackupListListResult> Lists;
        public readonly int? MaxNumber;
        public readonly string MysqlId;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetBackupListResult(
            string id,

            ImmutableArray<Outputs.GetBackupListListResult> lists,

            int? maxNumber,

            string mysqlId,

            string? resultOutputFile)
        {
            Id = id;
            Lists = lists;
            MaxNumber = maxNumber;
            MysqlId = mysqlId;
            ResultOutputFile = resultOutputFile;
        }
    }
}
