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

tencentcloud.getCynosdbInstances

Explore with Pulumi AI

Use this data source to query detailed information of Cynosdb instances.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const foo = tencentcloud.getCynosdbInstances({
    dbType: "MYSQL",
    instanceId: "cynosdbmysql-ins-0wln9u6w",
    instanceName: "test",
    projectId: 0,
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

foo = tencentcloud.get_cynosdb_instances(db_type="MYSQL",
    instance_id="cynosdbmysql-ins-0wln9u6w",
    instance_name="test",
    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.GetCynosdbInstances(ctx, &tencentcloud.GetCynosdbInstancesArgs{
			DbType:       pulumi.StringRef("MYSQL"),
			InstanceId:   pulumi.StringRef("cynosdbmysql-ins-0wln9u6w"),
			InstanceName: pulumi.StringRef("test"),
			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.GetCynosdbInstances.Invoke(new()
    {
        DbType = "MYSQL",
        InstanceId = "cynosdbmysql-ins-0wln9u6w",
        InstanceName = "test",
        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.GetCynosdbInstancesArgs;
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.getCynosdbInstances(GetCynosdbInstancesArgs.builder()
            .dbType("MYSQL")
            .instanceId("cynosdbmysql-ins-0wln9u6w")
            .instanceName("test")
            .projectId(0)
            .build());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: tencentcloud:getCynosdbInstances
      arguments:
        dbType: MYSQL
        instanceId: cynosdbmysql-ins-0wln9u6w
        instanceName: test
        projectId: 0
Copy

Using getCynosdbInstances

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 getCynosdbInstances(args: GetCynosdbInstancesArgs, opts?: InvokeOptions): Promise<GetCynosdbInstancesResult>
function getCynosdbInstancesOutput(args: GetCynosdbInstancesOutputArgs, opts?: InvokeOptions): Output<GetCynosdbInstancesResult>
Copy
def get_cynosdb_instances(cluster_id: Optional[str] = None,
                          db_type: Optional[str] = None,
                          id: Optional[str] = None,
                          instance_id: Optional[str] = None,
                          instance_name: Optional[str] = None,
                          project_id: Optional[float] = None,
                          result_output_file: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCynosdbInstancesResult
def get_cynosdb_instances_output(cluster_id: Optional[pulumi.Input[str]] = None,
                          db_type: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          instance_id: Optional[pulumi.Input[str]] = None,
                          instance_name: 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[GetCynosdbInstancesResult]
Copy
func GetCynosdbInstances(ctx *Context, args *GetCynosdbInstancesArgs, opts ...InvokeOption) (*GetCynosdbInstancesResult, error)
func GetCynosdbInstancesOutput(ctx *Context, args *GetCynosdbInstancesOutputArgs, opts ...InvokeOption) GetCynosdbInstancesResultOutput
Copy

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

public static class GetCynosdbInstances 
{
    public static Task<GetCynosdbInstancesResult> InvokeAsync(GetCynosdbInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetCynosdbInstancesResult> Invoke(GetCynosdbInstancesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCynosdbInstancesResult> getCynosdbInstances(GetCynosdbInstancesArgs args, InvokeOptions options)
public static Output<GetCynosdbInstancesResult> getCynosdbInstances(GetCynosdbInstancesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getCynosdbInstances:getCynosdbInstances
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

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

getCynosdbInstances Result

The following output properties are available:

Id string
InstanceLists List<GetCynosdbInstancesInstanceList>
A list of instances. Each element contains the following attributes:
ClusterId string
DbType string
InstanceId string
InstanceName string
Name of CynosDB instance.
ProjectId double
ResultOutputFile string
Id string
InstanceLists []GetCynosdbInstancesInstanceList
A list of instances. Each element contains the following attributes:
ClusterId string
DbType string
InstanceId string
InstanceName string
Name of CynosDB instance.
ProjectId float64
ResultOutputFile string
id String
instanceLists List<GetCynosdbInstancesInstanceList>
A list of instances. Each element contains the following attributes:
clusterId String
dbType String
instanceId String
instanceName String
Name of CynosDB instance.
projectId Double
resultOutputFile String
id string
instanceLists GetCynosdbInstancesInstanceList[]
A list of instances. Each element contains the following attributes:
clusterId string
dbType string
instanceId string
instanceName string
Name of CynosDB instance.
projectId number
resultOutputFile string
id str
instance_lists Sequence[GetCynosdbInstancesInstanceList]
A list of instances. Each element contains the following attributes:
cluster_id str
db_type str
instance_id str
instance_name str
Name of CynosDB instance.
project_id float
result_output_file str
id String
instanceLists List<Property Map>
A list of instances. Each element contains the following attributes:
clusterId String
dbType String
instanceId String
instanceName String
Name of CynosDB instance.
projectId Number
resultOutputFile String

Supporting Types

GetCynosdbInstancesInstanceList

ClusterId This property is required. string
ID of the cluster.
CreateTime This property is required. string
Creation time of the CynosDB instance.
InstanceCpuCore This property is required. double
InstanceId This property is required. string
ID of the Cynosdb instance to be queried.
InstanceMemorySize This property is required. double
InstanceName This property is required. string
Name of the Cynosdb instance to be queried.
InstanceStatus This property is required. string
Status of the Cynosdb instance.
InstanceStorageSize This property is required. double
Storage size of the Cynosdb instance, unit in GB.
InstanceType This property is required. string
Instance type. ro for readonly instance, rw for read and write instance.
ClusterId This property is required. string
ID of the cluster.
CreateTime This property is required. string
Creation time of the CynosDB instance.
InstanceCpuCore This property is required. float64
InstanceId This property is required. string
ID of the Cynosdb instance to be queried.
InstanceMemorySize This property is required. float64
InstanceName This property is required. string
Name of the Cynosdb instance to be queried.
InstanceStatus This property is required. string
Status of the Cynosdb instance.
InstanceStorageSize This property is required. float64
Storage size of the Cynosdb instance, unit in GB.
InstanceType This property is required. string
Instance type. ro for readonly instance, rw for read and write instance.
clusterId This property is required. String
ID of the cluster.
createTime This property is required. String
Creation time of the CynosDB instance.
instanceCpuCore This property is required. Double
instanceId This property is required. String
ID of the Cynosdb instance to be queried.
instanceMemorySize This property is required. Double
instanceName This property is required. String
Name of the Cynosdb instance to be queried.
instanceStatus This property is required. String
Status of the Cynosdb instance.
instanceStorageSize This property is required. Double
Storage size of the Cynosdb instance, unit in GB.
instanceType This property is required. String
Instance type. ro for readonly instance, rw for read and write instance.
clusterId This property is required. string
ID of the cluster.
createTime This property is required. string
Creation time of the CynosDB instance.
instanceCpuCore This property is required. number
instanceId This property is required. string
ID of the Cynosdb instance to be queried.
instanceMemorySize This property is required. number
instanceName This property is required. string
Name of the Cynosdb instance to be queried.
instanceStatus This property is required. string
Status of the Cynosdb instance.
instanceStorageSize This property is required. number
Storage size of the Cynosdb instance, unit in GB.
instanceType This property is required. string
Instance type. ro for readonly instance, rw for read and write instance.
cluster_id This property is required. str
ID of the cluster.
create_time This property is required. str
Creation time of the CynosDB instance.
instance_cpu_core This property is required. float
instance_id This property is required. str
ID of the Cynosdb instance to be queried.
instance_memory_size This property is required. float
instance_name This property is required. str
Name of the Cynosdb instance to be queried.
instance_status This property is required. str
Status of the Cynosdb instance.
instance_storage_size This property is required. float
Storage size of the Cynosdb instance, unit in GB.
instance_type This property is required. str
Instance type. ro for readonly instance, rw for read and write instance.
clusterId This property is required. String
ID of the cluster.
createTime This property is required. String
Creation time of the CynosDB instance.
instanceCpuCore This property is required. Number
instanceId This property is required. String
ID of the Cynosdb instance to be queried.
instanceMemorySize This property is required. Number
instanceName This property is required. String
Name of the Cynosdb instance to be queried.
instanceStatus This property is required. String
Status of the Cynosdb instance.
instanceStorageSize This property is required. Number
Storage size of the Cynosdb instance, unit in GB.
instanceType This property is required. String
Instance type. ro for readonly instance, rw for read and write instance.

Package Details

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