published on Friday, Sep 18, 2026 by planetscale
published on Friday, Sep 18, 2026 by planetscale
NekiBackupPolicy Resource
Create NekiBackupPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NekiBackupPolicy(name: string, args: NekiBackupPolicyArgs, opts?: CustomResourceOptions);@overload
def NekiBackupPolicy(resource_name: str,
args: NekiBackupPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NekiBackupPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
database: Optional[str] = None,
frequency_unit: Optional[str] = None,
frequency_value: Optional[float] = None,
organization: Optional[str] = None,
retention_unit: Optional[str] = None,
retention_value: Optional[float] = None,
schedule_time: Optional[str] = None,
target: Optional[str] = None,
name: Optional[str] = None,
schedule_day: Optional[float] = None,
schedule_week: Optional[float] = None)func NewNekiBackupPolicy(ctx *Context, name string, args NekiBackupPolicyArgs, opts ...ResourceOption) (*NekiBackupPolicy, error)public NekiBackupPolicy(string name, NekiBackupPolicyArgs args, CustomResourceOptions? opts = null)
public NekiBackupPolicy(String name, NekiBackupPolicyArgs args)
public NekiBackupPolicy(String name, NekiBackupPolicyArgs args, CustomResourceOptions options)
type: planetscale:NekiBackupPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "planetscale_neki_backup_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args NekiBackupPolicyArgs
- 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 NekiBackupPolicyArgs
- 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 NekiBackupPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NekiBackupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NekiBackupPolicyArgs
- 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 nekiBackupPolicyResource = new Planetscale.NekiBackupPolicy("nekiBackupPolicyResource", new()
{
Database = "string",
FrequencyUnit = "string",
FrequencyValue = 0.0,
Organization = "string",
RetentionUnit = "string",
RetentionValue = 0.0,
ScheduleTime = "string",
Target = "string",
Name = "string",
ScheduleDay = 0.0,
ScheduleWeek = 0.0,
});
example, err := planetscale.NewNekiBackupPolicy(ctx, "nekiBackupPolicyResource", &planetscale.NekiBackupPolicyArgs{
Database: pulumi.String("string"),
FrequencyUnit: pulumi.String("string"),
FrequencyValue: pulumi.Float64(0),
Organization: pulumi.String("string"),
RetentionUnit: pulumi.String("string"),
RetentionValue: pulumi.Float64(0),
ScheduleTime: pulumi.String("string"),
Target: pulumi.String("string"),
Name: pulumi.String("string"),
ScheduleDay: pulumi.Float64(0),
ScheduleWeek: pulumi.Float64(0),
})
resource "planetscale_neki_backup_policy" "nekiBackupPolicyResource" {
lifecycle {
create_before_destroy = true
}
database = "string"
frequency_unit = "string"
frequency_value = 0
organization = "string"
retention_unit = "string"
retention_value = 0
schedule_time = "string"
target = "string"
name = "string"
schedule_day = 0
schedule_week = 0
}
var nekiBackupPolicyResource = new NekiBackupPolicy("nekiBackupPolicyResource", NekiBackupPolicyArgs.builder()
.database("string")
.frequencyUnit("string")
.frequencyValue(0.0)
.organization("string")
.retentionUnit("string")
.retentionValue(0.0)
.scheduleTime("string")
.target("string")
.name("string")
.scheduleDay(0.0)
.scheduleWeek(0.0)
.build());
neki_backup_policy_resource = planetscale.NekiBackupPolicy("nekiBackupPolicyResource",
database="string",
frequency_unit="string",
frequency_value=float(0),
organization="string",
retention_unit="string",
retention_value=float(0),
schedule_time="string",
target="string",
name="string",
schedule_day=float(0),
schedule_week=float(0))
const nekiBackupPolicyResource = new planetscale.NekiBackupPolicy("nekiBackupPolicyResource", {
database: "string",
frequencyUnit: "string",
frequencyValue: 0,
organization: "string",
retentionUnit: "string",
retentionValue: 0,
scheduleTime: "string",
target: "string",
name: "string",
scheduleDay: 0,
scheduleWeek: 0,
});
type: planetscale:NekiBackupPolicy
properties:
database: string
frequencyUnit: string
frequencyValue: 0
name: string
organization: string
retentionUnit: string
retentionValue: 0
scheduleDay: 0
scheduleTime: string
scheduleWeek: 0
target: string
NekiBackupPolicy 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 NekiBackupPolicy resource accepts the following input properties:
- Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Frequency
Unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- Frequency
Value double - A number value for the frequency of the backup policy
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - Retention
Unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- Retention
Value double - A number value for the retention period of the backup policy
- Schedule
Time string - The time of day that the backup is scheduled, in HH:MM format
- Target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- Name string
- The name of the backup policy
- Schedule
Day double - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- Schedule
Week double - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Frequency
Unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- Frequency
Value float64 - A number value for the frequency of the backup policy
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - Retention
Unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- Retention
Value float64 - A number value for the retention period of the backup policy
- Schedule
Time string - The time of day that the backup is scheduled, in HH:MM format
- Target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- Name string
- The name of the backup policy
- Schedule
Day float64 - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- Schedule
Week float64 - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency_
unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency_
value number - A number value for the frequency of the backup policy
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - retention_
unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention_
value number - A number value for the retention period of the backup policy
- schedule_
time string - The time of day that the backup is scheduled, in HH:MM format
- target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- name string
- The name of the backup policy
- schedule_
day number - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule_
week number - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency
Unit String - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency
Value Double - A number value for the frequency of the backup policy
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - retention
Unit String - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention
Value Double - A number value for the retention period of the backup policy
- schedule
Time String - The time of day that the backup is scheduled, in HH:MM format
- target String
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- name String
- The name of the backup policy
- schedule
Day Double - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule
Week Double - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency
Unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency
Value number - A number value for the frequency of the backup policy
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - retention
Unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention
Value number - A number value for the retention period of the backup policy
- schedule
Time string - The time of day that the backup is scheduled, in HH:MM format
- target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- name string
- The name of the backup policy
- schedule
Day number - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule
Week number - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- database str
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency_
unit str - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency_
value float - A number value for the frequency of the backup policy
- organization str
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - retention_
unit str - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention_
value float - A number value for the retention period of the backup policy
- schedule_
time str - The time of day that the backup is scheduled, in HH:MM format
- target str
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- name str
- The name of the backup policy
- schedule_
day float - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule_
week float - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency
Unit String - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency
Value Number - A number value for the frequency of the backup policy
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - retention
Unit String - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention
Value Number - A number value for the retention period of the backup policy
- schedule
Time String - The time of day that the backup is scheduled, in HH:MM format
- target String
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- name String
- The name of the backup policy
- schedule
Day Number - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule
Week Number - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
Outputs
All input properties are implicitly available as output properties. Additionally, the NekiBackupPolicy resource produces the following output properties:
Look up Existing NekiBackupPolicy Resource
Get an existing NekiBackupPolicy 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?: NekiBackupPolicyState, opts?: CustomResourceOptions): NekiBackupPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
database: Optional[str] = None,
frequency_unit: Optional[str] = None,
frequency_value: Optional[float] = None,
name: Optional[str] = None,
organization: Optional[str] = None,
required: Optional[bool] = None,
retention_unit: Optional[str] = None,
retention_value: Optional[float] = None,
schedule_day: Optional[float] = None,
schedule_time: Optional[str] = None,
schedule_week: Optional[float] = None,
target: Optional[str] = None) -> NekiBackupPolicyfunc GetNekiBackupPolicy(ctx *Context, name string, id IDInput, state *NekiBackupPolicyState, opts ...ResourceOption) (*NekiBackupPolicy, error)public static NekiBackupPolicy Get(string name, Input<string> id, NekiBackupPolicyState? state, CustomResourceOptions? opts = null)public static NekiBackupPolicy get(String name, Output<String> id, NekiBackupPolicyState state, CustomResourceOptions options)resources: _: type: planetscale:NekiBackupPolicy get: id: ${id}import {
to = planetscale_neki_backup_policy.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.
- Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Frequency
Unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- Frequency
Value double - A number value for the frequency of the backup policy
- Name string
- The name of the backup policy
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - Required bool
- Whether the policy is a required system backup that cannot be updated or deleted.
- Retention
Unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- Retention
Value double - A number value for the retention period of the backup policy
- Schedule
Day double - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- Schedule
Time string - The time of day that the backup is scheduled, in HH:MM format
- Schedule
Week double - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- Target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- Database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - Frequency
Unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- Frequency
Value float64 - A number value for the frequency of the backup policy
- Name string
- The name of the backup policy
- Organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - Required bool
- Whether the policy is a required system backup that cannot be updated or deleted.
- Retention
Unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- Retention
Value float64 - A number value for the retention period of the backup policy
- Schedule
Day float64 - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- Schedule
Time string - The time of day that the backup is scheduled, in HH:MM format
- Schedule
Week float64 - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- Target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency_
unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency_
value number - A number value for the frequency of the backup policy
- name string
- The name of the backup policy
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - required bool
- Whether the policy is a required system backup that cannot be updated or deleted.
- retention_
unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention_
value number - A number value for the retention period of the backup policy
- schedule_
day number - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule_
time string - The time of day that the backup is scheduled, in HH:MM format
- schedule_
week number - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency
Unit String - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency
Value Double - A number value for the frequency of the backup policy
- name String
- The name of the backup policy
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - required Boolean
- Whether the policy is a required system backup that cannot be updated or deleted.
- retention
Unit String - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention
Value Double - A number value for the retention period of the backup policy
- schedule
Day Double - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule
Time String - The time of day that the backup is scheduled, in HH:MM format
- schedule
Week Double - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- target String
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- database string
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency
Unit string - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency
Value number - A number value for the frequency of the backup policy
- name string
- The name of the backup policy
- organization string
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - required boolean
- Whether the policy is a required system backup that cannot be updated or deleted.
- retention
Unit string - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention
Value number - A number value for the retention period of the backup policy
- schedule
Day number - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule
Time string - The time of day that the backup is scheduled, in HH:MM format
- schedule
Week number - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- target string
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- database str
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency_
unit str - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency_
value float - A number value for the frequency of the backup policy
- name str
- The name of the backup policy
- organization str
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - required bool
- Whether the policy is a required system backup that cannot be updated or deleted.
- retention_
unit str - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention_
value float - A number value for the retention period of the backup policy
- schedule_
day float - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule_
time str - The time of day that the backup is scheduled, in HH:MM format
- schedule_
week float - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- target str
- Whether the policy is for production or development branches. must be one of ["production", "development"]
- database String
- Database name slug from
list_databases. Example:app-db. Requires replacement if changed. - frequency
Unit String - The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
- frequency
Value Number - A number value for the frequency of the backup policy
- name String
- The name of the backup policy
- organization String
- Organization name slug from
list_organizations. Example:acme. Requires replacement if changed. - required Boolean
- Whether the policy is a required system backup that cannot be updated or deleted.
- retention
Unit String - The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
- retention
Value Number - A number value for the retention period of the backup policy
- schedule
Day Number - Day of the week that the backup is scheduled. Required for weekly and monthly schedules. 0 is Sunday, 6 is Saturday.
- schedule
Time String - The time of day that the backup is scheduled, in HH:MM format
- schedule
Week Number - Week of the month that the backup is scheduled. Required for monthly schedules. 0 is the first week, 3 is the fourth week.
- target String
- Whether the policy is for production or development branches. must be one of ["production", "development"]
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = planetscale_neki_backup_policy.my_planetscale_neki_backup_policy
id = jsonencode({
database = "..."
id = "..."
organization = "..."
})
}
The pulumi import command can be used, for example:
$ pulumi import planetscale:index/nekiBackupPolicy:NekiBackupPolicy my_planetscale_neki_backup_policy '{"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 Friday, Sep 18, 2026 by planetscale