1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. PostgresqlBaseBackup
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.PostgresqlBaseBackup

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a postgresql base_backup

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const baseBackup = new tencentcloud.PostgresqlBaseBackup("baseBackup", {
        dbInstanceId: local.pgsql_id,
        tags: {
            createdBy: "terraform",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    base_backup = tencentcloud.PostgresqlBaseBackup("baseBackup",
        db_instance_id=local["pgsql_id"],
        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, "baseBackup", &tencentcloud.PostgresqlBaseBackupArgs{
    			DbInstanceId: pulumi.Any(local.Pgsql_id),
    			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 baseBackup = new Tencentcloud.PostgresqlBaseBackup("baseBackup", new()
        {
            DbInstanceId = local.Pgsql_id,
            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 baseBackup = new PostgresqlBaseBackup("baseBackup", PostgresqlBaseBackupArgs.builder()
                .dbInstanceId(local.pgsql_id())
                .tags(Map.of("createdBy", "terraform"))
                .build());
    
        }
    }
    
    resources:
      baseBackup:
        type: tencentcloud:PostgresqlBaseBackup
        properties:
          dbInstanceId: ${local.pgsql_id}
          tags:
            createdBy: terraform
    

    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)
    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.
    
    

    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.
    DbInstanceId string
    Instance ID.
    NewExpireTime string
    New expiration time.
    PostgresqlBaseBackupId string
    ID of the resource.
    Tags map[string]string
    Tag description list.
    dbInstanceId String
    Instance ID.
    newExpireTime String
    New expiration time.
    postgresqlBaseBackupId String
    ID of the resource.
    tags Map<String,String>
    Tag description list.
    dbInstanceId string
    Instance ID.
    newExpireTime string
    New expiration time.
    postgresqlBaseBackupId string
    ID of the resource.
    tags {[key: string]: string}
    Tag description list.
    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.
    dbInstanceId String
    Instance ID.
    newExpireTime String
    New expiration time.
    postgresqlBaseBackupId String
    ID of the resource.
    tags Map<String>
    Tag description list.

    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.
    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) -> 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}
    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.
    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.
    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.
    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.
    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.
    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.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack