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

tencentcloud.getCynosdbInstances

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 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,
    });
    
    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)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          function: tencentcloud:getCynosdbInstances
          arguments:
            dbType: MYSQL
            instanceId: cynosdbmysql-ins-0wln9u6w
            instanceName: test
            projectId: 0
    

    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>
    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]
    func GetCynosdbInstances(ctx *Context, args *GetCynosdbInstancesArgs, opts ...InvokeOption) (*GetCynosdbInstancesResult, error)
    func GetCynosdbInstancesOutput(ctx *Context, args *GetCynosdbInstancesOutputArgs, opts ...InvokeOption) GetCynosdbInstancesResultOutput

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

    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 string
    ID of the cluster.
    CreateTime string
    Creation time of the CynosDB instance.
    InstanceCpuCore double
    InstanceId string
    ID of the Cynosdb instance to be queried.
    InstanceMemorySize double
    InstanceName string
    Name of the Cynosdb instance to be queried.
    InstanceStatus string
    Status of the Cynosdb instance.
    InstanceStorageSize double
    Storage size of the Cynosdb instance, unit in GB.
    InstanceType string
    Instance type. ro for readonly instance, rw for read and write instance.
    ClusterId string
    ID of the cluster.
    CreateTime string
    Creation time of the CynosDB instance.
    InstanceCpuCore float64
    InstanceId string
    ID of the Cynosdb instance to be queried.
    InstanceMemorySize float64
    InstanceName string
    Name of the Cynosdb instance to be queried.
    InstanceStatus string
    Status of the Cynosdb instance.
    InstanceStorageSize float64
    Storage size of the Cynosdb instance, unit in GB.
    InstanceType string
    Instance type. ro for readonly instance, rw for read and write instance.
    clusterId String
    ID of the cluster.
    createTime String
    Creation time of the CynosDB instance.
    instanceCpuCore Double
    instanceId String
    ID of the Cynosdb instance to be queried.
    instanceMemorySize Double
    instanceName String
    Name of the Cynosdb instance to be queried.
    instanceStatus String
    Status of the Cynosdb instance.
    instanceStorageSize Double
    Storage size of the Cynosdb instance, unit in GB.
    instanceType String
    Instance type. ro for readonly instance, rw for read and write instance.
    clusterId string
    ID of the cluster.
    createTime string
    Creation time of the CynosDB instance.
    instanceCpuCore number
    instanceId string
    ID of the Cynosdb instance to be queried.
    instanceMemorySize number
    instanceName string
    Name of the Cynosdb instance to be queried.
    instanceStatus string
    Status of the Cynosdb instance.
    instanceStorageSize number
    Storage size of the Cynosdb instance, unit in GB.
    instanceType string
    Instance type. ro for readonly instance, rw for read and write instance.
    cluster_id str
    ID of the cluster.
    create_time str
    Creation time of the CynosDB instance.
    instance_cpu_core float
    instance_id str
    ID of the Cynosdb instance to be queried.
    instance_memory_size float
    instance_name str
    Name of the Cynosdb instance to be queried.
    instance_status str
    Status of the Cynosdb instance.
    instance_storage_size float
    Storage size of the Cynosdb instance, unit in GB.
    instance_type str
    Instance type. ro for readonly instance, rw for read and write instance.
    clusterId String
    ID of the cluster.
    createTime String
    Creation time of the CynosDB instance.
    instanceCpuCore Number
    instanceId String
    ID of the Cynosdb instance to be queried.
    instanceMemorySize Number
    instanceName String
    Name of the Cynosdb instance to be queried.
    instanceStatus String
    Status of the Cynosdb instance.
    instanceStorageSize Number
    Storage size of the Cynosdb instance, unit in GB.
    instanceType 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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack