1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. PostgresqlBaseBackup
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.82.93
published on Monday, May 11, 2026 by tencentcloudstack

    Provides a resource to create a PostgreSQL base backup

    Example Usage

    Create a PostgreSQL base backup

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.PostgresqlBaseBackup("example", {
        dbInstanceId: "postgres-ckwcgdf1",
        tags: {
            createdBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.PostgresqlBaseBackup("example",
        db_instance_id="postgres-ckwcgdf1",
        tags={
            "createdBy": "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 {
    		_, err := tencentcloud.NewPostgresqlBaseBackup(ctx, "example", &tencentcloud.PostgresqlBaseBackupArgs{
    			DbInstanceId: pulumi.String("postgres-ckwcgdf1"),
    			Tags: pulumi.StringMap{
    				"createdBy": 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 example = new Tencentcloud.PostgresqlBaseBackup("example", new()
        {
            DbInstanceId = "postgres-ckwcgdf1",
            Tags = 
            {
                { "createdBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlBaseBackup;
    import com.pulumi.tencentcloud.PostgresqlBaseBackupArgs;
    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 PostgresqlBaseBackup("example", PostgresqlBaseBackupArgs.builder()
                .dbInstanceId("postgres-ckwcgdf1")
                .tags(Map.of("createdBy", "Terraform"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:PostgresqlBaseBackup
        properties:
          dbInstanceId: postgres-ckwcgdf1
          tags:
            createdBy: Terraform
    
    Example coming soon!
    

    Customize the expire time

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.PostgresqlBaseBackup("example", {
        dbInstanceId: "postgres-ckwcgdf1",
        newExpireTime: "2027-04-23 20:07:36",
        tags: {
            createdBy: "Terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.PostgresqlBaseBackup("example",
        db_instance_id="postgres-ckwcgdf1",
        new_expire_time="2027-04-23 20:07:36",
        tags={
            "createdBy": "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 {
    		_, err := tencentcloud.NewPostgresqlBaseBackup(ctx, "example", &tencentcloud.PostgresqlBaseBackupArgs{
    			DbInstanceId:  pulumi.String("postgres-ckwcgdf1"),
    			NewExpireTime: pulumi.String("2027-04-23 20:07:36"),
    			Tags: pulumi.StringMap{
    				"createdBy": 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 example = new Tencentcloud.PostgresqlBaseBackup("example", new()
        {
            DbInstanceId = "postgres-ckwcgdf1",
            NewExpireTime = "2027-04-23 20:07:36",
            Tags = 
            {
                { "createdBy", "Terraform" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.PostgresqlBaseBackup;
    import com.pulumi.tencentcloud.PostgresqlBaseBackupArgs;
    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 PostgresqlBaseBackup("example", PostgresqlBaseBackupArgs.builder()
                .dbInstanceId("postgres-ckwcgdf1")
                .newExpireTime("2027-04-23 20:07:36")
                .tags(Map.of("createdBy", "Terraform"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:PostgresqlBaseBackup
        properties:
          dbInstanceId: postgres-ckwcgdf1
          newExpireTime: 2027-04-23 20:07:36
          tags:
            createdBy: Terraform
    
    Example coming soon!
    

    Create PostgresqlBaseBackup Resource

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

    Constructor syntax

    new PostgresqlBaseBackup(name: string, args: PostgresqlBaseBackupArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresqlBaseBackup(resource_name: str,
                             args: PostgresqlBaseBackupArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresqlBaseBackup(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             db_instance_id: Optional[str] = None,
                             new_expire_time: Optional[str] = None,
                             postgresql_base_backup_id: Optional[str] = None,
                             tags: Optional[Mapping[str, str]] = None,
                             timeouts: Optional[PostgresqlBaseBackupTimeoutsArgs] = None)
    func NewPostgresqlBaseBackup(ctx *Context, name string, args PostgresqlBaseBackupArgs, opts ...ResourceOption) (*PostgresqlBaseBackup, error)
    public PostgresqlBaseBackup(string name, PostgresqlBaseBackupArgs args, CustomResourceOptions? opts = null)
    public PostgresqlBaseBackup(String name, PostgresqlBaseBackupArgs args)
    public PostgresqlBaseBackup(String name, PostgresqlBaseBackupArgs args, CustomResourceOptions options)
    
    type: tencentcloud:PostgresqlBaseBackup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_postgresqlbasebackup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args PostgresqlBaseBackupArgs
    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 PostgresqlBaseBackupArgs
    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 PostgresqlBaseBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresqlBaseBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresqlBaseBackupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    DbInstanceId string
    Instance ID.
    NewExpireTime string
    New expiration time.
    PostgresqlBaseBackupId string
    ID of the resource.
    Tags Dictionary<string, string>
    Tag description list.
    Timeouts PostgresqlBaseBackupTimeouts
    DbInstanceId string
    Instance ID.
    NewExpireTime string
    New expiration time.
    PostgresqlBaseBackupId string
    ID of the resource.
    Tags map[string]string
    Tag description list.
    Timeouts PostgresqlBaseBackupTimeoutsArgs
    db_instance_id string
    Instance ID.
    new_expire_time string
    New expiration time.
    postgresql_base_backup_id string
    ID of the resource.
    tags map(string)
    Tag description list.
    timeouts object
    dbInstanceId String
    Instance ID.
    newExpireTime String
    New expiration time.
    postgresqlBaseBackupId String
    ID of the resource.
    tags Map<String,String>
    Tag description list.
    timeouts PostgresqlBaseBackupTimeouts
    dbInstanceId string
    Instance ID.
    newExpireTime string
    New expiration time.
    postgresqlBaseBackupId string
    ID of the resource.
    tags {[key: string]: string}
    Tag description list.
    timeouts PostgresqlBaseBackupTimeouts
    db_instance_id str
    Instance ID.
    new_expire_time str
    New expiration time.
    postgresql_base_backup_id str
    ID of the resource.
    tags Mapping[str, str]
    Tag description list.
    timeouts PostgresqlBaseBackupTimeoutsArgs
    dbInstanceId String
    Instance ID.
    newExpireTime String
    New expiration time.
    postgresqlBaseBackupId String
    ID of the resource.
    tags Map<String>
    Tag description list.
    timeouts Property Map

    Outputs

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

    BaseBackupId string
    Base backup ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    BaseBackupId string
    Base backup ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    base_backup_id string
    Base backup ID.
    id string
    The provider-assigned unique ID for this managed resource.
    baseBackupId String
    Base backup ID.
    id String
    The provider-assigned unique ID for this managed resource.
    baseBackupId string
    Base backup ID.
    id string
    The provider-assigned unique ID for this managed resource.
    base_backup_id str
    Base backup ID.
    id str
    The provider-assigned unique ID for this managed resource.
    baseBackupId String
    Base backup ID.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PostgresqlBaseBackup Resource

    Get an existing PostgresqlBaseBackup 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?: PostgresqlBaseBackupState, opts?: CustomResourceOptions): PostgresqlBaseBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            base_backup_id: Optional[str] = None,
            db_instance_id: Optional[str] = None,
            new_expire_time: Optional[str] = None,
            postgresql_base_backup_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            timeouts: Optional[PostgresqlBaseBackupTimeoutsArgs] = None) -> PostgresqlBaseBackup
    func GetPostgresqlBaseBackup(ctx *Context, name string, id IDInput, state *PostgresqlBaseBackupState, opts ...ResourceOption) (*PostgresqlBaseBackup, error)
    public static PostgresqlBaseBackup Get(string name, Input<string> id, PostgresqlBaseBackupState? state, CustomResourceOptions? opts = null)
    public static PostgresqlBaseBackup get(String name, Output<String> id, PostgresqlBaseBackupState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:PostgresqlBaseBackup    get:      id: ${id}
    import {
      to = tencentcloud_postgresqlbasebackup.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.
    The following state arguments are supported:
    BaseBackupId string
    Base backup ID.
    DbInstanceId string
    Instance ID.
    NewExpireTime string
    New expiration time.
    PostgresqlBaseBackupId string
    ID of the resource.
    Tags Dictionary<string, string>
    Tag description list.
    Timeouts PostgresqlBaseBackupTimeouts
    BaseBackupId string
    Base backup ID.
    DbInstanceId string
    Instance ID.
    NewExpireTime string
    New expiration time.
    PostgresqlBaseBackupId string
    ID of the resource.
    Tags map[string]string
    Tag description list.
    Timeouts PostgresqlBaseBackupTimeoutsArgs
    base_backup_id string
    Base backup ID.
    db_instance_id string
    Instance ID.
    new_expire_time string
    New expiration time.
    postgresql_base_backup_id string
    ID of the resource.
    tags map(string)
    Tag description list.
    timeouts object
    baseBackupId String
    Base backup ID.
    dbInstanceId String
    Instance ID.
    newExpireTime String
    New expiration time.
    postgresqlBaseBackupId String
    ID of the resource.
    tags Map<String,String>
    Tag description list.
    timeouts PostgresqlBaseBackupTimeouts
    baseBackupId string
    Base backup ID.
    dbInstanceId string
    Instance ID.
    newExpireTime string
    New expiration time.
    postgresqlBaseBackupId string
    ID of the resource.
    tags {[key: string]: string}
    Tag description list.
    timeouts PostgresqlBaseBackupTimeouts
    base_backup_id str
    Base backup ID.
    db_instance_id str
    Instance ID.
    new_expire_time str
    New expiration time.
    postgresql_base_backup_id str
    ID of the resource.
    tags Mapping[str, str]
    Tag description list.
    timeouts PostgresqlBaseBackupTimeoutsArgs
    baseBackupId String
    Base backup ID.
    dbInstanceId String
    Instance ID.
    newExpireTime String
    New expiration time.
    postgresqlBaseBackupId String
    ID of the resource.
    tags Map<String>
    Tag description list.
    timeouts Property Map

    Supporting Types

    PostgresqlBaseBackupTimeouts, PostgresqlBaseBackupTimeoutsArgs

    Create string
    Create string
    create string
    create String
    create string
    create str
    create String

    Import

    PostgreSQL base backup can be imported using the dBInstanceId#baseBackupId, e.g.

    $ pulumi import tencentcloud:index/postgresqlBaseBackup:PostgresqlBaseBackup example postgres-ckwcgdf1#bac3d001-5160-5077-9139-49c1310e0854
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.82.93
    published on Monday, May 11, 2026 by tencentcloudstack
      Try Pulumi Cloud free. Your team will thank you.