published on Friday, Aug 14, 2026 by tencentcloudstack
published on Friday, Aug 14, 2026 by tencentcloudstack
Provides a resource to create a postgresql clone db instance
Example Usage
Clone db instance by recovery_target_time
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlCloneDbInstance("example", {
dbInstanceId: "postgres-ckwcgdf1",
name: "tf-example",
specCode: "pg.it.medium4",
storage: 100,
period: 1,
autoRenewFlag: 0,
vpcId: "vpc-i5yyodl9",
subnetId: "subnet-hhi88a58",
instanceChargeType: "POSTPAID_BY_HOUR",
securityGroupIds: [
"sg-rs32zv1r",
"sg-37tigqat",
],
projectId: 0,
recoveryTargetTime: "2026-07-10 01:00:06",
deletionProtection: true,
dbNodeSets: [
{
role: "Primary",
zone: "ap-guangzhou-6",
},
{
role: "Standby",
zone: "ap-guangzhou-7",
},
],
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlCloneDbInstance("example",
db_instance_id="postgres-ckwcgdf1",
name="tf-example",
spec_code="pg.it.medium4",
storage=100,
period=1,
auto_renew_flag=0,
vpc_id="vpc-i5yyodl9",
subnet_id="subnet-hhi88a58",
instance_charge_type="POSTPAID_BY_HOUR",
security_group_ids=[
"sg-rs32zv1r",
"sg-37tigqat",
],
project_id=0,
recovery_target_time="2026-07-10 01:00:06",
deletion_protection=True,
db_node_sets=[
{
"role": "Primary",
"zone": "ap-guangzhou-6",
},
{
"role": "Standby",
"zone": "ap-guangzhou-7",
},
],
tags={
"tagKey": "tagValue",
})
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{
DbInstanceId: pulumi.String("postgres-ckwcgdf1"),
Name: pulumi.String("tf-example"),
SpecCode: pulumi.String("pg.it.medium4"),
Storage: pulumi.Float64(100),
Period: pulumi.Float64(1),
AutoRenewFlag: pulumi.Float64(0),
VpcId: pulumi.String("vpc-i5yyodl9"),
SubnetId: pulumi.String("subnet-hhi88a58"),
InstanceChargeType: pulumi.String("POSTPAID_BY_HOUR"),
SecurityGroupIds: pulumi.StringArray{
pulumi.String("sg-rs32zv1r"),
pulumi.String("sg-37tigqat"),
},
ProjectId: pulumi.Float64(0),
RecoveryTargetTime: pulumi.String("2026-07-10 01:00:06"),
DeletionProtection: pulumi.Bool(true),
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-7"),
},
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
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 example = new Tencentcloud.PostgresqlCloneDbInstance("example", new()
{
DbInstanceId = "postgres-ckwcgdf1",
Name = "tf-example",
SpecCode = "pg.it.medium4",
Storage = 100,
Period = 1,
AutoRenewFlag = 0,
VpcId = "vpc-i5yyodl9",
SubnetId = "subnet-hhi88a58",
InstanceChargeType = "POSTPAID_BY_HOUR",
SecurityGroupIds = new[]
{
"sg-rs32zv1r",
"sg-37tigqat",
},
ProjectId = 0,
RecoveryTargetTime = "2026-07-10 01:00:06",
DeletionProtection = true,
DbNodeSets = new[]
{
new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
{
Role = "Primary",
Zone = "ap-guangzhou-6",
},
new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
{
Role = "Standby",
Zone = "ap-guangzhou-7",
},
},
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
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 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()
.dbInstanceId("postgres-ckwcgdf1")
.name("tf-example")
.specCode("pg.it.medium4")
.storage(100.0)
.period(1.0)
.autoRenewFlag(0.0)
.vpcId("vpc-i5yyodl9")
.subnetId("subnet-hhi88a58")
.instanceChargeType("POSTPAID_BY_HOUR")
.securityGroupIds(
"sg-rs32zv1r",
"sg-37tigqat")
.projectId(0.0)
.recoveryTargetTime("2026-07-10 01:00:06")
.deletionProtection(true)
.dbNodeSets(
PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
.role("Primary")
.zone("ap-guangzhou-6")
.build(),
PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
.role("Standby")
.zone("ap-guangzhou-7")
.build())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlCloneDbInstance
properties:
dbInstanceId: postgres-ckwcgdf1
name: tf-example
specCode: pg.it.medium4
storage: 100
period: 1
autoRenewFlag: 0
vpcId: vpc-i5yyodl9
subnetId: subnet-hhi88a58
instanceChargeType: POSTPAID_BY_HOUR
securityGroupIds:
- sg-rs32zv1r
- sg-37tigqat
projectId: 0
recoveryTargetTime: 2026-07-10 01:00:06
deletionProtection: true
dbNodeSets:
- role: Primary
zone: ap-guangzhou-6
- role: Standby
zone: ap-guangzhou-7
tags:
tagKey: tagValue
Example coming soon!
Clone db instance by backup_set_id
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",
name: "tf-example-clone",
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),
deletionProtection: true,
dbNodeSets: [
{
role: "Primary",
zone: "ap-guangzhou-6",
},
{
role: "Standby",
zone: "ap-guangzhou-6",
},
],
tags: {
tagKey: "tagValue",
},
});
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",
name="tf-example-clone",
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,
deletion_protection=True,
db_node_sets=[
{
"role": "Primary",
"zone": "ap-guangzhou-6",
},
{
"role": "Standby",
"zone": "ap-guangzhou-6",
},
],
tags={
"tagKey": "tagValue",
})
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"),
Name: pulumi.String("tf-example-clone"),
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),
DeletionProtection: pulumi.Bool(true),
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"),
},
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
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 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",
Name = "tf-example-clone",
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),
DeletionProtection = true,
DbNodeSets = new[]
{
new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
{
Role = "Primary",
Zone = "ap-guangzhou-6",
},
new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
{
Role = "Standby",
Zone = "ap-guangzhou-6",
},
},
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
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 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")
.name("tf-example-clone")
.specCode("pg.it.medium4")
.storage(200.0)
.period(1.0)
.autoRenewFlag(0.0)
.vpcId("vpc-a6zec4mf")
.subnetId("subnet-b8hintyy")
.instanceChargeType("POSTPAID_BY_HOUR")
.securityGroupIds("sg-8stavs03")
.projectId(0.0)
.backupSetId(baseBackups.baseBackupSets()[0].id())
.deletionProtection(true)
.dbNodeSets(
PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
.role("Primary")
.zone("ap-guangzhou-6")
.build(),
PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
.role("Standby")
.zone("ap-guangzhou-6")
.build())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlCloneDbInstance
properties:
dbInstanceId: postgres-evsqpyap
name: tf-example-clone
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}
deletionProtection: true
dbNodeSets:
- role: Primary
zone: ap-guangzhou-6
- role: Standby
zone: ap-guangzhou-6
tags:
tagKey: tagValue
variables:
baseBackups:
fn::invoke:
function: tencentcloud:getPostgresqlBaseBackups
arguments:
filters:
- name: db-instance-id
values:
- postgres-evsqpyap
orderBy: Size
orderByType: asc
Example coming soon!
Clone db instance from CDC
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlCloneDbInstance("example", {
dbInstanceId: "postgres-evsqpyap",
name: "tf-example-clone",
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,
recoveryTargetTime: "2024-10-12 18:17:00",
deletionProtection: true,
dbNodeSets: [
{
role: "Primary",
zone: "ap-guangzhou-6",
dedicatedClusterId: "cluster-262n63e8",
},
{
role: "Standby",
zone: "ap-guangzhou-6",
dedicatedClusterId: "cluster-262n63e8",
},
],
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlCloneDbInstance("example",
db_instance_id="postgres-evsqpyap",
name="tf-example-clone",
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,
recovery_target_time="2024-10-12 18:17:00",
deletion_protection=True,
db_node_sets=[
{
"role": "Primary",
"zone": "ap-guangzhou-6",
"dedicated_cluster_id": "cluster-262n63e8",
},
{
"role": "Standby",
"zone": "ap-guangzhou-6",
"dedicated_cluster_id": "cluster-262n63e8",
},
],
tags={
"tagKey": "tagValue",
})
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{
DbInstanceId: pulumi.String("postgres-evsqpyap"),
Name: pulumi.String("tf-example-clone"),
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),
RecoveryTargetTime: pulumi.String("2024-10-12 18:17:00"),
DeletionProtection: pulumi.Bool(true),
DbNodeSets: tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArray{
&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
Role: pulumi.String("Primary"),
Zone: pulumi.String("ap-guangzhou-6"),
DedicatedClusterId: pulumi.String("cluster-262n63e8"),
},
&tencentcloud.PostgresqlCloneDbInstanceDbNodeSetArgs{
Role: pulumi.String("Standby"),
Zone: pulumi.String("ap-guangzhou-6"),
DedicatedClusterId: pulumi.String("cluster-262n63e8"),
},
},
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
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 example = new Tencentcloud.PostgresqlCloneDbInstance("example", new()
{
DbInstanceId = "postgres-evsqpyap",
Name = "tf-example-clone",
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,
RecoveryTargetTime = "2024-10-12 18:17:00",
DeletionProtection = true,
DbNodeSets = new[]
{
new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
{
Role = "Primary",
Zone = "ap-guangzhou-6",
DedicatedClusterId = "cluster-262n63e8",
},
new Tencentcloud.Inputs.PostgresqlCloneDbInstanceDbNodeSetArgs
{
Role = "Standby",
Zone = "ap-guangzhou-6",
DedicatedClusterId = "cluster-262n63e8",
},
},
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
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 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()
.dbInstanceId("postgres-evsqpyap")
.name("tf-example-clone")
.specCode("pg.it.medium4")
.storage(200.0)
.period(1.0)
.autoRenewFlag(0.0)
.vpcId("vpc-a6zec4mf")
.subnetId("subnet-b8hintyy")
.instanceChargeType("POSTPAID_BY_HOUR")
.securityGroupIds("sg-8stavs03")
.projectId(0.0)
.recoveryTargetTime("2024-10-12 18:17:00")
.deletionProtection(true)
.dbNodeSets(
PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
.role("Primary")
.zone("ap-guangzhou-6")
.dedicatedClusterId("cluster-262n63e8")
.build(),
PostgresqlCloneDbInstanceDbNodeSetArgs.builder()
.role("Standby")
.zone("ap-guangzhou-6")
.dedicatedClusterId("cluster-262n63e8")
.build())
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlCloneDbInstance
properties:
dbInstanceId: postgres-evsqpyap
name: tf-example-clone
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
recoveryTargetTime: 2024-10-12 18:17:00
deletionProtection: true
dbNodeSets:
- role: Primary
zone: ap-guangzhou-6
dedicatedClusterId: cluster-262n63e8
- role: Standby
zone: ap-guangzhou-6
dedicatedClusterId: cluster-262n63e8
tags:
tagKey: tagValue
Example coming soon!
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,
deletion_protection: Optional[bool] = None,
activity_id: 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,
instance_charge_type: Optional[str] = None,
name: Optional[str] = None,
db_node_sets: Optional[Sequence[PostgresqlCloneDbInstanceDbNodeSetArgs]] = None,
sync_mode: Optional[str] = None,
tag_lists: Optional[Sequence[PostgresqlCloneDbInstanceTagListArgs]] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[PostgresqlCloneDbInstanceTimeoutsArgs] = 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.
resource "tencentcloud_postgresql_clone_db_instance" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresqlCloneDbInstanceArgs
- 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 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 string
- The unique name of the resource.
- args PostgresqlCloneDbInstanceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlCloneDbInstanceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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:
- Auto
Renew doubleFlag - Renewal Flag:
- Db
Instance stringId - ID of the original instance to be cloned.
- Period double
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- Spec
Code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - Storage double
- Instance storage capacity in GB.
- Subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - Vpc
Id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - Activity
Id double - Campaign ID.
- Backup
Set stringId - Basic backup set ID.
- Db
Node List<PostgresqlSets Clone Db Instance Db Node Set> - 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
Zonefield in the return value of the DescribeZones API. - Deletion
Protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - Instance
Charge stringType 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.
- Postgresql
Clone stringDb Instance Id - ID of the resource.
- Project
Id double - Project ID.
- Recovery
Target stringTime - Restoration point in time.
- Security
Group List<string>Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - Sync
Mode 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.
- Tag
Lists List<PostgresqlClone Db Instance Tag List> - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Dictionary<string, string>
- The available tags within this postgresql.
- Timeouts
Postgresql
Clone Db Instance Timeouts
- Auto
Renew float64Flag - Renewal Flag:
- Db
Instance stringId - ID of the original instance to be cloned.
- Period float64
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- Spec
Code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - Storage float64
- Instance storage capacity in GB.
- Subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - Vpc
Id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - Activity
Id float64 - Campaign ID.
- Backup
Set stringId - Basic backup set ID.
- Db
Node []PostgresqlSets Clone Db Instance Db Node Set Args - 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
Zonefield in the return value of the DescribeZones API. - Deletion
Protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - Instance
Charge stringType 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.
- Postgresql
Clone stringDb Instance Id - ID of the resource.
- Project
Id float64 - Project ID.
- Recovery
Target stringTime - Restoration point in time.
- Security
Group []stringIds - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - Sync
Mode 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.
- Tag
Lists []PostgresqlClone Db Instance Tag List Args - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - map[string]string
- The available tags within this postgresql.
- Timeouts
Postgresql
Clone Db Instance Timeouts Args
- auto_
renew_ numberflag - Renewal Flag:
- db_
instance_ stringid - ID of the original instance to be cloned.
- period number
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- spec_
code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage number
- Instance storage capacity in GB.
- subnet_
id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - vpc_
id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - activity_
id number - Campaign ID.
- backup_
set_ stringid - Basic backup set ID.
- db_
node_ list(object)sets - 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
Zonefield in the return value of the DescribeZones API. - deletion_
protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance_
charge_ stringtype 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.
- postgresql_
clone_ stringdb_ instance_ id - ID of the resource.
- project_
id number - Project ID.
- recovery_
target_ stringtime - Restoration point in time.
- security_
group_ list(string)ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - sync_
mode 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.
- tag_
lists list(object) - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - map(string)
- The available tags within this postgresql.
- timeouts object
- auto
Renew DoubleFlag - Renewal Flag:
- db
Instance StringId - ID of the original instance to be cloned.
- period Double
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- spec
Code String - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage Double
- Instance storage capacity in GB.
- subnet
Id String - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - vpc
Id String - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - activity
Id Double - Campaign ID.
- backup
Set StringId - Basic backup set ID.
- db
Node List<PostgresqlSets Clone Db Instance Db Node Set> - 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
Zonefield in the return value of the DescribeZones API. - deletion
Protection Boolean - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance
Charge StringType 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.
- postgresql
Clone StringDb Instance Id - ID of the resource.
- project
Id Double - Project ID.
- recovery
Target StringTime - Restoration point in time.
- security
Group List<String>Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - sync
Mode 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.
- tag
Lists List<PostgresqlClone Db Instance Tag List> - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Map<String,String>
- The available tags within this postgresql.
- timeouts
Postgresql
Clone Db Instance Timeouts
- auto
Renew numberFlag - Renewal Flag:
- db
Instance stringId - ID of the original instance to be cloned.
- period number
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- spec
Code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage number
- Instance storage capacity in GB.
- subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - vpc
Id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - activity
Id number - Campaign ID.
- backup
Set stringId - Basic backup set ID.
- db
Node PostgresqlSets Clone Db Instance Db Node Set[] - 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
Zonefield in the return value of the DescribeZones API. - deletion
Protection boolean - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance
Charge stringType 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.
- postgresql
Clone stringDb Instance Id - ID of the resource.
- project
Id number - Project ID.
- recovery
Target stringTime - Restoration point in time.
- security
Group string[]Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - sync
Mode 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.
- tag
Lists PostgresqlClone Db Instance Tag List[] - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - {[key: string]: string}
- The available tags within this postgresql.
- timeouts
Postgresql
Clone Db Instance Timeouts
- auto_
renew_ floatflag - Renewal Flag:
- db_
instance_ strid - ID of the original instance to be cloned.
- period float
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- spec_
code str - Purchasable code, which can be obtained from the
SpecCodefield 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 theunSubnetIdfield in the return value of the DescribeSubnets API. - vpc_
id str - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - activity_
id float - Campaign ID.
- backup_
set_ strid - Basic backup set ID.
- db_
node_ Sequence[Postgresqlsets Clone Db Instance Db Node Set Args] - 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
Zonefield in the return value of the DescribeZones API. - deletion_
protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance_
charge_ strtype 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_ strdb_ instance_ id - ID of the resource.
- project_
id float - Project ID.
- recovery_
target_ strtime - Restoration point in time.
- security_
group_ Sequence[str]ids - Security group of the instance, which can be obtained from the
sgldfield 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[PostgresqlClone Db Instance Tag List Args] - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Mapping[str, str]
- The available tags within this postgresql.
- timeouts
Postgresql
Clone Db Instance Timeouts Args
- auto
Renew NumberFlag - Renewal Flag:
- db
Instance StringId - ID of the original instance to be cloned.
- period Number
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- spec
Code String - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage Number
- Instance storage capacity in GB.
- subnet
Id String - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - vpc
Id String - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API. - activity
Id Number - Campaign ID.
- backup
Set StringId - Basic backup set ID.
- db
Node List<Property Map>Sets - 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
Zonefield in the return value of the DescribeZones API. - deletion
Protection Boolean - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance
Charge StringType 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.
- postgresql
Clone StringDb Instance Id - ID of the resource.
- project
Id Number - Project ID.
- recovery
Target StringTime - Restoration point in time.
- security
Group List<String>Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - sync
Mode 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.
- tag
Lists List<Property Map> - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Map<String>
- The available tags within this postgresql.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlCloneDbInstance resource produces the following output properties:
- Availability
Zone string - Availability zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- New
Db stringInstance Id - ID of the cloned instance.
- Private
Access stringIp - IP for private access.
- Private
Access doublePort - Port for private access.
- Public
Access stringHost - Host for public access.
- Public
Access doublePort - Port for public access.
- Availability
Zone string - Availability zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- New
Db stringInstance Id - ID of the cloned instance.
- Private
Access stringIp - IP for private access.
- Private
Access float64Port - Port for private access.
- Public
Access stringHost - Host for public access.
- Public
Access float64Port - Port for public access.
- availability_
zone string - Availability zone.
- id string
- The provider-assigned unique ID for this managed resource.
- new_
db_ stringinstance_ id - ID of the cloned instance.
- private_
access_ stringip - IP for private access.
- private_
access_ numberport - Port for private access.
- public_
access_ stringhost - Host for public access.
- public_
access_ numberport - Port for public access.
- availability
Zone String - Availability zone.
- id String
- The provider-assigned unique ID for this managed resource.
- new
Db StringInstance Id - ID of the cloned instance.
- private
Access StringIp - IP for private access.
- private
Access DoublePort - Port for private access.
- public
Access StringHost - Host for public access.
- public
Access DoublePort - Port for public access.
- availability
Zone string - Availability zone.
- id string
- The provider-assigned unique ID for this managed resource.
- new
Db stringInstance Id - ID of the cloned instance.
- private
Access stringIp - IP for private access.
- private
Access numberPort - Port for private access.
- public
Access stringHost - Host for public access.
- public
Access numberPort - Port for public access.
- availability_
zone str - Availability zone.
- id str
- The provider-assigned unique ID for this managed resource.
- new_
db_ strinstance_ id - ID of the cloned instance.
- private_
access_ strip - IP for private access.
- private_
access_ floatport - Port for private access.
- public_
access_ strhost - Host for public access.
- public_
access_ floatport - Port for public access.
- availability
Zone String - Availability zone.
- id String
- The provider-assigned unique ID for this managed resource.
- new
Db StringInstance Id - ID of the cloned instance.
- private
Access StringIp - IP for private access.
- private
Access NumberPort - Port for private access.
- public
Access StringHost - Host for public access.
- public
Access NumberPort - Port for public access.
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,
availability_zone: Optional[str] = None,
backup_set_id: Optional[str] = None,
db_instance_id: Optional[str] = None,
db_node_sets: Optional[Sequence[PostgresqlCloneDbInstanceDbNodeSetArgs]] = None,
deletion_protection: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
name: Optional[str] = None,
new_db_instance_id: Optional[str] = None,
period: Optional[float] = None,
postgresql_clone_db_instance_id: Optional[str] = None,
private_access_ip: Optional[str] = None,
private_access_port: Optional[float] = None,
project_id: Optional[float] = None,
public_access_host: Optional[str] = None,
public_access_port: 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,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[PostgresqlCloneDbInstanceTimeoutsArgs] = None,
vpc_id: Optional[str] = None) -> PostgresqlCloneDbInstancefunc 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}import {
to = tencentcloud_postgresql_clone_db_instance.example
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.
- Activity
Id double - Campaign ID.
- Auto
Renew doubleFlag - Renewal Flag:
- Availability
Zone string - Availability zone.
- Backup
Set stringId - Basic backup set ID.
- Db
Instance stringId - ID of the original instance to be cloned.
- Db
Node List<PostgresqlSets Clone Db Instance Db Node Set> - 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
Zonefield in the return value of the DescribeZones API. - Deletion
Protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - Instance
Charge stringType 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.
- New
Db stringInstance Id - ID of the cloned instance.
- Period double
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- Postgresql
Clone stringDb Instance Id - ID of the resource.
- Private
Access stringIp - IP for private access.
- Private
Access doublePort - Port for private access.
- Project
Id double - Project ID.
- Public
Access stringHost - Host for public access.
- Public
Access doublePort - Port for public access.
- Recovery
Target stringTime - Restoration point in time.
- Security
Group List<string>Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - Spec
Code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - Storage double
- Instance storage capacity in GB.
- Subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - Sync
Mode 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.
- Tag
Lists List<PostgresqlClone Db Instance Tag List> - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Dictionary<string, string>
- The available tags within this postgresql.
- Timeouts
Postgresql
Clone Db Instance Timeouts - Vpc
Id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
- Activity
Id float64 - Campaign ID.
- Auto
Renew float64Flag - Renewal Flag:
- Availability
Zone string - Availability zone.
- Backup
Set stringId - Basic backup set ID.
- Db
Instance stringId - ID of the original instance to be cloned.
- Db
Node []PostgresqlSets Clone Db Instance Db Node Set Args - 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
Zonefield in the return value of the DescribeZones API. - Deletion
Protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - Instance
Charge stringType 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.
- New
Db stringInstance Id - ID of the cloned instance.
- Period float64
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- Postgresql
Clone stringDb Instance Id - ID of the resource.
- Private
Access stringIp - IP for private access.
- Private
Access float64Port - Port for private access.
- Project
Id float64 - Project ID.
- Public
Access stringHost - Host for public access.
- Public
Access float64Port - Port for public access.
- Recovery
Target stringTime - Restoration point in time.
- Security
Group []stringIds - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - Spec
Code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - Storage float64
- Instance storage capacity in GB.
- Subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - Sync
Mode 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.
- Tag
Lists []PostgresqlClone Db Instance Tag List Args - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - map[string]string
- The available tags within this postgresql.
- Timeouts
Postgresql
Clone Db Instance Timeouts Args - Vpc
Id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
- activity_
id number - Campaign ID.
- auto_
renew_ numberflag - Renewal Flag:
- availability_
zone string - Availability zone.
- backup_
set_ stringid - Basic backup set ID.
- db_
instance_ stringid - ID of the original instance to be cloned.
- db_
node_ list(object)sets - 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
Zonefield in the return value of the DescribeZones API. - deletion_
protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance_
charge_ stringtype 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.
- new_
db_ stringinstance_ id - ID of the cloned instance.
- period number
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- postgresql_
clone_ stringdb_ instance_ id - ID of the resource.
- private_
access_ stringip - IP for private access.
- private_
access_ numberport - Port for private access.
- project_
id number - Project ID.
- public_
access_ stringhost - Host for public access.
- public_
access_ numberport - Port for public access.
- recovery_
target_ stringtime - Restoration point in time.
- security_
group_ list(string)ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - spec_
code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage number
- Instance storage capacity in GB.
- subnet_
id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - sync_
mode 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.
- tag_
lists list(object) - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - map(string)
- The available tags within this postgresql.
- timeouts object
- vpc_
id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
- activity
Id Double - Campaign ID.
- auto
Renew DoubleFlag - Renewal Flag:
- availability
Zone String - Availability zone.
- backup
Set StringId - Basic backup set ID.
- db
Instance StringId - ID of the original instance to be cloned.
- db
Node List<PostgresqlSets Clone Db Instance Db Node Set> - 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
Zonefield in the return value of the DescribeZones API. - deletion
Protection Boolean - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance
Charge StringType 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.
- new
Db StringInstance Id - ID of the cloned instance.
- period Double
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- postgresql
Clone StringDb Instance Id - ID of the resource.
- private
Access StringIp - IP for private access.
- private
Access DoublePort - Port for private access.
- project
Id Double - Project ID.
- public
Access StringHost - Host for public access.
- public
Access DoublePort - Port for public access.
- recovery
Target StringTime - Restoration point in time.
- security
Group List<String>Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - spec
Code String - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage Double
- Instance storage capacity in GB.
- subnet
Id String - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - sync
Mode 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.
- tag
Lists List<PostgresqlClone Db Instance Tag List> - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Map<String,String>
- The available tags within this postgresql.
- timeouts
Postgresql
Clone Db Instance Timeouts - vpc
Id String - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
- activity
Id number - Campaign ID.
- auto
Renew numberFlag - Renewal Flag:
- availability
Zone string - Availability zone.
- backup
Set stringId - Basic backup set ID.
- db
Instance stringId - ID of the original instance to be cloned.
- db
Node PostgresqlSets Clone Db Instance Db Node Set[] - 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
Zonefield in the return value of the DescribeZones API. - deletion
Protection boolean - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance
Charge stringType 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.
- new
Db stringInstance Id - ID of the cloned instance.
- period number
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- postgresql
Clone stringDb Instance Id - ID of the resource.
- private
Access stringIp - IP for private access.
- private
Access numberPort - Port for private access.
- project
Id number - Project ID.
- public
Access stringHost - Host for public access.
- public
Access numberPort - Port for public access.
- recovery
Target stringTime - Restoration point in time.
- security
Group string[]Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - spec
Code string - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage number
- Instance storage capacity in GB.
- subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - sync
Mode 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.
- tag
Lists PostgresqlClone Db Instance Tag List[] - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - {[key: string]: string}
- The available tags within this postgresql.
- timeouts
Postgresql
Clone Db Instance Timeouts - vpc
Id string - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
- activity_
id float - Campaign ID.
- auto_
renew_ floatflag - Renewal Flag:
- availability_
zone str - Availability zone.
- backup_
set_ strid - Basic backup set ID.
- db_
instance_ strid - ID of the original instance to be cloned.
- db_
node_ Sequence[Postgresqlsets Clone Db Instance Db Node Set Args] - 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
Zonefield in the return value of the DescribeZones API. - deletion_
protection bool - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance_
charge_ strtype 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.
- new_
db_ strinstance_ id - ID of the cloned instance.
- period float
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- postgresql_
clone_ strdb_ instance_ id - ID of the resource.
- private_
access_ strip - IP for private access.
- private_
access_ floatport - Port for private access.
- project_
id float - Project ID.
- public_
access_ strhost - Host for public access.
- public_
access_ floatport - Port for public access.
- recovery_
target_ strtime - Restoration point in time.
- security_
group_ Sequence[str]ids - Security group of the instance, which can be obtained from the
sgldfield 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
SpecCodefield 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 theunSubnetIdfield 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[PostgresqlClone Db Instance Tag List Args] - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Mapping[str, str]
- The available tags within this postgresql.
- timeouts
Postgresql
Clone Db Instance Timeouts Args - vpc_
id str - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
- activity
Id Number - Campaign ID.
- auto
Renew NumberFlag - Renewal Flag:
- availability
Zone String - Availability zone.
- backup
Set StringId - Basic backup set ID.
- db
Instance StringId - ID of the original instance to be cloned.
- db
Node List<Property Map>Sets - 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
Zonefield in the return value of the DescribeZones API. - deletion
Protection Boolean - Whether deletion protection is enabled for the instance:
truedeletion protection enabled;falsedeletion protection disabled. - instance
Charge StringType 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.
- new
Db StringInstance Id - ID of the cloned instance.
- period Number
- Purchase duration, in months.
- Prepaid: Supports
1,2,3,4,5,6,7,8,9,10,11,12,24, and36. - Pay-as-you-go: Only supports
1.
- Prepaid: Supports
- postgresql
Clone StringDb Instance Id - ID of the resource.
- private
Access StringIp - IP for private access.
- private
Access NumberPort - Port for private access.
- project
Id Number - Project ID.
- public
Access StringHost - Host for public access.
- public
Access NumberPort - Port for public access.
- recovery
Target StringTime - Restoration point in time.
- security
Group List<String>Ids - Security group of the instance, which can be obtained from the
sgldfield in the return value of the DescribeSecurityGroups API. If this parameter is not specified, the default security group will be bound. - spec
Code String - Purchasable code, which can be obtained from the
SpecCodefield in the return value of the DescribeClasses API. - storage Number
- Instance storage capacity in GB.
- subnet
Id String - VPC subnet ID in the format of
subnet-xxxxxxxx, which can be obtained in the console or from theunSubnetIdfield in the return value of the DescribeSubnets API. - sync
Mode 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.
- tag
Lists List<Property Map> - It has been deprecated from version 1.83.10. Use
tagsinstead. The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from theTagsfield in the return value of the DescribeTags API. - Map<String>
- The available tags within this postgresql.
- timeouts Property Map
- vpc
Id String - VPC ID in the format of
vpc-xxxxxxx, which can be obtained in the console or from theunVpcIdfield in the return value of the DescribeVpcEx API.
Supporting Types
PostgresqlCloneDbInstanceDbNodeSet, PostgresqlCloneDbInstanceDbNodeSetArgs
- Role string
- Node type. Valid values:
Primary;Standby. - Zone string
- AZ where the node resides, such as ap-guangzhou-1.
- Dedicated
Cluster stringId - Dedicated cluster ID.
- Role string
- Node type. Valid values:
Primary;Standby. - Zone string
- AZ where the node resides, such as ap-guangzhou-1.
- Dedicated
Cluster stringId - Dedicated cluster ID.
- role string
- Node type. Valid values:
Primary;Standby. - zone string
- AZ where the node resides, such as ap-guangzhou-1.
- dedicated_
cluster_ stringid - Dedicated cluster ID.
- role String
- Node type. Valid values:
Primary;Standby. - zone String
- AZ where the node resides, such as ap-guangzhou-1.
- dedicated
Cluster StringId - Dedicated cluster ID.
- role string
- Node type. Valid values:
Primary;Standby. - zone string
- AZ where the node resides, such as ap-guangzhou-1.
- dedicated
Cluster stringId - Dedicated cluster ID.
- role str
- Node type. Valid values:
Primary;Standby. - zone str
- AZ where the node resides, such as ap-guangzhou-1.
- dedicated_
cluster_ strid - Dedicated cluster ID.
- role String
- Node type. Valid values:
Primary;Standby. - zone String
- AZ where the node resides, such as ap-guangzhou-1.
- dedicated
Cluster StringId - Dedicated cluster ID.
PostgresqlCloneDbInstanceTagList, PostgresqlCloneDbInstanceTagListArgs
PostgresqlCloneDbInstanceTimeouts, PostgresqlCloneDbInstanceTimeoutsArgs
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Friday, Aug 14, 2026 by tencentcloudstack