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

tencentcloud.getCynosdbAccounts

Explore with Pulumi AI

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",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

accounts = tencentcloud.get_cynosdb_accounts(account_names=["root"],
    cluster_id="cynosdbmysql-bws8h88b")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  accounts:
    fn::invoke:
      function: tencentcloud:getCynosdbAccounts
      arguments:
        accountNames:
          - root
        clusterId: cynosdbmysql-bws8h88b
Copy

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>
Copy
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]
Copy
func GetCynosdbAccounts(ctx *Context, args *GetCynosdbAccountsArgs, opts ...InvokeOption) (*GetCynosdbAccountsResult, error)
func GetCynosdbAccountsOutput(ctx *Context, args *GetCynosdbAccountsOutputArgs, opts ...InvokeOption) GetCynosdbAccountsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCynosdbAccountsResult> getCynosdbAccounts(GetCynosdbAccountsArgs args, InvokeOptions options)
public static Output<GetCynosdbAccountsResult> getCynosdbAccounts(GetCynosdbAccountsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getCynosdbAccounts:getCynosdbAccounts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterId This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. string
Account name of database.
CreateTime This property is required. string
Create time.
Description This property is required. string
The account description of database.
Host This property is required. string
Host.
MaxUserConnections This property is required. double
Maximum number of user connections.
UpdateTime This property is required. string
Update time.
AccountName This property is required. string
Account name of database.
CreateTime This property is required. string
Create time.
Description This property is required. string
The account description of database.
Host This property is required. string
Host.
MaxUserConnections This property is required. float64
Maximum number of user connections.
UpdateTime This property is required. string
Update time.
accountName This property is required. String
Account name of database.
createTime This property is required. String
Create time.
description This property is required. String
The account description of database.
host This property is required. String
Host.
maxUserConnections This property is required. Double
Maximum number of user connections.
updateTime This property is required. String
Update time.
accountName This property is required. string
Account name of database.
createTime This property is required. string
Create time.
description This property is required. string
The account description of database.
host This property is required. string
Host.
maxUserConnections This property is required. number
Maximum number of user connections.
updateTime This property is required. string
Update time.
account_name This property is required. str
Account name of database.
create_time This property is required. str
Create time.
description This property is required. str
The account description of database.
host This property is required. str
Host.
max_user_connections This property is required. float
Maximum number of user connections.
update_time This property is required. str
Update time.
accountName This property is required. String
Account name of database.
createTime This property is required. String
Create time.
description This property is required. String
The account description of database.
host This property is required. String
Host.
maxUserConnections This property is required. Number
Maximum number of user connections.
updateTime This property is required. String
Update time.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.