published on Tuesday, Jun 16, 2026 by planetscale
published on Tuesday, Jun 16, 2026 by planetscale
VitessBranchBackup Resource
Create VitessBranchBackup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VitessBranchBackup(name: string, args: VitessBranchBackupArgs, opts?: CustomResourceOptions);@overload
def VitessBranchBackup(resource_name: str,
args: VitessBranchBackupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VitessBranchBackup(resource_name: str,
opts: Optional[ResourceOptions] = None,
branch: Optional[str] = None,
database: Optional[str] = None,
organization: Optional[str] = None,
name: Optional[str] = None,
retention_unit: Optional[str] = None,
retention_value: Optional[float] = None)func NewVitessBranchBackup(ctx *Context, name string, args VitessBranchBackupArgs, opts ...ResourceOption) (*VitessBranchBackup, error)public VitessBranchBackup(string name, VitessBranchBackupArgs args, CustomResourceOptions? opts = null)
public VitessBranchBackup(String name, VitessBranchBackupArgs args)
public VitessBranchBackup(String name, VitessBranchBackupArgs args, CustomResourceOptions options)
type: planetscale:VitessBranchBackup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "planetscale_vitessbranchbackup" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VitessBranchBackupArgs
- 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 VitessBranchBackupArgs
- 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 VitessBranchBackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VitessBranchBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VitessBranchBackupArgs
- 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 vitessBranchBackupResource = new Planetscale.VitessBranchBackup("vitessBranchBackupResource", new()
{
Branch = "string",
Database = "string",
Organization = "string",
Name = "string",
RetentionUnit = "string",
RetentionValue = 0,
});
example, err := planetscale.NewVitessBranchBackup(ctx, "vitessBranchBackupResource", &planetscale.VitessBranchBackupArgs{
Branch: pulumi.String("string"),
Database: pulumi.String("string"),
Organization: pulumi.String("string"),
Name: pulumi.String("string"),
RetentionUnit: pulumi.String("string"),
RetentionValue: pulumi.Float64(0),
})
resource "planetscale_vitessbranchbackup" "vitessBranchBackupResource" {
branch = "string"
database = "string"
organization = "string"
name = "string"
retention_unit = "string"
retention_value = 0
}
var vitessBranchBackupResource = new VitessBranchBackup("vitessBranchBackupResource", VitessBranchBackupArgs.builder()
.branch("string")
.database("string")
.organization("string")
.name("string")
.retentionUnit("string")
.retentionValue(0.0)
.build());
vitess_branch_backup_resource = planetscale.VitessBranchBackup("vitessBranchBackupResource",
branch="string",
database="string",
organization="string",
name="string",
retention_unit="string",
retention_value=float(0))
const vitessBranchBackupResource = new planetscale.VitessBranchBackup("vitessBranchBackupResource", {
branch: "string",
database: "string",
organization: "string",
name: "string",
retentionUnit: "string",
retentionValue: 0,
});
type: planetscale:VitessBranchBackup
properties:
branch: string
database: string
name: string
organization: string
retentionUnit: string
retentionValue: 0
VitessBranchBackup 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 VitessBranchBackup resource accepts the following input properties:
- Branch string
- The name of the branch. Requires replacement if changed.
- Database string
- The name of the database the branch belongs to. Requires replacement if changed.
- Organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- Name string
- Name for the backup. Requires replacement if changed.
- Retention
Unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- Retention
Value double - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
- Branch string
- The name of the branch. Requires replacement if changed.
- Database string
- The name of the database the branch belongs to. Requires replacement if changed.
- Organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- Name string
- Name for the backup. Requires replacement if changed.
- Retention
Unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- Retention
Value float64 - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
- branch string
- The name of the branch. Requires replacement if changed.
- database string
- The name of the database the branch belongs to. Requires replacement if changed.
- organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- name string
- Name for the backup. Requires replacement if changed.
- retention_
unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention_
value number - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
- branch String
- The name of the branch. Requires replacement if changed.
- database String
- The name of the database the branch belongs to. Requires replacement if changed.
- organization String
- The name of the organization the branch belongs to. Requires replacement if changed.
- name String
- Name for the backup. Requires replacement if changed.
- retention
Unit String - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention
Value Double - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
- branch string
- The name of the branch. Requires replacement if changed.
- database string
- The name of the database the branch belongs to. Requires replacement if changed.
- organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- name string
- Name for the backup. Requires replacement if changed.
- retention
Unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention
Value number - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
- branch str
- The name of the branch. Requires replacement if changed.
- database str
- The name of the database the branch belongs to. Requires replacement if changed.
- organization str
- The name of the organization the branch belongs to. Requires replacement if changed.
- name str
- Name for the backup. Requires replacement if changed.
- retention_
unit str - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention_
value float - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
- branch String
- The name of the branch. Requires replacement if changed.
- database String
- The name of the database the branch belongs to. Requires replacement if changed.
- organization String
- The name of the organization the branch belongs to. Requires replacement if changed.
- name String
- Name for the backup. Requires replacement if changed.
- retention
Unit String - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention
Value Number - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the VitessBranchBackup resource produces the following output properties:
- Actor
Vitess
Branch Backup Actor - Backup
Policy VitessBranch Backup Backup Policy - Completed
At string - When the backup completed
- Database
Branch VitessBranch Backup 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 provider-assigned unique ID for this managed resource.
- 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
Vitess
Branch Backup Actor - Backup
Policy VitessBranch Backup Backup Policy - Completed
At string - When the backup completed
- Database
Branch VitessBranch Backup 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 provider-assigned unique ID for this managed resource.
- 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 provider-assigned unique ID for this managed resource.
- 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
Vitess
Branch Backup Actor - backup
Policy VitessBranch Backup Backup Policy - completed
At String - When the backup completed
- database
Branch VitessBranch Backup 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 provider-assigned unique ID for this managed resource.
- 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
Vitess
Branch Backup Actor - backup
Policy VitessBranch Backup Backup Policy - completed
At string - When the backup completed
- database
Branch VitessBranch Backup 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 provider-assigned unique ID for this managed resource.
- 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
Vitess
Branch Backup Actor - backup_
policy VitessBranch Backup Backup Policy - completed_
at str - When the backup completed
- database_
branch VitessBranch Backup 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 provider-assigned unique ID for this managed resource.
- 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 provider-assigned unique ID for this managed resource.
- 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
Look up Existing VitessBranchBackup Resource
Get an existing VitessBranchBackup 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?: VitessBranchBackupState, opts?: CustomResourceOptions): VitessBranchBackup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actor: Optional[VitessBranchBackupActorArgs] = None,
backup_policy: Optional[VitessBranchBackupBackupPolicyArgs] = None,
branch: Optional[str] = None,
completed_at: Optional[str] = None,
database: Optional[str] = None,
database_branch: Optional[VitessBranchBackupDatabaseBranchArgs] = None,
deleted_at: Optional[str] = None,
estimated_storage_cost: Optional[float] = None,
expires_at: Optional[str] = None,
name: Optional[str] = None,
organization: Optional[str] = None,
protected: Optional[bool] = None,
pvc_size: Optional[float] = None,
retention_unit: Optional[str] = None,
retention_value: Optional[float] = None,
size: Optional[float] = None,
started_at: Optional[str] = None,
state: Optional[str] = None) -> VitessBranchBackupfunc GetVitessBranchBackup(ctx *Context, name string, id IDInput, state *VitessBranchBackupState, opts ...ResourceOption) (*VitessBranchBackup, error)public static VitessBranchBackup Get(string name, Input<string> id, VitessBranchBackupState? state, CustomResourceOptions? opts = null)public static VitessBranchBackup get(String name, Output<String> id, VitessBranchBackupState state, CustomResourceOptions options)resources: _: type: planetscale:VitessBranchBackup get: id: ${id}import {
to = planetscale_vitessbranchbackup.example
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
Vitess
Branch Backup Actor - Backup
Policy VitessBranch Backup Backup Policy - Branch string
- The name of the branch. Requires replacement if changed.
- Completed
At string - When the backup completed
- Database string
- The name of the database the branch belongs to. Requires replacement if changed.
- Database
Branch VitessBranch Backup 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
- Name string
- Name for the backup. Requires replacement if changed.
- Organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- Protected bool
- Whether or not the backup is protected from deletion
- Pvc
Size double - Size of the PVC used for the backup
- Retention
Unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- Retention
Value double - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - 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
Vitess
Branch Backup Actor Args - Backup
Policy VitessBranch Backup Backup Policy Args - Branch string
- The name of the branch. Requires replacement if changed.
- Completed
At string - When the backup completed
- Database string
- The name of the database the branch belongs to. Requires replacement if changed.
- Database
Branch VitessBranch Backup Database Branch Args - 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
- Name string
- Name for the backup. Requires replacement if changed.
- Organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- Protected bool
- Whether or not the backup is protected from deletion
- Pvc
Size float64 - Size of the PVC used for the backup
- Retention
Unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- Retention
Value float64 - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - 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 - branch string
- The name of the branch. Requires replacement if changed.
- completed_
at string - When the backup completed
- database string
- The name of the database the branch belongs to. Requires replacement if changed.
- 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
- name string
- Name for the backup. Requires replacement if changed.
- organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- protected bool
- Whether or not the backup is protected from deletion
- pvc_
size number - Size of the PVC used for the backup
- retention_
unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention_
value number - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - 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
Vitess
Branch Backup Actor - backup
Policy VitessBranch Backup Backup Policy - branch String
- The name of the branch. Requires replacement if changed.
- completed
At String - When the backup completed
- database String
- The name of the database the branch belongs to. Requires replacement if changed.
- database
Branch VitessBranch Backup 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
- name String
- Name for the backup. Requires replacement if changed.
- organization String
- The name of the organization the branch belongs to. Requires replacement if changed.
- protected_ Boolean
- Whether or not the backup is protected from deletion
- pvc
Size Double - Size of the PVC used for the backup
- retention
Unit String - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention
Value Double - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - 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
Vitess
Branch Backup Actor - backup
Policy VitessBranch Backup Backup Policy - branch string
- The name of the branch. Requires replacement if changed.
- completed
At string - When the backup completed
- database string
- The name of the database the branch belongs to. Requires replacement if changed.
- database
Branch VitessBranch Backup 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
- name string
- Name for the backup. Requires replacement if changed.
- organization string
- The name of the organization the branch belongs to. Requires replacement if changed.
- protected boolean
- Whether or not the backup is protected from deletion
- pvc
Size number - Size of the PVC used for the backup
- retention
Unit string - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention
Value number - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - 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
Vitess
Branch Backup Actor Args - backup_
policy VitessBranch Backup Backup Policy Args - branch str
- The name of the branch. Requires replacement if changed.
- completed_
at str - When the backup completed
- database str
- The name of the database the branch belongs to. Requires replacement if changed.
- database_
branch VitessBranch Backup Database Branch Args - 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
- name str
- Name for the backup. Requires replacement if changed.
- organization str
- The name of the organization the branch belongs to. Requires replacement if changed.
- protected bool
- Whether or not the backup is protected from deletion
- pvc_
size float - Size of the PVC used for the backup
- retention_
unit str - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention_
value float - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - 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 - branch String
- The name of the branch. Requires replacement if changed.
- completed
At String - When the backup completed
- database String
- The name of the database the branch belongs to. Requires replacement if changed.
- 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
- name String
- Name for the backup. Requires replacement if changed.
- organization String
- The name of the organization the branch belongs to. Requires replacement if changed.
- protected Boolean
- Whether or not the backup is protected from deletion
- pvc
Size Number - Size of the PVC used for the backup
- retention
Unit String - Unit for the retention period of the backup. must be one of ["hour", "day", "week", "month", "year"]; Requires replacement if changed.
- retention
Value Number - Value between
1and1000for the retention period of the backup (i.e retentionvalue6and retentionunithourmeans 6 hours). Requires replacement if changed. - size Number
- The size of the backup in bytes
- started
At String - When the backup started
- state String
- The current state of the backup
Supporting Types
VitessBranchBackupActor, VitessBranchBackupActorArgs
- 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
VitessBranchBackupBackupPolicy, VitessBranchBackupBackupPolicyArgs
- 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
VitessBranchBackupDatabaseBranch, VitessBranchBackupDatabaseBranchArgs
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = planetscale_vitess_branch_backup.my_planetscale_vitess_branch_backup
id = jsonencode({
branch = "..."
database = "..."
id = "..."
organization = "..."
})
}
The pulumi import command can be used, for example:
$ pulumi import planetscale:index/vitessBranchBackup:VitessBranchBackup my_planetscale_vitess_branch_backup '{"branch": "...", "database": "...", "id": "...", "organization": "..."}'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscaleTerraform Provider.
published on Tuesday, Jun 16, 2026 by planetscale