1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getSqlserverAccounts
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getSqlserverAccounts

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query the list of SQL Server accounts.

    Example Usage

    Pull instance account list

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getSqlserverAccounts({
        instanceId: "mssql-3cdq7kx5",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_sqlserver_accounts(instance_id="mssql-3cdq7kx5")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetSqlserverAccounts(ctx, &tencentcloud.GetSqlserverAccountsArgs{
    			InstanceId: "mssql-3cdq7kx5",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetSqlserverAccounts.Invoke(new()
        {
            InstanceId = "mssql-3cdq7kx5",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSqlserverAccountsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = TencentcloudFunctions.getSqlserverAccounts(GetSqlserverAccountsArgs.builder()
                .instanceId("mssql-3cdq7kx5")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getSqlserverAccounts
          arguments:
            instanceId: mssql-3cdq7kx5
    

    Pull instance account list Filter by name

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getSqlserverAccounts({
        instanceId: "mssql-3cdq7kx5",
        name: "myaccount",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_sqlserver_accounts(instance_id="mssql-3cdq7kx5",
        name="myaccount")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetSqlserverAccounts(ctx, &tencentcloud.GetSqlserverAccountsArgs{
    			InstanceId: "mssql-3cdq7kx5",
    			Name:       pulumi.StringRef("myaccount"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetSqlserverAccounts.Invoke(new()
        {
            InstanceId = "mssql-3cdq7kx5",
            Name = "myaccount",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetSqlserverAccountsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = TencentcloudFunctions.getSqlserverAccounts(GetSqlserverAccountsArgs.builder()
                .instanceId("mssql-3cdq7kx5")
                .name("myaccount")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getSqlserverAccounts
          arguments:
            instanceId: mssql-3cdq7kx5
            name: myaccount
    

    Using getSqlserverAccounts

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSqlserverAccounts(args: GetSqlserverAccountsArgs, opts?: InvokeOptions): Promise<GetSqlserverAccountsResult>
    function getSqlserverAccountsOutput(args: GetSqlserverAccountsOutputArgs, opts?: InvokeOptions): Output<GetSqlserverAccountsResult>
    def get_sqlserver_accounts(id: Optional[str] = None,
                               instance_id: Optional[str] = None,
                               name: Optional[str] = None,
                               result_output_file: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetSqlserverAccountsResult
    def get_sqlserver_accounts_output(id: Optional[pulumi.Input[str]] = None,
                               instance_id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               result_output_file: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetSqlserverAccountsResult]
    func GetSqlserverAccounts(ctx *Context, args *GetSqlserverAccountsArgs, opts ...InvokeOption) (*GetSqlserverAccountsResult, error)
    func GetSqlserverAccountsOutput(ctx *Context, args *GetSqlserverAccountsOutputArgs, opts ...InvokeOption) GetSqlserverAccountsResultOutput

    > Note: This function is named GetSqlserverAccounts in the Go SDK.

    public static class GetSqlserverAccounts 
    {
        public static Task<GetSqlserverAccountsResult> InvokeAsync(GetSqlserverAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetSqlserverAccountsResult> Invoke(GetSqlserverAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSqlserverAccountsResult> getSqlserverAccounts(GetSqlserverAccountsArgs args, InvokeOptions options)
    public static Output<GetSqlserverAccountsResult> getSqlserverAccounts(GetSqlserverAccountsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getSqlserverAccounts:getSqlserverAccounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    SQL server instance ID that the account belongs to.
    Id string
    Name string
    Name of the SQL server account to be queried.
    ResultOutputFile string
    Used to store results.
    InstanceId string
    SQL server instance ID that the account belongs to.
    Id string
    Name string
    Name of the SQL server account to be queried.
    ResultOutputFile string
    Used to store results.
    instanceId String
    SQL server instance ID that the account belongs to.
    id String
    name String
    Name of the SQL server account to be queried.
    resultOutputFile String
    Used to store results.
    instanceId string
    SQL server instance ID that the account belongs to.
    id string
    name string
    Name of the SQL server account to be queried.
    resultOutputFile string
    Used to store results.
    instance_id str
    SQL server instance ID that the account belongs to.
    id str
    name str
    Name of the SQL server account to be queried.
    result_output_file str
    Used to store results.
    instanceId String
    SQL server instance ID that the account belongs to.
    id String
    name String
    Name of the SQL server account to be queried.
    resultOutputFile String
    Used to store results.

    getSqlserverAccounts Result

    The following output properties are available:

    Id string
    InstanceId string
    SQL server instance ID that the account belongs to.
    Lists List<GetSqlserverAccountsList>
    A list of SQL Server account. Each element contains the following attributes:
    Name string
    Name of the SQL server account.
    ResultOutputFile string
    Id string
    InstanceId string
    SQL server instance ID that the account belongs to.
    Lists []GetSqlserverAccountsList
    A list of SQL Server account. Each element contains the following attributes:
    Name string
    Name of the SQL server account.
    ResultOutputFile string
    id String
    instanceId String
    SQL server instance ID that the account belongs to.
    lists List<GetSqlserverAccountsList>
    A list of SQL Server account. Each element contains the following attributes:
    name String
    Name of the SQL server account.
    resultOutputFile String
    id string
    instanceId string
    SQL server instance ID that the account belongs to.
    lists GetSqlserverAccountsList[]
    A list of SQL Server account. Each element contains the following attributes:
    name string
    Name of the SQL server account.
    resultOutputFile string
    id str
    instance_id str
    SQL server instance ID that the account belongs to.
    lists Sequence[GetSqlserverAccountsList]
    A list of SQL Server account. Each element contains the following attributes:
    name str
    Name of the SQL server account.
    result_output_file str
    id String
    instanceId String
    SQL server instance ID that the account belongs to.
    lists List<Property Map>
    A list of SQL Server account. Each element contains the following attributes:
    name String
    Name of the SQL server account.
    resultOutputFile String

    Supporting Types

    GetSqlserverAccountsList

    CreateTime string
    Create time of the SQL Server account.
    InstanceId string
    SQL server instance ID that the account belongs to.
    Name string
    Name of the SQL server account to be queried.
    Remark string
    Remark of the SQL Server account.
    Status double
    Status of the SQL Server account. 1 for creating, 2 for running, 3 for modifying, 4 for resetting password, -1 for deleting.
    UpdateTime string
    Last updated time of the SQL Server account.
    CreateTime string
    Create time of the SQL Server account.
    InstanceId string
    SQL server instance ID that the account belongs to.
    Name string
    Name of the SQL server account to be queried.
    Remark string
    Remark of the SQL Server account.
    Status float64
    Status of the SQL Server account. 1 for creating, 2 for running, 3 for modifying, 4 for resetting password, -1 for deleting.
    UpdateTime string
    Last updated time of the SQL Server account.
    createTime String
    Create time of the SQL Server account.
    instanceId String
    SQL server instance ID that the account belongs to.
    name String
    Name of the SQL server account to be queried.
    remark String
    Remark of the SQL Server account.
    status Double
    Status of the SQL Server account. 1 for creating, 2 for running, 3 for modifying, 4 for resetting password, -1 for deleting.
    updateTime String
    Last updated time of the SQL Server account.
    createTime string
    Create time of the SQL Server account.
    instanceId string
    SQL server instance ID that the account belongs to.
    name string
    Name of the SQL server account to be queried.
    remark string
    Remark of the SQL Server account.
    status number
    Status of the SQL Server account. 1 for creating, 2 for running, 3 for modifying, 4 for resetting password, -1 for deleting.
    updateTime string
    Last updated time of the SQL Server account.
    create_time str
    Create time of the SQL Server account.
    instance_id str
    SQL server instance ID that the account belongs to.
    name str
    Name of the SQL server account to be queried.
    remark str
    Remark of the SQL Server account.
    status float
    Status of the SQL Server account. 1 for creating, 2 for running, 3 for modifying, 4 for resetting password, -1 for deleting.
    update_time str
    Last updated time of the SQL Server account.
    createTime String
    Create time of the SQL Server account.
    instanceId String
    SQL server instance ID that the account belongs to.
    name String
    Name of the SQL server account to be queried.
    remark String
    Remark of the SQL Server account.
    status Number
    Status of the SQL Server account. 1 for creating, 2 for running, 3 for modifying, 4 for resetting password, -1 for deleting.
    updateTime String
    Last updated time of the SQL Server account.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack