1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CynosdbCluster
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.CynosdbCluster

Explore with Pulumi AI

Provide a resource to create a CynosDB cluster.

Example Usage

Create a single availability zone NORMAL CynosDB cluster

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

const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-3";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
    availabilityZone: availabilityZone,
    vpcId: vpc.vpcId,
    cidrBlock: "10.0.20.0/28",
    isMulticast: false,
});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
    description: "sg desc.",
    projectId: 0,
    tags: {
        example: "test",
    },
});
// create cynosdb cluster
const exampleCynosdbCluster = new tencentcloud.CynosdbCluster("exampleCynosdbCluster", {
    availableZone: availabilityZone,
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
    dbMode: "NORMAL",
    dbType: "MYSQL",
    dbVersion: "5.7",
    port: 3306,
    clusterName: "tf-example",
    password: "cynosDB@123",
    instanceMaintainDuration: 7200,
    instanceMaintainStartTime: 10800,
    instanceCpuCore: 2,
    instanceMemorySize: 4,
    forceDelete: false,
    instanceMaintainWeekdays: [
        "Fri",
        "Mon",
        "Sat",
        "Sun",
        "Thu",
        "Wed",
        "Tue",
    ],
    paramItems: [
        {
            name: "character_set_server",
            currentValue: "utf8mb4",
        },
        {
            name: "lower_case_table_names",
            currentValue: "0",
        },
    ],
    rwGroupSgs: [exampleSecurityGroup.securityGroupId],
    roGroupSgs: [exampleSecurityGroup.securityGroupId],
    instanceInitInfos: [
        {
            cpu: 2,
            memory: 4,
            instanceType: "rw",
            instanceCount: 1,
            deviceType: "common",
        },
        {
            cpu: 2,
            memory: 4,
            instanceType: "ro",
            instanceCount: 1,
            deviceType: "exclusive",
        },
    ],
    tags: {
        createBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
    availability_zone = "ap-guangzhou-3"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
    availability_zone=availability_zone,
    vpc_id=vpc.vpc_id,
    cidr_block="10.0.20.0/28",
    is_multicast=False)
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
    description="sg desc.",
    project_id=0,
    tags={
        "example": "test",
    })
# create cynosdb cluster
example_cynosdb_cluster = tencentcloud.CynosdbCluster("exampleCynosdbCluster",
    available_zone=availability_zone,
    vpc_id=vpc.vpc_id,
    subnet_id=subnet.subnet_id,
    db_mode="NORMAL",
    db_type="MYSQL",
    db_version="5.7",
    port=3306,
    cluster_name="tf-example",
    password="cynosDB@123",
    instance_maintain_duration=7200,
    instance_maintain_start_time=10800,
    instance_cpu_core=2,
    instance_memory_size=4,
    force_delete=False,
    instance_maintain_weekdays=[
        "Fri",
        "Mon",
        "Sat",
        "Sun",
        "Thu",
        "Wed",
        "Tue",
    ],
    param_items=[
        {
            "name": "character_set_server",
            "current_value": "utf8mb4",
        },
        {
            "name": "lower_case_table_names",
            "current_value": "0",
        },
    ],
    rw_group_sgs=[example_security_group.security_group_id],
    ro_group_sgs=[example_security_group.security_group_id],
    instance_init_infos=[
        {
            "cpu": 2,
            "memory": 4,
            "instance_type": "rw",
            "instance_count": 1,
            "device_type": "common",
        },
        {
            "cpu": 2,
            "memory": 4,
            "instance_type": "ro",
            "instance_count": 1,
            "device_type": "exclusive",
        },
    ],
    tags={
        "createBy": "terraform",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		availabilityZone := "ap-guangzhou-3"
		if param := cfg.Get("availabilityZone"); param != "" {
			availabilityZone = param
		}
		// create vpc
		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		// create subnet
		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
			AvailabilityZone: pulumi.String(availabilityZone),
			VpcId:            vpc.VpcId,
			CidrBlock:        pulumi.String("10.0.20.0/28"),
			IsMulticast:      pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		// create security group
		exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
			Description: pulumi.String("sg desc."),
			ProjectId:   pulumi.Float64(0),
			Tags: pulumi.StringMap{
				"example": pulumi.String("test"),
			},
		})
		if err != nil {
			return err
		}
		// create cynosdb cluster
		_, err = tencentcloud.NewCynosdbCluster(ctx, "exampleCynosdbCluster", &tencentcloud.CynosdbClusterArgs{
			AvailableZone:             pulumi.String(availabilityZone),
			VpcId:                     vpc.VpcId,
			SubnetId:                  subnet.SubnetId,
			DbMode:                    pulumi.String("NORMAL"),
			DbType:                    pulumi.String("MYSQL"),
			DbVersion:                 pulumi.String("5.7"),
			Port:                      pulumi.Float64(3306),
			ClusterName:               pulumi.String("tf-example"),
			Password:                  pulumi.String("cynosDB@123"),
			InstanceMaintainDuration:  pulumi.Float64(7200),
			InstanceMaintainStartTime: pulumi.Float64(10800),
			InstanceCpuCore:           pulumi.Float64(2),
			InstanceMemorySize:        pulumi.Float64(4),
			ForceDelete:               pulumi.Bool(false),
			InstanceMaintainWeekdays: pulumi.StringArray{
				pulumi.String("Fri"),
				pulumi.String("Mon"),
				pulumi.String("Sat"),
				pulumi.String("Sun"),
				pulumi.String("Thu"),
				pulumi.String("Wed"),
				pulumi.String("Tue"),
			},
			ParamItems: tencentcloud.CynosdbClusterParamItemArray{
				&tencentcloud.CynosdbClusterParamItemArgs{
					Name:         pulumi.String("character_set_server"),
					CurrentValue: pulumi.String("utf8mb4"),
				},
				&tencentcloud.CynosdbClusterParamItemArgs{
					Name:         pulumi.String("lower_case_table_names"),
					CurrentValue: pulumi.String("0"),
				},
			},
			RwGroupSgs: pulumi.StringArray{
				exampleSecurityGroup.SecurityGroupId,
			},
			RoGroupSgs: pulumi.StringArray{
				exampleSecurityGroup.SecurityGroupId,
			},
			InstanceInitInfos: tencentcloud.CynosdbClusterInstanceInitInfoArray{
				&tencentcloud.CynosdbClusterInstanceInitInfoArgs{
					Cpu:           pulumi.Float64(2),
					Memory:        pulumi.Float64(4),
					InstanceType:  pulumi.String("rw"),
					InstanceCount: pulumi.Float64(1),
					DeviceType:    pulumi.String("common"),
				},
				&tencentcloud.CynosdbClusterInstanceInitInfoArgs{
					Cpu:           pulumi.Float64(2),
					Memory:        pulumi.Float64(4),
					InstanceType:  pulumi.String("ro"),
					InstanceCount: pulumi.Float64(1),
					DeviceType:    pulumi.String("exclusive"),
				},
			},
			Tags: pulumi.StringMap{
				"createBy": pulumi.String("terraform"),
			},
		})
		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 config = new Config();
    var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-3";
    // create vpc
    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    // create subnet
    var subnet = new Tencentcloud.Subnet("subnet", new()
    {
        AvailabilityZone = availabilityZone,
        VpcId = vpc.VpcId,
        CidrBlock = "10.0.20.0/28",
        IsMulticast = false,
    });

    // create security group
    var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
    {
        Description = "sg desc.",
        ProjectId = 0,
        Tags = 
        {
            { "example", "test" },
        },
    });

    // create cynosdb cluster
    var exampleCynosdbCluster = new Tencentcloud.CynosdbCluster("exampleCynosdbCluster", new()
    {
        AvailableZone = availabilityZone,
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
        DbMode = "NORMAL",
        DbType = "MYSQL",
        DbVersion = "5.7",
        Port = 3306,
        ClusterName = "tf-example",
        Password = "cynosDB@123",
        InstanceMaintainDuration = 7200,
        InstanceMaintainStartTime = 10800,
        InstanceCpuCore = 2,
        InstanceMemorySize = 4,
        ForceDelete = false,
        InstanceMaintainWeekdays = new[]
        {
            "Fri",
            "Mon",
            "Sat",
            "Sun",
            "Thu",
            "Wed",
            "Tue",
        },
        ParamItems = new[]
        {
            new Tencentcloud.Inputs.CynosdbClusterParamItemArgs
            {
                Name = "character_set_server",
                CurrentValue = "utf8mb4",
            },
            new Tencentcloud.Inputs.CynosdbClusterParamItemArgs
            {
                Name = "lower_case_table_names",
                CurrentValue = "0",
            },
        },
        RwGroupSgs = new[]
        {
            exampleSecurityGroup.SecurityGroupId,
        },
        RoGroupSgs = new[]
        {
            exampleSecurityGroup.SecurityGroupId,
        },
        InstanceInitInfos = new[]
        {
            new Tencentcloud.Inputs.CynosdbClusterInstanceInitInfoArgs
            {
                Cpu = 2,
                Memory = 4,
                InstanceType = "rw",
                InstanceCount = 1,
                DeviceType = "common",
            },
            new Tencentcloud.Inputs.CynosdbClusterInstanceInitInfoArgs
            {
                Cpu = 2,
                Memory = 4,
                InstanceType = "ro",
                InstanceCount = 1,
                DeviceType = "exclusive",
            },
        },
        Tags = 
        {
            { "createBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.CynosdbCluster;
import com.pulumi.tencentcloud.CynosdbClusterArgs;
import com.pulumi.tencentcloud.inputs.CynosdbClusterParamItemArgs;
import com.pulumi.tencentcloud.inputs.CynosdbClusterInstanceInitInfoArgs;
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 config = ctx.config();
        final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-3");
        // create vpc
        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        // create subnet
        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .availabilityZone(availabilityZone)
            .vpcId(vpc.vpcId())
            .cidrBlock("10.0.20.0/28")
            .isMulticast(false)
            .build());

        // create security group
        var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
            .description("sg desc.")
            .projectId(0)
            .tags(Map.of("example", "test"))
            .build());

        // create cynosdb cluster
        var exampleCynosdbCluster = new CynosdbCluster("exampleCynosdbCluster", CynosdbClusterArgs.builder()
            .availableZone(availabilityZone)
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .dbMode("NORMAL")
            .dbType("MYSQL")
            .dbVersion("5.7")
            .port(3306)
            .clusterName("tf-example")
            .password("cynosDB@123")
            .instanceMaintainDuration(7200)
            .instanceMaintainStartTime(10800)
            .instanceCpuCore(2)
            .instanceMemorySize(4)
            .forceDelete(false)
            .instanceMaintainWeekdays(            
                "Fri",
                "Mon",
                "Sat",
                "Sun",
                "Thu",
                "Wed",
                "Tue")
            .paramItems(            
                CynosdbClusterParamItemArgs.builder()
                    .name("character_set_server")
                    .currentValue("utf8mb4")
                    .build(),
                CynosdbClusterParamItemArgs.builder()
                    .name("lower_case_table_names")
                    .currentValue("0")
                    .build())
            .rwGroupSgs(exampleSecurityGroup.securityGroupId())
            .roGroupSgs(exampleSecurityGroup.securityGroupId())
            .instanceInitInfos(            
                CynosdbClusterInstanceInitInfoArgs.builder()
                    .cpu(2)
                    .memory(4)
                    .instanceType("rw")
                    .instanceCount(1)
                    .deviceType("common")
                    .build(),
                CynosdbClusterInstanceInitInfoArgs.builder()
                    .cpu(2)
                    .memory(4)
                    .instanceType("ro")
                    .instanceCount(1)
                    .deviceType("exclusive")
                    .build())
            .tags(Map.of("createBy", "terraform"))
            .build());

    }
}
Copy
configuration:
  availabilityZone:
    type: string
    default: ap-guangzhou-3
resources:
  # create vpc
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  # create subnet
  subnet:
    type: tencentcloud:Subnet
    properties:
      availabilityZone: ${availabilityZone}
      vpcId: ${vpc.vpcId}
      cidrBlock: 10.0.20.0/28
      isMulticast: false
  # create security group
  exampleSecurityGroup:
    type: tencentcloud:SecurityGroup
    properties:
      description: sg desc.
      projectId: 0
      tags:
        example: test
  # create cynosdb cluster
  exampleCynosdbCluster:
    type: tencentcloud:CynosdbCluster
    properties:
      availableZone: ${availabilityZone}
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
      dbMode: NORMAL
      dbType: MYSQL
      dbVersion: '5.7'
      port: 3306
      clusterName: tf-example
      password: cynosDB@123
      instanceMaintainDuration: 7200
      instanceMaintainStartTime: 10800
      instanceCpuCore: 2
      instanceMemorySize: 4
      forceDelete: false
      instanceMaintainWeekdays:
        - Fri
        - Mon
        - Sat
        - Sun
        - Thu
        - Wed
        - Tue
      paramItems:
        - name: character_set_server
          currentValue: utf8mb4
        - name: lower_case_table_names
          currentValue: '0'
      rwGroupSgs:
        - ${exampleSecurityGroup.securityGroupId}
      roGroupSgs:
        - ${exampleSecurityGroup.securityGroupId}
      instanceInitInfos:
        - cpu: 2
          memory: 4
          instanceType: rw
          instanceCount: 1
          deviceType: common
        - cpu: 2
          memory: 4
          instanceType: ro
          instanceCount: 1
          deviceType: exclusive
      tags:
        createBy: terraform
Copy

Create a multiple availability zone SERVERLESS CynosDB cluster

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

const config = new pulumi.Config();
const availabilityZone = config.get("availabilityZone") || "ap-guangzhou-4";
const slaveZone = config.get("slaveZone") || "ap-guangzhou-6";
// create vpc
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
// create subnet
const subnet = new tencentcloud.Subnet("subnet", {
    availabilityZone: availabilityZone,
    vpcId: vpc.vpcId,
    cidrBlock: "10.0.20.0/28",
    isMulticast: false,
});
// create security group
const exampleSecurityGroup = new tencentcloud.SecurityGroup("exampleSecurityGroup", {
    description: "sg desc.",
    projectId: 0,
    tags: {
        example: "test",
    },
});
// create param template
const exampleCynosdbParamTemplate = new tencentcloud.CynosdbParamTemplate("exampleCynosdbParamTemplate", {
    dbMode: "SERVERLESS",
    engineVersion: "8.0",
    templateName: "tf-example",
    templateDescription: "terraform-template",
    paramLists: [{
        currentValue: "-1",
        paramName: "optimizer_trace_offset",
    }],
});
// create cynosdb cluster
const exampleCynosdbCluster = new tencentcloud.CynosdbCluster("exampleCynosdbCluster", {
    availableZone: availabilityZone,
    slaveZone: slaveZone,
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
    dbMode: "SERVERLESS",
    dbType: "MYSQL",
    dbVersion: "8.0",
    port: 3306,
    clusterName: "tf-example",
    password: "cynosDB@123",
    instanceMaintainDuration: 7200,
    instanceMaintainStartTime: 10800,
    minCpu: 2,
    maxCpu: 4,
    paramTemplateId: exampleCynosdbParamTemplate.templateId,
    forceDelete: false,
    instanceMaintainWeekdays: [
        "Fri",
        "Mon",
        "Sat",
        "Sun",
        "Thu",
        "Wed",
        "Tue",
    ],
    rwGroupSgs: [exampleSecurityGroup.securityGroupId],
    roGroupSgs: [exampleSecurityGroup.securityGroupId],
    tags: {
        createBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

config = pulumi.Config()
availability_zone = config.get("availabilityZone")
if availability_zone is None:
    availability_zone = "ap-guangzhou-4"
slave_zone = config.get("slaveZone")
if slave_zone is None:
    slave_zone = "ap-guangzhou-6"
# create vpc
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
# create subnet
subnet = tencentcloud.Subnet("subnet",
    availability_zone=availability_zone,
    vpc_id=vpc.vpc_id,
    cidr_block="10.0.20.0/28",
    is_multicast=False)
# create security group
example_security_group = tencentcloud.SecurityGroup("exampleSecurityGroup",
    description="sg desc.",
    project_id=0,
    tags={
        "example": "test",
    })
# create param template
example_cynosdb_param_template = tencentcloud.CynosdbParamTemplate("exampleCynosdbParamTemplate",
    db_mode="SERVERLESS",
    engine_version="8.0",
    template_name="tf-example",
    template_description="terraform-template",
    param_lists=[{
        "current_value": "-1",
        "param_name": "optimizer_trace_offset",
    }])
# create cynosdb cluster
example_cynosdb_cluster = tencentcloud.CynosdbCluster("exampleCynosdbCluster",
    available_zone=availability_zone,
    slave_zone=slave_zone,
    vpc_id=vpc.vpc_id,
    subnet_id=subnet.subnet_id,
    db_mode="SERVERLESS",
    db_type="MYSQL",
    db_version="8.0",
    port=3306,
    cluster_name="tf-example",
    password="cynosDB@123",
    instance_maintain_duration=7200,
    instance_maintain_start_time=10800,
    min_cpu=2,
    max_cpu=4,
    param_template_id=example_cynosdb_param_template.template_id,
    force_delete=False,
    instance_maintain_weekdays=[
        "Fri",
        "Mon",
        "Sat",
        "Sun",
        "Thu",
        "Wed",
        "Tue",
    ],
    rw_group_sgs=[example_security_group.security_group_id],
    ro_group_sgs=[example_security_group.security_group_id],
    tags={
        "createBy": "terraform",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		availabilityZone := "ap-guangzhou-4"
		if param := cfg.Get("availabilityZone"); param != "" {
			availabilityZone = param
		}
		slaveZone := "ap-guangzhou-6"
		if param := cfg.Get("slaveZone"); param != "" {
			slaveZone = param
		}
		// create vpc
		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		// create subnet
		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
			AvailabilityZone: pulumi.String(availabilityZone),
			VpcId:            vpc.VpcId,
			CidrBlock:        pulumi.String("10.0.20.0/28"),
			IsMulticast:      pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		// create security group
		exampleSecurityGroup, err := tencentcloud.NewSecurityGroup(ctx, "exampleSecurityGroup", &tencentcloud.SecurityGroupArgs{
			Description: pulumi.String("sg desc."),
			ProjectId:   pulumi.Float64(0),
			Tags: pulumi.StringMap{
				"example": pulumi.String("test"),
			},
		})
		if err != nil {
			return err
		}
		// create param template
		exampleCynosdbParamTemplate, err := tencentcloud.NewCynosdbParamTemplate(ctx, "exampleCynosdbParamTemplate", &tencentcloud.CynosdbParamTemplateArgs{
			DbMode:              pulumi.String("SERVERLESS"),
			EngineVersion:       pulumi.String("8.0"),
			TemplateName:        pulumi.String("tf-example"),
			TemplateDescription: pulumi.String("terraform-template"),
			ParamLists: tencentcloud.CynosdbParamTemplateParamListArray{
				&tencentcloud.CynosdbParamTemplateParamListArgs{
					CurrentValue: pulumi.String("-1"),
					ParamName:    pulumi.String("optimizer_trace_offset"),
				},
			},
		})
		if err != nil {
			return err
		}
		// create cynosdb cluster
		_, err = tencentcloud.NewCynosdbCluster(ctx, "exampleCynosdbCluster", &tencentcloud.CynosdbClusterArgs{
			AvailableZone:             pulumi.String(availabilityZone),
			SlaveZone:                 pulumi.String(slaveZone),
			VpcId:                     vpc.VpcId,
			SubnetId:                  subnet.SubnetId,
			DbMode:                    pulumi.String("SERVERLESS"),
			DbType:                    pulumi.String("MYSQL"),
			DbVersion:                 pulumi.String("8.0"),
			Port:                      pulumi.Float64(3306),
			ClusterName:               pulumi.String("tf-example"),
			Password:                  pulumi.String("cynosDB@123"),
			InstanceMaintainDuration:  pulumi.Float64(7200),
			InstanceMaintainStartTime: pulumi.Float64(10800),
			MinCpu:                    pulumi.Float64(2),
			MaxCpu:                    pulumi.Float64(4),
			ParamTemplateId:           exampleCynosdbParamTemplate.TemplateId,
			ForceDelete:               pulumi.Bool(false),
			InstanceMaintainWeekdays: pulumi.StringArray{
				pulumi.String("Fri"),
				pulumi.String("Mon"),
				pulumi.String("Sat"),
				pulumi.String("Sun"),
				pulumi.String("Thu"),
				pulumi.String("Wed"),
				pulumi.String("Tue"),
			},
			RwGroupSgs: pulumi.StringArray{
				exampleSecurityGroup.SecurityGroupId,
			},
			RoGroupSgs: pulumi.StringArray{
				exampleSecurityGroup.SecurityGroupId,
			},
			Tags: pulumi.StringMap{
				"createBy": pulumi.String("terraform"),
			},
		})
		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 config = new Config();
    var availabilityZone = config.Get("availabilityZone") ?? "ap-guangzhou-4";
    var slaveZone = config.Get("slaveZone") ?? "ap-guangzhou-6";
    // create vpc
    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    // create subnet
    var subnet = new Tencentcloud.Subnet("subnet", new()
    {
        AvailabilityZone = availabilityZone,
        VpcId = vpc.VpcId,
        CidrBlock = "10.0.20.0/28",
        IsMulticast = false,
    });

    // create security group
    var exampleSecurityGroup = new Tencentcloud.SecurityGroup("exampleSecurityGroup", new()
    {
        Description = "sg desc.",
        ProjectId = 0,
        Tags = 
        {
            { "example", "test" },
        },
    });

    // create param template
    var exampleCynosdbParamTemplate = new Tencentcloud.CynosdbParamTemplate("exampleCynosdbParamTemplate", new()
    {
        DbMode = "SERVERLESS",
        EngineVersion = "8.0",
        TemplateName = "tf-example",
        TemplateDescription = "terraform-template",
        ParamLists = new[]
        {
            new Tencentcloud.Inputs.CynosdbParamTemplateParamListArgs
            {
                CurrentValue = "-1",
                ParamName = "optimizer_trace_offset",
            },
        },
    });

    // create cynosdb cluster
    var exampleCynosdbCluster = new Tencentcloud.CynosdbCluster("exampleCynosdbCluster", new()
    {
        AvailableZone = availabilityZone,
        SlaveZone = slaveZone,
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
        DbMode = "SERVERLESS",
        DbType = "MYSQL",
        DbVersion = "8.0",
        Port = 3306,
        ClusterName = "tf-example",
        Password = "cynosDB@123",
        InstanceMaintainDuration = 7200,
        InstanceMaintainStartTime = 10800,
        MinCpu = 2,
        MaxCpu = 4,
        ParamTemplateId = exampleCynosdbParamTemplate.TemplateId,
        ForceDelete = false,
        InstanceMaintainWeekdays = new[]
        {
            "Fri",
            "Mon",
            "Sat",
            "Sun",
            "Thu",
            "Wed",
            "Tue",
        },
        RwGroupSgs = new[]
        {
            exampleSecurityGroup.SecurityGroupId,
        },
        RoGroupSgs = new[]
        {
            exampleSecurityGroup.SecurityGroupId,
        },
        Tags = 
        {
            { "createBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.SecurityGroup;
import com.pulumi.tencentcloud.SecurityGroupArgs;
import com.pulumi.tencentcloud.CynosdbParamTemplate;
import com.pulumi.tencentcloud.CynosdbParamTemplateArgs;
import com.pulumi.tencentcloud.inputs.CynosdbParamTemplateParamListArgs;
import com.pulumi.tencentcloud.CynosdbCluster;
import com.pulumi.tencentcloud.CynosdbClusterArgs;
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 config = ctx.config();
        final var availabilityZone = config.get("availabilityZone").orElse("ap-guangzhou-4");
        final var slaveZone = config.get("slaveZone").orElse("ap-guangzhou-6");
        // create vpc
        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        // create subnet
        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .availabilityZone(availabilityZone)
            .vpcId(vpc.vpcId())
            .cidrBlock("10.0.20.0/28")
            .isMulticast(false)
            .build());

        // create security group
        var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
            .description("sg desc.")
            .projectId(0)
            .tags(Map.of("example", "test"))
            .build());

        // create param template
        var exampleCynosdbParamTemplate = new CynosdbParamTemplate("exampleCynosdbParamTemplate", CynosdbParamTemplateArgs.builder()
            .dbMode("SERVERLESS")
            .engineVersion("8.0")
            .templateName("tf-example")
            .templateDescription("terraform-template")
            .paramLists(CynosdbParamTemplateParamListArgs.builder()
                .currentValue("-1")
                .paramName("optimizer_trace_offset")
                .build())
            .build());

        // create cynosdb cluster
        var exampleCynosdbCluster = new CynosdbCluster("exampleCynosdbCluster", CynosdbClusterArgs.builder()
            .availableZone(availabilityZone)
            .slaveZone(slaveZone)
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .dbMode("SERVERLESS")
            .dbType("MYSQL")
            .dbVersion("8.0")
            .port(3306)
            .clusterName("tf-example")
            .password("cynosDB@123")
            .instanceMaintainDuration(7200)
            .instanceMaintainStartTime(10800)
            .minCpu(2)
            .maxCpu(4)
            .paramTemplateId(exampleCynosdbParamTemplate.templateId())
            .forceDelete(false)
            .instanceMaintainWeekdays(            
                "Fri",
                "Mon",
                "Sat",
                "Sun",
                "Thu",
                "Wed",
                "Tue")
            .rwGroupSgs(exampleSecurityGroup.securityGroupId())
            .roGroupSgs(exampleSecurityGroup.securityGroupId())
            .tags(Map.of("createBy", "terraform"))
            .build());

    }
}
Copy
configuration:
  availabilityZone:
    type: string
    default: ap-guangzhou-4
  slaveZone:
    type: string
    default: ap-guangzhou-6
resources:
  # create vpc
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  # create subnet
  subnet:
    type: tencentcloud:Subnet
    properties:
      availabilityZone: ${availabilityZone}
      vpcId: ${vpc.vpcId}
      cidrBlock: 10.0.20.0/28
      isMulticast: false
  # create security group
  exampleSecurityGroup:
    type: tencentcloud:SecurityGroup
    properties:
      description: sg desc.
      projectId: 0
      tags:
        example: test
  # create param template
  exampleCynosdbParamTemplate:
    type: tencentcloud:CynosdbParamTemplate
    properties:
      dbMode: SERVERLESS
      engineVersion: '8.0'
      templateName: tf-example
      templateDescription: terraform-template
      paramLists:
        - currentValue: '-1'
          paramName: optimizer_trace_offset
  # create cynosdb cluster
  exampleCynosdbCluster:
    type: tencentcloud:CynosdbCluster
    properties:
      availableZone: ${availabilityZone}
      slaveZone: ${slaveZone}
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
      dbMode: SERVERLESS
      dbType: MYSQL
      dbVersion: '8.0'
      port: 3306
      clusterName: tf-example
      password: cynosDB@123
      instanceMaintainDuration: 7200
      instanceMaintainStartTime: 10800
      minCpu: 2
      maxCpu: 4
      paramTemplateId: ${exampleCynosdbParamTemplate.templateId}
      forceDelete: false
      instanceMaintainWeekdays:
        - Fri
        - Mon
        - Sat
        - Sun
        - Thu
        - Wed
        - Tue
      rwGroupSgs:
        - ${exampleSecurityGroup.securityGroupId}
      roGroupSgs:
        - ${exampleSecurityGroup.securityGroupId}
      tags:
        createBy: terraform
Copy

Create CynosdbCluster Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CynosdbCluster(name: string, args: CynosdbClusterArgs, opts?: CustomResourceOptions);
@overload
def CynosdbCluster(resource_name: str,
                   args: CynosdbClusterArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def CynosdbCluster(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   db_type: Optional[str] = None,
                   vpc_id: Optional[str] = None,
                   subnet_id: Optional[str] = None,
                   available_zone: Optional[str] = None,
                   password: Optional[str] = None,
                   cluster_name: Optional[str] = None,
                   db_version: Optional[str] = None,
                   max_cpu: Optional[float] = None,
                   param_template_id: Optional[float] = None,
                   cynosdb_cluster_id: Optional[str] = None,
                   cynos_version: Optional[str] = None,
                   force_delete: Optional[bool] = None,
                   instance_cpu_core: Optional[float] = None,
                   instance_init_infos: Optional[Sequence[CynosdbClusterInstanceInitInfoArgs]] = None,
                   instance_maintain_duration: Optional[float] = None,
                   instance_maintain_start_time: Optional[float] = None,
                   instance_maintain_weekdays: Optional[Sequence[str]] = None,
                   instance_memory_size: Optional[float] = None,
                   auto_pause: Optional[str] = None,
                   min_cpu: Optional[float] = None,
                   old_ip_reserve_hours: Optional[float] = None,
                   param_items: Optional[Sequence[CynosdbClusterParamItemArgs]] = None,
                   db_mode: Optional[str] = None,
                   charge_type: Optional[str] = None,
                   port: Optional[float] = None,
                   prarm_template_id: Optional[float] = None,
                   prepaid_period: Optional[float] = None,
                   project_id: Optional[float] = None,
                   ro_group_sgs: Optional[Sequence[str]] = None,
                   rw_group_sgs: Optional[Sequence[str]] = None,
                   serverless_status_flag: Optional[str] = None,
                   slave_zone: Optional[str] = None,
                   storage_limit: Optional[float] = None,
                   storage_pay_mode: Optional[float] = None,
                   auto_renew_flag: Optional[float] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   auto_pause_delay: Optional[float] = None)
func NewCynosdbCluster(ctx *Context, name string, args CynosdbClusterArgs, opts ...ResourceOption) (*CynosdbCluster, error)
public CynosdbCluster(string name, CynosdbClusterArgs args, CustomResourceOptions? opts = null)
public CynosdbCluster(String name, CynosdbClusterArgs args)
public CynosdbCluster(String name, CynosdbClusterArgs args, CustomResourceOptions options)
type: tencentcloud:CynosdbCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CynosdbClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CynosdbClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CynosdbClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CynosdbClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CynosdbClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CynosdbCluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CynosdbCluster resource accepts the following input properties:

AvailableZone This property is required. string
The available zone of the CynosDB Cluster.
ClusterName This property is required. string
Name of CynosDB cluster.
DbType This property is required. string
Type of CynosDB, and available values include MYSQL.
DbVersion This property is required. string
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
Password This property is required. string
Password of root account.
SubnetId This property is required. string
ID of the subnet within this VPC.
VpcId This property is required. string
ID of the VPC.
AutoPause string
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
AutoPauseDelay double
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
AutoRenewFlag double
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. Only works for PREPAID cluster.
ChargeType string
The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
CynosVersion string
Kernel version, you can enter it when modifying.
CynosdbClusterId string
ID of the resource.
DbMode string
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
ForceDelete bool
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
InstanceCpuCore double
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
InstanceInitInfos List<CynosdbClusterInstanceInitInfo>
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
InstanceMaintainDuration double
Duration time for maintenance, unit in second. 3600 by default.
InstanceMaintainStartTime double
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
InstanceMaintainWeekdays List<string>
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
InstanceMemorySize double
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
MaxCpu double
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
MinCpu double
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
OldIpReserveHours double
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
ParamItems List<CynosdbClusterParamItem>
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
ParamTemplateId double
The ID of the parameter template.
Port double
Port of CynosDB cluster.
PrarmTemplateId double
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

PrepaidPeriod double
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
ProjectId double
ID of the project. 0 by default.
RoGroupSgs List<string>
IDs of security group for ro_group.
RwGroupSgs List<string>
IDs of security group for rw_group.
ServerlessStatusFlag string
Specify whether to pause or resume serverless cluster. values: resume, pause.
SlaveZone string
Multi zone Addresses of the CynosDB Cluster.
StorageLimit double
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
StoragePayMode double
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
Tags Dictionary<string, string>
The tags of the CynosDB cluster.
AvailableZone This property is required. string
The available zone of the CynosDB Cluster.
ClusterName This property is required. string
Name of CynosDB cluster.
DbType This property is required. string
Type of CynosDB, and available values include MYSQL.
DbVersion This property is required. string
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
Password This property is required. string
Password of root account.
SubnetId This property is required. string
ID of the subnet within this VPC.
VpcId This property is required. string
ID of the VPC.
AutoPause string
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
AutoPauseDelay float64
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
AutoRenewFlag float64
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. Only works for PREPAID cluster.
ChargeType string
The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
CynosVersion string
Kernel version, you can enter it when modifying.
CynosdbClusterId string
ID of the resource.
DbMode string
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
ForceDelete bool
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
InstanceCpuCore float64
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
InstanceInitInfos []CynosdbClusterInstanceInitInfoArgs
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
InstanceMaintainDuration float64
Duration time for maintenance, unit in second. 3600 by default.
InstanceMaintainStartTime float64
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
InstanceMaintainWeekdays []string
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
InstanceMemorySize float64
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
MaxCpu float64
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
MinCpu float64
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
OldIpReserveHours float64
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
ParamItems []CynosdbClusterParamItemArgs
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
ParamTemplateId float64
The ID of the parameter template.
Port float64
Port of CynosDB cluster.
PrarmTemplateId float64
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

PrepaidPeriod float64
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
ProjectId float64
ID of the project. 0 by default.
RoGroupSgs []string
IDs of security group for ro_group.
RwGroupSgs []string
IDs of security group for rw_group.
ServerlessStatusFlag string
Specify whether to pause or resume serverless cluster. values: resume, pause.
SlaveZone string
Multi zone Addresses of the CynosDB Cluster.
StorageLimit float64
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
StoragePayMode float64
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
Tags map[string]string
The tags of the CynosDB cluster.
availableZone This property is required. String
The available zone of the CynosDB Cluster.
clusterName This property is required. String
Name of CynosDB cluster.
dbType This property is required. String
Type of CynosDB, and available values include MYSQL.
dbVersion This property is required. String
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
password This property is required. String
Password of root account.
subnetId This property is required. String
ID of the subnet within this VPC.
vpcId This property is required. String
ID of the VPC.
autoPause String
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
autoPauseDelay Double
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
autoRenewFlag Double
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. Only works for PREPAID cluster.
chargeType String
The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
cynosVersion String
Kernel version, you can enter it when modifying.
cynosdbClusterId String
ID of the resource.
dbMode String
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
forceDelete Boolean
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instanceCpuCore Double
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceInitInfos List<CynosdbClusterInstanceInitInfo>
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instanceMaintainDuration Double
Duration time for maintenance, unit in second. 3600 by default.
instanceMaintainStartTime Double
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instanceMaintainWeekdays List<String>
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instanceMemorySize Double
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
maxCpu Double
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
minCpu Double
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
oldIpReserveHours Double
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
paramItems List<CynosdbClusterParamItem>
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
paramTemplateId Double
The ID of the parameter template.
port Double
Port of CynosDB cluster.
prarmTemplateId Double
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaidPeriod Double
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
projectId Double
ID of the project. 0 by default.
roGroupSgs List<String>
IDs of security group for ro_group.
rwGroupSgs List<String>
IDs of security group for rw_group.
serverlessStatusFlag String
Specify whether to pause or resume serverless cluster. values: resume, pause.
slaveZone String
Multi zone Addresses of the CynosDB Cluster.
storageLimit Double
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storagePayMode Double
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
tags Map<String,String>
The tags of the CynosDB cluster.
availableZone This property is required. string
The available zone of the CynosDB Cluster.
clusterName This property is required. string
Name of CynosDB cluster.
dbType This property is required. string
Type of CynosDB, and available values include MYSQL.
dbVersion This property is required. string
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
password This property is required. string
Password of root account.
subnetId This property is required. string
ID of the subnet within this VPC.
vpcId This property is required. string
ID of the VPC.
autoPause string
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
autoPauseDelay number
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
autoRenewFlag number
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. Only works for PREPAID cluster.
chargeType string
The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
cynosVersion string
Kernel version, you can enter it when modifying.
cynosdbClusterId string
ID of the resource.
dbMode string
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
forceDelete boolean
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instanceCpuCore number
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceInitInfos CynosdbClusterInstanceInitInfo[]
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instanceMaintainDuration number
Duration time for maintenance, unit in second. 3600 by default.
instanceMaintainStartTime number
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instanceMaintainWeekdays string[]
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instanceMemorySize number
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
maxCpu number
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
minCpu number
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
oldIpReserveHours number
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
paramItems CynosdbClusterParamItem[]
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
paramTemplateId number
The ID of the parameter template.
port number
Port of CynosDB cluster.
prarmTemplateId number
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaidPeriod number
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
projectId number
ID of the project. 0 by default.
roGroupSgs string[]
IDs of security group for ro_group.
rwGroupSgs string[]
IDs of security group for rw_group.
serverlessStatusFlag string
Specify whether to pause or resume serverless cluster. values: resume, pause.
slaveZone string
Multi zone Addresses of the CynosDB Cluster.
storageLimit number
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storagePayMode number
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
tags {[key: string]: string}
The tags of the CynosDB cluster.
available_zone This property is required. str
The available zone of the CynosDB Cluster.
cluster_name This property is required. str
Name of CynosDB cluster.
db_type This property is required. str
Type of CynosDB, and available values include MYSQL.
db_version This property is required. str
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
password This property is required. str
Password of root account.
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.
auto_pause str
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
auto_pause_delay float
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
auto_renew_flag float
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. Only works for PREPAID cluster.
charge_type str
The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
cynos_version str
Kernel version, you can enter it when modifying.
cynosdb_cluster_id str
ID of the resource.
db_mode str
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
force_delete bool
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instance_cpu_core float
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instance_init_infos Sequence[CynosdbClusterInstanceInitInfoArgs]
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instance_maintain_duration float
Duration time for maintenance, unit in second. 3600 by default.
instance_maintain_start_time float
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instance_maintain_weekdays Sequence[str]
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instance_memory_size float
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
max_cpu float
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
min_cpu float
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
old_ip_reserve_hours float
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
param_items Sequence[CynosdbClusterParamItemArgs]
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
param_template_id float
The ID of the parameter template.
port float
Port of CynosDB cluster.
prarm_template_id float
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaid_period float
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
project_id float
ID of the project. 0 by default.
ro_group_sgs Sequence[str]
IDs of security group for ro_group.
rw_group_sgs Sequence[str]
IDs of security group for rw_group.
serverless_status_flag str
Specify whether to pause or resume serverless cluster. values: resume, pause.
slave_zone str
Multi zone Addresses of the CynosDB Cluster.
storage_limit float
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storage_pay_mode float
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
tags Mapping[str, str]
The tags of the CynosDB cluster.
availableZone This property is required. String
The available zone of the CynosDB Cluster.
clusterName This property is required. String
Name of CynosDB cluster.
dbType This property is required. String
Type of CynosDB, and available values include MYSQL.
dbVersion This property is required. String
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
password This property is required. String
Password of root account.
subnetId This property is required. String
ID of the subnet within this VPC.
vpcId This property is required. String
ID of the VPC.
autoPause String
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
autoPauseDelay Number
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
autoRenewFlag Number
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. Only works for PREPAID cluster.
chargeType String
The charge type of instance. Valid values are PREPAID and POSTPAID_BY_HOUR. Default value is POSTPAID_BY_HOUR.
cynosVersion String
Kernel version, you can enter it when modifying.
cynosdbClusterId String
ID of the resource.
dbMode String
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
forceDelete Boolean
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instanceCpuCore Number
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceInitInfos List<Property Map>
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instanceMaintainDuration Number
Duration time for maintenance, unit in second. 3600 by default.
instanceMaintainStartTime Number
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instanceMaintainWeekdays List<String>
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instanceMemorySize Number
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
maxCpu Number
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
minCpu Number
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
oldIpReserveHours Number
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
paramItems List<Property Map>
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
paramTemplateId Number
The ID of the parameter template.
port Number
Port of CynosDB cluster.
prarmTemplateId Number
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaidPeriod Number
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
projectId Number
ID of the project. 0 by default.
roGroupSgs List<String>
IDs of security group for ro_group.
rwGroupSgs List<String>
IDs of security group for rw_group.
serverlessStatusFlag String
Specify whether to pause or resume serverless cluster. values: resume, pause.
slaveZone String
Multi zone Addresses of the CynosDB Cluster.
storageLimit Number
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storagePayMode Number
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
tags Map<String>
The tags of the CynosDB cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the CynosdbCluster resource produces the following output properties:

Charset string
Charset used by CynosDB cluster.
ClusterStatus string
Status of the Cynosdb cluster.
CreateTime string
Creation time of the CynosDB cluster.
Id string
The provider-assigned unique ID for this managed resource.
InstanceId string
ID of instance.
InstanceName string
Name of instance.
InstanceStatus string
Status of the instance.
InstanceStorageSize double
Storage size of the instance, unit in GB.
RoGroupAddrs List<CynosdbClusterRoGroupAddr>
Readonly addresses. Each element contains the following attributes:
RoGroupId string
ID of read-only instance group.
RoGroupInstances List<CynosdbClusterRoGroupInstance>
List of instances in the read-only instance group.
RwGroupAddrs List<CynosdbClusterRwGroupAddr>
Read-write addresses. Each element contains the following attributes:
RwGroupId string
ID of read-write instance group.
RwGroupInstances List<CynosdbClusterRwGroupInstance>
List of instances in the read-write instance group.
ServerlessStatus string
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
StorageUsed double
Used storage of CynosDB cluster, unit in MB.
Charset string
Charset used by CynosDB cluster.
ClusterStatus string
Status of the Cynosdb cluster.
CreateTime string
Creation time of the CynosDB cluster.
Id string
The provider-assigned unique ID for this managed resource.
InstanceId string
ID of instance.
InstanceName string
Name of instance.
InstanceStatus string
Status of the instance.
InstanceStorageSize float64
Storage size of the instance, unit in GB.
RoGroupAddrs []CynosdbClusterRoGroupAddr
Readonly addresses. Each element contains the following attributes:
RoGroupId string
ID of read-only instance group.
RoGroupInstances []CynosdbClusterRoGroupInstance
List of instances in the read-only instance group.
RwGroupAddrs []CynosdbClusterRwGroupAddr
Read-write addresses. Each element contains the following attributes:
RwGroupId string
ID of read-write instance group.
RwGroupInstances []CynosdbClusterRwGroupInstance
List of instances in the read-write instance group.
ServerlessStatus string
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
StorageUsed float64
Used storage of CynosDB cluster, unit in MB.
charset String
Charset used by CynosDB cluster.
clusterStatus String
Status of the Cynosdb cluster.
createTime String
Creation time of the CynosDB cluster.
id String
The provider-assigned unique ID for this managed resource.
instanceId String
ID of instance.
instanceName String
Name of instance.
instanceStatus String
Status of the instance.
instanceStorageSize Double
Storage size of the instance, unit in GB.
roGroupAddrs List<CynosdbClusterRoGroupAddr>
Readonly addresses. Each element contains the following attributes:
roGroupId String
ID of read-only instance group.
roGroupInstances List<CynosdbClusterRoGroupInstance>
List of instances in the read-only instance group.
rwGroupAddrs List<CynosdbClusterRwGroupAddr>
Read-write addresses. Each element contains the following attributes:
rwGroupId String
ID of read-write instance group.
rwGroupInstances List<CynosdbClusterRwGroupInstance>
List of instances in the read-write instance group.
serverlessStatus String
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
storageUsed Double
Used storage of CynosDB cluster, unit in MB.
charset string
Charset used by CynosDB cluster.
clusterStatus string
Status of the Cynosdb cluster.
createTime string
Creation time of the CynosDB cluster.
id string
The provider-assigned unique ID for this managed resource.
instanceId string
ID of instance.
instanceName string
Name of instance.
instanceStatus string
Status of the instance.
instanceStorageSize number
Storage size of the instance, unit in GB.
roGroupAddrs CynosdbClusterRoGroupAddr[]
Readonly addresses. Each element contains the following attributes:
roGroupId string
ID of read-only instance group.
roGroupInstances CynosdbClusterRoGroupInstance[]
List of instances in the read-only instance group.
rwGroupAddrs CynosdbClusterRwGroupAddr[]
Read-write addresses. Each element contains the following attributes:
rwGroupId string
ID of read-write instance group.
rwGroupInstances CynosdbClusterRwGroupInstance[]
List of instances in the read-write instance group.
serverlessStatus string
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
storageUsed number
Used storage of CynosDB cluster, unit in MB.
charset str
Charset used by CynosDB cluster.
cluster_status str
Status of the Cynosdb cluster.
create_time str
Creation time of the CynosDB cluster.
id str
The provider-assigned unique ID for this managed resource.
instance_id str
ID of instance.
instance_name str
Name of instance.
instance_status str
Status of the instance.
instance_storage_size float
Storage size of the instance, unit in GB.
ro_group_addrs Sequence[CynosdbClusterRoGroupAddr]
Readonly addresses. Each element contains the following attributes:
ro_group_id str
ID of read-only instance group.
ro_group_instances Sequence[CynosdbClusterRoGroupInstance]
List of instances in the read-only instance group.
rw_group_addrs Sequence[CynosdbClusterRwGroupAddr]
Read-write addresses. Each element contains the following attributes:
rw_group_id str
ID of read-write instance group.
rw_group_instances Sequence[CynosdbClusterRwGroupInstance]
List of instances in the read-write instance group.
serverless_status str
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
storage_used float
Used storage of CynosDB cluster, unit in MB.
charset String
Charset used by CynosDB cluster.
clusterStatus String
Status of the Cynosdb cluster.
createTime String
Creation time of the CynosDB cluster.
id String
The provider-assigned unique ID for this managed resource.
instanceId String
ID of instance.
instanceName String
Name of instance.
instanceStatus String
Status of the instance.
instanceStorageSize Number
Storage size of the instance, unit in GB.
roGroupAddrs List<Property Map>
Readonly addresses. Each element contains the following attributes:
roGroupId String
ID of read-only instance group.
roGroupInstances List<Property Map>
List of instances in the read-only instance group.
rwGroupAddrs List<Property Map>
Read-write addresses. Each element contains the following attributes:
rwGroupId String
ID of read-write instance group.
rwGroupInstances List<Property Map>
List of instances in the read-write instance group.
serverlessStatus String
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
storageUsed Number
Used storage of CynosDB cluster, unit in MB.

Look up Existing CynosdbCluster Resource

Get an existing CynosdbCluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CynosdbClusterState, opts?: CustomResourceOptions): CynosdbCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_pause: Optional[str] = None,
        auto_pause_delay: Optional[float] = None,
        auto_renew_flag: Optional[float] = None,
        available_zone: Optional[str] = None,
        charge_type: Optional[str] = None,
        charset: Optional[str] = None,
        cluster_name: Optional[str] = None,
        cluster_status: Optional[str] = None,
        create_time: Optional[str] = None,
        cynos_version: Optional[str] = None,
        cynosdb_cluster_id: Optional[str] = None,
        db_mode: Optional[str] = None,
        db_type: Optional[str] = None,
        db_version: Optional[str] = None,
        force_delete: Optional[bool] = None,
        instance_cpu_core: Optional[float] = None,
        instance_id: Optional[str] = None,
        instance_init_infos: Optional[Sequence[CynosdbClusterInstanceInitInfoArgs]] = None,
        instance_maintain_duration: Optional[float] = None,
        instance_maintain_start_time: Optional[float] = None,
        instance_maintain_weekdays: Optional[Sequence[str]] = None,
        instance_memory_size: Optional[float] = None,
        instance_name: Optional[str] = None,
        instance_status: Optional[str] = None,
        instance_storage_size: Optional[float] = None,
        max_cpu: Optional[float] = None,
        min_cpu: Optional[float] = None,
        old_ip_reserve_hours: Optional[float] = None,
        param_items: Optional[Sequence[CynosdbClusterParamItemArgs]] = None,
        param_template_id: Optional[float] = None,
        password: Optional[str] = None,
        port: Optional[float] = None,
        prarm_template_id: Optional[float] = None,
        prepaid_period: Optional[float] = None,
        project_id: Optional[float] = None,
        ro_group_addrs: Optional[Sequence[CynosdbClusterRoGroupAddrArgs]] = None,
        ro_group_id: Optional[str] = None,
        ro_group_instances: Optional[Sequence[CynosdbClusterRoGroupInstanceArgs]] = None,
        ro_group_sgs: Optional[Sequence[str]] = None,
        rw_group_addrs: Optional[Sequence[CynosdbClusterRwGroupAddrArgs]] = None,
        rw_group_id: Optional[str] = None,
        rw_group_instances: Optional[Sequence[CynosdbClusterRwGroupInstanceArgs]] = None,
        rw_group_sgs: Optional[Sequence[str]] = None,
        serverless_status: Optional[str] = None,
        serverless_status_flag: Optional[str] = None,
        slave_zone: Optional[str] = None,
        storage_limit: Optional[float] = None,
        storage_pay_mode: Optional[float] = None,
        storage_used: Optional[float] = None,
        subnet_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        vpc_id: Optional[str] = None) -> CynosdbCluster
func GetCynosdbCluster(ctx *Context, name string, id IDInput, state *CynosdbClusterState, opts ...ResourceOption) (*CynosdbCluster, error)
public static CynosdbCluster Get(string name, Input<string> id, CynosdbClusterState? state, CustomResourceOptions? opts = null)
public static CynosdbCluster get(String name, Output<String> id, CynosdbClusterState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:CynosdbCluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AutoPause string
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
AutoPauseDelay double
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
AutoRenewFlag double
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. 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.
Charset string
Charset used by CynosDB cluster.
ClusterName string
Name of CynosDB cluster.
ClusterStatus string
Status of the Cynosdb cluster.
CreateTime string
Creation time of the CynosDB cluster.
CynosVersion string
Kernel version, you can enter it when modifying.
CynosdbClusterId string
ID of the resource.
DbMode string
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
DbType string
Type of CynosDB, and available values include MYSQL.
DbVersion string
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
ForceDelete bool
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
InstanceCpuCore double
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
InstanceId string
ID of instance.
InstanceInitInfos List<CynosdbClusterInstanceInitInfo>
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
InstanceMaintainDuration double
Duration time for maintenance, unit in second. 3600 by default.
InstanceMaintainStartTime double
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
InstanceMaintainWeekdays List<string>
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
InstanceMemorySize double
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
InstanceName string
Name of instance.
InstanceStatus string
Status of the instance.
InstanceStorageSize double
Storage size of the instance, unit in GB.
MaxCpu double
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
MinCpu double
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
OldIpReserveHours double
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
ParamItems List<CynosdbClusterParamItem>
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
ParamTemplateId double
The ID of the parameter template.
Password string
Password of root account.
Port double
Port of CynosDB cluster.
PrarmTemplateId double
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

PrepaidPeriod double
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
ProjectId double
ID of the project. 0 by default.
RoGroupAddrs List<CynosdbClusterRoGroupAddr>
Readonly addresses. Each element contains the following attributes:
RoGroupId string
ID of read-only instance group.
RoGroupInstances List<CynosdbClusterRoGroupInstance>
List of instances in the read-only instance group.
RoGroupSgs List<string>
IDs of security group for ro_group.
RwGroupAddrs List<CynosdbClusterRwGroupAddr>
Read-write addresses. Each element contains the following attributes:
RwGroupId string
ID of read-write instance group.
RwGroupInstances List<CynosdbClusterRwGroupInstance>
List of instances in the read-write instance group.
RwGroupSgs List<string>
IDs of security group for rw_group.
ServerlessStatus string
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
ServerlessStatusFlag string
Specify whether to pause or resume serverless cluster. values: resume, pause.
SlaveZone string
Multi zone Addresses of the CynosDB Cluster.
StorageLimit double
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
StoragePayMode double
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
StorageUsed double
Used storage of CynosDB cluster, unit in MB.
SubnetId string
ID of the subnet within this VPC.
Tags Dictionary<string, string>
The tags of the CynosDB cluster.
VpcId string
ID of the VPC.
AutoPause string
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
AutoPauseDelay float64
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
AutoRenewFlag float64
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. 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.
Charset string
Charset used by CynosDB cluster.
ClusterName string
Name of CynosDB cluster.
ClusterStatus string
Status of the Cynosdb cluster.
CreateTime string
Creation time of the CynosDB cluster.
CynosVersion string
Kernel version, you can enter it when modifying.
CynosdbClusterId string
ID of the resource.
DbMode string
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
DbType string
Type of CynosDB, and available values include MYSQL.
DbVersion string
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
ForceDelete bool
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
InstanceCpuCore float64
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
InstanceId string
ID of instance.
InstanceInitInfos []CynosdbClusterInstanceInitInfoArgs
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
InstanceMaintainDuration float64
Duration time for maintenance, unit in second. 3600 by default.
InstanceMaintainStartTime float64
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
InstanceMaintainWeekdays []string
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
InstanceMemorySize float64
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
InstanceName string
Name of instance.
InstanceStatus string
Status of the instance.
InstanceStorageSize float64
Storage size of the instance, unit in GB.
MaxCpu float64
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
MinCpu float64
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
OldIpReserveHours float64
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
ParamItems []CynosdbClusterParamItemArgs
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
ParamTemplateId float64
The ID of the parameter template.
Password string
Password of root account.
Port float64
Port of CynosDB cluster.
PrarmTemplateId float64
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

PrepaidPeriod float64
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
ProjectId float64
ID of the project. 0 by default.
RoGroupAddrs []CynosdbClusterRoGroupAddrArgs
Readonly addresses. Each element contains the following attributes:
RoGroupId string
ID of read-only instance group.
RoGroupInstances []CynosdbClusterRoGroupInstanceArgs
List of instances in the read-only instance group.
RoGroupSgs []string
IDs of security group for ro_group.
RwGroupAddrs []CynosdbClusterRwGroupAddrArgs
Read-write addresses. Each element contains the following attributes:
RwGroupId string
ID of read-write instance group.
RwGroupInstances []CynosdbClusterRwGroupInstanceArgs
List of instances in the read-write instance group.
RwGroupSgs []string
IDs of security group for rw_group.
ServerlessStatus string
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
ServerlessStatusFlag string
Specify whether to pause or resume serverless cluster. values: resume, pause.
SlaveZone string
Multi zone Addresses of the CynosDB Cluster.
StorageLimit float64
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
StoragePayMode float64
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
StorageUsed float64
Used storage of CynosDB cluster, unit in MB.
SubnetId string
ID of the subnet within this VPC.
Tags map[string]string
The tags of the CynosDB cluster.
VpcId string
ID of the VPC.
autoPause String
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
autoPauseDelay Double
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
autoRenewFlag Double
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. 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.
charset String
Charset used by CynosDB cluster.
clusterName String
Name of CynosDB cluster.
clusterStatus String
Status of the Cynosdb cluster.
createTime String
Creation time of the CynosDB cluster.
cynosVersion String
Kernel version, you can enter it when modifying.
cynosdbClusterId String
ID of the resource.
dbMode String
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
dbType String
Type of CynosDB, and available values include MYSQL.
dbVersion String
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
forceDelete Boolean
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instanceCpuCore Double
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceId String
ID of instance.
instanceInitInfos List<CynosdbClusterInstanceInitInfo>
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instanceMaintainDuration Double
Duration time for maintenance, unit in second. 3600 by default.
instanceMaintainStartTime Double
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instanceMaintainWeekdays List<String>
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instanceMemorySize Double
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceName String
Name of instance.
instanceStatus String
Status of the instance.
instanceStorageSize Double
Storage size of the instance, unit in GB.
maxCpu Double
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
minCpu Double
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
oldIpReserveHours Double
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
paramItems List<CynosdbClusterParamItem>
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
paramTemplateId Double
The ID of the parameter template.
password String
Password of root account.
port Double
Port of CynosDB cluster.
prarmTemplateId Double
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaidPeriod Double
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
projectId Double
ID of the project. 0 by default.
roGroupAddrs List<CynosdbClusterRoGroupAddr>
Readonly addresses. Each element contains the following attributes:
roGroupId String
ID of read-only instance group.
roGroupInstances List<CynosdbClusterRoGroupInstance>
List of instances in the read-only instance group.
roGroupSgs List<String>
IDs of security group for ro_group.
rwGroupAddrs List<CynosdbClusterRwGroupAddr>
Read-write addresses. Each element contains the following attributes:
rwGroupId String
ID of read-write instance group.
rwGroupInstances List<CynosdbClusterRwGroupInstance>
List of instances in the read-write instance group.
rwGroupSgs List<String>
IDs of security group for rw_group.
serverlessStatus String
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
serverlessStatusFlag String
Specify whether to pause or resume serverless cluster. values: resume, pause.
slaveZone String
Multi zone Addresses of the CynosDB Cluster.
storageLimit Double
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storagePayMode Double
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
storageUsed Double
Used storage of CynosDB cluster, unit in MB.
subnetId String
ID of the subnet within this VPC.
tags Map<String,String>
The tags of the CynosDB cluster.
vpcId String
ID of the VPC.
autoPause string
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
autoPauseDelay number
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
autoRenewFlag number
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. 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.
charset string
Charset used by CynosDB cluster.
clusterName string
Name of CynosDB cluster.
clusterStatus string
Status of the Cynosdb cluster.
createTime string
Creation time of the CynosDB cluster.
cynosVersion string
Kernel version, you can enter it when modifying.
cynosdbClusterId string
ID of the resource.
dbMode string
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
dbType string
Type of CynosDB, and available values include MYSQL.
dbVersion string
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
forceDelete boolean
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instanceCpuCore number
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceId string
ID of instance.
instanceInitInfos CynosdbClusterInstanceInitInfo[]
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instanceMaintainDuration number
Duration time for maintenance, unit in second. 3600 by default.
instanceMaintainStartTime number
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instanceMaintainWeekdays string[]
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instanceMemorySize number
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceName string
Name of instance.
instanceStatus string
Status of the instance.
instanceStorageSize number
Storage size of the instance, unit in GB.
maxCpu number
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
minCpu number
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
oldIpReserveHours number
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
paramItems CynosdbClusterParamItem[]
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
paramTemplateId number
The ID of the parameter template.
password string
Password of root account.
port number
Port of CynosDB cluster.
prarmTemplateId number
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaidPeriod number
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
projectId number
ID of the project. 0 by default.
roGroupAddrs CynosdbClusterRoGroupAddr[]
Readonly addresses. Each element contains the following attributes:
roGroupId string
ID of read-only instance group.
roGroupInstances CynosdbClusterRoGroupInstance[]
List of instances in the read-only instance group.
roGroupSgs string[]
IDs of security group for ro_group.
rwGroupAddrs CynosdbClusterRwGroupAddr[]
Read-write addresses. Each element contains the following attributes:
rwGroupId string
ID of read-write instance group.
rwGroupInstances CynosdbClusterRwGroupInstance[]
List of instances in the read-write instance group.
rwGroupSgs string[]
IDs of security group for rw_group.
serverlessStatus string
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
serverlessStatusFlag string
Specify whether to pause or resume serverless cluster. values: resume, pause.
slaveZone string
Multi zone Addresses of the CynosDB Cluster.
storageLimit number
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storagePayMode number
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
storageUsed number
Used storage of CynosDB cluster, unit in MB.
subnetId string
ID of the subnet within this VPC.
tags {[key: string]: string}
The tags of the CynosDB cluster.
vpcId string
ID of the VPC.
auto_pause str
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
auto_pause_delay float
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
auto_renew_flag float
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. 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.
charset str
Charset used by CynosDB cluster.
cluster_name str
Name of CynosDB cluster.
cluster_status str
Status of the Cynosdb cluster.
create_time str
Creation time of the CynosDB cluster.
cynos_version str
Kernel version, you can enter it when modifying.
cynosdb_cluster_id str
ID of the resource.
db_mode str
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
db_type str
Type of CynosDB, and available values include MYSQL.
db_version str
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
force_delete bool
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instance_cpu_core float
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instance_id str
ID of instance.
instance_init_infos Sequence[CynosdbClusterInstanceInitInfoArgs]
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instance_maintain_duration float
Duration time for maintenance, unit in second. 3600 by default.
instance_maintain_start_time float
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instance_maintain_weekdays Sequence[str]
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instance_memory_size float
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instance_name str
Name of instance.
instance_status str
Status of the instance.
instance_storage_size float
Storage size of the instance, unit in GB.
max_cpu float
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
min_cpu float
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
old_ip_reserve_hours float
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
param_items Sequence[CynosdbClusterParamItemArgs]
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
param_template_id float
The ID of the parameter template.
password str
Password of root account.
port float
Port of CynosDB cluster.
prarm_template_id float
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaid_period float
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
project_id float
ID of the project. 0 by default.
ro_group_addrs Sequence[CynosdbClusterRoGroupAddrArgs]
Readonly addresses. Each element contains the following attributes:
ro_group_id str
ID of read-only instance group.
ro_group_instances Sequence[CynosdbClusterRoGroupInstanceArgs]
List of instances in the read-only instance group.
ro_group_sgs Sequence[str]
IDs of security group for ro_group.
rw_group_addrs Sequence[CynosdbClusterRwGroupAddrArgs]
Read-write addresses. Each element contains the following attributes:
rw_group_id str
ID of read-write instance group.
rw_group_instances Sequence[CynosdbClusterRwGroupInstanceArgs]
List of instances in the read-write instance group.
rw_group_sgs Sequence[str]
IDs of security group for rw_group.
serverless_status str
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
serverless_status_flag str
Specify whether to pause or resume serverless cluster. values: resume, pause.
slave_zone str
Multi zone Addresses of the CynosDB Cluster.
storage_limit float
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storage_pay_mode float
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
storage_used float
Used storage of CynosDB cluster, unit in MB.
subnet_id str
ID of the subnet within this VPC.
tags Mapping[str, str]
The tags of the CynosDB cluster.
vpc_id str
ID of the VPC.
autoPause String
Specify whether the cluster can auto-pause while db_mode is SERVERLESS. Values: yes (default), no.
autoPauseDelay Number
Specify auto-pause delay in second while db_mode is SERVERLESS. Value range: [600, 691200]. Default: 600.
autoRenewFlag Number
Auto renew flag. Valid values are 0(MANUAL_RENEW), 1(AUTO_RENEW). Default value is 0. 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.
charset String
Charset used by CynosDB cluster.
clusterName String
Name of CynosDB cluster.
clusterStatus String
Status of the Cynosdb cluster.
createTime String
Creation time of the CynosDB cluster.
cynosVersion String
Kernel version, you can enter it when modifying.
cynosdbClusterId String
ID of the resource.
dbMode String
Specify DB mode, only available when db_type is MYSQL. Values: NORMAL (Default), SERVERLESS.
dbType String
Type of CynosDB, and available values include MYSQL.
dbVersion String
Version of CynosDB, which is related to db_type. For MYSQL, available value is 5.7, 8.0.
forceDelete Boolean
Indicate whether to delete cluster instance directly or not. Default is false. If set true, the cluster and its All RELATED INSTANCES will be deleted instead of staying recycle bin. Note: works for both PREPAID and POSTPAID_BY_HOUR cluster.
instanceCpuCore Number
The number of CPU cores of read-write type instance in the CynosDB cluster. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceId String
ID of instance.
instanceInitInfos List<Property Map>
Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
instanceMaintainDuration Number
Duration time for maintenance, unit in second. 3600 by default.
instanceMaintainStartTime Number
Offset time from 00:00, unit in second. For example, 03:00am should be 10800. 10800 by default.
instanceMaintainWeekdays List<String>
Weekdays for maintenance. ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] by default.
instanceMemorySize Number
Memory capacity of read-write type instance, unit in GB. Required while creating normal cluster. Note: modification of this field will take effect immediately, if want to upgrade on maintenance window, please upgrade from console.
instanceName String
Name of instance.
instanceStatus String
Status of the instance.
instanceStorageSize Number
Storage size of the instance, unit in GB.
maxCpu Number
Maximum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
minCpu Number
Minimum CPU core count, required while db_mode is SERVERLESS, request DescribeServerlessInstanceSpecs for more reference.
oldIpReserveHours Number
Recycling time of the old address, must be filled in when modifying the vpcRecycling time of the old address, must be filled in when modifying the vpc.
paramItems List<Property Map>
Specify parameter list of database. It is valid when param_template_id is set in create cluster. Use data.tencentcloud_mysql_default_params to query available parameter details.
paramTemplateId Number
The ID of the parameter template.
password String
Password of root account.
port Number
Port of CynosDB cluster.
prarmTemplateId Number
It will be deprecated. Use param_template_id instead. The ID of the parameter template.

Deprecated: Deprecated

prepaidPeriod Number
The tenancy (time unit is month) of the prepaid instance. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36. NOTE: it only works when charge_type is set to PREPAID.
projectId Number
ID of the project. 0 by default.
roGroupAddrs List<Property Map>
Readonly addresses. Each element contains the following attributes:
roGroupId String
ID of read-only instance group.
roGroupInstances List<Property Map>
List of instances in the read-only instance group.
roGroupSgs List<String>
IDs of security group for ro_group.
rwGroupAddrs List<Property Map>
Read-write addresses. Each element contains the following attributes:
rwGroupId String
ID of read-write instance group.
rwGroupInstances List<Property Map>
List of instances in the read-write instance group.
rwGroupSgs List<String>
IDs of security group for rw_group.
serverlessStatus String
Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set serverless_status_flag.
serverlessStatusFlag String
Specify whether to pause or resume serverless cluster. values: resume, pause.
slaveZone String
Multi zone Addresses of the CynosDB Cluster.
storageLimit Number
Storage limit of CynosDB cluster instance, unit in GB. The maximum storage of a non-serverless instance in GB. NOTE: If db_type is MYSQL and charge_type is PREPAID, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode is order and pay. when charge_type is POSTPAID_BY_HOUR, this argument is unnecessary.
storagePayMode Number
Cluster storage billing mode, pay-as-you-go: 0-yearly/monthly: 1-The default is pay-as-you-go. When the DbType is MYSQL, when the cluster computing billing mode is post-paid (including DbMode is SERVERLESS), the storage billing mode can only be billing by volume; rollback and cloning do not support yearly subscriptions monthly storage.
storageUsed Number
Used storage of CynosDB cluster, unit in MB.
subnetId String
ID of the subnet within this VPC.
tags Map<String>
The tags of the CynosDB cluster.
vpcId String
ID of the VPC.

Supporting Types

CynosdbClusterInstanceInitInfo
, CynosdbClusterInstanceInitInfoArgs

Cpu This property is required. double
CPU of instance.
InstanceCount This property is required. double
Instance count. Range: [1, 15].
InstanceType This property is required. string
Instance type. Value: rw, ro.
Memory This property is required. double
Memory of instance.
DeviceType string
Instance machine type. Values: common, exclusive.
MaxRoCount double
Maximum number of Serverless instances. Range [1,15].
MaxRoCpu double
Maximum Serverless Instance Specifications.
MinRoCount double
Minimum number of Serverless instances. Range [1,15].
MinRoCpu double
Minimum Serverless Instance Specifications.
Cpu This property is required. float64
CPU of instance.
InstanceCount This property is required. float64
Instance count. Range: [1, 15].
InstanceType This property is required. string
Instance type. Value: rw, ro.
Memory This property is required. float64
Memory of instance.
DeviceType string
Instance machine type. Values: common, exclusive.
MaxRoCount float64
Maximum number of Serverless instances. Range [1,15].
MaxRoCpu float64
Maximum Serverless Instance Specifications.
MinRoCount float64
Minimum number of Serverless instances. Range [1,15].
MinRoCpu float64
Minimum Serverless Instance Specifications.
cpu This property is required. Double
CPU of instance.
instanceCount This property is required. Double
Instance count. Range: [1, 15].
instanceType This property is required. String
Instance type. Value: rw, ro.
memory This property is required. Double
Memory of instance.
deviceType String
Instance machine type. Values: common, exclusive.
maxRoCount Double
Maximum number of Serverless instances. Range [1,15].
maxRoCpu Double
Maximum Serverless Instance Specifications.
minRoCount Double
Minimum number of Serverless instances. Range [1,15].
minRoCpu Double
Minimum Serverless Instance Specifications.
cpu This property is required. number
CPU of instance.
instanceCount This property is required. number
Instance count. Range: [1, 15].
instanceType This property is required. string
Instance type. Value: rw, ro.
memory This property is required. number
Memory of instance.
deviceType string
Instance machine type. Values: common, exclusive.
maxRoCount number
Maximum number of Serverless instances. Range [1,15].
maxRoCpu number
Maximum Serverless Instance Specifications.
minRoCount number
Minimum number of Serverless instances. Range [1,15].
minRoCpu number
Minimum Serverless Instance Specifications.
cpu This property is required. float
CPU of instance.
instance_count This property is required. float
Instance count. Range: [1, 15].
instance_type This property is required. str
Instance type. Value: rw, ro.
memory This property is required. float
Memory of instance.
device_type str
Instance machine type. Values: common, exclusive.
max_ro_count float
Maximum number of Serverless instances. Range [1,15].
max_ro_cpu float
Maximum Serverless Instance Specifications.
min_ro_count float
Minimum number of Serverless instances. Range [1,15].
min_ro_cpu float
Minimum Serverless Instance Specifications.
cpu This property is required. Number
CPU of instance.
instanceCount This property is required. Number
Instance count. Range: [1, 15].
instanceType This property is required. String
Instance type. Value: rw, ro.
memory This property is required. Number
Memory of instance.
deviceType String
Instance machine type. Values: common, exclusive.
maxRoCount Number
Maximum number of Serverless instances. Range [1,15].
maxRoCpu Number
Maximum Serverless Instance Specifications.
minRoCount Number
Minimum number of Serverless instances. Range [1,15].
minRoCpu Number
Minimum Serverless Instance Specifications.

CynosdbClusterParamItem
, CynosdbClusterParamItemArgs

CurrentValue This property is required. string
Param expected value to set.
Name This property is required. string
Name of param, e.g. character_set_server.
OldValue string
Param old value, indicates the value which already set, this value is required when modifying current_value.
CurrentValue This property is required. string
Param expected value to set.
Name This property is required. string
Name of param, e.g. character_set_server.
OldValue string
Param old value, indicates the value which already set, this value is required when modifying current_value.
currentValue This property is required. String
Param expected value to set.
name This property is required. String
Name of param, e.g. character_set_server.
oldValue String
Param old value, indicates the value which already set, this value is required when modifying current_value.
currentValue This property is required. string
Param expected value to set.
name This property is required. string
Name of param, e.g. character_set_server.
oldValue string
Param old value, indicates the value which already set, this value is required when modifying current_value.
current_value This property is required. str
Param expected value to set.
name This property is required. str
Name of param, e.g. character_set_server.
old_value str
Param old value, indicates the value which already set, this value is required when modifying current_value.
currentValue This property is required. String
Param expected value to set.
name This property is required. String
Name of param, e.g. character_set_server.
oldValue String
Param old value, indicates the value which already set, this value is required when modifying current_value.

CynosdbClusterRoGroupAddr
, CynosdbClusterRoGroupAddrArgs

Ip This property is required. string
IP address for read-write connection.
Port This property is required. double
Port of CynosDB cluster.
Ip This property is required. string
IP address for read-write connection.
Port This property is required. float64
Port of CynosDB cluster.
ip This property is required. String
IP address for read-write connection.
port This property is required. Double
Port of CynosDB cluster.
ip This property is required. string
IP address for read-write connection.
port This property is required. number
Port of CynosDB cluster.
ip This property is required. str
IP address for read-write connection.
port This property is required. float
Port of CynosDB cluster.
ip This property is required. String
IP address for read-write connection.
port This property is required. Number
Port of CynosDB cluster.

CynosdbClusterRoGroupInstance
, CynosdbClusterRoGroupInstanceArgs

InstanceId This property is required. string
ID of instance.
InstanceName This property is required. string
Name of instance.
InstanceId This property is required. string
ID of instance.
InstanceName This property is required. string
Name of instance.
instanceId This property is required. String
ID of instance.
instanceName This property is required. String
Name of instance.
instanceId This property is required. string
ID of instance.
instanceName This property is required. string
Name of instance.
instance_id This property is required. str
ID of instance.
instance_name This property is required. str
Name of instance.
instanceId This property is required. String
ID of instance.
instanceName This property is required. String
Name of instance.

CynosdbClusterRwGroupAddr
, CynosdbClusterRwGroupAddrArgs

Ip This property is required. string
IP address for read-write connection.
Port This property is required. double
Port of CynosDB cluster.
Ip This property is required. string
IP address for read-write connection.
Port This property is required. float64
Port of CynosDB cluster.
ip This property is required. String
IP address for read-write connection.
port This property is required. Double
Port of CynosDB cluster.
ip This property is required. string
IP address for read-write connection.
port This property is required. number
Port of CynosDB cluster.
ip This property is required. str
IP address for read-write connection.
port This property is required. float
Port of CynosDB cluster.
ip This property is required. String
IP address for read-write connection.
port This property is required. Number
Port of CynosDB cluster.

CynosdbClusterRwGroupInstance
, CynosdbClusterRwGroupInstanceArgs

InstanceId This property is required. string
ID of instance.
InstanceName This property is required. string
Name of instance.
InstanceId This property is required. string
ID of instance.
InstanceName This property is required. string
Name of instance.
instanceId This property is required. String
ID of instance.
instanceName This property is required. String
Name of instance.
instanceId This property is required. string
ID of instance.
instanceName This property is required. string
Name of instance.
instance_id This property is required. str
ID of instance.
instance_name This property is required. str
Name of instance.
instanceId This property is required. String
ID of instance.
instanceName This property is required. String
Name of instance.

Import

CynosDB cluster can be imported using the id, e.g.

$ pulumi import tencentcloud:index/cynosdbCluster:CynosdbCluster example cynosdbmysql-dzj5l8gz
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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