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

tencentcloud.getCynosdbClusters

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 clusters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const foo = tencentcloud.getCynosdbClusters({
        clusterId: "cynosdbmysql-dzj5l8gz",
        clusterName: "test",
        dbType: "MYSQL",
        projectId: 0,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    foo = tencentcloud.get_cynosdb_clusters(cluster_id="cynosdbmysql-dzj5l8gz",
        cluster_name="test",
        db_type="MYSQL",
        project_id=0)
    
    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.GetCynosdbClusters(ctx, &tencentcloud.GetCynosdbClustersArgs{
    			ClusterId:   pulumi.StringRef("cynosdbmysql-dzj5l8gz"),
    			ClusterName: pulumi.StringRef("test"),
    			DbType:      pulumi.StringRef("MYSQL"),
    			ProjectId:   pulumi.Float64Ref(0),
    		}, 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 foo = Tencentcloud.GetCynosdbClusters.Invoke(new()
        {
            ClusterId = "cynosdbmysql-dzj5l8gz",
            ClusterName = "test",
            DbType = "MYSQL",
            ProjectId = 0,
        });
    
    });
    
    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.GetCynosdbClustersArgs;
    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 foo = TencentcloudFunctions.getCynosdbClusters(GetCynosdbClustersArgs.builder()
                .clusterId("cynosdbmysql-dzj5l8gz")
                .clusterName("test")
                .dbType("MYSQL")
                .projectId(0)
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: tencentcloud:getCynosdbClusters
          arguments:
            clusterId: cynosdbmysql-dzj5l8gz
            clusterName: test
            dbType: MYSQL
            projectId: 0
    

    Using getCynosdbClusters

    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 getCynosdbClusters(args: GetCynosdbClustersArgs, opts?: InvokeOptions): Promise<GetCynosdbClustersResult>
    function getCynosdbClustersOutput(args: GetCynosdbClustersOutputArgs, opts?: InvokeOptions): Output<GetCynosdbClustersResult>
    def get_cynosdb_clusters(cluster_id: Optional[str] = None,
                             cluster_name: Optional[str] = None,
                             db_type: Optional[str] = None,
                             id: Optional[str] = None,
                             project_id: Optional[float] = None,
                             result_output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCynosdbClustersResult
    def get_cynosdb_clusters_output(cluster_id: Optional[pulumi.Input[str]] = None,
                             cluster_name: Optional[pulumi.Input[str]] = None,
                             db_type: Optional[pulumi.Input[str]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             project_id: Optional[pulumi.Input[float]] = None,
                             result_output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCynosdbClustersResult]
    func GetCynosdbClusters(ctx *Context, args *GetCynosdbClustersArgs, opts ...InvokeOption) (*GetCynosdbClustersResult, error)
    func GetCynosdbClustersOutput(ctx *Context, args *GetCynosdbClustersOutputArgs, opts ...InvokeOption) GetCynosdbClustersResultOutput

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

    public static class GetCynosdbClusters 
    {
        public static Task<GetCynosdbClustersResult> InvokeAsync(GetCynosdbClustersArgs args, InvokeOptions? opts = null)
        public static Output<GetCynosdbClustersResult> Invoke(GetCynosdbClustersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCynosdbClustersResult> getCynosdbClusters(GetCynosdbClustersArgs args, InvokeOptions options)
    public static Output<GetCynosdbClustersResult> getCynosdbClusters(GetCynosdbClustersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCynosdbClusters:getCynosdbClusters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    ID of the cluster to be queried.
    ClusterName string
    Name of the cluster to be queried.
    DbType string
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    Id string
    ProjectId double
    ID of the project to be queried.
    ResultOutputFile string
    Used to save results.
    ClusterId string
    ID of the cluster to be queried.
    ClusterName string
    Name of the cluster to be queried.
    DbType string
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    Id string
    ProjectId float64
    ID of the project to be queried.
    ResultOutputFile string
    Used to save results.
    clusterId String
    ID of the cluster to be queried.
    clusterName String
    Name of the cluster to be queried.
    dbType String
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    id String
    projectId Double
    ID of the project to be queried.
    resultOutputFile String
    Used to save results.
    clusterId string
    ID of the cluster to be queried.
    clusterName string
    Name of the cluster to be queried.
    dbType string
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    id string
    projectId number
    ID of the project to be queried.
    resultOutputFile string
    Used to save results.
    cluster_id str
    ID of the cluster to be queried.
    cluster_name str
    Name of the cluster to be queried.
    db_type str
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    id str
    project_id float
    ID of the project to be queried.
    result_output_file str
    Used to save results.
    clusterId String
    ID of the cluster to be queried.
    clusterName String
    Name of the cluster to be queried.
    dbType String
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    id String
    projectId Number
    ID of the project to be queried.
    resultOutputFile String
    Used to save results.

    getCynosdbClusters Result

    The following output properties are available:

    ClusterLists List<GetCynosdbClustersClusterList>
    A list of clusters. Each element contains the following attributes:
    Id string
    ClusterId string
    ID of CynosDB cluster.
    ClusterName string
    Name of CynosDB cluster.
    DbType string
    Type of CynosDB, and available values include MYSQL.
    ProjectId double
    ID of the project.
    ResultOutputFile string
    ClusterLists []GetCynosdbClustersClusterList
    A list of clusters. Each element contains the following attributes:
    Id string
    ClusterId string
    ID of CynosDB cluster.
    ClusterName string
    Name of CynosDB cluster.
    DbType string
    Type of CynosDB, and available values include MYSQL.
    ProjectId float64
    ID of the project.
    ResultOutputFile string
    clusterLists List<GetCynosdbClustersClusterList>
    A list of clusters. Each element contains the following attributes:
    id String
    clusterId String
    ID of CynosDB cluster.
    clusterName String
    Name of CynosDB cluster.
    dbType String
    Type of CynosDB, and available values include MYSQL.
    projectId Double
    ID of the project.
    resultOutputFile String
    clusterLists GetCynosdbClustersClusterList[]
    A list of clusters. Each element contains the following attributes:
    id string
    clusterId string
    ID of CynosDB cluster.
    clusterName string
    Name of CynosDB cluster.
    dbType string
    Type of CynosDB, and available values include MYSQL.
    projectId number
    ID of the project.
    resultOutputFile string
    cluster_lists Sequence[GetCynosdbClustersClusterList]
    A list of clusters. Each element contains the following attributes:
    id str
    cluster_id str
    ID of CynosDB cluster.
    cluster_name str
    Name of CynosDB cluster.
    db_type str
    Type of CynosDB, and available values include MYSQL.
    project_id float
    ID of the project.
    result_output_file str
    clusterLists List<Property Map>
    A list of clusters. Each element contains the following attributes:
    id String
    clusterId String
    ID of CynosDB cluster.
    clusterName String
    Name of CynosDB cluster.
    dbType String
    Type of CynosDB, and available values include MYSQL.
    projectId Number
    ID of the project.
    resultOutputFile String

    Supporting Types

    GetCynosdbClustersClusterList

    AutoRenewFlag double
    Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Only works for PREPAID cluster.
    AvailableZone string
    The available zone of the CynosDB Cluster.
    ChargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
    ClusterId string
    ID of the cluster to be queried.
    ClusterLimit double
    Storage limit of CynosDB cluster instance, unit in GB.
    ClusterName string
    Name of the cluster to be queried.
    ClusterStatus string
    Status of the Cynosdb cluster.
    CreateTime string
    Creation time of the CynosDB cluster.
    DbType string
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    DbVersion string
    Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7.
    Port double
    Port of CynosDB cluster.
    ProjectId double
    ID of the project to be queried.
    SubnetId string
    ID of the subnet within this VPC.
    VpcId string
    ID of the VPC.
    AutoRenewFlag float64
    Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Only works for PREPAID cluster.
    AvailableZone string
    The available zone of the CynosDB Cluster.
    ChargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
    ClusterId string
    ID of the cluster to be queried.
    ClusterLimit float64
    Storage limit of CynosDB cluster instance, unit in GB.
    ClusterName string
    Name of the cluster to be queried.
    ClusterStatus string
    Status of the Cynosdb cluster.
    CreateTime string
    Creation time of the CynosDB cluster.
    DbType string
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    DbVersion string
    Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7.
    Port float64
    Port of CynosDB cluster.
    ProjectId float64
    ID of the project to be queried.
    SubnetId string
    ID of the subnet within this VPC.
    VpcId string
    ID of the VPC.
    autoRenewFlag Double
    Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Only works for PREPAID cluster.
    availableZone String
    The available zone of the CynosDB Cluster.
    chargeType String
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
    clusterId String
    ID of the cluster to be queried.
    clusterLimit Double
    Storage limit of CynosDB cluster instance, unit in GB.
    clusterName String
    Name of the cluster to be queried.
    clusterStatus String
    Status of the Cynosdb cluster.
    createTime String
    Creation time of the CynosDB cluster.
    dbType String
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    dbVersion String
    Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7.
    port Double
    Port of CynosDB cluster.
    projectId Double
    ID of the project to be queried.
    subnetId String
    ID of the subnet within this VPC.
    vpcId String
    ID of the VPC.
    autoRenewFlag number
    Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Only works for PREPAID cluster.
    availableZone string
    The available zone of the CynosDB Cluster.
    chargeType string
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
    clusterId string
    ID of the cluster to be queried.
    clusterLimit number
    Storage limit of CynosDB cluster instance, unit in GB.
    clusterName string
    Name of the cluster to be queried.
    clusterStatus string
    Status of the Cynosdb cluster.
    createTime string
    Creation time of the CynosDB cluster.
    dbType string
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    dbVersion string
    Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7.
    port number
    Port of CynosDB cluster.
    projectId number
    ID of the project to be queried.
    subnetId string
    ID of the subnet within this VPC.
    vpcId string
    ID of the VPC.
    auto_renew_flag float
    Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Only works for PREPAID cluster.
    available_zone str
    The available zone of the CynosDB Cluster.
    charge_type str
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
    cluster_id str
    ID of the cluster to be queried.
    cluster_limit float
    Storage limit of CynosDB cluster instance, unit in GB.
    cluster_name str
    Name of the cluster to be queried.
    cluster_status str
    Status of the Cynosdb cluster.
    create_time str
    Creation time of the CynosDB cluster.
    db_type str
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    db_version str
    Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7.
    port float
    Port of CynosDB cluster.
    project_id float
    ID of the project to be queried.
    subnet_id str
    ID of the subnet within this VPC.
    vpc_id str
    ID of the VPC.
    autoRenewFlag Number
    Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Only works for PREPAID cluster.
    availableZone String
    The available zone of the CynosDB Cluster.
    chargeType String
    The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
    clusterId String
    ID of the cluster to be queried.
    clusterLimit Number
    Storage limit of CynosDB cluster instance, unit in GB.
    clusterName String
    Name of the cluster to be queried.
    clusterStatus String
    Status of the Cynosdb cluster.
    createTime String
    Creation time of the CynosDB cluster.
    dbType String
    Type of CynosDB, and available values include MYSQL, POSTGRESQL.
    dbVersion String
    Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7.
    port Number
    Port of CynosDB cluster.
    projectId Number
    ID of the project to be queried.
    subnetId String
    ID of the subnet within this VPC.
    vpcId String
    ID of the VPC.

    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