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

tencentcloud.PostgresqlCloneDbInstance

Explore with Pulumi AI

Provides a resource to create a postgresql clone db instance

Example Usage

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

const example = new tencentcloud.PostgresqlCloneDbInstance("example", {
    autoRenewFlag: 0,
    dbInstanceId: "postgres-evsqpyap",
    dbNodeSets: [
        {
            role: "Primary",
            zone: "ap-guangzhou-6",
        },
        {
            role: "Standby",
            zone: "ap-guangzhou-6",
        },
    ],
    instanceChargeType: "POSTPAID_BY_HOUR",
    period: 1,
    projectId: 0,
    recoveryTargetTime: "2024-10-12 18:17:00",
    securityGroupIds: ["sg-8stavs03"],
    specCode: "pg.it.medium4",
    storage: 200,
    subnetId: "subnet-b8hintyy",
    tagLists: [{
        tagKey: "createBy",
        tagValue: "terraform",
    }],
    vpcId: "vpc-a6zec4mf",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.PostgresqlCloneDbInstance("example",
    auto_renew_flag=0,
    db_instance_id="postgres-evsqpyap",
    db_node_sets=[
        {
            "role": "Primary",
            "zone": "ap-guangzhou-6",
        },
        {
            "role": "Standby",
            "zone": "ap-guangzhou-6",
        },
    ],
    instance_charge_type="POSTPAID_BY_HOUR",
    period=1,
    project_id=0,
    recovery_target_time="2024-10-12 18:17:00",
    security_group_ids=["sg-8stavs03"],
    spec_code="pg.it.medium4",
    storage=200,
    subnet_id="subnet-b8hintyy",
    tag_lists=[{
        "tag_key": "createBy",
        "tag_value": "terraform",
    }],
    vpc_id="vpc-a6zec4mf")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.NewPostgresqlCloneDbInstance(ctx, "example", &tencentcloud.PostgresqlCloneDbInstanceArgs{
			AutoRenewFlag: pulumi.Float64(0),
			DbInstanceId:  pulumi.String("postgres-evsqpyap"),
			DbNodeSets: tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArray{
				&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
					Role: pulumi.String("Primary"),
					Zone: pulumi.String("ap-guangzhou-6"),
				},
				&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
					Role: pulumi.String("Standby"),
					Zone: pulumi.String("ap-guangzhou-6"),
				},
			},
			InstanceChargeType: pulumi.String("POSTPAID_BY_HOUR"),
			Period:             pulumi.Float64(1),
			ProjectId:          pulumi.Float64(0),
			RecoveryTargetTime: pulumi.String("2024-10-12 18:17:00"),
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("sg-8stavs03"),
			},
			SpecCode: pulumi.String("pg.it.medium4"),
			Storage:  pulumi.Float64(200),
			SubnetId: pulumi.String("subnet-b8hintyy"),
			TagLists: tencentcloud.PostgresqlCloneDbInstanceTagListArray{
				&tencentcloud.PostgresqlCloneDbInstanceTagListArgs{
					TagKey:   pulumi.String("createBy"),
					TagValue: pulumi.String("terraform"),
				},
			},
			VpcId: pulumi.String("vpc-a6zec4mf"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.PostgresqlCloneDbInstance("example", new()
    {
        AutoRenewFlag = 0,
        DbInstanceId = "postgres-evsqpyap",
        DbNodeSets = new[]
        {
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
            {
                Role = "Primary",
                Zone = "ap-guangzhou-6",
            },
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
            {
                Role = "Standby",
                Zone = "ap-guangzhou-6",
            },
        },
        InstanceChargeType = "POSTPAID_BY_HOUR",
        Period = 1,
        ProjectId = 0,
        RecoveryTargetTime = "2024-10-12 18:17:00",
        SecurityGroupIds = new[]
        {
            "sg-8stavs03",
        },
        SpecCode = "pg.it.medium4",
        Storage = 200,
        SubnetId = "subnet-b8hintyy",
        TagLists = new[]
        {
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceTagListArgs
            {
                TagKey = "createBy",
                TagValue = "terraform",
            },
        },
        VpcId = "vpc-a6zec4mf",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlCloneDbInstance;
import com.pulumi.tencentcloud.PostgresqlCloneDbInstanceArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlCloneDbInstanceDbNodeSetArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlCloneDbInstanceTagListArgs;
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 example = new PostgresqlCloneDbInstance("example", PostgresqlCloneDbInstanceArgs.builder()
            .autoRenewFlag(0)
            .dbInstanceId("postgres-evsqpyap")
            .dbNodeSets(            
                PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
                    .role("Primary")
                    .zone("ap-guangzhou-6")
                    .build(),
                PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
                    .role("Standby")
                    .zone("ap-guangzhou-6")
                    .build())
            .instanceChargeType("POSTPAID_BY_HOUR")
            .period(1)
            .projectId(0)
            .recoveryTargetTime("2024-10-12 18:17:00")
            .securityGroupIds("sg-8stavs03")
            .specCode("pg.it.medium4")
            .storage(200)
            .subnetId("subnet-b8hintyy")
            .tagLists(PostgresqlCloneDbInstanceTagListArgs.builder()
                .tagKey("createBy")
                .tagValue("terraform")
                .build())
            .vpcId("vpc-a6zec4mf")
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:PostgresqlCloneDbInstance
    properties:
      autoRenewFlag: 0
      dbInstanceId: postgres-evsqpyap
      dbNodeSets:
        - role: Primary
          zone: ap-guangzhou-6
        - role: Standby
          zone: ap-guangzhou-6
      instanceChargeType: POSTPAID_BY_HOUR
      period: 1
      projectId: 0
      recoveryTargetTime: 2024-10-12 18:17:00
      securityGroupIds:
        - sg-8stavs03
      specCode: pg.it.medium4
      storage: 200
      subnetId: subnet-b8hintyy
      tagLists:
        - tagKey: createBy
          tagValue: terraform
      vpcId: vpc-a6zec4mf
Copy
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const baseBackups = tencentcloud.getPostgresqlBaseBackups({
    filters: [{
        name: "db-instance-id",
        values: ["postgres-evsqpyap"],
    }],
    orderBy: "Size",
    orderByType: "asc",
});
const example = new tencentcloud.PostgresqlCloneDbInstance("example", {
    dbInstanceId: "postgres-evsqpyap",
    specCode: "pg.it.medium4",
    storage: 200,
    period: 1,
    autoRenewFlag: 0,
    vpcId: "vpc-a6zec4mf",
    subnetId: "subnet-b8hintyy",
    instanceChargeType: "POSTPAID_BY_HOUR",
    securityGroupIds: ["sg-8stavs03"],
    projectId: 0,
    backupSetId: baseBackups.then(baseBackups => baseBackups.baseBackupSets?.[0]?.id),
    dbNodeSets: [
        {
            role: "Primary",
            zone: "ap-guangzhou-6",
        },
        {
            role: "Standby",
            zone: "ap-guangzhou-6",
        },
    ],
    tagLists: [{
        tagKey: "createBy",
        tagValue: "terraform",
    }],
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

base_backups = tencentcloud.get_postgresql_base_backups(filters=[{
        "name": "db-instance-id",
        "values": ["postgres-evsqpyap"],
    }],
    order_by="Size",
    order_by_type="asc")
example = tencentcloud.PostgresqlCloneDbInstance("example",
    db_instance_id="postgres-evsqpyap",
    spec_code="pg.it.medium4",
    storage=200,
    period=1,
    auto_renew_flag=0,
    vpc_id="vpc-a6zec4mf",
    subnet_id="subnet-b8hintyy",
    instance_charge_type="POSTPAID_BY_HOUR",
    security_group_ids=["sg-8stavs03"],
    project_id=0,
    backup_set_id=base_backups.base_backup_sets[0].id,
    db_node_sets=[
        {
            "role": "Primary",
            "zone": "ap-guangzhou-6",
        },
        {
            "role": "Standby",
            "zone": "ap-guangzhou-6",
        },
    ],
    tag_lists=[{
        "tag_key": "createBy",
        "tag_value": "terraform",
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		baseBackups, err := tencentcloud.GetPostgresqlBaseBackups(ctx, &tencentcloud.GetPostgresqlBaseBackupsArgs{
			Filters: []tencentcloud.GetPostgresqlBaseBackupsFilter{
				{
					Name: pulumi.StringRef("db-instance-id"),
					Values: []string{
						"postgres-evsqpyap",
					},
				},
			},
			OrderBy:     pulumi.StringRef("Size"),
			OrderByType: pulumi.StringRef("asc"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewPostgresqlCloneDbInstance(ctx, "example", &tencentcloud.PostgresqlCloneDbInstanceArgs{
			DbInstanceId:       pulumi.String("postgres-evsqpyap"),
			SpecCode:           pulumi.String("pg.it.medium4"),
			Storage:            pulumi.Float64(200),
			Period:             pulumi.Float64(1),
			AutoRenewFlag:      pulumi.Float64(0),
			VpcId:              pulumi.String("vpc-a6zec4mf"),
			SubnetId:           pulumi.String("subnet-b8hintyy"),
			InstanceChargeType: pulumi.String("POSTPAID_BY_HOUR"),
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("sg-8stavs03"),
			},
			ProjectId:   pulumi.Float64(0),
			BackupSetId: pulumi.String(baseBackups.BaseBackupSets[0].Id),
			DbNodeSets: tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArray{
				&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
					Role: pulumi.String("Primary"),
					Zone: pulumi.String("ap-guangzhou-6"),
				},
				&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
					Role: pulumi.String("Standby"),
					Zone: pulumi.String("ap-guangzhou-6"),
				},
			},
			TagLists: tencentcloud.PostgresqlCloneDbInstanceTagListArray{
				&tencentcloud.PostgresqlCloneDbInstanceTagListArgs{
					TagKey:   pulumi.String("createBy"),
					TagValue: pulumi.String("terraform"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var baseBackups = Tencentcloud.GetPostgresqlBaseBackups.Invoke(new()
    {
        Filters = new[]
        {
            new Tencentcloud.Inputs.GetPostgresqlBaseBackupsFilterInputArgs
            {
                Name = "db-instance-id",
                Values = new[]
                {
                    "postgres-evsqpyap",
                },
            },
        },
        OrderBy = "Size",
        OrderByType = "asc",
    });

    var example = new Tencentcloud.PostgresqlCloneDbInstance("example", new()
    {
        DbInstanceId = "postgres-evsqpyap",
        SpecCode = "pg.it.medium4",
        Storage = 200,
        Period = 1,
        AutoRenewFlag = 0,
        VpcId = "vpc-a6zec4mf",
        SubnetId = "subnet-b8hintyy",
        InstanceChargeType = "POSTPAID_BY_HOUR",
        SecurityGroupIds = new[]
        {
            "sg-8stavs03",
        },
        ProjectId = 0,
        BackupSetId = baseBackups.Apply(getPostgresqlBaseBackupsResult => getPostgresqlBaseBackupsResult.BaseBackupSets[0]?.Id),
        DbNodeSets = new[]
        {
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
            {
                Role = "Primary",
                Zone = "ap-guangzhou-6",
            },
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
            {
                Role = "Standby",
                Zone = "ap-guangzhou-6",
            },
        },
        TagLists = new[]
        {
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceTagListArgs
            {
                TagKey = "createBy",
                TagValue = "terraform",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetPostgresqlBaseBackupsArgs;
import com.pulumi.tencentcloud.PostgresqlCloneDbInstance;
import com.pulumi.tencentcloud.PostgresqlCloneDbInstanceArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlCloneDbInstanceDbNodeSetArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlCloneDbInstanceTagListArgs;
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 baseBackups = TencentcloudFunctions.getPostgresqlBaseBackups(GetPostgresqlBaseBackupsArgs.builder()
            .filters(GetPostgresqlBaseBackupsFilterArgs.builder()
                .name("db-instance-id")
                .values("postgres-evsqpyap")
                .build())
            .orderBy("Size")
            .orderByType("asc")
            .build());

        var example = new PostgresqlCloneDbInstance("example", PostgresqlCloneDbInstanceArgs.builder()
            .dbInstanceId("postgres-evsqpyap")
            .specCode("pg.it.medium4")
            .storage(200)
            .period(1)
            .autoRenewFlag(0)
            .vpcId("vpc-a6zec4mf")
            .subnetId("subnet-b8hintyy")
            .instanceChargeType("POSTPAID_BY_HOUR")
            .securityGroupIds("sg-8stavs03")
            .projectId(0)
            .backupSetId(baseBackups.applyValue(getPostgresqlBaseBackupsResult -> getPostgresqlBaseBackupsResult.baseBackupSets()[0].id()))
            .dbNodeSets(            
                PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
                    .role("Primary")
                    .zone("ap-guangzhou-6")
                    .build(),
                PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
                    .role("Standby")
                    .zone("ap-guangzhou-6")
                    .build())
            .tagLists(PostgresqlCloneDbInstanceTagListArgs.builder()
                .tagKey("createBy")
                .tagValue("terraform")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:PostgresqlCloneDbInstance
    properties:
      dbInstanceId: postgres-evsqpyap
      specCode: pg.it.medium4
      storage: 200
      period: 1
      autoRenewFlag: 0
      vpcId: vpc-a6zec4mf
      subnetId: subnet-b8hintyy
      instanceChargeType: POSTPAID_BY_HOUR
      securityGroupIds:
        - sg-8stavs03
      projectId: 0
      backupSetId: ${baseBackups.baseBackupSets[0].id}
      dbNodeSets:
        - role: Primary
          zone: ap-guangzhou-6
        - role: Standby
          zone: ap-guangzhou-6
      tagLists:
        - tagKey: createBy
          tagValue: terraform
variables:
  baseBackups:
    fn::invoke:
      function: tencentcloud:getPostgresqlBaseBackups
      arguments:
        filters:
          - name: db-instance-id
            values:
              - postgres-evsqpyap
        orderBy: Size
        orderByType: asc
Copy

Clone db instance from CDC

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

const example = new tencentcloud.PostgresqlCloneDbInstance("example", {
    autoRenewFlag: 0,
    dbInstanceId: "postgres-evsqpyap",
    dbNodeSets: [
        {
            dedicatedClusterId: "cluster-262n63e8",
            role: "Primary",
            zone: "ap-guangzhou-6",
        },
        {
            dedicatedClusterId: "cluster-262n63e8",
            role: "Standby",
            zone: "ap-guangzhou-6",
        },
    ],
    instanceChargeType: "POSTPAID_BY_HOUR",
    period: 1,
    projectId: 0,
    recoveryTargetTime: "2024-10-12 18:17:00",
    securityGroupIds: ["sg-8stavs03"],
    specCode: "pg.it.medium4",
    storage: 200,
    subnetId: "subnet-b8hintyy",
    tagLists: [{
        tagKey: "createBy",
        tagValue: "terraform",
    }],
    vpcId: "vpc-a6zec4mf",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.PostgresqlCloneDbInstance("example",
    auto_renew_flag=0,
    db_instance_id="postgres-evsqpyap",
    db_node_sets=[
        {
            "dedicated_cluster_id": "cluster-262n63e8",
            "role": "Primary",
            "zone": "ap-guangzhou-6",
        },
        {
            "dedicated_cluster_id": "cluster-262n63e8",
            "role": "Standby",
            "zone": "ap-guangzhou-6",
        },
    ],
    instance_charge_type="POSTPAID_BY_HOUR",
    period=1,
    project_id=0,
    recovery_target_time="2024-10-12 18:17:00",
    security_group_ids=["sg-8stavs03"],
    spec_code="pg.it.medium4",
    storage=200,
    subnet_id="subnet-b8hintyy",
    tag_lists=[{
        "tag_key": "createBy",
        "tag_value": "terraform",
    }],
    vpc_id="vpc-a6zec4mf")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.NewPostgresqlCloneDbInstance(ctx, "example", &tencentcloud.PostgresqlCloneDbInstanceArgs{
			AutoRenewFlag: pulumi.Float64(0),
			DbInstanceId:  pulumi.String("postgres-evsqpyap"),
			DbNodeSets: tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArray{
				&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
					DedicatedClusterId: pulumi.String("cluster-262n63e8"),
					Role:               pulumi.String("Primary"),
					Zone:               pulumi.String("ap-guangzhou-6"),
				},
				&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
					DedicatedClusterId: pulumi.String("cluster-262n63e8"),
					Role:               pulumi.String("Standby"),
					Zone:               pulumi.String("ap-guangzhou-6"),
				},
			},
			InstanceChargeType: pulumi.String("POSTPAID_BY_HOUR"),
			Period:             pulumi.Float64(1),
			ProjectId:          pulumi.Float64(0),
			RecoveryTargetTime: pulumi.String("2024-10-12 18:17:00"),
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("sg-8stavs03"),
			},
			SpecCode: pulumi.String("pg.it.medium4"),
			Storage:  pulumi.Float64(200),
			SubnetId: pulumi.String("subnet-b8hintyy"),
			TagLists: tencentcloud.PostgresqlCloneDbInstanceTagListArray{
				&tencentcloud.PostgresqlCloneDbInstanceTagListArgs{
					TagKey:   pulumi.String("createBy"),
					TagValue: pulumi.String("terraform"),
				},
			},
			VpcId: pulumi.String("vpc-a6zec4mf"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.PostgresqlCloneDbInstance("example", new()
    {
        AutoRenewFlag = 0,
        DbInstanceId = "postgres-evsqpyap",
        DbNodeSets = new[]
        {
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
            {
                DedicatedClusterId = "cluster-262n63e8",
                Role = "Primary",
                Zone = "ap-guangzhou-6",
            },
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
            {
                DedicatedClusterId = "cluster-262n63e8",
                Role = "Standby",
                Zone = "ap-guangzhou-6",
            },
        },
        InstanceChargeType = "POSTPAID_BY_HOUR",
        Period = 1,
        ProjectId = 0,
        RecoveryTargetTime = "2024-10-12 18:17:00",
        SecurityGroupIds = new[]
        {
            "sg-8stavs03",
        },
        SpecCode = "pg.it.medium4",
        Storage = 200,
        SubnetId = "subnet-b8hintyy",
        TagLists = new[]
        {
            new Tencentcloud.Inputs.PostgresqlCloneDbInstanceTagListArgs
            {
                TagKey = "createBy",
                TagValue = "terraform",
            },
        },
        VpcId = "vpc-a6zec4mf",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlCloneDbInstance;
import com.pulumi.tencentcloud.PostgresqlCloneDbInstanceArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlCloneDbInstanceDbNodeSetArgs;
import com.pulumi.tencentcloud.inputs.PostgresqlCloneDbInstanceTagListArgs;
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 example = new PostgresqlCloneDbInstance("example", PostgresqlCloneDbInstanceArgs.builder()
            .autoRenewFlag(0)
            .dbInstanceId("postgres-evsqpyap")
            .dbNodeSets(            
                PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
                    .dedicatedClusterId("cluster-262n63e8")
                    .role("Primary")
                    .zone("ap-guangzhou-6")
                    .build(),
                PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
                    .dedicatedClusterId("cluster-262n63e8")
                    .role("Standby")
                    .zone("ap-guangzhou-6")
                    .build())
            .instanceChargeType("POSTPAID_BY_HOUR")
            .period(1)
            .projectId(0)
            .recoveryTargetTime("2024-10-12 18:17:00")
            .securityGroupIds("sg-8stavs03")
            .specCode("pg.it.medium4")
            .storage(200)
            .subnetId("subnet-b8hintyy")
            .tagLists(PostgresqlCloneDbInstanceTagListArgs.builder()
                .tagKey("createBy")
                .tagValue("terraform")
                .build())
            .vpcId("vpc-a6zec4mf")
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:PostgresqlCloneDbInstance
    properties:
      autoRenewFlag: 0
      dbInstanceId: postgres-evsqpyap
      dbNodeSets:
        - dedicatedClusterId: cluster-262n63e8
          role: Primary
          zone: ap-guangzhou-6
        - dedicatedClusterId: cluster-262n63e8
          role: Standby
          zone: ap-guangzhou-6
      instanceChargeType: POSTPAID_BY_HOUR
      period: 1
      projectId: 0
      recoveryTargetTime: 2024-10-12 18:17:00
      securityGroupIds:
        - sg-8stavs03
      specCode: pg.it.medium4
      storage: 200
      subnetId: subnet-b8hintyy
      tagLists:
        - tagKey: createBy
          tagValue: terraform
      vpcId: vpc-a6zec4mf
Copy

Create PostgresqlCloneDbInstance Resource

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

Constructor syntax

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

@overload
def PostgresqlCloneDbInstance(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              period: Optional[float] = None,
                              auto_renew_flag: Optional[float] = None,
                              vpc_id: Optional[str] = None,
                              db_instance_id: Optional[str] = None,
                              subnet_id: Optional[str] = None,
                              storage: Optional[float] = None,
                              spec_code: Optional[str] = None,
                              db_node_sets: Optional[Sequence[PostgresqlCloneDbInstanceDbNodeSetArgs]] = None,
                              postgresql_clone_db_instance_id: Optional[str] = None,
                              project_id: Optional[float] = None,
                              recovery_target_time: Optional[str] = None,
                              security_group_ids: Optional[Sequence[str]] = None,
                              name: Optional[str] = None,
                              instance_charge_type: Optional[str] = None,
                              activity_id: Optional[float] = None,
                              sync_mode: Optional[str] = None,
                              tag_lists: Optional[Sequence[PostgresqlCloneDbInstanceTagListArgs]] = None,
                              backup_set_id: Optional[str] = None)
func NewPostgresqlCloneDbInstance(ctx *Context, name string, args PostgresqlCloneDbInstanceArgs, opts ...ResourceOption) (*PostgresqlCloneDbInstance, error)
public PostgresqlCloneDbInstance(string name, PostgresqlCloneDbInstanceArgs args, CustomResourceOptions? opts = null)
public PostgresqlCloneDbInstance(String name, PostgresqlCloneDbInstanceArgs args)
public PostgresqlCloneDbInstance(String name, PostgresqlCloneDbInstanceArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlCloneDbInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

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

AutoRenewFlag This property is required. double
Renewal Flag:
DbInstanceId This property is required. string
ID of the original instance to be cloned.
Period This property is required. double
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
SpecCode This property is required. string
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
Storage This property is required. double
Instance storage capacity in GB.
SubnetId This property is required. string
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
VpcId This property is required. string
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
ActivityId double
Campaign ID.
BackupSetId string
Basic backup set ID.
DbNodeSets List<PostgresqlCloneDbInstanceDbNodeSet>
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
InstanceChargeType string

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

Name string
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
PostgresqlCloneDbInstanceId string
ID of the resource.
ProjectId double
Project ID.
RecoveryTargetTime string
Restoration point in time.
SecurityGroupIds List<string>
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
SyncMode string
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
TagLists List<PostgresqlCloneDbInstanceTagList>
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
AutoRenewFlag This property is required. float64
Renewal Flag:
DbInstanceId This property is required. string
ID of the original instance to be cloned.
Period This property is required. float64
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
SpecCode This property is required. string
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
Storage This property is required. float64
Instance storage capacity in GB.
SubnetId This property is required. string
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
VpcId This property is required. string
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
ActivityId float64
Campaign ID.
BackupSetId string
Basic backup set ID.
DbNodeSets []PostgresqlCloneDbInstanceDbNodeSetArgs
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
InstanceChargeType string

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

Name string
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
PostgresqlCloneDbInstanceId string
ID of the resource.
ProjectId float64
Project ID.
RecoveryTargetTime string
Restoration point in time.
SecurityGroupIds []string
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
SyncMode string
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
TagLists []PostgresqlCloneDbInstanceTagListArgs
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
autoRenewFlag This property is required. Double
Renewal Flag:
dbInstanceId This property is required. String
ID of the original instance to be cloned.
period This property is required. Double
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
specCode This property is required. String
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage This property is required. Double
Instance storage capacity in GB.
subnetId This property is required. String
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
vpcId This property is required. String
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activityId Double
Campaign ID.
backupSetId String
Basic backup set ID.
dbNodeSets List<PostgresqlCloneDbInstanceDbNodeSet>
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instanceChargeType String

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name String
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
postgresqlCloneDbInstanceId String
ID of the resource.
projectId Double
Project ID.
recoveryTargetTime String
Restoration point in time.
securityGroupIds List<String>
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
syncMode String
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tagLists List<PostgresqlCloneDbInstanceTagList>
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
autoRenewFlag This property is required. number
Renewal Flag:
dbInstanceId This property is required. string
ID of the original instance to be cloned.
period This property is required. number
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
specCode This property is required. string
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage This property is required. number
Instance storage capacity in GB.
subnetId This property is required. string
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
vpcId This property is required. string
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activityId number
Campaign ID.
backupSetId string
Basic backup set ID.
dbNodeSets PostgresqlCloneDbInstanceDbNodeSet[]
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instanceChargeType string

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name string
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
postgresqlCloneDbInstanceId string
ID of the resource.
projectId number
Project ID.
recoveryTargetTime string
Restoration point in time.
securityGroupIds string[]
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
syncMode string
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tagLists PostgresqlCloneDbInstanceTagList[]
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
auto_renew_flag This property is required. float
Renewal Flag:
db_instance_id This property is required. str
ID of the original instance to be cloned.
period This property is required. float
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
spec_code This property is required. str
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage This property is required. float
Instance storage capacity in GB.
subnet_id This property is required. str
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
vpc_id This property is required. str
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activity_id float
Campaign ID.
backup_set_id str
Basic backup set ID.
db_node_sets Sequence[PostgresqlCloneDbInstanceDbNodeSetArgs]
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instance_charge_type str

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name str
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
postgresql_clone_db_instance_id str
ID of the resource.
project_id float
Project ID.
recovery_target_time str
Restoration point in time.
security_group_ids Sequence[str]
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
sync_mode str
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tag_lists Sequence[PostgresqlCloneDbInstanceTagListArgs]
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
autoRenewFlag This property is required. Number
Renewal Flag:
dbInstanceId This property is required. String
ID of the original instance to be cloned.
period This property is required. Number
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
specCode This property is required. String
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage This property is required. Number
Instance storage capacity in GB.
subnetId This property is required. String
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
vpcId This property is required. String
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activityId Number
Campaign ID.
backupSetId String
Basic backup set ID.
dbNodeSets List<Property Map>
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instanceChargeType String

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name String
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
postgresqlCloneDbInstanceId String
ID of the resource.
projectId Number
Project ID.
recoveryTargetTime String
Restoration point in time.
securityGroupIds List<String>
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
syncMode String
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tagLists List<Property Map>
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing PostgresqlCloneDbInstance Resource

Get an existing PostgresqlCloneDbInstance 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?: PostgresqlCloneDbInstanceState, opts?: CustomResourceOptions): PostgresqlCloneDbInstance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        activity_id: Optional[float] = None,
        auto_renew_flag: Optional[float] = None,
        backup_set_id: Optional[str] = None,
        db_instance_id: Optional[str] = None,
        db_node_sets: Optional[Sequence[PostgresqlCloneDbInstanceDbNodeSetArgs]] = None,
        instance_charge_type: Optional[str] = None,
        name: Optional[str] = None,
        period: Optional[float] = None,
        postgresql_clone_db_instance_id: Optional[str] = None,
        project_id: Optional[float] = None,
        recovery_target_time: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        spec_code: Optional[str] = None,
        storage: Optional[float] = None,
        subnet_id: Optional[str] = None,
        sync_mode: Optional[str] = None,
        tag_lists: Optional[Sequence[PostgresqlCloneDbInstanceTagListArgs]] = None,
        vpc_id: Optional[str] = None) -> PostgresqlCloneDbInstance
func GetPostgresqlCloneDbInstance(ctx *Context, name string, id IDInput, state *PostgresqlCloneDbInstanceState, opts ...ResourceOption) (*PostgresqlCloneDbInstance, error)
public static PostgresqlCloneDbInstance Get(string name, Input<string> id, PostgresqlCloneDbInstanceState? state, CustomResourceOptions? opts = null)
public static PostgresqlCloneDbInstance get(String name, Output<String> id, PostgresqlCloneDbInstanceState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:PostgresqlCloneDbInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ActivityId double
Campaign ID.
AutoRenewFlag double
Renewal Flag:
BackupSetId string
Basic backup set ID.
DbInstanceId string
ID of the original instance to be cloned.
DbNodeSets List<PostgresqlCloneDbInstanceDbNodeSet>
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
InstanceChargeType string

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

Name string
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
Period double
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
PostgresqlCloneDbInstanceId string
ID of the resource.
ProjectId double
Project ID.
RecoveryTargetTime string
Restoration point in time.
SecurityGroupIds List<string>
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
SpecCode string
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
Storage double
Instance storage capacity in GB.
SubnetId string
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
SyncMode string
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
TagLists List<PostgresqlCloneDbInstanceTagList>
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
VpcId string
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
ActivityId float64
Campaign ID.
AutoRenewFlag float64
Renewal Flag:
BackupSetId string
Basic backup set ID.
DbInstanceId string
ID of the original instance to be cloned.
DbNodeSets []PostgresqlCloneDbInstanceDbNodeSetArgs
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
InstanceChargeType string

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

Name string
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
Period float64
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
PostgresqlCloneDbInstanceId string
ID of the resource.
ProjectId float64
Project ID.
RecoveryTargetTime string
Restoration point in time.
SecurityGroupIds []string
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
SpecCode string
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
Storage float64
Instance storage capacity in GB.
SubnetId string
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
SyncMode string
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
TagLists []PostgresqlCloneDbInstanceTagListArgs
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
VpcId string
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activityId Double
Campaign ID.
autoRenewFlag Double
Renewal Flag:
backupSetId String
Basic backup set ID.
dbInstanceId String
ID of the original instance to be cloned.
dbNodeSets List<PostgresqlCloneDbInstanceDbNodeSet>
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instanceChargeType String

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name String
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
period Double
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
postgresqlCloneDbInstanceId String
ID of the resource.
projectId Double
Project ID.
recoveryTargetTime String
Restoration point in time.
securityGroupIds List<String>
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
specCode String
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage Double
Instance storage capacity in GB.
subnetId String
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
syncMode String
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tagLists List<PostgresqlCloneDbInstanceTagList>
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
vpcId String
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activityId number
Campaign ID.
autoRenewFlag number
Renewal Flag:
backupSetId string
Basic backup set ID.
dbInstanceId string
ID of the original instance to be cloned.
dbNodeSets PostgresqlCloneDbInstanceDbNodeSet[]
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instanceChargeType string

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name string
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
period number
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
postgresqlCloneDbInstanceId string
ID of the resource.
projectId number
Project ID.
recoveryTargetTime string
Restoration point in time.
securityGroupIds string[]
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
specCode string
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage number
Instance storage capacity in GB.
subnetId string
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
syncMode string
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tagLists PostgresqlCloneDbInstanceTagList[]
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
vpcId string
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activity_id float
Campaign ID.
auto_renew_flag float
Renewal Flag:
backup_set_id str
Basic backup set ID.
db_instance_id str
ID of the original instance to be cloned.
db_node_sets Sequence[PostgresqlCloneDbInstanceDbNodeSetArgs]
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instance_charge_type str

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name str
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
period float
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
postgresql_clone_db_instance_id str
ID of the resource.
project_id float
Project ID.
recovery_target_time str
Restoration point in time.
security_group_ids Sequence[str]
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
spec_code str
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage float
Instance storage capacity in GB.
subnet_id str
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
sync_mode str
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tag_lists Sequence[PostgresqlCloneDbInstanceTagListArgs]
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
vpc_id str
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.
activityId Number
Campaign ID.
autoRenewFlag Number
Renewal Flag:
backupSetId String
Basic backup set ID.
dbInstanceId String
ID of the original instance to be cloned.
dbNodeSets List<Property Map>
Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs. The information of AZ can be obtained from the Zone field in the return value of the DescribeZones API.
instanceChargeType String

Instance billing type, which currently supports:

  • PREPAID: Prepaid, i.e., monthly subscription
  • POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption

Default value: PREPAID.

name String
Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
period Number
Purchase duration, in months.

  • Prepaid: Supports 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, and 36.
  • Pay-as-you-go: Only supports 1.
postgresqlCloneDbInstanceId String
ID of the resource.
projectId Number
Project ID.
recoveryTargetTime String
Restoration point in time.
securityGroupIds List<String>
Security group of the instance, which can be obtained from the sgld field in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound.
specCode String
Purchasable code, which can be obtained from the SpecCode field in the return value of the DescribeClasses API.
storage Number
Instance storage capacity in GB.
subnetId String
VPC subnet ID in the format of subnet-xxxxxxxx, which can be obtained in the console or from the unSubnetId field in the return value of the DescribeSubnets API.
syncMode String
Primary-standby sync mode, which supports: Semi-sync: Semi-sync Async: Asynchronous Default value for the primary instance: Semi-sync Default value for the read-only instance: Async.
tagLists List<Property Map>
The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the Tags field in the return value of the DescribeTags API.
vpcId String
VPC ID in the format of vpc-xxxxxxx, which can be obtained in the console or from the unVpcId field in the return value of the DescribeVpcEx API.

Supporting Types

PostgresqlCloneDbInstanceDbNodeSet
, PostgresqlCloneDbInstanceDbNodeSetArgs

Role This property is required. string
Node type. Valid values: Primary; Standby.
Zone This property is required. string
AZ where the node resides, such as ap-guangzhou-1.
DedicatedClusterId string
Dedicated cluster ID.
Role This property is required. string
Node type. Valid values: Primary; Standby.
Zone This property is required. string
AZ where the node resides, such as ap-guangzhou-1.
DedicatedClusterId string
Dedicated cluster ID.
role This property is required. String
Node type. Valid values: Primary; Standby.
zone This property is required. String
AZ where the node resides, such as ap-guangzhou-1.
dedicatedClusterId String
Dedicated cluster ID.
role This property is required. string
Node type. Valid values: Primary; Standby.
zone This property is required. string
AZ where the node resides, such as ap-guangzhou-1.
dedicatedClusterId string
Dedicated cluster ID.
role This property is required. str
Node type. Valid values: Primary; Standby.
zone This property is required. str
AZ where the node resides, such as ap-guangzhou-1.
dedicated_cluster_id str
Dedicated cluster ID.
role This property is required. String
Node type. Valid values: Primary; Standby.
zone This property is required. String
AZ where the node resides, such as ap-guangzhou-1.
dedicatedClusterId String
Dedicated cluster ID.

PostgresqlCloneDbInstanceTagList
, PostgresqlCloneDbInstanceTagListArgs

TagKey This property is required. string
Tag key.
TagValue This property is required. string
Tag value.
TagKey This property is required. string
Tag key.
TagValue This property is required. string
Tag value.
tagKey This property is required. String
Tag key.
tagValue This property is required. String
Tag value.
tagKey This property is required. string
Tag key.
tagValue This property is required. string
Tag value.
tag_key This property is required. str
Tag key.
tag_value This property is required. str
Tag value.
tagKey This property is required. String
Tag key.
tagValue This property is required. String
Tag value.

Package Details

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