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

tencentcloud.DcdbDbInstance

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a dcdb db_instance

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const dbInstance = new tencentcloud.DcdbDbInstance("dbInstance", {
        instanceName: "test_dcdb_db_instance",
        zones: ["ap-guangzhou-5"],
        period: 1,
        shardMemory: 2,
        shardStorage: 10,
        shardNodeCount: 2,
        shardCount: 2,
        vpcId: local.vpc_id,
        subnetId: local.subnet_id,
        dbVersionId: "8.0",
        resourceTags: [{
            tagKey: "aaa",
            tagValue: "bbb",
        }],
        initParams: [
            {
                param: "character_set_server",
                value: "utf8mb4",
            },
            {
                param: "lower_case_table_names",
                value: "1",
            },
            {
                param: "sync_mode",
                value: "2",
            },
            {
                param: "innodb_page_size",
                value: "16384",
            },
        ],
        securityGroupIds: [local.sg_id],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    db_instance = tencentcloud.DcdbDbInstance("dbInstance",
        instance_name="test_dcdb_db_instance",
        zones=["ap-guangzhou-5"],
        period=1,
        shard_memory=2,
        shard_storage=10,
        shard_node_count=2,
        shard_count=2,
        vpc_id=local["vpc_id"],
        subnet_id=local["subnet_id"],
        db_version_id="8.0",
        resource_tags=[{
            "tag_key": "aaa",
            "tag_value": "bbb",
        }],
        init_params=[
            {
                "param": "character_set_server",
                "value": "utf8mb4",
            },
            {
                "param": "lower_case_table_names",
                "value": "1",
            },
            {
                "param": "sync_mode",
                "value": "2",
            },
            {
                "param": "innodb_page_size",
                "value": "16384",
            },
        ],
        security_group_ids=[local["sg_id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewDcdbDbInstance(ctx, "dbInstance", &tencentcloud.DcdbDbInstanceArgs{
    			InstanceName: pulumi.String("test_dcdb_db_instance"),
    			Zones: pulumi.StringArray{
    				pulumi.String("ap-guangzhou-5"),
    			},
    			Period:         pulumi.Float64(1),
    			ShardMemory:    pulumi.Float64(2),
    			ShardStorage:   pulumi.Float64(10),
    			ShardNodeCount: pulumi.Float64(2),
    			ShardCount:     pulumi.Float64(2),
    			VpcId:          pulumi.Any(local.Vpc_id),
    			SubnetId:       pulumi.Any(local.Subnet_id),
    			DbVersionId:    pulumi.String("8.0"),
    			ResourceTags: tencentcloud.DcdbDbInstanceResourceTagArray{
    				&tencentcloud.DcdbDbInstanceResourceTagArgs{
    					TagKey:   pulumi.String("aaa"),
    					TagValue: pulumi.String("bbb"),
    				},
    			},
    			InitParams: tencentcloud.DcdbDbInstanceInitParamArray{
    				&tencentcloud.DcdbDbInstanceInitParamArgs{
    					Param: pulumi.String("character_set_server"),
    					Value: pulumi.String("utf8mb4"),
    				},
    				&tencentcloud.DcdbDbInstanceInitParamArgs{
    					Param: pulumi.String("lower_case_table_names"),
    					Value: pulumi.String("1"),
    				},
    				&tencentcloud.DcdbDbInstanceInitParamArgs{
    					Param: pulumi.String("sync_mode"),
    					Value: pulumi.String("2"),
    				},
    				&tencentcloud.DcdbDbInstanceInitParamArgs{
    					Param: pulumi.String("innodb_page_size"),
    					Value: pulumi.String("16384"),
    				},
    			},
    			SecurityGroupIds: pulumi.StringArray{
    				local.Sg_id,
    			},
    		})
    		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 dbInstance = new Tencentcloud.DcdbDbInstance("dbInstance", new()
        {
            InstanceName = "test_dcdb_db_instance",
            Zones = new[]
            {
                "ap-guangzhou-5",
            },
            Period = 1,
            ShardMemory = 2,
            ShardStorage = 10,
            ShardNodeCount = 2,
            ShardCount = 2,
            VpcId = local.Vpc_id,
            SubnetId = local.Subnet_id,
            DbVersionId = "8.0",
            ResourceTags = new[]
            {
                new Tencentcloud.Inputs.DcdbDbInstanceResourceTagArgs
                {
                    TagKey = "aaa",
                    TagValue = "bbb",
                },
            },
            InitParams = new[]
            {
                new Tencentcloud.Inputs.DcdbDbInstanceInitParamArgs
                {
                    Param = "character_set_server",
                    Value = "utf8mb4",
                },
                new Tencentcloud.Inputs.DcdbDbInstanceInitParamArgs
                {
                    Param = "lower_case_table_names",
                    Value = "1",
                },
                new Tencentcloud.Inputs.DcdbDbInstanceInitParamArgs
                {
                    Param = "sync_mode",
                    Value = "2",
                },
                new Tencentcloud.Inputs.DcdbDbInstanceInitParamArgs
                {
                    Param = "innodb_page_size",
                    Value = "16384",
                },
            },
            SecurityGroupIds = new[]
            {
                local.Sg_id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.DcdbDbInstance;
    import com.pulumi.tencentcloud.DcdbDbInstanceArgs;
    import com.pulumi.tencentcloud.inputs.DcdbDbInstanceResourceTagArgs;
    import com.pulumi.tencentcloud.inputs.DcdbDbInstanceInitParamArgs;
    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) {
            var dbInstance = new DcdbDbInstance("dbInstance", DcdbDbInstanceArgs.builder()
                .instanceName("test_dcdb_db_instance")
                .zones("ap-guangzhou-5")
                .period(1)
                .shardMemory("2")
                .shardStorage("10")
                .shardNodeCount("2")
                .shardCount("2")
                .vpcId(local.vpc_id())
                .subnetId(local.subnet_id())
                .dbVersionId("8.0")
                .resourceTags(DcdbDbInstanceResourceTagArgs.builder()
                    .tagKey("aaa")
                    .tagValue("bbb")
                    .build())
                .initParams(            
                    DcdbDbInstanceInitParamArgs.builder()
                        .param("character_set_server")
                        .value("utf8mb4")
                        .build(),
                    DcdbDbInstanceInitParamArgs.builder()
                        .param("lower_case_table_names")
                        .value("1")
                        .build(),
                    DcdbDbInstanceInitParamArgs.builder()
                        .param("sync_mode")
                        .value("2")
                        .build(),
                    DcdbDbInstanceInitParamArgs.builder()
                        .param("innodb_page_size")
                        .value("16384")
                        .build())
                .securityGroupIds(local.sg_id())
                .build());
    
        }
    }
    
    resources:
      dbInstance:
        type: tencentcloud:DcdbDbInstance
        properties:
          instanceName: test_dcdb_db_instance
          zones:
            - ap-guangzhou-5
          period: 1
          shardMemory: '2'
          shardStorage: '10'
          shardNodeCount: '2'
          shardCount: '2'
          vpcId: ${local.vpc_id}
          subnetId: ${local.subnet_id}
          dbVersionId: '8.0'
          resourceTags:
            - tagKey: aaa
              tagValue: bbb
          initParams:
            - param: character_set_server
              value: utf8mb4
            - param: lower_case_table_names
              value: '1'
            - param: sync_mode
              value: '2'
            - param: innodb_page_size
              value: '16384'
          securityGroupIds:
            - ${local.sg_id}
    

    Create DcdbDbInstance Resource

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

    Constructor syntax

    new DcdbDbInstance(name: string, args: DcdbDbInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def DcdbDbInstance(resource_name: str,
                       args: DcdbDbInstanceArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def DcdbDbInstance(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       period: Optional[float] = None,
                       zones: Optional[Sequence[str]] = None,
                       shard_storage: Optional[float] = None,
                       shard_node_count: Optional[float] = None,
                       shard_memory: Optional[float] = None,
                       shard_count: Optional[float] = None,
                       resource_tags: Optional[Sequence[DcdbDbInstanceResourceTagArgs]] = None,
                       dcn_instance_id: Optional[str] = None,
                       instance_name: Optional[str] = None,
                       ipv6_flag: Optional[float] = None,
                       extranet_access: Optional[bool] = None,
                       project_id: Optional[float] = None,
                       auto_renew_flag: Optional[float] = None,
                       security_group_ids: Optional[Sequence[str]] = None,
                       dcn_region: Optional[str] = None,
                       init_params: Optional[Sequence[DcdbDbInstanceInitParamArgs]] = None,
                       dcdb_db_instance_id: Optional[str] = None,
                       db_version_id: Optional[str] = None,
                       subnet_id: Optional[str] = None,
                       vip: Optional[str] = None,
                       vipv6: Optional[str] = None,
                       voucher_ids: Optional[Sequence[str]] = None,
                       vpc_id: Optional[str] = None,
                       auto_voucher: Optional[bool] = None)
    func NewDcdbDbInstance(ctx *Context, name string, args DcdbDbInstanceArgs, opts ...ResourceOption) (*DcdbDbInstance, error)
    public DcdbDbInstance(string name, DcdbDbInstanceArgs args, CustomResourceOptions? opts = null)
    public DcdbDbInstance(String name, DcdbDbInstanceArgs args)
    public DcdbDbInstance(String name, DcdbDbInstanceArgs args, CustomResourceOptions options)
    
    type: tencentcloud:DcdbDbInstance
    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 DcdbDbInstanceArgs
    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 DcdbDbInstanceArgs
    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 DcdbDbInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DcdbDbInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DcdbDbInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DcdbDbInstance 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 DcdbDbInstance resource accepts the following input properties:

    Period double
    The length of time you want to buy, unit: month.
    ShardCount double
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    ShardMemory double
    "Shard memory size, unit: GB, can pass DescribeShardSpec""Query the instance specification to obtain.".
    ShardNodeCount double
    "Number of single shard nodes, can pass DescribeShardSpec""Query the instance specification to obtain.".
    ShardStorage double
    "Shard storage size, unit: GB, can pass DescribeShardSpec""Query the instance specification to obtain.".
    Zones List<string>
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    AutoRenewFlag double
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    AutoVoucher bool
    Whether to automatically use vouchers for payment, not used by default.
    DbVersionId string
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    DcdbDbInstanceId string
    ID of the resource.
    DcnInstanceId string
    DCN source instance ID.
    DcnRegion string
    DCN source region.
    ExtranetAccess bool
    Whether to open the extranet access.
    InitParams List<DcdbDbInstanceInitParam>
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    InstanceName string
    Instance name, you can set the name of the instance independently through this field.
    Ipv6Flag double
    Whether to support IPv6.
    ProjectId double
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    ResourceTags List<DcdbDbInstanceResourceTag>
    Array of tag key-value pairs.
    SecurityGroupIds List<string>
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    SubnetId string
    Virtual private network subnet ID, required when VpcId is not empty.
    Vip string
    The field is required to specify VIP.
    Vipv6 string
    The field is required to specify VIPv6.
    VoucherIds List<string>
    Voucher ID list, currently only supports specifying one voucher.
    VpcId string
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    Period float64
    The length of time you want to buy, unit: month.
    ShardCount float64
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    ShardMemory float64
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    ShardNodeCount float64
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    ShardStorage float64
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    Zones []string
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    AutoRenewFlag float64
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    AutoVoucher bool
    Whether to automatically use vouchers for payment, not used by default.
    DbVersionId string
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    DcdbDbInstanceId string
    ID of the resource.
    DcnInstanceId string
    DCN source instance ID.
    DcnRegion string
    DCN source region.
    ExtranetAccess bool
    Whether to open the extranet access.
    InitParams []DcdbDbInstanceInitParamArgs
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    InstanceName string
    Instance name, you can set the name of the instance independently through this field.
    Ipv6Flag float64
    Whether to support IPv6.
    ProjectId float64
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    ResourceTags []DcdbDbInstanceResourceTagArgs
    Array of tag key-value pairs.
    SecurityGroupIds []string
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    SubnetId string
    Virtual private network subnet ID, required when VpcId is not empty.
    Vip string
    The field is required to specify VIP.
    Vipv6 string
    The field is required to specify VIPv6.
    VoucherIds []string
    Voucher ID list, currently only supports specifying one voucher.
    VpcId string
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    period Double
    The length of time you want to buy, unit: month.
    shardCount Double
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shardMemory Double
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardNodeCount Double
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardStorage Double
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    zones List<String>
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    autoRenewFlag Double
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    autoVoucher Boolean
    Whether to automatically use vouchers for payment, not used by default.
    dbVersionId String
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdbDbInstanceId String
    ID of the resource.
    dcnInstanceId String
    DCN source instance ID.
    dcnRegion String
    DCN source region.
    extranetAccess Boolean
    Whether to open the extranet access.
    initParams List<DcdbDbInstanceInitParam>
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instanceName String
    Instance name, you can set the name of the instance independently through this field.
    ipv6Flag Double
    Whether to support IPv6.
    projectId Double
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resourceTags List<DcdbDbInstanceResourceTag>
    Array of tag key-value pairs.
    securityGroupIds List<String>
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    subnetId String
    Virtual private network subnet ID, required when VpcId is not empty.
    vip String
    The field is required to specify VIP.
    vipv6 String
    The field is required to specify VIPv6.
    voucherIds List<String>
    Voucher ID list, currently only supports specifying one voucher.
    vpcId String
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    period number
    The length of time you want to buy, unit: month.
    shardCount number
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shardMemory number
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardNodeCount number
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardStorage number
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    zones string[]
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    autoRenewFlag number
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    autoVoucher boolean
    Whether to automatically use vouchers for payment, not used by default.
    dbVersionId string
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdbDbInstanceId string
    ID of the resource.
    dcnInstanceId string
    DCN source instance ID.
    dcnRegion string
    DCN source region.
    extranetAccess boolean
    Whether to open the extranet access.
    initParams DcdbDbInstanceInitParam[]
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instanceName string
    Instance name, you can set the name of the instance independently through this field.
    ipv6Flag number
    Whether to support IPv6.
    projectId number
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resourceTags DcdbDbInstanceResourceTag[]
    Array of tag key-value pairs.
    securityGroupIds string[]
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    subnetId string
    Virtual private network subnet ID, required when VpcId is not empty.
    vip string
    The field is required to specify VIP.
    vipv6 string
    The field is required to specify VIPv6.
    voucherIds string[]
    Voucher ID list, currently only supports specifying one voucher.
    vpcId string
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    period float
    The length of time you want to buy, unit: month.
    shard_count float
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shard_memory float
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shard_node_count float
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shard_storage float
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    zones Sequence[str]
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    auto_renew_flag float
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    auto_voucher bool
    Whether to automatically use vouchers for payment, not used by default.
    db_version_id str
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdb_db_instance_id str
    ID of the resource.
    dcn_instance_id str
    DCN source instance ID.
    dcn_region str
    DCN source region.
    extranet_access bool
    Whether to open the extranet access.
    init_params Sequence[DcdbDbInstanceInitParamArgs]
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instance_name str
    Instance name, you can set the name of the instance independently through this field.
    ipv6_flag float
    Whether to support IPv6.
    project_id float
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resource_tags Sequence[DcdbDbInstanceResourceTagArgs]
    Array of tag key-value pairs.
    security_group_ids Sequence[str]
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    subnet_id str
    Virtual private network subnet ID, required when VpcId is not empty.
    vip str
    The field is required to specify VIP.
    vipv6 str
    The field is required to specify VIPv6.
    voucher_ids Sequence[str]
    Voucher ID list, currently only supports specifying one voucher.
    vpc_id str
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    period Number
    The length of time you want to buy, unit: month.
    shardCount Number
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shardMemory Number
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardNodeCount Number
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardStorage Number
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    zones List<String>
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    autoRenewFlag Number
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    autoVoucher Boolean
    Whether to automatically use vouchers for payment, not used by default.
    dbVersionId String
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdbDbInstanceId String
    ID of the resource.
    dcnInstanceId String
    DCN source instance ID.
    dcnRegion String
    DCN source region.
    extranetAccess Boolean
    Whether to open the extranet access.
    initParams List<Property Map>
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instanceName String
    Instance name, you can set the name of the instance independently through this field.
    ipv6Flag Number
    Whether to support IPv6.
    projectId Number
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resourceTags List<Property Map>
    Array of tag key-value pairs.
    securityGroupIds List<String>
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    subnetId String
    Virtual private network subnet ID, required when VpcId is not empty.
    vip String
    The field is required to specify VIP.
    vipv6 String
    The field is required to specify VIPv6.
    voucherIds List<String>
    Voucher ID list, currently only supports specifying one voucher.
    vpcId String
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Vport double
    Intranet port.
    Id string
    The provider-assigned unique ID for this managed resource.
    Vport float64
    Intranet port.
    id String
    The provider-assigned unique ID for this managed resource.
    vport Double
    Intranet port.
    id string
    The provider-assigned unique ID for this managed resource.
    vport number
    Intranet port.
    id str
    The provider-assigned unique ID for this managed resource.
    vport float
    Intranet port.
    id String
    The provider-assigned unique ID for this managed resource.
    vport Number
    Intranet port.

    Look up Existing DcdbDbInstance Resource

    Get an existing DcdbDbInstance 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?: DcdbDbInstanceState, opts?: CustomResourceOptions): DcdbDbInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_renew_flag: Optional[float] = None,
            auto_voucher: Optional[bool] = None,
            db_version_id: Optional[str] = None,
            dcdb_db_instance_id: Optional[str] = None,
            dcn_instance_id: Optional[str] = None,
            dcn_region: Optional[str] = None,
            extranet_access: Optional[bool] = None,
            init_params: Optional[Sequence[DcdbDbInstanceInitParamArgs]] = None,
            instance_name: Optional[str] = None,
            ipv6_flag: Optional[float] = None,
            period: Optional[float] = None,
            project_id: Optional[float] = None,
            resource_tags: Optional[Sequence[DcdbDbInstanceResourceTagArgs]] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            shard_count: Optional[float] = None,
            shard_memory: Optional[float] = None,
            shard_node_count: Optional[float] = None,
            shard_storage: Optional[float] = None,
            subnet_id: Optional[str] = None,
            vip: Optional[str] = None,
            vipv6: Optional[str] = None,
            voucher_ids: Optional[Sequence[str]] = None,
            vpc_id: Optional[str] = None,
            vport: Optional[float] = None,
            zones: Optional[Sequence[str]] = None) -> DcdbDbInstance
    func GetDcdbDbInstance(ctx *Context, name string, id IDInput, state *DcdbDbInstanceState, opts ...ResourceOption) (*DcdbDbInstance, error)
    public static DcdbDbInstance Get(string name, Input<string> id, DcdbDbInstanceState? state, CustomResourceOptions? opts = null)
    public static DcdbDbInstance get(String name, Output<String> id, DcdbDbInstanceState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:DcdbDbInstance    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.
    The following state arguments are supported:
    AutoRenewFlag double
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    AutoVoucher bool
    Whether to automatically use vouchers for payment, not used by default.
    DbVersionId string
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    DcdbDbInstanceId string
    ID of the resource.
    DcnInstanceId string
    DCN source instance ID.
    DcnRegion string
    DCN source region.
    ExtranetAccess bool
    Whether to open the extranet access.
    InitParams List<DcdbDbInstanceInitParam>
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    InstanceName string
    Instance name, you can set the name of the instance independently through this field.
    Ipv6Flag double
    Whether to support IPv6.
    Period double
    The length of time you want to buy, unit: month.
    ProjectId double
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    ResourceTags List<DcdbDbInstanceResourceTag>
    Array of tag key-value pairs.
    SecurityGroupIds List<string>
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    ShardCount double
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    ShardMemory double
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    ShardNodeCount double
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    ShardStorage double
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    SubnetId string
    Virtual private network subnet ID, required when VpcId is not empty.
    Vip string
    The field is required to specify VIP.
    Vipv6 string
    The field is required to specify VIPv6.
    VoucherIds List<string>
    Voucher ID list, currently only supports specifying one voucher.
    VpcId string
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    Vport double
    Intranet port.
    Zones List<string>
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    AutoRenewFlag float64
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    AutoVoucher bool
    Whether to automatically use vouchers for payment, not used by default.
    DbVersionId string
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    DcdbDbInstanceId string
    ID of the resource.
    DcnInstanceId string
    DCN source instance ID.
    DcnRegion string
    DCN source region.
    ExtranetAccess bool
    Whether to open the extranet access.
    InitParams []DcdbDbInstanceInitParamArgs
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    InstanceName string
    Instance name, you can set the name of the instance independently through this field.
    Ipv6Flag float64
    Whether to support IPv6.
    Period float64
    The length of time you want to buy, unit: month.
    ProjectId float64
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    ResourceTags []DcdbDbInstanceResourceTagArgs
    Array of tag key-value pairs.
    SecurityGroupIds []string
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    ShardCount float64
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    ShardMemory float64
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    ShardNodeCount float64
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    ShardStorage float64
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    SubnetId string
    Virtual private network subnet ID, required when VpcId is not empty.
    Vip string
    The field is required to specify VIP.
    Vipv6 string
    The field is required to specify VIPv6.
    VoucherIds []string
    Voucher ID list, currently only supports specifying one voucher.
    VpcId string
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    Vport float64
    Intranet port.
    Zones []string
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    autoRenewFlag Double
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    autoVoucher Boolean
    Whether to automatically use vouchers for payment, not used by default.
    dbVersionId String
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdbDbInstanceId String
    ID of the resource.
    dcnInstanceId String
    DCN source instance ID.
    dcnRegion String
    DCN source region.
    extranetAccess Boolean
    Whether to open the extranet access.
    initParams List<DcdbDbInstanceInitParam>
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instanceName String
    Instance name, you can set the name of the instance independently through this field.
    ipv6Flag Double
    Whether to support IPv6.
    period Double
    The length of time you want to buy, unit: month.
    projectId Double
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resourceTags List<DcdbDbInstanceResourceTag>
    Array of tag key-value pairs.
    securityGroupIds List<String>
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    shardCount Double
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shardMemory Double
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardNodeCount Double
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardStorage Double
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    subnetId String
    Virtual private network subnet ID, required when VpcId is not empty.
    vip String
    The field is required to specify VIP.
    vipv6 String
    The field is required to specify VIPv6.
    voucherIds List<String>
    Voucher ID list, currently only supports specifying one voucher.
    vpcId String
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    vport Double
    Intranet port.
    zones List<String>
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    autoRenewFlag number
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    autoVoucher boolean
    Whether to automatically use vouchers for payment, not used by default.
    dbVersionId string
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdbDbInstanceId string
    ID of the resource.
    dcnInstanceId string
    DCN source instance ID.
    dcnRegion string
    DCN source region.
    extranetAccess boolean
    Whether to open the extranet access.
    initParams DcdbDbInstanceInitParam[]
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instanceName string
    Instance name, you can set the name of the instance independently through this field.
    ipv6Flag number
    Whether to support IPv6.
    period number
    The length of time you want to buy, unit: month.
    projectId number
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resourceTags DcdbDbInstanceResourceTag[]
    Array of tag key-value pairs.
    securityGroupIds string[]
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    shardCount number
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shardMemory number
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardNodeCount number
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardStorage number
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    subnetId string
    Virtual private network subnet ID, required when VpcId is not empty.
    vip string
    The field is required to specify VIP.
    vipv6 string
    The field is required to specify VIPv6.
    voucherIds string[]
    Voucher ID list, currently only supports specifying one voucher.
    vpcId string
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    vport number
    Intranet port.
    zones string[]
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    auto_renew_flag float
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    auto_voucher bool
    Whether to automatically use vouchers for payment, not used by default.
    db_version_id str
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdb_db_instance_id str
    ID of the resource.
    dcn_instance_id str
    DCN source instance ID.
    dcn_region str
    DCN source region.
    extranet_access bool
    Whether to open the extranet access.
    init_params Sequence[DcdbDbInstanceInitParamArgs]
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instance_name str
    Instance name, you can set the name of the instance independently through this field.
    ipv6_flag float
    Whether to support IPv6.
    period float
    The length of time you want to buy, unit: month.
    project_id float
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resource_tags Sequence[DcdbDbInstanceResourceTagArgs]
    Array of tag key-value pairs.
    security_group_ids Sequence[str]
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    shard_count float
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shard_memory float
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shard_node_count float
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shard_storage float
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    subnet_id str
    Virtual private network subnet ID, required when VpcId is not empty.
    vip str
    The field is required to specify VIP.
    vipv6 str
    The field is required to specify VIPv6.
    voucher_ids Sequence[str]
    Voucher ID list, currently only supports specifying one voucher.
    vpc_id str
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    vport float
    Intranet port.
    zones Sequence[str]
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.
    autoRenewFlag Number
    &quot;Automatic renewal flag, 0 means the default state (the user has not set it, that is, the initial state is manual renewal, and the user has activated the prepaid non-stop privilege and will also perform automatic renewal).&quot;&quot;1 means automatic renewal, 2 means no automatic renewal (user setting).&quot;&quot;if the business has no concept of renewal or automatic renewal is not required, it needs to be set to 0.&quot;.
    autoVoucher Boolean
    Whether to automatically use vouchers for payment, not used by default.
    dbVersionId String
    &quot;Database engine version, currently available: 8.0.18, 10.1.9, 5.7.17.&quot;&quot;8.0.18 - MySQL 8.0.18;&quot;&quot;10.1.9 - Mariadb 10.1.9;&quot;&quot;5.7.17 - Percona 5.7.17&quot;&quot;If not filled, the default is 5.7.17, which means Percona 5.7.17.&quot;.
    dcdbDbInstanceId String
    ID of the resource.
    dcnInstanceId String
    DCN source instance ID.
    dcnRegion String
    DCN source region.
    extranetAccess Boolean
    Whether to open the extranet access.
    initParams List<Property Map>
    &quot;parameter list. The optional values of this interface are:&quot;&quot;character_set_server (character set, must be passed),&quot;&quot;lower_case_table_names (table name is case sensitive, must be passed, 0 - sensitive; 1 - insensitive),&quot;&quot;innodb_page_size (innodb data page, default 16K),&quot;&quot;sync_mode ( Synchronous mode: 0 - asynchronous; 1 - strong synchronous; 2 - strong synchronous degenerate. The default is strong synchronous degenerate)&quot;.
    instanceName String
    Instance name, you can set the name of the instance independently through this field.
    ipv6Flag Number
    Whether to support IPv6.
    period Number
    The length of time you want to buy, unit: month.
    projectId Number
    Project ID, which can be obtained by viewing the project list, if not passed, it will be associated with the default project.
    resourceTags List<Property Map>
    Array of tag key-value pairs.
    securityGroupIds List<String>
    Security group ids, the security group can be passed in the form of an array, compatible with the previous SecurityGroupId parameter.
    shardCount Number
    The number of instance fragments, the optional range is 2-8, and new fragments can be added to a maximum of 64 fragments by upgrading the instance.
    shardMemory Number
    &quot;Shard memory size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardNodeCount Number
    &quot;Number of single shard nodes, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    shardStorage Number
    &quot;Shard storage size, unit: GB, can pass DescribeShardSpec&quot;&quot;Query the instance specification to obtain.&quot;.
    subnetId String
    Virtual private network subnet ID, required when VpcId is not empty.
    vip String
    The field is required to specify VIP.
    vipv6 String
    The field is required to specify VIPv6.
    voucherIds List<String>
    Voucher ID list, currently only supports specifying one voucher.
    vpcId String
    Virtual private network ID, if not passed or passed empty, it means that it is created as a basic network.
    vport Number
    Intranet port.
    zones List<String>
    &quot;The availability zone distribution of shard nodes can be filled with up to two availability zones. When the shard specification is one master and two slaves, two of the nodes are in the first availability zone.&quot;&quot;Note that the current availability zone that can be sold needs to be pulled through the DescribeDCDBSaleInfo interface.&quot;.

    Supporting Types

    DcdbDbInstanceInitParam, DcdbDbInstanceInitParamArgs

    Param string
    The name of parameter.
    Value string
    The value of parameter.
    Param string
    The name of parameter.
    Value string
    The value of parameter.
    param String
    The name of parameter.
    value String
    The value of parameter.
    param string
    The name of parameter.
    value string
    The value of parameter.
    param str
    The name of parameter.
    value str
    The value of parameter.
    param String
    The name of parameter.
    value String
    The value of parameter.

    DcdbDbInstanceResourceTag, DcdbDbInstanceResourceTagArgs

    TagKey string
    The key of tag.
    TagValue string
    The value of tag.
    TagKey string
    The key of tag.
    TagValue string
    The value of tag.
    tagKey String
    The key of tag.
    tagValue String
    The value of tag.
    tagKey string
    The key of tag.
    tagValue string
    The value of tag.
    tag_key str
    The key of tag.
    tag_value str
    The value of tag.
    tagKey String
    The key of tag.
    tagValue String
    The value of tag.

    Import

    dcdb db_instance can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/dcdbDbInstance:DcdbDbInstance db_instance db_instance_id
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack