Skip to content

PostgresSnapshotSchedule

laktory.models.resources.databricks.PostgresSnapshotSchedule ¤

Bases: PostgresSnapshotScheduleBase

Lakebase Autoscaling (Postgres) snapshot schedule

Daily, weekly and/or monthly snapshots of a branch, each with its own retention. Can also be declared as the snapshot_schedule of a PostgresBranch.

Examples:

import io

from laktory import models

schedule_yaml = '''
parent: projects/app/branches/production
schedule:
- daily_schedule:
    hour: 3
  retention: 168h0m0s
'''
schedule = models.resources.databricks.PostgresSnapshotSchedule.model_validate_yaml(
    io.StringIO(schedule_yaml)
)
References
BASE DESCRIPTION
parent

Branch of the snapshots (projects/{project_id}/branches/{branch_id}). Set automatically when declared as the snapshot_schedule of a branch.

TYPE: str | VariableType DEFAULT: None

provider_config

Configure the provider for management through account provider

TYPE: PostgresSnapshotScheduleProviderConfig | None | VariableType DEFAULT: None

schedule

The cadences at which automatic snapshots are taken. Update replaces the whole set; an empty set disables automatic snapshots. Order is not significant. When several cadences fire together, one snapshot is taken, retained for the longest of their retentions

TYPE: list[PostgresSnapshotScheduleSchedule] | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgressnapshotschedule.PostgresSnapshotScheduleProviderConfig ¤

Bases: BaseModel

PARAMETER DESCRIPTION
workspace_id

Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgressnapshotschedule.PostgresSnapshotScheduleSchedule ¤

Bases: BaseModel

PARAMETER DESCRIPTION
daily_schedule

Take a snapshot once per day

TYPE: PostgresSnapshotScheduleScheduleDailySchedule | None | VariableType DEFAULT: None

monthly_schedule

Take a snapshot once per month

TYPE: PostgresSnapshotScheduleScheduleMonthlySchedule | None | VariableType DEFAULT: None

retention

How long snapshots from this cadence are kept before automatic deletion. Must be at least 1 hour. Applied when a snapshot is taken; not retroactive, so changing it affects only later snapshots

TYPE: str | VariableType

weekly_schedule

Take a snapshot once per week

TYPE: PostgresSnapshotScheduleScheduleWeeklySchedule | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgressnapshotschedule.PostgresSnapshotScheduleScheduleDailySchedule ¤

Bases: BaseModel

PARAMETER DESCRIPTION
hour

The hour of the day, in UTC, at which to take the snapshot, in [0, 23]

TYPE: int | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgressnapshotschedule.PostgresSnapshotScheduleScheduleMonthlySchedule ¤

Bases: BaseModel

PARAMETER DESCRIPTION
day

The day of the month on which to take the snapshot, in [1, 31]. In shorter months the snapshot is taken on the last day instead (day 31 runs on Feb 28 or 29, and on Apr 30), so every month gets exactly one snapshot

TYPE: int | VariableType

hour

The hour of the day, in UTC, at which to take the snapshot, in [0, 23]

TYPE: int | None | VariableType DEFAULT: None


laktory.models.resources.databricks.postgressnapshotschedule.PostgresSnapshotScheduleScheduleWeeklySchedule ¤

Bases: BaseModel

PARAMETER DESCRIPTION
day_of_week

The day of the week on which to take the snapshot. Possible values are: FRIDAY, MONDAY, SATURDAY, SUNDAY, THURSDAY, TUESDAY, WEDNESDAY

TYPE: str | VariableType

hour

The hour of the day, in UTC, at which to take the snapshot, in [0, 23]

TYPE: int | None | VariableType DEFAULT: None