<filename>sdk/dotnet/Tencentcloud/Sqlserver/GetAccountDbAttachments.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.Sqlserver
{
    public static class GetAccountDbAttachments
    {
        /// <summary>
        /// Use this data source to query the list of SQL Server account DB privileges.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var test = Output.Create(Tencentcloud.Sqlserver.GetAccountDbAttachments.InvokeAsync(new Tencentcloud.Sqlserver.GetAccountDbAttachmentsArgs
        ///         {
        ///             InstanceId = tencentcloud_sqlserver_instance.Test.Id,
        ///             AccountName = tencentcloud_sqlserver_account_db_attachment.Test.Account_name,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetAccountDbAttachmentsResult> InvokeAsync(GetAccountDbAttachmentsArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAccountDbAttachmentsResult>("tencentcloud:Sqlserver/getAccountDbAttachments:getAccountDbAttachments", args ?? new GetAccountDbAttachmentsArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to query the list of SQL Server account DB privileges.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using Pulumi;
        /// using Tencentcloud = Pulumi.Tencentcloud;
        /// 
        /// class MyStack : Stack
        /// {
        ///     public MyStack()
        ///     {
        ///         var test = Output.Create(Tencentcloud.Sqlserver.GetAccountDbAttachments.InvokeAsync(new Tencentcloud.Sqlserver.GetAccountDbAttachmentsArgs
        ///         {
        ///             InstanceId = tencentcloud_sqlserver_instance.Test.Id,
        ///             AccountName = tencentcloud_sqlserver_account_db_attachment.Test.Account_name,
        ///         }));
        ///     }
        /// 
        /// }
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetAccountDbAttachmentsResult> Invoke(GetAccountDbAttachmentsInvokeArgs args, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAccountDbAttachmentsResult>("tencentcloud:Sqlserver/getAccountDbAttachments:getAccountDbAttachments", args ?? new GetAccountDbAttachmentsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAccountDbAttachmentsArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the SQL Server account to be queried.
        /// </summary>
        [Input("accountName")]
        public string? AccountName { get; set; }

        /// <summary>
        /// Name of the DB to be queried.
        /// </summary>
        [Input("dbName")]
        public string? DbName { get; set; }

        /// <summary>
        /// SQL Server instance ID that the account 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 GetAccountDbAttachmentsArgs()
        {
        }
    }

    public sealed class GetAccountDbAttachmentsInvokeArgs : Pulumi.InvokeArgs
    {
        /// <summary>
        /// Name of the SQL Server account to be queried.
        /// </summary>
        [Input("accountName")]
        public Input<string>? AccountName { get; set; }

        /// <summary>
        /// Name of the DB to be queried.
        /// </summary>
        [Input("dbName")]
        public Input<string>? DbName { get; set; }

        /// <summary>
        /// SQL Server instance ID that the account 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 GetAccountDbAttachmentsInvokeArgs()
        {
        }
    }


    [OutputType]
    public sealed class GetAccountDbAttachmentsResult
    {
        /// <summary>
        /// SQL Server account name.
        /// </summary>
        public readonly string? AccountName;
        /// <summary>
        /// SQL Server DB name.
        /// </summary>
        public readonly string? DbName;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// SQL Server instance ID that the account belongs to.
        /// </summary>
        public readonly string InstanceId;
        /// <summary>
        /// A list of SQL Server account. Each element contains the following attributes:
        /// </summary>
        public readonly ImmutableArray<Outputs.GetAccountDbAttachmentsListResult> Lists;
        public readonly string? ResultOutputFile;

        [OutputConstructor]
        private GetAccountDbAttachmentsResult(
            string? accountName,

            string? dbName,

            string id,

            string instanceId,

            ImmutableArray<Outputs.GetAccountDbAttachmentsListResult> lists,

            string? resultOutputFile)
        {
            AccountName = accountName;
            DbName = dbName;
            Id = id;
            InstanceId = instanceId;
            Lists = lists;
            ResultOutputFile = resultOutputFile;
        }
    }
}
