Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale
published on Tuesday, Jun 16, 2026 by planetscale
Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale
published on Tuesday, Jun 16, 2026 by planetscale
PostgresBranchBackups DataSource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const myPostgresbranchbackups = planetscale.getPostgresBranchBackups({
all: false,
branch: "...my_branch...",
database: "...my_database...",
from: "...my_from...",
organization: "...my_organization...",
policy: "...my_policy...",
production: true,
runningAt: "...my_running_at...",
state: "ignored",
to: "...my_to...",
});
import pulumi
import pulumi_planetscale as planetscale
my_postgresbranchbackups = planetscale.get_postgres_branch_backups(all=False,
branch="...my_branch...",
database="...my_database...",
from_="...my_from...",
organization="...my_organization...",
policy="...my_policy...",
production=True,
running_at="...my_running_at...",
state="ignored",
to="...my_to...")
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.GetPostgresBranchBackups(ctx, &planetscale.GetPostgresBranchBackupsArgs{
All: pulumi.BoolRef(false),
Branch: "...my_branch...",
Database: "...my_database...",
From: pulumi.StringRef("...my_from..."),
Organization: "...my_organization...",
Policy: pulumi.StringRef("...my_policy..."),
Production: pulumi.BoolRef(true),
RunningAt: pulumi.StringRef("...my_running_at..."),
State: pulumi.StringRef("ignored"),
To: pulumi.StringRef("...my_to..."),
}, 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 myPostgresbranchbackups = Planetscale.GetPostgresBranchBackups.Invoke(new()
{
All = false,
Branch = "...my_branch...",
Database = "...my_database...",
From = "...my_from...",
Organization = "...my_organization...",
Policy = "...my_policy...",
Production = true,
RunningAt = "...my_running_at...",
State = "ignored",
To = "...my_to...",
});
});
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.GetPostgresBranchBackupsArgs;
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 myPostgresbranchbackups = PlanetscaleFunctions.getPostgresBranchBackups(GetPostgresBranchBackupsArgs.builder()
.all(false)
.branch("...my_branch...")
.database("...my_database...")
.from("...my_from...")
.organization("...my_organization...")
.policy("...my_policy...")
.production(true)
.runningAt("...my_running_at...")
.state("ignored")
.to("...my_to...")
.build());
}
}
variables:
myPostgresbranchbackups:
fn::invoke:
function: planetscale:getPostgresBranchBackups
arguments:
all: false
branch: '...my_branch...'
database: '...my_database...'
from: '...my_from...'
organization: '...my_organization...'
policy: '...my_policy...'
production: true
runningAt: '...my_running_at...'
state: ignored
to: '...my_to...'
Example coming soon!
Using getPostgresBranchBackups
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 getPostgresBranchBackups(args: GetPostgresBranchBackupsArgs, opts?: InvokeOptions): Promise<GetPostgresBranchBackupsResult>
function getPostgresBranchBackupsOutput(args: GetPostgresBranchBackupsOutputArgs, opts?: InvokeOptions): Output<GetPostgresBranchBackupsResult>def get_postgres_branch_backups(all: Optional[bool] = None,
branch: Optional[str] = None,
database: Optional[str] = None,
from_: Optional[str] = None,
organization: Optional[str] = None,
policy: Optional[str] = None,
production: Optional[bool] = None,
running_at: Optional[str] = None,
state: Optional[str] = None,
to: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresBranchBackupsResult
def get_postgres_branch_backups_output(all: pulumi.Input[Optional[bool]] = None,
branch: pulumi.Input[Optional[str]] = None,
database: pulumi.Input[Optional[str]] = None,
from_: pulumi.Input[Optional[str]] = None,
organization: pulumi.Input[Optional[str]] = None,
policy: pulumi.Input[Optional[str]] = None,
production: pulumi.Input[Optional[bool]] = None,
running_at: pulumi.Input[Optional[str]] = None,
state: pulumi.Input[Optional[str]] = None,
to: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresBranchBackupsResult]func GetPostgresBranchBackups(ctx *Context, args *GetPostgresBranchBackupsArgs, opts ...InvokeOption) (*GetPostgresBranchBackupsResult, error)
func GetPostgresBranchBackupsOutput(ctx *Context, args *GetPostgresBranchBackupsOutputArgs, opts ...InvokeOption) GetPostgresBranchBackupsResultOutput> Note: This function is named GetPostgresBranchBackups in the Go SDK.
public static class GetPostgresBranchBackups
{
public static Task<GetPostgresBranchBackupsResult> InvokeAsync(GetPostgresBranchBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresBranchBackupsResult> Invoke(GetPostgresBranchBackupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPostgresBranchBackupsResult> getPostgresBranchBackups(GetPostgresBranchBackupsArgs args, InvokeOptions options)
public static Output<GetPostgresBranchBackupsResult> getPostgresBranchBackups(GetPostgresBranchBackupsArgs args, InvokeOptions options)
fn::invoke:
function: planetscale:index/getPostgresBranchBackups:getPostgresBranchBackups
arguments:
# arguments dictionarydata "planetscale_getpostgresbranchbackups" "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
- Organization string
- The name of the organization the branch belongs to
- All bool
- Whether to include all backups, including deleted ones
- From string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- Policy string
- Filter backups by backup policy ID
- Production bool
- Filter backups by production branch
- Running
At string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- State string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- To string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- Branch string
- The name of the branch
- Database string
- The name of the database the branch belongs to
- Organization string
- The name of the organization the branch belongs to
- All bool
- Whether to include all backups, including deleted ones
- From string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- Policy string
- Filter backups by backup policy ID
- Production bool
- Filter backups by production branch
- Running
At string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- State string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- To string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch string
- The name of the branch
- database string
- The name of the database the branch belongs to
- organization string
- The name of the organization the branch belongs to
- all bool
- Whether to include all backups, including deleted ones
- from string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy string
- Filter backups by backup policy ID
- production bool
- Filter backups by production branch
- running_
at string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch String
- The name of the branch
- database String
- The name of the database the branch belongs to
- organization String
- The name of the organization the branch belongs to
- all Boolean
- Whether to include all backups, including deleted ones
- from String
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy String
- Filter backups by backup policy ID
- production Boolean
- Filter backups by production branch
- running
At String - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state String
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to String
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch string
- The name of the branch
- database string
- The name of the database the branch belongs to
- organization string
- The name of the organization the branch belongs to
- all boolean
- Whether to include all backups, including deleted ones
- from string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy string
- Filter backups by backup policy ID
- production boolean
- Filter backups by production branch
- running
At string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch str
- The name of the branch
- database str
- The name of the database the branch belongs to
- organization str
- The name of the organization the branch belongs to
- all bool
- Whether to include all backups, including deleted ones
- from_ str
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy str
- Filter backups by backup policy ID
- production bool
- Filter backups by production branch
- running_
at str - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state str
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to str
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch String
- The name of the branch
- database String
- The name of the database the branch belongs to
- organization String
- The name of the organization the branch belongs to
- all Boolean
- Whether to include all backups, including deleted ones
- from String
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy String
- Filter backups by backup policy ID
- production Boolean
- Filter backups by production branch
- running
At String - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state String
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to String
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
getPostgresBranchBackups Result
The following output properties are available:
- Branch string
- The name of the branch
- Database string
- The name of the database the branch belongs to
- Datas
List<Get
Postgres Branch Backups Data> - Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- The name of the organization the branch belongs to
- All bool
- Whether to include all backups, including deleted ones
- From string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- Policy string
- Filter backups by backup policy ID
- Production bool
- Filter backups by production branch
- Running
At string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- State string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- To string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- Branch string
- The name of the branch
- Database string
- The name of the database the branch belongs to
- Datas
[]Get
Postgres Branch Backups Data - Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- The name of the organization the branch belongs to
- All bool
- Whether to include all backups, including deleted ones
- From string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- Policy string
- Filter backups by backup policy ID
- Production bool
- Filter backups by production branch
- Running
At string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- State string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- To string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch string
- The name of the branch
- database string
- The name of the database the branch belongs to
- datas list(object)
- id string
- The provider-assigned unique ID for this managed resource.
- organization string
- The name of the organization the branch belongs to
- all bool
- Whether to include all backups, including deleted ones
- from string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy string
- Filter backups by backup policy ID
- production bool
- Filter backups by production branch
- running_
at string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch String
- The name of the branch
- database String
- The name of the database the branch belongs to
- datas
List<Get
Postgres Branch Backups Data> - id String
- The provider-assigned unique ID for this managed resource.
- organization String
- The name of the organization the branch belongs to
- all Boolean
- Whether to include all backups, including deleted ones
- from String
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy String
- Filter backups by backup policy ID
- production Boolean
- Filter backups by production branch
- running
At String - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state String
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to String
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch string
- The name of the branch
- database string
- The name of the database the branch belongs to
- datas
Get
Postgres Branch Backups Data[] - id string
- The provider-assigned unique ID for this managed resource.
- organization string
- The name of the organization the branch belongs to
- all boolean
- Whether to include all backups, including deleted ones
- from string
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy string
- Filter backups by backup policy ID
- production boolean
- Filter backups by production branch
- running
At string - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state string
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to string
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch str
- The name of the branch
- database str
- The name of the database the branch belongs to
- datas
Sequence[Get
Postgres Branch Backups Data] - id str
- The provider-assigned unique ID for this managed resource.
- organization str
- The name of the organization the branch belongs to
- all bool
- Whether to include all backups, including deleted ones
- from_ str
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy str
- Filter backups by backup policy ID
- production bool
- Filter backups by production branch
- running_
at str - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state str
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to str
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
- branch String
- The name of the branch
- database String
- The name of the database the branch belongs to
- datas List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
- The name of the organization the branch belongs to
- all Boolean
- Whether to include all backups, including deleted ones
- from String
- Filter backups started after this date (e.g. 2023-01-01T00:00:00Z)
- policy String
- Filter backups by backup policy ID
- production Boolean
- Filter backups by production branch
- running
At String - Filter backups that are running during a specific time (e.g. 2023-01-01T00:00:00Z..2023-01-01T23:59:59Z)
- state String
- Filter backups by state. must be one of ["pending", "running", "success", "failed", "canceled", "ignored"]
- to String
- Filter backups started before this date (e.g. 2023-01-31T23:59:59Z)
Supporting Types
GetPostgresBranchBackupsData
- Actor
Get
Postgres Branch Backups Data Actor - Backup
Policy GetPostgres Branch Backups Data Backup Policy - Completed
At string - When the backup completed
- Database
Branch GetPostgres Branch Backups Data Database Branch - Deleted
At string - When the backup was deleted
- Estimated
Storage doubleCost - 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
- Protected bool
- Whether or not the backup is protected from deletion
- Pvc
Size double - Size of the PVC used for the backup
- Size double
- The size of the backup in bytes
- Started
At string - When the backup started
- State string
- The current state of the backup
- Actor
Get
Postgres Branch Backups Data Actor - Backup
Policy GetPostgres Branch Backups Data Backup Policy - Completed
At string - When the backup completed
- Database
Branch GetPostgres Branch Backups Data Database Branch - Deleted
At string - When the backup was deleted
- Estimated
Storage float64Cost - 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
- Protected bool
- Whether or not the backup is protected from deletion
- Pvc
Size float64 - Size of the PVC used for the backup
- Size float64
- The size of the backup in bytes
- Started
At string - When the backup started
- State string
- The current state of the backup
- actor object
- backup_
policy object - completed_
at string - When the backup completed
- database_
branch object - deleted_
at string - When the backup was deleted
- estimated_
storage_ numbercost - 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
- 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
Get
Postgres Branch Backups Data Actor - backup
Policy GetPostgres Branch Backups Data Backup Policy - completed
At String - When the backup completed
- database
Branch GetPostgres Branch Backups Data Database Branch - deleted
At String - When the backup was deleted
- estimated
Storage DoubleCost - 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
- protected_ Boolean
- Whether or not the backup is protected from deletion
- pvc
Size Double - Size of the PVC used for the backup
- size Double
- The size of the backup in bytes
- started
At String - When the backup started
- state String
- The current state of the backup
- actor
Get
Postgres Branch Backups Data Actor - backup
Policy GetPostgres Branch Backups Data Backup Policy - completed
At string - When the backup completed
- database
Branch GetPostgres Branch Backups Data Database Branch - deleted
At string - When the backup was deleted
- estimated
Storage numberCost - 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
- protected boolean
- 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
Get
Postgres Branch Backups Data Actor - backup_
policy GetPostgres Branch Backups Data Backup Policy - completed_
at str - When the backup completed
- database_
branch GetPostgres Branch Backups Data Database Branch - deleted_
at str - When the backup was deleted
- estimated_
storage_ floatcost - 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
- 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
- backup
Policy Property Map - completed
At String - When the backup completed
- database
Branch Property Map - deleted
At String - When the backup was deleted
- estimated
Storage NumberCost - 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
- protected Boolean
- 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
GetPostgresBranchBackupsDataActor
- 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
GetPostgresBranchBackupsDataBackupPolicy
- 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
GetPostgresBranchBackupsDataDatabaseBranch
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscaleTerraform Provider.
Viewing docs for planetscale 1.2.0
published on Tuesday, Jun 16, 2026 by planetscale
published on Tuesday, Jun 16, 2026 by planetscale