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

tencentcloud.getCynosdbCluster

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 cluster

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const cluster = tencentcloud.getCynosdbCluster({
        clusterId: "cynosdbmysql-bws8h88b",
        database: "users",
        table: "tb_user_name",
        tableType: "all",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    cluster = tencentcloud.get_cynosdb_cluster(cluster_id="cynosdbmysql-bws8h88b",
        database="users",
        table="tb_user_name",
        table_type="all")
    
    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.LookupCynosdbCluster(ctx, &tencentcloud.LookupCynosdbClusterArgs{
    			ClusterId: "cynosdbmysql-bws8h88b",
    			Database:  pulumi.StringRef("users"),
    			Table:     pulumi.StringRef("tb_user_name"),
    			TableType: pulumi.StringRef("all"),
    		}, 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 cluster = Tencentcloud.GetCynosdbCluster.Invoke(new()
        {
            ClusterId = "cynosdbmysql-bws8h88b",
            Database = "users",
            Table = "tb_user_name",
            TableType = "all",
        });
    
    });
    
    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.GetCynosdbClusterArgs;
    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 cluster = TencentcloudFunctions.getCynosdbCluster(GetCynosdbClusterArgs.builder()
                .clusterId("cynosdbmysql-bws8h88b")
                .database("users")
                .table("tb_user_name")
                .tableType("all")
                .build());
    
        }
    }
    
    variables:
      cluster:
        fn::invoke:
          function: tencentcloud:getCynosdbCluster
          arguments:
            clusterId: cynosdbmysql-bws8h88b
            database: users
            table: tb_user_name
            tableType: all
    

    Using getCynosdbCluster

    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 getCynosdbCluster(args: GetCynosdbClusterArgs, opts?: InvokeOptions): Promise<GetCynosdbClusterResult>
    function getCynosdbClusterOutput(args: GetCynosdbClusterOutputArgs, opts?: InvokeOptions): Output<GetCynosdbClusterResult>
    def get_cynosdb_cluster(cluster_id: Optional[str] = None,
                            database: Optional[str] = None,
                            id: Optional[str] = None,
                            result_output_file: Optional[str] = None,
                            table: Optional[str] = None,
                            table_type: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetCynosdbClusterResult
    def get_cynosdb_cluster_output(cluster_id: Optional[pulumi.Input[str]] = None,
                            database: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            result_output_file: Optional[pulumi.Input[str]] = None,
                            table: Optional[pulumi.Input[str]] = None,
                            table_type: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetCynosdbClusterResult]
    func LookupCynosdbCluster(ctx *Context, args *LookupCynosdbClusterArgs, opts ...InvokeOption) (*LookupCynosdbClusterResult, error)
    func LookupCynosdbClusterOutput(ctx *Context, args *LookupCynosdbClusterOutputArgs, opts ...InvokeOption) LookupCynosdbClusterResultOutput

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

    public static class GetCynosdbCluster 
    {
        public static Task<GetCynosdbClusterResult> InvokeAsync(GetCynosdbClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetCynosdbClusterResult> Invoke(GetCynosdbClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCynosdbClusterResult> getCynosdbCluster(GetCynosdbClusterArgs args, InvokeOptions options)
    public static Output<GetCynosdbClusterResult> getCynosdbCluster(GetCynosdbClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCynosdbCluster:getCynosdbCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    Cluster ID.
    Database string
    Database name.
    Id string
    ResultOutputFile string
    Used to save results.
    Table string
    Data Table Name.
    TableType string
    Data table type: view: only return view, base_ Table: only returns the basic table, all: returns the view and table.
    ClusterId string
    Cluster ID.
    Database string
    Database name.
    Id string
    ResultOutputFile string
    Used to save results.
    Table string
    Data Table Name.
    TableType string
    Data table type: view: only return view, base_ Table: only returns the basic table, all: returns the view and table.
    clusterId String
    Cluster ID.
    database String
    Database name.
    id String
    resultOutputFile String
    Used to save results.
    table String
    Data Table Name.
    tableType String
    Data table type: view: only return view, base_ Table: only returns the basic table, all: returns the view and table.
    clusterId string
    Cluster ID.
    database string
    Database name.
    id string
    resultOutputFile string
    Used to save results.
    table string
    Data Table Name.
    tableType string
    Data table type: view: only return view, base_ Table: only returns the basic table, all: returns the view and table.
    cluster_id str
    Cluster ID.
    database str
    Database name.
    id str
    result_output_file str
    Used to save results.
    table str
    Data Table Name.
    table_type str
    Data table type: view: only return view, base_ Table: only returns the basic table, all: returns the view and table.
    clusterId String
    Cluster ID.
    database String
    Database name.
    id String
    resultOutputFile String
    Used to save results.
    table String
    Data Table Name.
    tableType String
    Data table type: view: only return view, base_ Table: only returns the basic table, all: returns the view and table.

    getCynosdbCluster Result

    The following output properties are available:

    ClusterId string
    Id string
    Tables List<GetCynosdbClusterTable>
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    Database string
    Database name note: This field may return null, indicating that a valid value cannot be obtained.
    ResultOutputFile string
    Table string
    TableType string
    ClusterId string
    Id string
    Tables []GetCynosdbClusterTable
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    Database string
    Database name note: This field may return null, indicating that a valid value cannot be obtained.
    ResultOutputFile string
    Table string
    TableType string
    clusterId String
    id String
    tables List<GetCynosdbClusterTable>
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database String
    Database name note: This field may return null, indicating that a valid value cannot be obtained.
    resultOutputFile String
    table String
    tableType String
    clusterId string
    id string
    tables GetCynosdbClusterTable[]
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database string
    Database name note: This field may return null, indicating that a valid value cannot be obtained.
    resultOutputFile string
    table string
    tableType string
    cluster_id str
    id str
    tables Sequence[GetCynosdbClusterTable]
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database str
    Database name note: This field may return null, indicating that a valid value cannot be obtained.
    result_output_file str
    table str
    table_type str
    clusterId String
    id String
    tables List<Property Map>
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database String
    Database name note: This field may return null, indicating that a valid value cannot be obtained.
    resultOutputFile String
    table String
    tableType String

    Supporting Types

    GetCynosdbClusterTable

    Database string
    Database name.
    Tables List<string>
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    Database string
    Database name.
    Tables []string
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database String
    Database name.
    tables List<String>
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database string
    Database name.
    tables string[]
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database str
    Database name.
    tables Sequence[str]
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.
    database String
    Database name.
    tables List<String>
    Table Name List Note: This field may return null, indicating that a valid value cannot be obtained.

    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