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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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",
}],
});
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",
}])
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
})
}
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",
},
},
});
});
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());
}
}
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
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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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 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
SpecCode
field 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 theunSubnetId
field 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 theunVpcId
field 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
Zone
field in the return value of the DescribeZones API. - 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
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 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> - 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 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
SpecCode
field 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 theunSubnetId
field 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 theunVpcId
field 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
Zone
field in the return value of the DescribeZones API. - 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
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 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 - 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 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
SpecCode
field 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 theunSubnetId
field 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 theunVpcId
field 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
Zone
field in the return value of the DescribeZones API. - 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
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 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> - 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 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
SpecCode
field 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 theunSubnetId
field 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 theunVpcId
field 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
Zone
field in the return value of the DescribeZones API. - 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
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 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[] - 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_ 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
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 theunSubnetId
field 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 theunVpcId
field 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
Zone
field in the return value of the DescribeZones API. - 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
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[PostgresqlClone Db Instance Tag List Args] - 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 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
SpecCode
field 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 theunSubnetId
field 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 theunVpcId
field 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
Zone
field in the return value of the DescribeZones API. - 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
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 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> - 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
- 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:
- 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
Zone
field in the return value of the DescribeZones API. - 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.
- 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.
- 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
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 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.
- Subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx
, which can be obtained in the console or from theunSubnetId
field 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> - 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 string - VPC ID in the format of
vpc-xxxxxxx
, which can be obtained in the console or from theunVpcId
field in the return value of the DescribeVpcEx API.
- Activity
Id float64 - Campaign ID.
- Auto
Renew float64Flag - Renewal Flag:
- 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
Zone
field in the return value of the DescribeZones API. - 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.
- 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.
- 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
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 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.
- Subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx
, which can be obtained in the console or from theunSubnetId
field 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 - 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 string - VPC ID in the format of
vpc-xxxxxxx
, which can be obtained in the console or from theunVpcId
field in the return value of the DescribeVpcEx API.
- activity
Id Double - Campaign ID.
- auto
Renew DoubleFlag - Renewal Flag:
- 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
Zone
field in the return value of the DescribeZones API. - 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.
- 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.
- 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
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 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.
- subnet
Id String - VPC subnet ID in the format of
subnet-xxxxxxxx
, which can be obtained in the console or from theunSubnetId
field 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> - 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 String - VPC ID in the format of
vpc-xxxxxxx
, which can be obtained in the console or from theunVpcId
field in the return value of the DescribeVpcEx API.
- activity
Id number - Campaign ID.
- auto
Renew numberFlag - Renewal Flag:
- 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
Zone
field in the return value of the DescribeZones API. - 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.
- 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.
- 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
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 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.
- subnet
Id string - VPC subnet ID in the format of
subnet-xxxxxxxx
, which can be obtained in the console or from theunSubnetId
field 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[] - 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 string - VPC ID in the format of
vpc-xxxxxxx
, which can be obtained in the console or from theunVpcId
field in the return value of the DescribeVpcEx API.
- activity_
id float - Campaign ID.
- auto_
renew_ floatflag - Renewal Flag:
- 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
Zone
field in the return value of the DescribeZones API. - 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.
- 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.
- 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
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 theunSubnetId
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[PostgresqlClone Db Instance Tag List Args] - 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 theunVpcId
field in the return value of the DescribeVpcEx API.
- activity
Id Number - Campaign ID.
- auto
Renew NumberFlag - Renewal Flag:
- 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
Zone
field in the return value of the DescribeZones API. - 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.
- 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.
- 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
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 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.
- subnet
Id String - VPC subnet ID in the format of
subnet-xxxxxxxx
, which can be obtained in the console or from theunSubnetId
field 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> - 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 String - VPC ID in the format of
vpc-xxxxxxx
, which can be obtained in the console or from theunVpcId
field 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 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
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.