planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
planetscale.getBackups
Explore with Pulumi AI
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
A list of PlanetScale backups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const example = planetscale.getBackups({
    organization: "example.com",
    database: "example_db",
    branch: "main",
});
export const backups = example;
import pulumi
import pulumi_planetscale as planetscale
example = planetscale.get_backups(organization="example.com",
    database="example_db",
    branch="main")
pulumi.export("backups", example)
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 {
		example, err := planetscale.GetBackups(ctx, &planetscale.GetBackupsArgs{
			Organization: "example.com",
			Database:     "example_db",
			Branch:       "main",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("backups", example)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetBackups.Invoke(new()
    {
        Organization = "example.com",
        Database = "example_db",
        Branch = "main",
    });
    return new Dictionary<string, object?>
    {
        ["backups"] = example,
    };
});
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.GetBackupsArgs;
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 example = PlanetscaleFunctions.getBackups(GetBackupsArgs.builder()
            .organization("example.com")
            .database("example_db")
            .branch("main")
            .build());
        ctx.export("backups", example.applyValue(getBackupsResult -> getBackupsResult));
    }
}
variables:
  example:
    fn::invoke:
      function: planetscale:getBackups
      arguments:
        organization: example.com
        database: example_db
        branch: main
outputs:
  backups: ${example}
Using getBackups
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 getBackups(args: GetBackupsArgs, opts?: InvokeOptions): Promise<GetBackupsResult>
function getBackupsOutput(args: GetBackupsOutputArgs, opts?: InvokeOptions): Output<GetBackupsResult>def get_backups(branch: Optional[str] = None,
                database: Optional[str] = None,
                organization: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetBackupsResult
def get_backups_output(branch: Optional[pulumi.Input[str]] = None,
                database: Optional[pulumi.Input[str]] = None,
                organization: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetBackupsResult]func GetBackups(ctx *Context, args *GetBackupsArgs, opts ...InvokeOption) (*GetBackupsResult, error)
func GetBackupsOutput(ctx *Context, args *GetBackupsOutputArgs, opts ...InvokeOption) GetBackupsResultOutput> Note: This function is named GetBackups in the Go SDK.
public static class GetBackups 
{
    public static Task<GetBackupsResult> InvokeAsync(GetBackupsArgs args, InvokeOptions? opts = null)
    public static Output<GetBackupsResult> Invoke(GetBackupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackupsResult> getBackups(GetBackupsArgs args, InvokeOptions options)
public static Output<GetBackupsResult> getBackups(GetBackupsArgs args, InvokeOptions options)
fn::invoke:
  function: planetscale:index/getBackups:getBackups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Branch string
 - Database string
 - Organization string
 
- Branch string
 - Database string
 - Organization string
 
- branch String
 - database String
 - organization String
 
- branch string
 - database string
 - organization string
 
- branch str
 - database str
 - organization str
 
- branch String
 - database String
 - organization String
 
getBackups Result
The following output properties are available:
- Backups
List<Get
Backups Backup>  - Branch string
 - Database string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Organization string
 
- Backups
[]Get
Backups Backup  - Branch string
 - Database string
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Organization string
 
- backups
List<Get
Backups Backup>  - branch String
 - database String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - organization String
 
- backups
Get
Backups Backup[]  - branch string
 - database string
 - id string
 - The provider-assigned unique ID for this managed resource.
 - organization string
 
- backups
Sequence[Get
Backups Backup]  - branch str
 - database str
 - id str
 - The provider-assigned unique ID for this managed resource.
 - organization str
 
- backups List<Property Map>
 - branch String
 - database String
 - id String
 - The provider-assigned unique ID for this managed resource.
 - organization String
 
Supporting Types
GetBackupsBackup  
- Actor
Get
Backups Backup Actor  - The actor that created the backup.
 - Backup
Policy GetBackups Backup Backup Policy  - The backup policy being followed.
 - Branch string
 - The branch this backup belongs to.
 - Created
At string - When the backup was created.
 - Database string
 - The database this backup belongs to.
 - Estimated
Storage doubleCost  - The estimated storage cost of the backup.
 - Id string
 - The ID of the backup.
 - Name string
 - The name of the backup.
 - Organization string
 - The organization this backup belongs to.
 - Required bool
 - Whether or not the backup policy is required.
 - Restored
Branches List<string> - Branches that have been restored with this backup.
 - Size double
 - The size of the backup.
 - State string
 - The current state of the backup.
 - Updated
At string - When the backup was last updated.
 
- Actor
Get
Backups Backup Actor  - The actor that created the backup.
 - Backup
Policy GetBackups Backup Backup Policy  - The backup policy being followed.
 - Branch string
 - The branch this backup belongs to.
 - Created
At string - When the backup was created.
 - Database string
 - The database this backup belongs to.
 - Estimated
Storage float64Cost  - The estimated storage cost of the backup.
 - Id string
 - The ID of the backup.
 - Name string
 - The name of the backup.
 - Organization string
 - The organization this backup belongs to.
 - Required bool
 - Whether or not the backup policy is required.
 - Restored
Branches []string - Branches that have been restored with this backup.
 - Size float64
 - The size of the backup.
 - State string
 - The current state of the backup.
 - Updated
At string - When the backup was last updated.
 
- actor
Get
Backups Backup Actor  - The actor that created the backup.
 - backup
Policy GetBackups Backup Backup Policy  - The backup policy being followed.
 - branch String
 - The branch this backup belongs to.
 - created
At String - When the backup was created.
 - database String
 - The database this backup belongs to.
 - estimated
Storage DoubleCost  - The estimated storage cost of the backup.
 - id String
 - The ID of the backup.
 - name String
 - The name of the backup.
 - organization String
 - The organization this backup belongs to.
 - required Boolean
 - Whether or not the backup policy is required.
 - restored
Branches List<String> - Branches that have been restored with this backup.
 - size Double
 - The size of the backup.
 - state String
 - The current state of the backup.
 - updated
At String - When the backup was last updated.
 
- actor
Get
Backups Backup Actor  - The actor that created the backup.
 - backup
Policy GetBackups Backup Backup Policy  - The backup policy being followed.
 - branch string
 - The branch this backup belongs to.
 - created
At string - When the backup was created.
 - database string
 - The database this backup belongs to.
 - estimated
Storage numberCost  - The estimated storage cost of the backup.
 - id string
 - The ID of the backup.
 - name string
 - The name of the backup.
 - organization string
 - The organization this backup belongs to.
 - required boolean
 - Whether or not the backup policy is required.
 - restored
Branches string[] - Branches that have been restored with this backup.
 - size number
 - The size of the backup.
 - state string
 - The current state of the backup.
 - updated
At string - When the backup was last updated.
 
- actor
Get
Backups Backup Actor  - The actor that created the backup.
 - backup_
policy GetBackups Backup Backup Policy  - The backup policy being followed.
 - branch str
 - The branch this backup belongs to.
 - created_
at str - When the backup was created.
 - database str
 - The database this backup belongs to.
 - estimated_
storage_ floatcost  - The estimated storage cost of the backup.
 - id str
 - The ID of the backup.
 - name str
 - The name of the backup.
 - organization str
 - The organization this backup belongs to.
 - required bool
 - Whether or not the backup policy is required.
 - restored_
branches Sequence[str] - Branches that have been restored with this backup.
 - size float
 - The size of the backup.
 - state str
 - The current state of the backup.
 - updated_
at str - When the backup was last updated.
 
- actor Property Map
 - The actor that created the backup.
 - backup
Policy Property Map - The backup policy being followed.
 - branch String
 - The branch this backup belongs to.
 - created
At String - When the backup was created.
 - database String
 - The database this backup belongs to.
 - estimated
Storage NumberCost  - The estimated storage cost of the backup.
 - id String
 - The ID of the backup.
 - name String
 - The name of the backup.
 - organization String
 - The organization this backup belongs to.
 - required Boolean
 - Whether or not the backup policy is required.
 - restored
Branches List<String> - Branches that have been restored with this backup.
 - size Number
 - The size of the backup.
 - state String
 - The current state of the backup.
 - updated
At String - When the backup was last updated.
 
GetBackupsBackupActor   
- Avatar
Url string - The URL of the actor's avatar
 - Display
Name string - The name of the actor
 - Id string
 - The ID of the actor
 
- Avatar
Url string - The URL of the actor's avatar
 - Display
Name string - The name of the actor
 - Id string
 - The ID of the actor
 
- avatar
Url String - The URL of the actor's avatar
 - display
Name String - The name of the actor
 - id String
 - The ID of the actor
 
- avatar
Url string - The URL of the actor's avatar
 - display
Name string - The name of the actor
 - id string
 - The ID of the actor
 
- avatar_
url str - The URL of the actor's avatar
 - display_
name str - The name of the actor
 - id str
 - The ID of the actor
 
- avatar
Url String - The URL of the actor's avatar
 - display
Name String - The name of the actor
 - id String
 - The ID of the actor
 
GetBackupsBackupBackupPolicy    
- Created
At string - When the backup policy was created.
 - Frequency
Unit string - The unit for the frequency of the backup policy.
 - Frequency
Value double - A number value for the frequency of the backup policy.
 - Id string
 - The ID of the backup policy.
 - Last
Ran stringAt  - When the backup was last run.
 - Name string
 - The name of the backup policy.
 - Next
Run stringAt  - When the backup will next run.
 - Retention
Unit string - The unit for the retention period of the backup policy.
 - Retention
Value double - A number value for the retention period of the backup policy.
 - Schedule
Day string - Day of the week that the backup is scheduled.
 - Schedule
Week string - Week of the month that the backup is scheduled.
 - Target string
 - Whether the backup policy is for a production or development database, or for a database branch.
 - Updated
At string - When the backup policy was last updated.
 
- Created
At string - When the backup policy was created.
 - Frequency
Unit string - The unit for the frequency of the backup policy.
 - Frequency
Value float64 - A number value for the frequency of the backup policy.
 - Id string
 - The ID of the backup policy.
 - Last
Ran stringAt  - When the backup was last run.
 - Name string
 - The name of the backup policy.
 - Next
Run stringAt  - When the backup will next run.
 - Retention
Unit string - The unit for the retention period of the backup policy.
 - Retention
Value float64 - A number value for the retention period of the backup policy.
 - Schedule
Day string - Day of the week that the backup is scheduled.
 - Schedule
Week string - Week of the month that the backup is scheduled.
 - Target string
 - Whether the backup policy is for a production or development database, or for a database branch.
 - Updated
At string - When the backup policy was last updated.
 
- created
At String - When the backup policy was created.
 - frequency
Unit String - The unit for the frequency of the backup policy.
 - frequency
Value Double - A number value for the frequency of the backup policy.
 - id String
 - The ID of the backup policy.
 - last
Ran StringAt  - When the backup was last run.
 - name String
 - The name of the backup policy.
 - next
Run StringAt  - When the backup will next run.
 - retention
Unit String - The unit for the retention period of the backup policy.
 - retention
Value Double - A number value for the retention period of the backup policy.
 - schedule
Day String - Day of the week that the backup is scheduled.
 - schedule
Week String - Week of the month that the backup is scheduled.
 - target String
 - Whether the backup policy is for a production or development database, or for a database branch.
 - updated
At String - When the backup policy was last updated.
 
- created
At string - When the backup policy was created.
 - frequency
Unit string - The unit for the frequency of the backup policy.
 - frequency
Value number - A number value for the frequency of the backup policy.
 - id string
 - The ID of the backup policy.
 - last
Ran stringAt  - When the backup was last run.
 - name string
 - The name of the backup policy.
 - next
Run stringAt  - When the backup will next run.
 - retention
Unit string - The unit for the retention period of the backup policy.
 - retention
Value number - A number value for the retention period of the backup policy.
 - schedule
Day string - Day of the week that the backup is scheduled.
 - schedule
Week string - Week of the month that the backup is scheduled.
 - target string
 - Whether the backup policy is for a production or development database, or for a database branch.
 - updated
At string - When the backup policy was last updated.
 
- created_
at str - When the backup policy was created.
 - frequency_
unit str - The unit for the frequency of the backup policy.
 - frequency_
value float - A number value for the frequency of the backup policy.
 - id str
 - The ID of the backup policy.
 - last_
ran_ strat  - When the backup was last run.
 - name str
 - The name of the backup policy.
 - next_
run_ strat  - When the backup will next run.
 - retention_
unit str - The unit for the retention period of the backup policy.
 - retention_
value float - A number value for the retention period of the backup policy.
 - schedule_
day str - Day of the week that the backup is scheduled.
 - schedule_
week str - Week of the month that the backup is scheduled.
 - target str
 - Whether the backup policy is for a production or development database, or for a database branch.
 - updated_
at str - When the backup policy was last updated.
 
- created
At String - When the backup policy was created.
 - frequency
Unit String - The unit for the frequency of the backup policy.
 - frequency
Value Number - A number value for the frequency of the backup policy.
 - id String
 - The ID of the backup policy.
 - last
Ran StringAt  - When the backup was last run.
 - name String
 - The name of the backup policy.
 - next
Run StringAt  - When the backup will next run.
 - retention
Unit String - The unit for the retention period of the backup policy.
 - retention
Value Number - A number value for the retention period of the backup policy.
 - schedule
Day String - Day of the week that the backup is scheduled.
 - schedule
Week String - Week of the month that the backup is scheduled.
 - target String
 - Whether the backup policy is for a production or development database, or for a database branch.
 - updated
At String - When the backup policy was last updated.
 
Package Details
- Repository
 - planetscale planetscale/terraform-provider-planetscale
 - License
 - Notes
 - This Pulumi package is based on the 
planetscaleTerraform Provider. 
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale