published on Friday, Aug 14, 2026 by tencentcloudstack
published on Friday, Aug 14, 2026 by tencentcloudstack
Provides a resource to create a postgres backup plan config
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.PostgresqlBackupPlanConfig("example", {
dbInstanceId: "postgres-ckwcgdf1",
minBackupStartTime: "01:00:00",
maxBackupStartTime: "03:00:00",
backupPeriods: [
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
],
baseBackupRetentionPeriod: 7,
logBackupRetentionPeriod: 7,
backupMethod: "physical",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.PostgresqlBackupPlanConfig("example",
db_instance_id="postgres-ckwcgdf1",
min_backup_start_time="01:00:00",
max_backup_start_time="03:00:00",
backup_periods=[
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
],
base_backup_retention_period=7,
log_backup_retention_period=7,
backup_method="physical")
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.NewPostgresqlBackupPlanConfig(ctx, "example", &tencentcloud.PostgresqlBackupPlanConfigArgs{
DbInstanceId: pulumi.String("postgres-ckwcgdf1"),
MinBackupStartTime: pulumi.String("01:00:00"),
MaxBackupStartTime: pulumi.String("03:00:00"),
BackupPeriods: pulumi.StringArray{
pulumi.String("monday"),
pulumi.String("tuesday"),
pulumi.String("wednesday"),
pulumi.String("thursday"),
pulumi.String("friday"),
pulumi.String("saturday"),
pulumi.String("sunday"),
},
BaseBackupRetentionPeriod: pulumi.Float64(7),
LogBackupRetentionPeriod: pulumi.Float64(7),
BackupMethod: pulumi.String("physical"),
})
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.PostgresqlBackupPlanConfig("example", new()
{
DbInstanceId = "postgres-ckwcgdf1",
MinBackupStartTime = "01:00:00",
MaxBackupStartTime = "03:00:00",
BackupPeriods = new[]
{
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
},
BaseBackupRetentionPeriod = 7,
LogBackupRetentionPeriod = 7,
BackupMethod = "physical",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.PostgresqlBackupPlanConfig;
import com.pulumi.tencentcloud.PostgresqlBackupPlanConfigArgs;
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 PostgresqlBackupPlanConfig("example", PostgresqlBackupPlanConfigArgs.builder()
.dbInstanceId("postgres-ckwcgdf1")
.minBackupStartTime("01:00:00")
.maxBackupStartTime("03:00:00")
.backupPeriods(
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday")
.baseBackupRetentionPeriod(7.0)
.logBackupRetentionPeriod(7.0)
.backupMethod("physical")
.build());
}
}
resources:
example:
type: tencentcloud:PostgresqlBackupPlanConfig
properties:
dbInstanceId: postgres-ckwcgdf1
minBackupStartTime: 01:00:00
maxBackupStartTime: 03:00:00
backupPeriods:
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
- sunday
baseBackupRetentionPeriod: 7
logBackupRetentionPeriod: 7
backupMethod: physical
Example coming soon!
Create PostgresqlBackupPlanConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PostgresqlBackupPlanConfig(name: string, args: PostgresqlBackupPlanConfigArgs, opts?: CustomResourceOptions);@overload
def PostgresqlBackupPlanConfig(resource_name: str,
args: PostgresqlBackupPlanConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PostgresqlBackupPlanConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_instance_id: Optional[str] = None,
backup_method: Optional[str] = None,
backup_periods: Optional[Sequence[str]] = None,
base_backup_retention_period: Optional[float] = None,
log_backup_retention_period: Optional[float] = None,
max_backup_start_time: Optional[str] = None,
min_backup_start_time: Optional[str] = None,
postgresql_backup_plan_config_id: Optional[str] = None)func NewPostgresqlBackupPlanConfig(ctx *Context, name string, args PostgresqlBackupPlanConfigArgs, opts ...ResourceOption) (*PostgresqlBackupPlanConfig, error)public PostgresqlBackupPlanConfig(string name, PostgresqlBackupPlanConfigArgs args, CustomResourceOptions? opts = null)
public PostgresqlBackupPlanConfig(String name, PostgresqlBackupPlanConfigArgs args)
public PostgresqlBackupPlanConfig(String name, PostgresqlBackupPlanConfigArgs args, CustomResourceOptions options)
type: tencentcloud:PostgresqlBackupPlanConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_postgresql_backup_plan_config" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PostgresqlBackupPlanConfigArgs
- 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 PostgresqlBackupPlanConfigArgs
- 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 PostgresqlBackupPlanConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PostgresqlBackupPlanConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PostgresqlBackupPlanConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
PostgresqlBackupPlanConfig 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 PostgresqlBackupPlanConfig resource accepts the following input properties:
- Db
Instance stringId - instance id.
- Backup
Method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - Backup
Periods List<string> - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- Base
Backup doubleRetention Period - Backup retention period in days. Value range:7-1830.
- Log
Backup doubleRetention Period - Log backup retention period in days. Value range: 7-1830.
- Max
Backup stringStart Time - The latest time to start a backup.
- Min
Backup stringStart Time - The earliest time to start a backup.
- Postgresql
Backup stringPlan Config Id - ID of the resource.
- Db
Instance stringId - instance id.
- Backup
Method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - Backup
Periods []string - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- Base
Backup float64Retention Period - Backup retention period in days. Value range:7-1830.
- Log
Backup float64Retention Period - Log backup retention period in days. Value range: 7-1830.
- Max
Backup stringStart Time - The latest time to start a backup.
- Min
Backup stringStart Time - The earliest time to start a backup.
- Postgresql
Backup stringPlan Config Id - ID of the resource.
- db_
instance_ stringid - instance id.
- backup_
method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup_
periods list(string) - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base_
backup_ numberretention_ period - Backup retention period in days. Value range:7-1830.
- log_
backup_ numberretention_ period - Log backup retention period in days. Value range: 7-1830.
- max_
backup_ stringstart_ time - The latest time to start a backup.
- min_
backup_ stringstart_ time - The earliest time to start a backup.
- postgresql_
backup_ stringplan_ config_ id - ID of the resource.
- db
Instance StringId - instance id.
- backup
Method String - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup
Periods List<String> - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base
Backup DoubleRetention Period - Backup retention period in days. Value range:7-1830.
- log
Backup DoubleRetention Period - Log backup retention period in days. Value range: 7-1830.
- max
Backup StringStart Time - The latest time to start a backup.
- min
Backup StringStart Time - The earliest time to start a backup.
- postgresql
Backup StringPlan Config Id - ID of the resource.
- db
Instance stringId - instance id.
- backup
Method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup
Periods string[] - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base
Backup numberRetention Period - Backup retention period in days. Value range:7-1830.
- log
Backup numberRetention Period - Log backup retention period in days. Value range: 7-1830.
- max
Backup stringStart Time - The latest time to start a backup.
- min
Backup stringStart Time - The earliest time to start a backup.
- postgresql
Backup stringPlan Config Id - ID of the resource.
- db_
instance_ strid - instance id.
- backup_
method str - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup_
periods Sequence[str] - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base_
backup_ floatretention_ period - Backup retention period in days. Value range:7-1830.
- log_
backup_ floatretention_ period - Log backup retention period in days. Value range: 7-1830.
- max_
backup_ strstart_ time - The latest time to start a backup.
- min_
backup_ strstart_ time - The earliest time to start a backup.
- postgresql_
backup_ strplan_ config_ id - ID of the resource.
- db
Instance StringId - instance id.
- backup
Method String - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup
Periods List<String> - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base
Backup NumberRetention Period - Backup retention period in days. Value range:7-1830.
- log
Backup NumberRetention Period - Log backup retention period in days. Value range: 7-1830.
- max
Backup StringStart Time - The latest time to start a backup.
- min
Backup StringStart Time - The earliest time to start a backup.
- postgresql
Backup StringPlan Config Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PostgresqlBackupPlanConfig 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 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 PostgresqlBackupPlanConfig Resource
Get an existing PostgresqlBackupPlanConfig 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?: PostgresqlBackupPlanConfigState, opts?: CustomResourceOptions): PostgresqlBackupPlanConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_method: Optional[str] = None,
backup_periods: Optional[Sequence[str]] = None,
base_backup_retention_period: Optional[float] = None,
db_instance_id: Optional[str] = None,
log_backup_retention_period: Optional[float] = None,
max_backup_start_time: Optional[str] = None,
min_backup_start_time: Optional[str] = None,
postgresql_backup_plan_config_id: Optional[str] = None) -> PostgresqlBackupPlanConfigfunc GetPostgresqlBackupPlanConfig(ctx *Context, name string, id IDInput, state *PostgresqlBackupPlanConfigState, opts ...ResourceOption) (*PostgresqlBackupPlanConfig, error)public static PostgresqlBackupPlanConfig Get(string name, Input<string> id, PostgresqlBackupPlanConfigState? state, CustomResourceOptions? opts = null)public static PostgresqlBackupPlanConfig get(String name, Output<String> id, PostgresqlBackupPlanConfigState state, CustomResourceOptions options)resources: _: type: tencentcloud:PostgresqlBackupPlanConfig get: id: ${id}import {
to = tencentcloud_postgresql_backup_plan_config.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.
- Backup
Method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - Backup
Periods List<string> - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- Base
Backup doubleRetention Period - Backup retention period in days. Value range:7-1830.
- Db
Instance stringId - instance id.
- Log
Backup doubleRetention Period - Log backup retention period in days. Value range: 7-1830.
- Max
Backup stringStart Time - The latest time to start a backup.
- Min
Backup stringStart Time - The earliest time to start a backup.
- Postgresql
Backup stringPlan Config Id - ID of the resource.
- Backup
Method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - Backup
Periods []string - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- Base
Backup float64Retention Period - Backup retention period in days. Value range:7-1830.
- Db
Instance stringId - instance id.
- Log
Backup float64Retention Period - Log backup retention period in days. Value range: 7-1830.
- Max
Backup stringStart Time - The latest time to start a backup.
- Min
Backup stringStart Time - The earliest time to start a backup.
- Postgresql
Backup stringPlan Config Id - ID of the resource.
- backup_
method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup_
periods list(string) - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base_
backup_ numberretention_ period - Backup retention period in days. Value range:7-1830.
- db_
instance_ stringid - instance id.
- log_
backup_ numberretention_ period - Log backup retention period in days. Value range: 7-1830.
- max_
backup_ stringstart_ time - The latest time to start a backup.
- min_
backup_ stringstart_ time - The earliest time to start a backup.
- postgresql_
backup_ stringplan_ config_ id - ID of the resource.
- backup
Method String - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup
Periods List<String> - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base
Backup DoubleRetention Period - Backup retention period in days. Value range:7-1830.
- db
Instance StringId - instance id.
- log
Backup DoubleRetention Period - Log backup retention period in days. Value range: 7-1830.
- max
Backup StringStart Time - The latest time to start a backup.
- min
Backup StringStart Time - The earliest time to start a backup.
- postgresql
Backup StringPlan Config Id - ID of the resource.
- backup
Method string - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup
Periods string[] - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base
Backup numberRetention Period - Backup retention period in days. Value range:7-1830.
- db
Instance stringId - instance id.
- log
Backup numberRetention Period - Log backup retention period in days. Value range: 7-1830.
- max
Backup stringStart Time - The latest time to start a backup.
- min
Backup stringStart Time - The earliest time to start a backup.
- postgresql
Backup stringPlan Config Id - ID of the resource.
- backup_
method str - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup_
periods Sequence[str] - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base_
backup_ floatretention_ period - Backup retention period in days. Value range:7-1830.
- db_
instance_ strid - instance id.
- log_
backup_ floatretention_ period - Log backup retention period in days. Value range: 7-1830.
- max_
backup_ strstart_ time - The latest time to start a backup.
- min_
backup_ strstart_ time - The earliest time to start a backup.
- postgresql_
backup_ strplan_ config_ id - ID of the resource.
- backup
Method String - Backup method. Valid values:
physical(physical backup),logical(logical backup),snapshot(snapshot backup). - backup
Periods List<String> - Backup cycle, which means on which days each week the instance will be backed up. The parameter value should be the lowercase names of the days of the week.
- base
Backup NumberRetention Period - Backup retention period in days. Value range:7-1830.
- db
Instance StringId - instance id.
- log
Backup NumberRetention Period - Log backup retention period in days. Value range: 7-1830.
- max
Backup StringStart Time - The latest time to start a backup.
- min
Backup StringStart Time - The earliest time to start a backup.
- postgresql
Backup StringPlan Config Id - ID of the resource.
Import
postgres backup plan config can be imported using the id, e.g.
$ pulumi import tencentcloud:index/postgresqlBackupPlanConfig:PostgresqlBackupPlanConfig example postgres-ckwcgdf1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Friday, Aug 14, 2026 by tencentcloudstack