planetscale.Backup
Explore with Pulumi AI
A PlanetScale backup.
Known limitations:
- It is not currently possible to manage backup schedules, only retention periods.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  example:
    type: planetscale:Backup
    properties:
      backupPolicy:
        retention_unit: day
        retention_value: 1
      branch: main
      database: example_db
      organization: example
Create Backup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Backup(name: string, args: BackupArgs, opts?: CustomResourceOptions);@overload
def Backup(resource_name: str,
           args: BackupArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Backup(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           branch: Optional[str] = None,
           database: Optional[str] = None,
           organization: Optional[str] = None,
           retention_unit: Optional[str] = None,
           retention_value: Optional[float] = None,
           name: Optional[str] = None)func NewBackup(ctx *Context, name string, args BackupArgs, opts ...ResourceOption) (*Backup, error)public Backup(string name, BackupArgs args, CustomResourceOptions? opts = null)
public Backup(String name, BackupArgs args)
public Backup(String name, BackupArgs args, CustomResourceOptions options)
type: planetscale:Backup
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 BackupArgs
- 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 BackupArgs
- 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 BackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BackupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var backupResource = new Planetscale.Backup("backupResource", new()
{
    Branch = "string",
    Database = "string",
    Organization = "string",
    RetentionUnit = "string",
    RetentionValue = 0,
    Name = "string",
});
example, err := planetscale.NewBackup(ctx, "backupResource", &planetscale.BackupArgs{
	Branch:         pulumi.String("string"),
	Database:       pulumi.String("string"),
	Organization:   pulumi.String("string"),
	RetentionUnit:  pulumi.String("string"),
	RetentionValue: pulumi.Float64(0),
	Name:           pulumi.String("string"),
})
var backupResource = new Backup("backupResource", BackupArgs.builder()
    .branch("string")
    .database("string")
    .organization("string")
    .retentionUnit("string")
    .retentionValue(0)
    .name("string")
    .build());
backup_resource = planetscale.Backup("backupResource",
    branch="string",
    database="string",
    organization="string",
    retention_unit="string",
    retention_value=0,
    name="string")
const backupResource = new planetscale.Backup("backupResource", {
    branch: "string",
    database: "string",
    organization: "string",
    retentionUnit: "string",
    retentionValue: 0,
    name: "string",
});
type: planetscale:Backup
properties:
    branch: string
    database: string
    name: string
    organization: string
    retentionUnit: string
    retentionValue: 0
Backup 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 Backup resource accepts the following input properties:
- Branch string
- The branch being backed up.
- Database string
- The database to which the branch being backed up belongs to.
- Organization string
- The organization in which the database branch being backed up belongs to.
- RetentionUnit string
- The unit for the retention period of the backup policy.
- RetentionValue double
- A number value for the retention period of the backup policy.
- Name string
- The name of the backup.
- Branch string
- The branch being backed up.
- Database string
- The database to which the branch being backed up belongs to.
- Organization string
- The organization in which the database branch being backed up belongs to.
- RetentionUnit string
- The unit for the retention period of the backup policy.
- RetentionValue float64
- A number value for the retention period of the backup policy.
- Name string
- The name of the backup.
- branch String
- The branch being backed up.
- database String
- The database to which the branch being backed up belongs to.
- organization String
- The organization in which the database branch being backed up belongs to.
- retentionUnit String
- The unit for the retention period of the backup policy.
- retentionValue Double
- A number value for the retention period of the backup policy.
- name String
- The name of the backup.
- branch string
- The branch being backed up.
- database string
- The database to which the branch being backed up belongs to.
- organization string
- The organization in which the database branch being backed up belongs to.
- retentionUnit string
- The unit for the retention period of the backup policy.
- retentionValue number
- A number value for the retention period of the backup policy.
- name string
- The name of the backup.
- branch str
- The branch being backed up.
- database str
- The database to which the branch being backed up belongs to.
- organization str
- The organization in which the database branch being backed up belongs to.
- 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.
- name str
- The name of the backup.
- branch String
- The branch being backed up.
- database String
- The database to which the branch being backed up belongs to.
- organization String
- The organization in which the database branch being backed up belongs to.
- retentionUnit String
- The unit for the retention period of the backup policy.
- retentionValue Number
- A number value for the retention period of the backup policy.
- name String
- The name of the backup.
Outputs
All input properties are implicitly available as output properties. Additionally, the Backup resource produces the following output properties:
- Actor
BackupActor 
- .
- BackupPolicy BackupBackup Policy 
- The policy used by the backup.
- CreatedAt string
- When the backup was created.
- EstimatedStorage doubleCost 
- The estimated storage cost of the backup.
- Id string
- The provider-assigned unique ID for this managed resource.
- Required bool
- Whether or not the backup policy is required.
- RestoredBranches 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.
- UpdatedAt string
- When the backup was last updated.
- Actor
BackupActor 
- .
- BackupPolicy BackupBackup Policy 
- The policy used by the backup.
- CreatedAt string
- When the backup was created.
- EstimatedStorage float64Cost 
- The estimated storage cost of the backup.
- Id string
- The provider-assigned unique ID for this managed resource.
- Required bool
- Whether or not the backup policy is required.
- RestoredBranches []string
- Branches that have been restored with this backup.
- Size float64
- The size of the backup.
- State string
- The current state of the backup.
- UpdatedAt string
- When the backup was last updated.
- actor
BackupActor 
- .
- backupPolicy BackupBackup Policy 
- The policy used by the backup.
- createdAt String
- When the backup was created.
- estimatedStorage DoubleCost 
- The estimated storage cost of the backup.
- id String
- The provider-assigned unique ID for this managed resource.
- required Boolean
- Whether or not the backup policy is required.
- restoredBranches 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.
- updatedAt String
- When the backup was last updated.
- actor
BackupActor 
- .
- backupPolicy BackupBackup Policy 
- The policy used by the backup.
- createdAt string
- When the backup was created.
- estimatedStorage numberCost 
- The estimated storage cost of the backup.
- id string
- The provider-assigned unique ID for this managed resource.
- required boolean
- Whether or not the backup policy is required.
- restoredBranches string[]
- Branches that have been restored with this backup.
- size number
- The size of the backup.
- state string
- The current state of the backup.
- updatedAt string
- When the backup was last updated.
- actor
BackupActor 
- .
- backup_policy BackupBackup Policy 
- The policy used by the backup.
- created_at str
- When the backup was created.
- estimated_storage_ floatcost 
- The estimated storage cost of the backup.
- id str
- The provider-assigned unique ID for this managed resource.
- 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
- .
- backupPolicy Property Map
- The policy used by the backup.
- createdAt String
- When the backup was created.
- estimatedStorage NumberCost 
- The estimated storage cost of the backup.
- id String
- The provider-assigned unique ID for this managed resource.
- required Boolean
- Whether or not the backup policy is required.
- restoredBranches 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.
- updatedAt String
- When the backup was last updated.
Look up Existing Backup Resource
Get an existing Backup 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?: BackupState, opts?: CustomResourceOptions): Backup@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        actor: Optional[BackupActorArgs] = None,
        backup_policy: Optional[BackupBackupPolicyArgs] = None,
        branch: Optional[str] = None,
        created_at: Optional[str] = None,
        database: Optional[str] = None,
        estimated_storage_cost: Optional[float] = None,
        name: Optional[str] = None,
        organization: Optional[str] = None,
        required: Optional[bool] = None,
        restored_branches: Optional[Sequence[str]] = None,
        retention_unit: Optional[str] = None,
        retention_value: Optional[float] = None,
        size: Optional[float] = None,
        state: Optional[str] = None,
        updated_at: Optional[str] = None) -> Backupfunc GetBackup(ctx *Context, name string, id IDInput, state *BackupState, opts ...ResourceOption) (*Backup, error)public static Backup Get(string name, Input<string> id, BackupState? state, CustomResourceOptions? opts = null)public static Backup get(String name, Output<String> id, BackupState state, CustomResourceOptions options)resources:  _:    type: planetscale:Backup    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.
- Actor
BackupActor 
- .
- BackupPolicy BackupBackup Policy 
- The policy used by the backup.
- Branch string
- The branch being backed up.
- CreatedAt string
- When the backup was created.
- Database string
- The database to which the branch being backed up belongs to.
- EstimatedStorage doubleCost 
- The estimated storage cost of the backup.
- Name string
- The name of the backup.
- Organization string
- The organization in which the database branch being backed up belongs to.
- Required bool
- Whether or not the backup policy is required.
- RestoredBranches List<string>
- Branches that have been restored with this backup.
- RetentionUnit string
- The unit for the retention period of the backup policy.
- RetentionValue double
- A number value for the retention period of the backup policy.
- Size double
- The size of the backup.
- State string
- The current state of the backup.
- UpdatedAt string
- When the backup was last updated.
- Actor
BackupActor Args 
- .
- BackupPolicy BackupBackup Policy Args 
- The policy used by the backup.
- Branch string
- The branch being backed up.
- CreatedAt string
- When the backup was created.
- Database string
- The database to which the branch being backed up belongs to.
- EstimatedStorage float64Cost 
- The estimated storage cost of the backup.
- Name string
- The name of the backup.
- Organization string
- The organization in which the database branch being backed up belongs to.
- Required bool
- Whether or not the backup policy is required.
- RestoredBranches []string
- Branches that have been restored with this backup.
- RetentionUnit string
- The unit for the retention period of the backup policy.
- RetentionValue float64
- A number value for the retention period of the backup policy.
- Size float64
- The size of the backup.
- State string
- The current state of the backup.
- UpdatedAt string
- When the backup was last updated.
- actor
BackupActor 
- .
- backupPolicy BackupBackup Policy 
- The policy used by the backup.
- branch String
- The branch being backed up.
- createdAt String
- When the backup was created.
- database String
- The database to which the branch being backed up belongs to.
- estimatedStorage DoubleCost 
- The estimated storage cost of the backup.
- name String
- The name of the backup.
- organization String
- The organization in which the database branch being backed up belongs to.
- required Boolean
- Whether or not the backup policy is required.
- restoredBranches List<String>
- Branches that have been restored with this backup.
- retentionUnit String
- The unit for the retention period of the backup policy.
- retentionValue Double
- A number value for the retention period of the backup policy.
- size Double
- The size of the backup.
- state String
- The current state of the backup.
- updatedAt String
- When the backup was last updated.
- actor
BackupActor 
- .
- backupPolicy BackupBackup Policy 
- The policy used by the backup.
- branch string
- The branch being backed up.
- createdAt string
- When the backup was created.
- database string
- The database to which the branch being backed up belongs to.
- estimatedStorage numberCost 
- The estimated storage cost of the backup.
- name string
- The name of the backup.
- organization string
- The organization in which the database branch being backed up belongs to.
- required boolean
- Whether or not the backup policy is required.
- restoredBranches string[]
- Branches that have been restored with this backup.
- retentionUnit string
- The unit for the retention period of the backup policy.
- retentionValue number
- A number value for the retention period of the backup policy.
- size number
- The size of the backup.
- state string
- The current state of the backup.
- updatedAt string
- When the backup was last updated.
- actor
BackupActor Args 
- .
- backup_policy BackupBackup Policy Args 
- The policy used by the backup.
- branch str
- The branch being backed up.
- created_at str
- When the backup was created.
- database str
- The database to which the branch being backed up belongs to.
- estimated_storage_ floatcost 
- The estimated storage cost of the backup.
- name str
- The name of the backup.
- organization str
- The organization in which the database branch being backed up belongs to.
- required bool
- Whether or not the backup policy is required.
- restored_branches Sequence[str]
- Branches that have been restored with this backup.
- 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.
- 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
- .
- backupPolicy Property Map
- The policy used by the backup.
- branch String
- The branch being backed up.
- createdAt String
- When the backup was created.
- database String
- The database to which the branch being backed up belongs to.
- estimatedStorage NumberCost 
- The estimated storage cost of the backup.
- name String
- The name of the backup.
- organization String
- The organization in which the database branch being backed up belongs to.
- required Boolean
- Whether or not the backup policy is required.
- restoredBranches List<String>
- Branches that have been restored with this backup.
- retentionUnit String
- The unit for the retention period of the backup policy.
- retentionValue Number
- A number value for the retention period of the backup policy.
- size Number
- The size of the backup.
- state String
- The current state of the backup.
- updatedAt String
- When the backup was last updated.
Supporting Types
BackupActor, BackupActorArgs    
- AvatarUrl string
- The URL of the actor's avatar
- DisplayName string
- The name of the actor
- Id string
- The ID of the actor
- AvatarUrl string
- The URL of the actor's avatar
- DisplayName string
- The name of the actor
- Id string
- The ID of the actor
- avatarUrl String
- The URL of the actor's avatar
- displayName String
- The name of the actor
- id String
- The ID of the actor
- avatarUrl string
- The URL of the actor's avatar
- displayName 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
- avatarUrl String
- The URL of the actor's avatar
- displayName String
- The name of the actor
- id String
- The ID of the actor
BackupBackupPolicy, BackupBackupPolicyArgs      
- RetentionUnit string
- The unit for the retention period of the backup policy.
- RetentionValue double
- A number value for the retention period of the backup policy.
- CreatedAt string
- When the backup policy was created.
- FrequencyUnit string
- The unit for the frequency of the backup policy. Not configurable for now.
- FrequencyValue double
- A number value for the frequency of the backup policy. Not configurable for now.
- Id string
- The ID of the backup policy.
- LastRan stringAt 
- When the backup was last run.
- Name string
- The name of the backup policy.
- NextRun stringAt 
- When the backup will next run.
- ScheduleDay string
- Day of the week that the backup is scheduled.
- ScheduleWeek 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.
- UpdatedAt string
- When the backup policy was last updated.
- RetentionUnit string
- The unit for the retention period of the backup policy.
- RetentionValue float64
- A number value for the retention period of the backup policy.
- CreatedAt string
- When the backup policy was created.
- FrequencyUnit string
- The unit for the frequency of the backup policy. Not configurable for now.
- FrequencyValue float64
- A number value for the frequency of the backup policy. Not configurable for now.
- Id string
- The ID of the backup policy.
- LastRan stringAt 
- When the backup was last run.
- Name string
- The name of the backup policy.
- NextRun stringAt 
- When the backup will next run.
- ScheduleDay string
- Day of the week that the backup is scheduled.
- ScheduleWeek 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.
- UpdatedAt string
- When the backup policy was last updated.
- retentionUnit String
- The unit for the retention period of the backup policy.
- retentionValue Double
- A number value for the retention period of the backup policy.
- createdAt String
- When the backup policy was created.
- frequencyUnit String
- The unit for the frequency of the backup policy. Not configurable for now.
- frequencyValue Double
- A number value for the frequency of the backup policy. Not configurable for now.
- id String
- The ID of the backup policy.
- lastRan StringAt 
- When the backup was last run.
- name String
- The name of the backup policy.
- nextRun StringAt 
- When the backup will next run.
- scheduleDay String
- Day of the week that the backup is scheduled.
- scheduleWeek 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.
- updatedAt String
- When the backup policy was last updated.
- retentionUnit string
- The unit for the retention period of the backup policy.
- retentionValue number
- A number value for the retention period of the backup policy.
- createdAt string
- When the backup policy was created.
- frequencyUnit string
- The unit for the frequency of the backup policy. Not configurable for now.
- frequencyValue number
- A number value for the frequency of the backup policy. Not configurable for now.
- id string
- The ID of the backup policy.
- lastRan stringAt 
- When the backup was last run.
- name string
- The name of the backup policy.
- nextRun stringAt 
- When the backup will next run.
- scheduleDay string
- Day of the week that the backup is scheduled.
- scheduleWeek 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.
- updatedAt string
- When the backup policy was last updated.
- 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.
- created_at str
- When the backup policy was created.
- frequency_unit str
- The unit for the frequency of the backup policy. Not configurable for now.
- frequency_value float
- A number value for the frequency of the backup policy. Not configurable for now.
- 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.
- 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.
- retentionUnit String
- The unit for the retention period of the backup policy.
- retentionValue Number
- A number value for the retention period of the backup policy.
- createdAt String
- When the backup policy was created.
- frequencyUnit String
- The unit for the frequency of the backup policy. Not configurable for now.
- frequencyValue Number
- A number value for the frequency of the backup policy. Not configurable for now.
- id String
- The ID of the backup policy.
- lastRan StringAt 
- When the backup was last run.
- name String
- The name of the backup policy.
- nextRun StringAt 
- When the backup will next run.
- scheduleDay String
- Day of the week that the backup is scheduled.
- scheduleWeek 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.
- updatedAt 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.