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

tencentcloud.getCynosdbAccounts

Explore with Pulumi AI

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

    Use this data source to query detailed information of cynosdb accounts

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const accounts = tencentcloud.getCynosdbAccounts({
        accountNames: ["root"],
        clusterId: "cynosdbmysql-bws8h88b",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    accounts = tencentcloud.get_cynosdb_accounts(account_names=["root"],
        cluster_id="cynosdbmysql-bws8h88b")
    
    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.GetCynosdbAccounts(ctx, &tencentcloud.GetCynosdbAccountsArgs{
    			AccountNames: []string{
    				"root",
    			},
    			ClusterId: "cynosdbmysql-bws8h88b",
    		}, 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 accounts = Tencentcloud.GetCynosdbAccounts.Invoke(new()
        {
            AccountNames = new[]
            {
                "root",
            },
            ClusterId = "cynosdbmysql-bws8h88b",
        });
    
    });
    
    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.GetCynosdbAccountsArgs;
    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 accounts = TencentcloudFunctions.getCynosdbAccounts(GetCynosdbAccountsArgs.builder()
                .accountNames("root")
                .clusterId("cynosdbmysql-bws8h88b")
                .build());
    
        }
    }
    
    variables:
      accounts:
        fn::invoke:
          function: tencentcloud:getCynosdbAccounts
          arguments:
            accountNames:
              - root
            clusterId: cynosdbmysql-bws8h88b
    

    Using getCynosdbAccounts

    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 getCynosdbAccounts(args: GetCynosdbAccountsArgs, opts?: InvokeOptions): Promise<GetCynosdbAccountsResult>
    function getCynosdbAccountsOutput(args: GetCynosdbAccountsOutputArgs, opts?: InvokeOptions): Output<GetCynosdbAccountsResult>
    def get_cynosdb_accounts(account_names: Optional[Sequence[str]] = None,
                             cluster_id: Optional[str] = None,
                             hosts: Optional[Sequence[str]] = None,
                             id: Optional[str] = None,
                             result_output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCynosdbAccountsResult
    def get_cynosdb_accounts_output(account_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             cluster_id: Optional[pulumi.Input[str]] = None,
                             hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             result_output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCynosdbAccountsResult]
    func GetCynosdbAccounts(ctx *Context, args *GetCynosdbAccountsArgs, opts ...InvokeOption) (*GetCynosdbAccountsResult, error)
    func GetCynosdbAccountsOutput(ctx *Context, args *GetCynosdbAccountsOutputArgs, opts ...InvokeOption) GetCynosdbAccountsResultOutput

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

    public static class GetCynosdbAccounts 
    {
        public static Task<GetCynosdbAccountsResult> InvokeAsync(GetCynosdbAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetCynosdbAccountsResult> Invoke(GetCynosdbAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCynosdbAccountsResult> getCynosdbAccounts(GetCynosdbAccountsArgs args, InvokeOptions options)
    public static Output<GetCynosdbAccountsResult> getCynosdbAccounts(GetCynosdbAccountsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCynosdbAccounts:getCynosdbAccounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    The ID of cluster.
    AccountNames List<string>
    List of accounts to be filtered.
    Hosts List<string>
    List of hosts to be filtered.
    Id string
    ResultOutputFile string
    Used to save results.
    ClusterId string
    The ID of cluster.
    AccountNames []string
    List of accounts to be filtered.
    Hosts []string
    List of hosts to be filtered.
    Id string
    ResultOutputFile string
    Used to save results.
    clusterId String
    The ID of cluster.
    accountNames List<String>
    List of accounts to be filtered.
    hosts List<String>
    List of hosts to be filtered.
    id String
    resultOutputFile String
    Used to save results.
    clusterId string
    The ID of cluster.
    accountNames string[]
    List of accounts to be filtered.
    hosts string[]
    List of hosts to be filtered.
    id string
    resultOutputFile string
    Used to save results.
    cluster_id str
    The ID of cluster.
    account_names Sequence[str]
    List of accounts to be filtered.
    hosts Sequence[str]
    List of hosts to be filtered.
    id str
    result_output_file str
    Used to save results.
    clusterId String
    The ID of cluster.
    accountNames List<String>
    List of accounts to be filtered.
    hosts List<String>
    List of hosts to be filtered.
    id String
    resultOutputFile String
    Used to save results.

    getCynosdbAccounts Result

    The following output properties are available:

    AccountSets List<GetCynosdbAccountsAccountSet>
    Database account list.&quot;&quot;Note: This field may return null, indicating that no valid value can be obtained.
    ClusterId string
    Id string
    AccountNames List<string>
    Hosts List<string>
    ResultOutputFile string
    AccountSets []GetCynosdbAccountsAccountSet
    Database account list.&quot;&quot;Note: This field may return null, indicating that no valid value can be obtained.
    ClusterId string
    Id string
    AccountNames []string
    Hosts []string
    ResultOutputFile string
    accountSets List<GetCynosdbAccountsAccountSet>
    Database account list.&quot;&quot;Note: This field may return null, indicating that no valid value can be obtained.
    clusterId String
    id String
    accountNames List<String>
    hosts List<String>
    resultOutputFile String
    accountSets GetCynosdbAccountsAccountSet[]
    Database account list.&quot;&quot;Note: This field may return null, indicating that no valid value can be obtained.
    clusterId string
    id string
    accountNames string[]
    hosts string[]
    resultOutputFile string
    account_sets Sequence[GetCynosdbAccountsAccountSet]
    Database account list.&quot;&quot;Note: This field may return null, indicating that no valid value can be obtained.
    cluster_id str
    id str
    account_names Sequence[str]
    hosts Sequence[str]
    result_output_file str
    accountSets List<Property Map>
    Database account list.&quot;&quot;Note: This field may return null, indicating that no valid value can be obtained.
    clusterId String
    id String
    accountNames List<String>
    hosts List<String>
    resultOutputFile String

    Supporting Types

    GetCynosdbAccountsAccountSet

    AccountName string
    Account name of database.
    CreateTime string
    Create time.
    Description string
    The account description of database.
    Host string
    Host.
    MaxUserConnections double
    Maximum number of user connections.
    UpdateTime string
    Update time.
    AccountName string
    Account name of database.
    CreateTime string
    Create time.
    Description string
    The account description of database.
    Host string
    Host.
    MaxUserConnections float64
    Maximum number of user connections.
    UpdateTime string
    Update time.
    accountName String
    Account name of database.
    createTime String
    Create time.
    description String
    The account description of database.
    host String
    Host.
    maxUserConnections Double
    Maximum number of user connections.
    updateTime String
    Update time.
    accountName string
    Account name of database.
    createTime string
    Create time.
    description string
    The account description of database.
    host string
    Host.
    maxUserConnections number
    Maximum number of user connections.
    updateTime string
    Update time.
    account_name str
    Account name of database.
    create_time str
    Create time.
    description str
    The account description of database.
    host str
    Host.
    max_user_connections float
    Maximum number of user connections.
    update_time str
    Update time.
    accountName String
    Account name of database.
    createTime String
    Create time.
    description String
    The account description of database.
    host String
    Host.
    maxUserConnections Number
    Maximum number of user connections.
    updateTime String
    Update time.

    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