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",
},
});
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",
})
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
})
}
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" },
},
});
});
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());
}
}
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
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",
},
});
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",
})
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
})
}
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" },
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args CynosdbClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args CynosdbClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CynosdbClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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:
- Available
Zone string - The available zone of the CynosDB Cluster.
- Cluster
Name string - Name of CynosDB cluster.
- Db
Type string - Type of CynosDB, and available values include
MYSQL
. - Db
Version string - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - Password string
- Password of
root
account. - Subnet
Id string - ID of the subnet within this VPC.
- Vpc
Id string - ID of the VPC.
- Auto
Pause string - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - Auto
Pause doubleDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - Auto
Renew doubleFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - Charge
Type string - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - Cynos
Version string - Kernel version, you can enter it when modifying.
- Cynosdb
Cluster stringId - ID of the resource.
- Db
Mode string - Specify DB mode, only available when
db_type
isMYSQL
. 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - Instance
Cpu doubleCore - 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 List<CynosdbInfos Cluster Instance Init Info> - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- Instance
Maintain doubleDuration - Duration time for maintenance, unit in second.
3600
by default. - Instance
Maintain doubleStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - Instance
Maintain List<string>Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - Instance
Memory doubleSize - 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 double - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Min
Cpu double - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Old
Ip doubleReserve Hours - 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 List<CynosdbCluster Param Item> - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - Param
Template doubleId - The ID of the parameter template.
- Port double
- Port of CynosDB cluster.
- Prarm
Template doubleId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - Prepaid
Period 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 toPREPAID
. - Project
Id double - ID of the project.
0
by default. - Ro
Group List<string>Sgs - IDs of security group for
ro_group
. - Rw
Group List<string>Sgs - IDs of security group for
rw_group
. - Serverless
Status stringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - Slave
Zone string - Multi zone Addresses of the CynosDB Cluster.
- Storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - Storage
Pay doubleMode - 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. - Dictionary<string, string>
- The tags of the CynosDB cluster.
- Available
Zone string - The available zone of the CynosDB Cluster.
- Cluster
Name string - Name of CynosDB cluster.
- Db
Type string - Type of CynosDB, and available values include
MYSQL
. - Db
Version string - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - Password string
- Password of
root
account. - Subnet
Id string - ID of the subnet within this VPC.
- Vpc
Id string - ID of the VPC.
- Auto
Pause string - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - Auto
Pause float64Delay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - Auto
Renew float64Flag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - Charge
Type string - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - Cynos
Version string - Kernel version, you can enter it when modifying.
- Cynosdb
Cluster stringId - ID of the resource.
- Db
Mode string - Specify DB mode, only available when
db_type
isMYSQL
. 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - Instance
Cpu float64Core - 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 []CynosdbInfos Cluster Instance Init Info Args - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- Instance
Maintain float64Duration - Duration time for maintenance, unit in second.
3600
by default. - Instance
Maintain float64Start Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - Instance
Maintain []stringWeekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - Instance
Memory float64Size - 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 float64 - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Min
Cpu float64 - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Old
Ip float64Reserve Hours - 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 []CynosdbCluster Param Item Args - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - Param
Template float64Id - The ID of the parameter template.
- Port float64
- Port of CynosDB cluster.
- Prarm
Template float64Id - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - Prepaid
Period 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 toPREPAID
. - Project
Id float64 - ID of the project.
0
by default. - Ro
Group []stringSgs - IDs of security group for
ro_group
. - Rw
Group []stringSgs - IDs of security group for
rw_group
. - Serverless
Status stringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - Slave
Zone string - Multi zone Addresses of the CynosDB Cluster.
- Storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - Storage
Pay float64Mode - 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. - map[string]string
- The tags of the CynosDB cluster.
- available
Zone String - The available zone of the CynosDB Cluster.
- cluster
Name String - Name of CynosDB cluster.
- db
Type String - Type of CynosDB, and available values include
MYSQL
. - db
Version String - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - password String
- Password of
root
account. - subnet
Id String - ID of the subnet within this VPC.
- vpc
Id String - ID of the VPC.
- auto
Pause String - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto
Pause DoubleDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto
Renew DoubleFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - charge
Type String - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - cynos
Version String - Kernel version, you can enter it when modifying.
- cynosdb
Cluster StringId - ID of the resource.
- db
Mode String - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - force
Delete 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance
Cpu DoubleCore - 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 List<CynosdbInfos Cluster Instance Init Info> - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance
Maintain DoubleDuration - Duration time for maintenance, unit in second.
3600
by default. - instance
Maintain DoubleStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance
Maintain List<String>Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance
Memory DoubleSize - 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 Double - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min
Cpu Double - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old
Ip DoubleReserve Hours - 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 List<CynosdbCluster Param Item> - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param
Template DoubleId - The ID of the parameter template.
- port Double
- Port of CynosDB cluster.
- prarm
Template DoubleId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - prepaid
Period 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 toPREPAID
. - project
Id Double - ID of the project.
0
by default. - ro
Group List<String>Sgs - IDs of security group for
ro_group
. - rw
Group List<String>Sgs - IDs of security group for
rw_group
. - serverless
Status StringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - slave
Zone String - Multi zone Addresses of the CynosDB Cluster.
- storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage
Pay DoubleMode - 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. - Map<String,String>
- The tags of the CynosDB cluster.
- available
Zone string - The available zone of the CynosDB Cluster.
- cluster
Name string - Name of CynosDB cluster.
- db
Type string - Type of CynosDB, and available values include
MYSQL
. - db
Version string - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - password string
- Password of
root
account. - subnet
Id string - ID of the subnet within this VPC.
- vpc
Id string - ID of the VPC.
- auto
Pause string - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto
Pause numberDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto
Renew numberFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - charge
Type string - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - cynos
Version string - Kernel version, you can enter it when modifying.
- cynosdb
Cluster stringId - ID of the resource.
- db
Mode string - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - force
Delete 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance
Cpu numberCore - 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 CynosdbInfos Cluster Instance Init Info[] - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance
Maintain numberDuration - Duration time for maintenance, unit in second.
3600
by default. - instance
Maintain numberStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance
Maintain string[]Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance
Memory numberSize - 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 number - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min
Cpu number - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old
Ip numberReserve Hours - 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 CynosdbCluster Param Item[] - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param
Template numberId - The ID of the parameter template.
- port number
- Port of CynosDB cluster.
- prarm
Template numberId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - prepaid
Period 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 toPREPAID
. - project
Id number - ID of the project.
0
by default. - ro
Group string[]Sgs - IDs of security group for
ro_group
. - rw
Group string[]Sgs - IDs of security group for
rw_group
. - serverless
Status stringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - slave
Zone string - Multi zone Addresses of the CynosDB Cluster.
- storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage
Pay numberMode - 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. - {[key: string]: string}
- The tags of the CynosDB cluster.
- available_
zone str - The available zone of the CynosDB Cluster.
- cluster_
name str - Name of CynosDB cluster.
- db_
type str - Type of CynosDB, and available values include
MYSQL
. - db_
version str - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - password str
- Password of
root
account. - subnet_
id str - ID of the subnet within this VPC.
- vpc_
id str - ID of the VPC.
- auto_
pause str - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto_
pause_ floatdelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto_
renew_ floatflag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - charge_
type str - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - cynos_
version str - Kernel version, you can enter it when modifying.
- cynosdb_
cluster_ strid - ID of the resource.
- db_
mode str - Specify DB mode, only available when
db_type
isMYSQL
. 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance_
cpu_ floatcore - 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_ Sequence[Cynosdbinfos Cluster Instance Init Info Args] - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance_
maintain_ floatduration - Duration time for maintenance, unit in second.
3600
by default. - instance_
maintain_ floatstart_ time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance_
maintain_ Sequence[str]weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance_
memory_ floatsize - 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
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min_
cpu float - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old_
ip_ floatreserve_ hours - 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[CynosdbCluster Param Item Args] - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param_
template_ floatid - The ID of the parameter template.
- port float
- Port of CynosDB cluster.
- prarm_
template_ floatid - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - 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 toPREPAID
. - project_
id float - ID of the project.
0
by default. - ro_
group_ Sequence[str]sgs - IDs of security group for
ro_group
. - rw_
group_ Sequence[str]sgs - IDs of security group for
rw_group
. - serverless_
status_ strflag - 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage_
pay_ floatmode - 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. - Mapping[str, str]
- The tags of the CynosDB cluster.
- available
Zone String - The available zone of the CynosDB Cluster.
- cluster
Name String - Name of CynosDB cluster.
- db
Type String - Type of CynosDB, and available values include
MYSQL
. - db
Version String - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - password String
- Password of
root
account. - subnet
Id String - ID of the subnet within this VPC.
- vpc
Id String - ID of the VPC.
- auto
Pause String - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto
Pause NumberDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto
Renew NumberFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - charge
Type String - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - cynos
Version String - Kernel version, you can enter it when modifying.
- cynosdb
Cluster StringId - ID of the resource.
- db
Mode String - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - force
Delete 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance
Cpu NumberCore - 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 List<Property Map>Infos - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance
Maintain NumberDuration - Duration time for maintenance, unit in second.
3600
by default. - instance
Maintain NumberStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance
Maintain List<String>Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance
Memory NumberSize - 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 Number - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min
Cpu Number - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old
Ip NumberReserve Hours - 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 List<Property Map> - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param
Template NumberId - The ID of the parameter template.
- port Number
- Port of CynosDB cluster.
- prarm
Template NumberId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - prepaid
Period 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 toPREPAID
. - project
Id Number - ID of the project.
0
by default. - ro
Group List<String>Sgs - IDs of security group for
ro_group
. - rw
Group List<String>Sgs - IDs of security group for
rw_group
. - serverless
Status StringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - slave
Zone String - Multi zone Addresses of the CynosDB Cluster.
- storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage
Pay NumberMode - 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. - 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.
- Cluster
Status string - Status of the Cynosdb cluster.
- Create
Time string - Creation time of the CynosDB cluster.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - ID of instance.
- Instance
Name string - Name of instance.
- Instance
Status string - Status of the instance.
- Instance
Storage doubleSize - Storage size of the instance, unit in GB.
- Ro
Group List<CynosdbAddrs Cluster Ro Group Addr> - Readonly addresses. Each element contains the following attributes:
- Ro
Group stringId - ID of read-only instance group.
- Ro
Group List<CynosdbInstances Cluster Ro Group Instance> - List of instances in the read-only instance group.
- Rw
Group List<CynosdbAddrs Cluster Rw Group Addr> - Read-write addresses. Each element contains the following attributes:
- Rw
Group stringId - ID of read-write instance group.
- Rw
Group List<CynosdbInstances Cluster Rw Group Instance> - List of instances in the read-write instance group.
- Serverless
Status string - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - Storage
Used double - Used storage of CynosDB cluster, unit in MB.
- Charset string
- Charset used by CynosDB cluster.
- Cluster
Status string - Status of the Cynosdb cluster.
- Create
Time string - Creation time of the CynosDB cluster.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - ID of instance.
- Instance
Name string - Name of instance.
- Instance
Status string - Status of the instance.
- Instance
Storage float64Size - Storage size of the instance, unit in GB.
- Ro
Group []CynosdbAddrs Cluster Ro Group Addr - Readonly addresses. Each element contains the following attributes:
- Ro
Group stringId - ID of read-only instance group.
- Ro
Group []CynosdbInstances Cluster Ro Group Instance - List of instances in the read-only instance group.
- Rw
Group []CynosdbAddrs Cluster Rw Group Addr - Read-write addresses. Each element contains the following attributes:
- Rw
Group stringId - ID of read-write instance group.
- Rw
Group []CynosdbInstances Cluster Rw Group Instance - List of instances in the read-write instance group.
- Serverless
Status string - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - Storage
Used float64 - Used storage of CynosDB cluster, unit in MB.
- charset String
- Charset used by CynosDB cluster.
- cluster
Status String - Status of the Cynosdb cluster.
- create
Time String - Creation time of the CynosDB cluster.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - ID of instance.
- instance
Name String - Name of instance.
- instance
Status String - Status of the instance.
- instance
Storage DoubleSize - Storage size of the instance, unit in GB.
- ro
Group List<CynosdbAddrs Cluster Ro Group Addr> - Readonly addresses. Each element contains the following attributes:
- ro
Group StringId - ID of read-only instance group.
- ro
Group List<CynosdbInstances Cluster Ro Group Instance> - List of instances in the read-only instance group.
- rw
Group List<CynosdbAddrs Cluster Rw Group Addr> - Read-write addresses. Each element contains the following attributes:
- rw
Group StringId - ID of read-write instance group.
- rw
Group List<CynosdbInstances Cluster Rw Group Instance> - List of instances in the read-write instance group.
- serverless
Status String - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - storage
Used Double - Used storage of CynosDB cluster, unit in MB.
- charset string
- Charset used by CynosDB cluster.
- cluster
Status string - Status of the Cynosdb cluster.
- create
Time string - Creation time of the CynosDB cluster.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - ID of instance.
- instance
Name string - Name of instance.
- instance
Status string - Status of the instance.
- instance
Storage numberSize - Storage size of the instance, unit in GB.
- ro
Group CynosdbAddrs Cluster Ro Group Addr[] - Readonly addresses. Each element contains the following attributes:
- ro
Group stringId - ID of read-only instance group.
- ro
Group CynosdbInstances Cluster Ro Group Instance[] - List of instances in the read-only instance group.
- rw
Group CynosdbAddrs Cluster Rw Group Addr[] - Read-write addresses. Each element contains the following attributes:
- rw
Group stringId - ID of read-write instance group.
- rw
Group CynosdbInstances Cluster Rw Group Instance[] - List of instances in the read-write instance group.
- serverless
Status string - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - storage
Used 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_ floatsize - Storage size of the instance, unit in GB.
- ro_
group_ Sequence[Cynosdbaddrs Cluster Ro Group Addr] - Readonly addresses. Each element contains the following attributes:
- ro_
group_ strid - ID of read-only instance group.
- ro_
group_ Sequence[Cynosdbinstances Cluster Ro Group Instance] - List of instances in the read-only instance group.
- rw_
group_ Sequence[Cynosdbaddrs Cluster Rw Group Addr] - Read-write addresses. Each element contains the following attributes:
- rw_
group_ strid - ID of read-write instance group.
- rw_
group_ Sequence[Cynosdbinstances Cluster Rw Group Instance] - 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.
- cluster
Status String - Status of the Cynosdb cluster.
- create
Time String - Creation time of the CynosDB cluster.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - ID of instance.
- instance
Name String - Name of instance.
- instance
Status String - Status of the instance.
- instance
Storage NumberSize - Storage size of the instance, unit in GB.
- ro
Group List<Property Map>Addrs - Readonly addresses. Each element contains the following attributes:
- ro
Group StringId - ID of read-only instance group.
- ro
Group List<Property Map>Instances - List of instances in the read-only instance group.
- rw
Group List<Property Map>Addrs - Read-write addresses. Each element contains the following attributes:
- rw
Group StringId - ID of read-write instance group.
- rw
Group List<Property Map>Instances - List of instances in the read-write instance group.
- serverless
Status String - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - storage
Used 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Auto
Pause string - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - Auto
Pause doubleDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - Auto
Renew doubleFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - Available
Zone string - The available zone of the CynosDB Cluster.
- Charge
Type string - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - Charset string
- Charset used by CynosDB cluster.
- Cluster
Name string - Name of CynosDB cluster.
- Cluster
Status string - Status of the Cynosdb cluster.
- Create
Time string - Creation time of the CynosDB cluster.
- Cynos
Version string - Kernel version, you can enter it when modifying.
- Cynosdb
Cluster stringId - ID of the resource.
- Db
Mode string - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - Db
Type string - Type of CynosDB, and available values include
MYSQL
. - Db
Version string - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - Instance
Cpu doubleCore - 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 string - ID of instance.
- Instance
Init List<CynosdbInfos Cluster Instance Init Info> - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- Instance
Maintain doubleDuration - Duration time for maintenance, unit in second.
3600
by default. - Instance
Maintain doubleStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - Instance
Maintain List<string>Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - Instance
Memory doubleSize - 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 string - Name of instance.
- Instance
Status string - Status of the instance.
- Instance
Storage doubleSize - Storage size of the instance, unit in GB.
- Max
Cpu double - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Min
Cpu double - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Old
Ip doubleReserve Hours - 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 List<CynosdbCluster Param Item> - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - Param
Template doubleId - The ID of the parameter template.
- Password string
- Password of
root
account. - Port double
- Port of CynosDB cluster.
- Prarm
Template doubleId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - Prepaid
Period 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 toPREPAID
. - Project
Id double - ID of the project.
0
by default. - Ro
Group List<CynosdbAddrs Cluster Ro Group Addr> - Readonly addresses. Each element contains the following attributes:
- Ro
Group stringId - ID of read-only instance group.
- Ro
Group List<CynosdbInstances Cluster Ro Group Instance> - List of instances in the read-only instance group.
- Ro
Group List<string>Sgs - IDs of security group for
ro_group
. - Rw
Group List<CynosdbAddrs Cluster Rw Group Addr> - Read-write addresses. Each element contains the following attributes:
- Rw
Group stringId - ID of read-write instance group.
- Rw
Group List<CynosdbInstances Cluster Rw Group Instance> - List of instances in the read-write instance group.
- Rw
Group List<string>Sgs - IDs of security group for
rw_group
. - Serverless
Status string - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - Serverless
Status stringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - Slave
Zone string - Multi zone Addresses of the CynosDB Cluster.
- Storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - Storage
Pay doubleMode - 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 double - Used storage of CynosDB cluster, unit in MB.
- Subnet
Id string - ID of the subnet within this VPC.
- Dictionary<string, string>
- The tags of the CynosDB cluster.
- Vpc
Id string - ID of the VPC.
- Auto
Pause string - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - Auto
Pause float64Delay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - Auto
Renew float64Flag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - Available
Zone string - The available zone of the CynosDB Cluster.
- Charge
Type string - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - Charset string
- Charset used by CynosDB cluster.
- Cluster
Name string - Name of CynosDB cluster.
- Cluster
Status string - Status of the Cynosdb cluster.
- Create
Time string - Creation time of the CynosDB cluster.
- Cynos
Version string - Kernel version, you can enter it when modifying.
- Cynosdb
Cluster stringId - ID of the resource.
- Db
Mode string - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - Db
Type string - Type of CynosDB, and available values include
MYSQL
. - Db
Version string - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - Instance
Cpu float64Core - 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 string - ID of instance.
- Instance
Init []CynosdbInfos Cluster Instance Init Info Args - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- Instance
Maintain float64Duration - Duration time for maintenance, unit in second.
3600
by default. - Instance
Maintain float64Start Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - Instance
Maintain []stringWeekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - Instance
Memory float64Size - 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 string - Name of instance.
- Instance
Status string - Status of the instance.
- Instance
Storage float64Size - Storage size of the instance, unit in GB.
- Max
Cpu float64 - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Min
Cpu float64 - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - Old
Ip float64Reserve Hours - 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 []CynosdbCluster Param Item Args - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - Param
Template float64Id - The ID of the parameter template.
- Password string
- Password of
root
account. - Port float64
- Port of CynosDB cluster.
- Prarm
Template float64Id - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - Prepaid
Period 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 toPREPAID
. - Project
Id float64 - ID of the project.
0
by default. - Ro
Group []CynosdbAddrs Cluster Ro Group Addr Args - Readonly addresses. Each element contains the following attributes:
- Ro
Group stringId - ID of read-only instance group.
- Ro
Group []CynosdbInstances Cluster Ro Group Instance Args - List of instances in the read-only instance group.
- Ro
Group []stringSgs - IDs of security group for
ro_group
. - Rw
Group []CynosdbAddrs Cluster Rw Group Addr Args - Read-write addresses. Each element contains the following attributes:
- Rw
Group stringId - ID of read-write instance group.
- Rw
Group []CynosdbInstances Cluster Rw Group Instance Args - List of instances in the read-write instance group.
- Rw
Group []stringSgs - IDs of security group for
rw_group
. - Serverless
Status string - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - Serverless
Status stringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - Slave
Zone string - Multi zone Addresses of the CynosDB Cluster.
- Storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - Storage
Pay float64Mode - 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 float64 - Used storage of CynosDB cluster, unit in MB.
- Subnet
Id string - ID of the subnet within this VPC.
- map[string]string
- The tags of the CynosDB cluster.
- Vpc
Id string - ID of the VPC.
- auto
Pause String - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto
Pause DoubleDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto
Renew DoubleFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - available
Zone String - The available zone of the CynosDB Cluster.
- charge
Type String - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - charset String
- Charset used by CynosDB cluster.
- cluster
Name String - Name of CynosDB cluster.
- cluster
Status String - Status of the Cynosdb cluster.
- create
Time String - Creation time of the CynosDB cluster.
- cynos
Version String - Kernel version, you can enter it when modifying.
- cynosdb
Cluster StringId - ID of the resource.
- db
Mode String - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - db
Type String - Type of CynosDB, and available values include
MYSQL
. - db
Version String - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - force
Delete 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance
Cpu DoubleCore - 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 String - ID of instance.
- instance
Init List<CynosdbInfos Cluster Instance Init Info> - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance
Maintain DoubleDuration - Duration time for maintenance, unit in second.
3600
by default. - instance
Maintain DoubleStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance
Maintain List<String>Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance
Memory DoubleSize - 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 String - Name of instance.
- instance
Status String - Status of the instance.
- instance
Storage DoubleSize - Storage size of the instance, unit in GB.
- max
Cpu Double - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min
Cpu Double - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old
Ip DoubleReserve Hours - 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 List<CynosdbCluster Param Item> - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param
Template DoubleId - The ID of the parameter template.
- password String
- Password of
root
account. - port Double
- Port of CynosDB cluster.
- prarm
Template DoubleId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - prepaid
Period 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 toPREPAID
. - project
Id Double - ID of the project.
0
by default. - ro
Group List<CynosdbAddrs Cluster Ro Group Addr> - Readonly addresses. Each element contains the following attributes:
- ro
Group StringId - ID of read-only instance group.
- ro
Group List<CynosdbInstances Cluster Ro Group Instance> - List of instances in the read-only instance group.
- ro
Group List<String>Sgs - IDs of security group for
ro_group
. - rw
Group List<CynosdbAddrs Cluster Rw Group Addr> - Read-write addresses. Each element contains the following attributes:
- rw
Group StringId - ID of read-write instance group.
- rw
Group List<CynosdbInstances Cluster Rw Group Instance> - List of instances in the read-write instance group.
- rw
Group List<String>Sgs - IDs of security group for
rw_group
. - serverless
Status String - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - serverless
Status StringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - slave
Zone String - Multi zone Addresses of the CynosDB Cluster.
- storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage
Pay DoubleMode - 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 Double - Used storage of CynosDB cluster, unit in MB.
- subnet
Id String - ID of the subnet within this VPC.
- Map<String,String>
- The tags of the CynosDB cluster.
- vpc
Id String - ID of the VPC.
- auto
Pause string - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto
Pause numberDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto
Renew numberFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - available
Zone string - The available zone of the CynosDB Cluster.
- charge
Type string - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - charset string
- Charset used by CynosDB cluster.
- cluster
Name string - Name of CynosDB cluster.
- cluster
Status string - Status of the Cynosdb cluster.
- create
Time string - Creation time of the CynosDB cluster.
- cynos
Version string - Kernel version, you can enter it when modifying.
- cynosdb
Cluster stringId - ID of the resource.
- db
Mode string - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - db
Type string - Type of CynosDB, and available values include
MYSQL
. - db
Version string - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - force
Delete 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance
Cpu numberCore - 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 string - ID of instance.
- instance
Init CynosdbInfos Cluster Instance Init Info[] - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance
Maintain numberDuration - Duration time for maintenance, unit in second.
3600
by default. - instance
Maintain numberStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance
Maintain string[]Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance
Memory numberSize - 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 string - Name of instance.
- instance
Status string - Status of the instance.
- instance
Storage numberSize - Storage size of the instance, unit in GB.
- max
Cpu number - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min
Cpu number - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old
Ip numberReserve Hours - 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 CynosdbCluster Param Item[] - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param
Template numberId - The ID of the parameter template.
- password string
- Password of
root
account. - port number
- Port of CynosDB cluster.
- prarm
Template numberId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - prepaid
Period 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 toPREPAID
. - project
Id number - ID of the project.
0
by default. - ro
Group CynosdbAddrs Cluster Ro Group Addr[] - Readonly addresses. Each element contains the following attributes:
- ro
Group stringId - ID of read-only instance group.
- ro
Group CynosdbInstances Cluster Ro Group Instance[] - List of instances in the read-only instance group.
- ro
Group string[]Sgs - IDs of security group for
ro_group
. - rw
Group CynosdbAddrs Cluster Rw Group Addr[] - Read-write addresses. Each element contains the following attributes:
- rw
Group stringId - ID of read-write instance group.
- rw
Group CynosdbInstances Cluster Rw Group Instance[] - List of instances in the read-write instance group.
- rw
Group string[]Sgs - IDs of security group for
rw_group
. - serverless
Status string - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - serverless
Status stringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - slave
Zone string - Multi zone Addresses of the CynosDB Cluster.
- storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage
Pay numberMode - 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 number - Used storage of CynosDB cluster, unit in MB.
- subnet
Id string - ID of the subnet within this VPC.
- {[key: string]: string}
- The tags of the CynosDB cluster.
- vpc
Id string - ID of the VPC.
- auto_
pause str - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto_
pause_ floatdelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto_
renew_ floatflag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. 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
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_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_ strid - ID of the resource.
- db_
mode str - Specify DB mode, only available when
db_type
isMYSQL
. 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
. ForMYSQL
, available value is5.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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance_
cpu_ floatcore - 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_ Sequence[Cynosdbinfos Cluster Instance Init Info Args] - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance_
maintain_ floatduration - Duration time for maintenance, unit in second.
3600
by default. - instance_
maintain_ floatstart_ time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance_
maintain_ Sequence[str]weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance_
memory_ floatsize - 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_ floatsize - Storage size of the instance, unit in GB.
- max_
cpu float - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min_
cpu float - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old_
ip_ floatreserve_ hours - 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[CynosdbCluster Param Item Args] - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param_
template_ floatid - The ID of the parameter template.
- password str
- Password of
root
account. - port float
- Port of CynosDB cluster.
- prarm_
template_ floatid - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - 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 toPREPAID
. - project_
id float - ID of the project.
0
by default. - ro_
group_ Sequence[Cynosdbaddrs Cluster Ro Group Addr Args] - Readonly addresses. Each element contains the following attributes:
- ro_
group_ strid - ID of read-only instance group.
- ro_
group_ Sequence[Cynosdbinstances Cluster Ro Group Instance Args] - List of instances in the read-only instance group.
- ro_
group_ Sequence[str]sgs - IDs of security group for
ro_group
. - rw_
group_ Sequence[Cynosdbaddrs Cluster Rw Group Addr Args] - Read-write addresses. Each element contains the following attributes:
- rw_
group_ strid - ID of read-write instance group.
- rw_
group_ Sequence[Cynosdbinstances Cluster Rw Group Instance Args] - List of instances in the read-write instance group.
- rw_
group_ Sequence[str]sgs - 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_ strflag - 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage_
pay_ floatmode - 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.
- Mapping[str, str]
- The tags of the CynosDB cluster.
- vpc_
id str - ID of the VPC.
- auto
Pause String - Specify whether the cluster can auto-pause while
db_mode
isSERVERLESS
. Values:yes
(default),no
. - auto
Pause NumberDelay - Specify auto-pause delay in second while
db_mode
isSERVERLESS
. Value range:[600, 691200]
. Default:600
. - auto
Renew NumberFlag - Auto renew flag. Valid values are
0
(MANUAL_RENEW),1
(AUTO_RENEW). Default value is0
. Only works for PREPAID cluster. - available
Zone String - The available zone of the CynosDB Cluster.
- charge
Type String - The charge type of instance. Valid values are
PREPAID
andPOSTPAID_BY_HOUR
. Default value isPOSTPAID_BY_HOUR
. - charset String
- Charset used by CynosDB cluster.
- cluster
Name String - Name of CynosDB cluster.
- cluster
Status String - Status of the Cynosdb cluster.
- create
Time String - Creation time of the CynosDB cluster.
- cynos
Version String - Kernel version, you can enter it when modifying.
- cynosdb
Cluster StringId - ID of the resource.
- db
Mode String - Specify DB mode, only available when
db_type
isMYSQL
. Values:NORMAL
(Default),SERVERLESS
. - db
Type String - Type of CynosDB, and available values include
MYSQL
. - db
Version String - Version of CynosDB, which is related to
db_type
. ForMYSQL
, available value is5.7
,8.0
. - force
Delete 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 bothPREPAID
andPOSTPAID_BY_HOUR
cluster. - instance
Cpu NumberCore - 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 String - ID of instance.
- instance
Init List<Property Map>Infos - Instance initialization configuration information, mainly used to select instances of different specifications when purchasing a cluster.
- instance
Maintain NumberDuration - Duration time for maintenance, unit in second.
3600
by default. - instance
Maintain NumberStart Time - Offset time from 00:00, unit in second. For example, 03:00am should be
10800
.10800
by default. - instance
Maintain List<String>Weekdays - Weekdays for maintenance.
["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
by default. - instance
Memory NumberSize - 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 String - Name of instance.
- instance
Status String - Status of the instance.
- instance
Storage NumberSize - Storage size of the instance, unit in GB.
- max
Cpu Number - Maximum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - min
Cpu Number - Minimum CPU core count, required while
db_mode
isSERVERLESS
, request DescribeServerlessInstanceSpecs for more reference. - old
Ip NumberReserve Hours - 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 List<Property Map> - Specify parameter list of database. It is valid when
param_template_id
is set in create cluster. Usedata.tencentcloud_mysql_default_params
to query available parameter details. - param
Template NumberId - The ID of the parameter template.
- password String
- Password of
root
account. - port Number
- Port of CynosDB cluster.
- prarm
Template NumberId - It will be deprecated. Use
param_template_id
instead. The ID of the parameter template. - prepaid
Period 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 toPREPAID
. - project
Id Number - ID of the project.
0
by default. - ro
Group List<Property Map>Addrs - Readonly addresses. Each element contains the following attributes:
- ro
Group StringId - ID of read-only instance group.
- ro
Group List<Property Map>Instances - List of instances in the read-only instance group.
- ro
Group List<String>Sgs - IDs of security group for
ro_group
. - rw
Group List<Property Map>Addrs - Read-write addresses. Each element contains the following attributes:
- rw
Group StringId - ID of read-write instance group.
- rw
Group List<Property Map>Instances - List of instances in the read-write instance group.
- rw
Group List<String>Sgs - IDs of security group for
rw_group
. - serverless
Status String - Serverless cluster status. NOTE: This is a readonly attribute, to modify, please set
serverless_status_flag
. - serverless
Status StringFlag - Specify whether to pause or resume serverless cluster. values:
resume
,pause
. - slave
Zone String - Multi zone Addresses of the CynosDB Cluster.
- storage
Limit 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 isPREPAID
, the value cannot exceed the maximum storage corresponding to the CPU and memory specifications, and the transaction mode isorder and pay
. when charge_type isPOSTPAID_BY_HOUR
, this argument is unnecessary. - storage
Pay NumberMode - 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 Number - Used storage of CynosDB cluster, unit in MB.
- subnet
Id String - ID of the subnet within this VPC.
- Map<String>
- The tags of the CynosDB cluster.
- vpc
Id String - ID of the VPC.
Supporting Types
CynosdbClusterInstanceInitInfo, CynosdbClusterInstanceInitInfoArgs
- Cpu double
- CPU of instance.
- Instance
Count double - Instance count. Range: [1, 15].
- Instance
Type string - Instance type. Value:
rw
,ro
. - Memory double
- Memory of instance.
- Device
Type string - Instance machine type. Values:
common
,exclusive
. - Max
Ro doubleCount - Maximum number of Serverless instances. Range [1,15].
- Max
Ro doubleCpu - Maximum Serverless Instance Specifications.
- Min
Ro doubleCount - Minimum number of Serverless instances. Range [1,15].
- Min
Ro doubleCpu - Minimum Serverless Instance Specifications.
- Cpu float64
- CPU of instance.
- Instance
Count float64 - Instance count. Range: [1, 15].
- Instance
Type string - Instance type. Value:
rw
,ro
. - Memory float64
- Memory of instance.
- Device
Type string - Instance machine type. Values:
common
,exclusive
. - Max
Ro float64Count - Maximum number of Serverless instances. Range [1,15].
- Max
Ro float64Cpu - Maximum Serverless Instance Specifications.
- Min
Ro float64Count - Minimum number of Serverless instances. Range [1,15].
- Min
Ro float64Cpu - Minimum Serverless Instance Specifications.
- cpu Double
- CPU of instance.
- instance
Count Double - Instance count. Range: [1, 15].
- instance
Type String - Instance type. Value:
rw
,ro
. - memory Double
- Memory of instance.
- device
Type String - Instance machine type. Values:
common
,exclusive
. - max
Ro DoubleCount - Maximum number of Serverless instances. Range [1,15].
- max
Ro DoubleCpu - Maximum Serverless Instance Specifications.
- min
Ro DoubleCount - Minimum number of Serverless instances. Range [1,15].
- min
Ro DoubleCpu - Minimum Serverless Instance Specifications.
- cpu number
- CPU of instance.
- instance
Count number - Instance count. Range: [1, 15].
- instance
Type string - Instance type. Value:
rw
,ro
. - memory number
- Memory of instance.
- device
Type string - Instance machine type. Values:
common
,exclusive
. - max
Ro numberCount - Maximum number of Serverless instances. Range [1,15].
- max
Ro numberCpu - Maximum Serverless Instance Specifications.
- min
Ro numberCount - Minimum number of Serverless instances. Range [1,15].
- min
Ro numberCpu - Minimum Serverless Instance Specifications.
- cpu float
- CPU of instance.
- instance_
count float - Instance count. Range: [1, 15].
- instance_
type str - Instance type. Value:
rw
,ro
. - memory float
- Memory of instance.
- device_
type str - Instance machine type. Values:
common
,exclusive
. - max_
ro_ floatcount - Maximum number of Serverless instances. Range [1,15].
- max_
ro_ floatcpu - Maximum Serverless Instance Specifications.
- min_
ro_ floatcount - Minimum number of Serverless instances. Range [1,15].
- min_
ro_ floatcpu - Minimum Serverless Instance Specifications.
- cpu Number
- CPU of instance.
- instance
Count Number - Instance count. Range: [1, 15].
- instance
Type String - Instance type. Value:
rw
,ro
. - memory Number
- Memory of instance.
- device
Type String - Instance machine type. Values:
common
,exclusive
. - max
Ro NumberCount - Maximum number of Serverless instances. Range [1,15].
- max
Ro NumberCpu - Maximum Serverless Instance Specifications.
- min
Ro NumberCount - Minimum number of Serverless instances. Range [1,15].
- min
Ro NumberCpu - Minimum Serverless Instance Specifications.
CynosdbClusterParamItem, CynosdbClusterParamItemArgs
- Current
Value string - Param expected value to set.
- Name string
- Name of param, e.g.
character_set_server
. - Old
Value string - Param old value, indicates the value which already set, this value is required when modifying current_value.
- Current
Value string - Param expected value to set.
- Name string
- Name of param, e.g.
character_set_server
. - Old
Value string - Param old value, indicates the value which already set, this value is required when modifying current_value.
- current
Value String - Param expected value to set.
- name String
- Name of param, e.g.
character_set_server
. - old
Value String - Param old value, indicates the value which already set, this value is required when modifying current_value.
- current
Value string - Param expected value to set.
- name string
- Name of param, e.g.
character_set_server
. - old
Value string - Param old value, indicates the value which already set, this value is required when modifying current_value.
- current_
value str - Param expected value to set.
- name 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.
- current
Value String - Param expected value to set.
- name String
- Name of param, e.g.
character_set_server
. - old
Value String - Param old value, indicates the value which already set, this value is required when modifying current_value.
CynosdbClusterRoGroupAddr, CynosdbClusterRoGroupAddrArgs
CynosdbClusterRoGroupInstance, CynosdbClusterRoGroupInstanceArgs
- Instance
Id string - ID of instance.
- Instance
Name string - Name of instance.
- Instance
Id string - ID of instance.
- Instance
Name string - Name of instance.
- instance
Id String - ID of instance.
- instance
Name String - Name of instance.
- instance
Id string - ID of instance.
- instance
Name string - Name of instance.
- instance_
id str - ID of instance.
- instance_
name str - Name of instance.
- instance
Id String - ID of instance.
- instance
Name String - Name of instance.
CynosdbClusterRwGroupAddr, CynosdbClusterRwGroupAddrArgs
CynosdbClusterRwGroupInstance, CynosdbClusterRwGroupInstanceArgs
- Instance
Id string - ID of instance.
- Instance
Name string - Name of instance.
- Instance
Id string - ID of instance.
- Instance
Name string - Name of instance.
- instance
Id String - ID of instance.
- instance
Name String - Name of instance.
- instance
Id string - ID of instance.
- instance
Name string - Name of instance.
- instance_
id str - ID of instance.
- instance_
name str - Name of instance.
- instance
Id String - ID of instance.
- instance
Name String - Name of instance.
Import
CynosDB cluster can be imported using the id, e.g.
$ pulumi import tencentcloud:index/cynosdbCluster:CynosdbCluster example cynosdbmysql-dzj5l8gz
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.