1. Packages
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. getPostgresBranchBackup
Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale
Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale

    PostgresBranchBackup DataSource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myPostgresbranchbackup = planetscale.getPostgresBranchBackup({
        branch: "...my_branch...",
        database: "...my_database...",
        id: "...my_id...",
        organization: "...my_organization...",
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_postgresbranchbackup = planetscale.get_postgres_branch_backup(branch="...my_branch...",
        database="...my_database...",
        id="...my_id...",
        organization="...my_organization...")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := planetscale.LookupPostgresBranchBackup(ctx, &planetscale.LookupPostgresBranchBackupArgs{
    			Branch:       "...my_branch...",
    			Database:     "...my_database...",
    			Id:           "...my_id...",
    			Organization: "...my_organization...",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Planetscale = Pulumi.Planetscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myPostgresbranchbackup = Planetscale.GetPostgresBranchBackup.Invoke(new()
        {
            Branch = "...my_branch...",
            Database = "...my_database...",
            Id = "...my_id...",
            Organization = "...my_organization...",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.PlanetscaleFunctions;
    import com.pulumi.planetscale.inputs.GetPostgresBranchBackupArgs;
    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 myPostgresbranchbackup = PlanetscaleFunctions.getPostgresBranchBackup(GetPostgresBranchBackupArgs.builder()
                .branch("...my_branch...")
                .database("...my_database...")
                .id("...my_id...")
                .organization("...my_organization...")
                .build());
    
        }
    }
    
    variables:
      myPostgresbranchbackup:
        fn::invoke:
          function: planetscale:getPostgresBranchBackup
          arguments:
            branch: '...my_branch...'
            database: '...my_database...'
            id: '...my_id...'
            organization: '...my_organization...'
    
    Example coming soon!
    

    Using getPostgresBranchBackup

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPostgresBranchBackup(args: GetPostgresBranchBackupArgs, opts?: InvokeOptions): Promise<GetPostgresBranchBackupResult>
    function getPostgresBranchBackupOutput(args: GetPostgresBranchBackupOutputArgs, opts?: InvokeOptions): Output<GetPostgresBranchBackupResult>
    def get_postgres_branch_backup(branch: Optional[str] = None,
                                   database: Optional[str] = None,
                                   id: Optional[str] = None,
                                   organization: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetPostgresBranchBackupResult
    def get_postgres_branch_backup_output(branch: pulumi.Input[Optional[str]] = None,
                                   database: pulumi.Input[Optional[str]] = None,
                                   id: pulumi.Input[Optional[str]] = None,
                                   organization: pulumi.Input[Optional[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetPostgresBranchBackupResult]
    func LookupPostgresBranchBackup(ctx *Context, args *LookupPostgresBranchBackupArgs, opts ...InvokeOption) (*LookupPostgresBranchBackupResult, error)
    func LookupPostgresBranchBackupOutput(ctx *Context, args *LookupPostgresBranchBackupOutputArgs, opts ...InvokeOption) LookupPostgresBranchBackupResultOutput

    > Note: This function is named LookupPostgresBranchBackup in the Go SDK.

    public static class GetPostgresBranchBackup 
    {
        public static Task<GetPostgresBranchBackupResult> InvokeAsync(GetPostgresBranchBackupArgs args, InvokeOptions? opts = null)
        public static Output<GetPostgresBranchBackupResult> Invoke(GetPostgresBranchBackupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPostgresBranchBackupResult> getPostgresBranchBackup(GetPostgresBranchBackupArgs args, InvokeOptions options)
    public static Output<GetPostgresBranchBackupResult> getPostgresBranchBackup(GetPostgresBranchBackupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: planetscale:index/getPostgresBranchBackup:getPostgresBranchBackup
      arguments:
        # arguments dictionary
    data "planetscale_getpostgresbranchbackup" "name" {
        # arguments
    }

    The following arguments are supported:

    Branch string
    The name of the branch
    Database string
    The name of the database the branch belongs to
    Id string
    The ID of the backup
    Organization string
    The name of the organization the branch belongs to
    Branch string
    The name of the branch
    Database string
    The name of the database the branch belongs to
    Id string
    The ID of the backup
    Organization string
    The name of the organization the branch belongs to
    branch string
    The name of the branch
    database string
    The name of the database the branch belongs to
    id string
    The ID of the backup
    organization string
    The name of the organization the branch belongs to
    branch String
    The name of the branch
    database String
    The name of the database the branch belongs to
    id String
    The ID of the backup
    organization String
    The name of the organization the branch belongs to
    branch string
    The name of the branch
    database string
    The name of the database the branch belongs to
    id string
    The ID of the backup
    organization string
    The name of the organization the branch belongs to
    branch str
    The name of the branch
    database str
    The name of the database the branch belongs to
    id str
    The ID of the backup
    organization str
    The name of the organization the branch belongs to
    branch String
    The name of the branch
    database String
    The name of the database the branch belongs to
    id String
    The ID of the backup
    organization String
    The name of the organization the branch belongs to

    getPostgresBranchBackup Result

    The following output properties are available:

    Actor GetPostgresBranchBackupActor
    BackupPolicy GetPostgresBranchBackupBackupPolicy
    Branch string
    The name of the branch
    CompletedAt string
    When the backup completed
    Database string
    The name of the database the branch belongs to
    DatabaseBranch GetPostgresBranchBackupDatabaseBranch
    DeletedAt string
    When the backup was deleted
    EstimatedStorageCost double
    The estimated storage cost of the backup
    ExpiresAt string
    When the backup expires
    Id string
    The ID of the backup
    Name string
    The name of the backup
    Organization string
    The name of the organization the branch belongs to
    Protected bool
    Whether or not the backup is protected from deletion
    PvcSize double
    Size of the PVC used for the backup
    Size double
    The size of the backup in bytes
    StartedAt string
    When the backup started
    State string
    The current state of the backup
    Actor GetPostgresBranchBackupActor
    BackupPolicy GetPostgresBranchBackupBackupPolicy
    Branch string
    The name of the branch
    CompletedAt string
    When the backup completed
    Database string
    The name of the database the branch belongs to
    DatabaseBranch GetPostgresBranchBackupDatabaseBranch
    DeletedAt string
    When the backup was deleted
    EstimatedStorageCost float64
    The estimated storage cost of the backup
    ExpiresAt string
    When the backup expires
    Id string
    The ID of the backup
    Name string
    The name of the backup
    Organization string
    The name of the organization the branch belongs to
    Protected bool
    Whether or not the backup is protected from deletion
    PvcSize float64
    Size of the PVC used for the backup
    Size float64
    The size of the backup in bytes
    StartedAt string
    When the backup started
    State string
    The current state of the backup
    actor object
    backup_policy object
    branch string
    The name of the branch
    completed_at string
    When the backup completed
    database string
    The name of the database the branch belongs to
    database_branch object
    deleted_at string
    When the backup was deleted
    estimated_storage_cost number
    The estimated storage cost of the backup
    expires_at string
    When the backup expires
    id string
    The ID of the backup
    name string
    The name of the backup
    organization string
    The name of the organization the branch belongs to
    protected bool
    Whether or not the backup is protected from deletion
    pvc_size number
    Size of the PVC used for the backup
    size number
    The size of the backup in bytes
    started_at string
    When the backup started
    state string
    The current state of the backup
    actor GetPostgresBranchBackupActor
    backupPolicy GetPostgresBranchBackupBackupPolicy
    branch String
    The name of the branch
    completedAt String
    When the backup completed
    database String
    The name of the database the branch belongs to
    databaseBranch GetPostgresBranchBackupDatabaseBranch
    deletedAt String
    When the backup was deleted
    estimatedStorageCost Double
    The estimated storage cost of the backup
    expiresAt String
    When the backup expires
    id String
    The ID of the backup
    name String
    The name of the backup
    organization String
    The name of the organization the branch belongs to
    protected_ Boolean
    Whether or not the backup is protected from deletion
    pvcSize Double
    Size of the PVC used for the backup
    size Double
    The size of the backup in bytes
    startedAt String
    When the backup started
    state String
    The current state of the backup
    actor GetPostgresBranchBackupActor
    backupPolicy GetPostgresBranchBackupBackupPolicy
    branch string
    The name of the branch
    completedAt string
    When the backup completed
    database string
    The name of the database the branch belongs to
    databaseBranch GetPostgresBranchBackupDatabaseBranch
    deletedAt string
    When the backup was deleted
    estimatedStorageCost number
    The estimated storage cost of the backup
    expiresAt string
    When the backup expires
    id string
    The ID of the backup
    name string
    The name of the backup
    organization string
    The name of the organization the branch belongs to
    protected boolean
    Whether or not the backup is protected from deletion
    pvcSize number
    Size of the PVC used for the backup
    size number
    The size of the backup in bytes
    startedAt string
    When the backup started
    state string
    The current state of the backup
    actor GetPostgresBranchBackupActor
    backup_policy GetPostgresBranchBackupBackupPolicy
    branch str
    The name of the branch
    completed_at str
    When the backup completed
    database str
    The name of the database the branch belongs to
    database_branch GetPostgresBranchBackupDatabaseBranch
    deleted_at str
    When the backup was deleted
    estimated_storage_cost float
    The estimated storage cost of the backup
    expires_at str
    When the backup expires
    id str
    The ID of the backup
    name str
    The name of the backup
    organization str
    The name of the organization the branch belongs to
    protected bool
    Whether or not the backup is protected from deletion
    pvc_size float
    Size of the PVC used for the backup
    size float
    The size of the backup in bytes
    started_at str
    When the backup started
    state str
    The current state of the backup
    actor Property Map
    backupPolicy Property Map
    branch String
    The name of the branch
    completedAt String
    When the backup completed
    database String
    The name of the database the branch belongs to
    databaseBranch Property Map
    deletedAt String
    When the backup was deleted
    estimatedStorageCost Number
    The estimated storage cost of the backup
    expiresAt String
    When the backup expires
    id String
    The ID of the backup
    name String
    The name of the backup
    organization String
    The name of the organization the branch belongs to
    protected Boolean
    Whether or not the backup is protected from deletion
    pvcSize Number
    Size of the PVC used for the backup
    size Number
    The size of the backup in bytes
    startedAt String
    When the backup started
    state String
    The current state of the backup

    Supporting Types

    GetPostgresBranchBackupActor

    Id string
    The ID of the actor
    Id string
    The ID of the actor
    id string
    The ID of the actor
    id String
    The ID of the actor
    id string
    The ID of the actor
    id str
    The ID of the actor
    id String
    The ID of the actor

    GetPostgresBranchBackupBackupPolicy

    Id string
    The ID of the backup policy
    Id string
    The ID of the backup policy
    id string
    The ID of the backup policy
    id String
    The ID of the backup policy
    id string
    The ID of the backup policy
    id str
    The ID of the backup policy
    id String
    The ID of the backup policy

    GetPostgresBranchBackupDatabaseBranch

    Id string
    The ID for the resource
    Name string
    The name for the resource
    Id string
    The ID for the resource
    Name string
    The name for the resource
    id string
    The ID for the resource
    name string
    The name for the resource
    id String
    The ID for the resource
    name String
    The name for the resource
    id string
    The ID for the resource
    name string
    The name for the resource
    id str
    The ID for the resource
    name str
    The name for the resource
    id String
    The ID for the resource
    name String
    The name for the resource

    Package Details

    Repository
    planetscale planetscale/terraform-provider-planetscale
    License
    Notes
    This Pulumi package is based on the planetscale Terraform Provider.
    Viewing docs for planetscale 1.2.0
    published on Tuesday, Jun 16, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial