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

tencentcloud.getCynosdbClusters

Explore with Pulumi AI

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

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

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: tencentcloud:getCynosdbClusters
      arguments:
        clusterId: cynosdbmysql-dzj5l8gz
        clusterName: test
        dbType: MYSQL
        projectId: 0
Copy

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>
Copy
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]
Copy
func GetCynosdbClusters(ctx *Context, args *GetCynosdbClustersArgs, opts ...InvokeOption) (*GetCynosdbClustersResult, error)
func GetCynosdbClustersOutput(ctx *Context, args *GetCynosdbClustersOutputArgs, opts ...InvokeOption) GetCynosdbClustersResultOutput
Copy

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

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