<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.Sqlserver
{
    public static class GetDbs
    {
        /// <summary>
        /// Use this data source to query DB resources for the specific SQL Server instance.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Tencentcloud.Sqlserver.GetDbs.InvokeAsync(new Tencentcloud.Sqlserver.GetDbsArgs
        ///         {
        ///             InstanceId = "mssql-3cdq7kx5",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetDbsResult> InvokeAsync(GetDbsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetDbsResult>("tencentcloud:Sqlserver/getDbs:getDbs", args ?? new GetDbsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query DB resources for the specific SQL Server instance.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var example = Output.Create(Tencentcloud.Sqlserver.GetDbs.InvokeAsync(new Tencentcloud.Sqlserver.GetDbsArgs
        ///         {
        ///             InstanceId = "mssql-3cdq7kx5",
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetDbsResult> Invoke(GetDbsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetDbsResult>("tencentcloud:Sqlserver/getDbs:getDbs", args ?? new GetDbsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetDbsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// SQL Server instance ID which DB belongs to.
        /// </summary>
        [Input("instanceId", required: true)]
        public string InstanceId { get; set; } = null!;

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

        public GetDbsArgs()
        {
        }
    }

    public sealed class GetDbsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// SQL Server instance ID which DB belongs to.
        /// </summary>
        [Input("instanceId", required: true)]
        public Input<string> InstanceId { get; set; } = null!;

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

        public GetDbsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetDbsResult
    {
        /// <summary>
        /// A list of dbs belong to the specific instance. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetDbsDbListResult> DbLists;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// SQL Server instance ID which DB belongs to.
        /// </summary>
        public readonly string InstanceId;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetDbsResult(
            ImmutableArray<Outputs.GetDbsDbListResult> dbLists,

            string id,

            string instanceId,

            string? resultOutputFile)
        {
            DbLists = dbLists;
            Id = id;
            InstanceId = instanceId;
            ResultOutputFile = resultOutputFile;
        }
    }
}
