Cloud.ScheduledSnapshot
A schedule that snapshots a server’s disk hourly, daily, weekly or
monthly (about one interval after the previous snapshot, not at a fixed
time). Snapshots are billable and stay after the schedule is deleted;
attached volumes are not included (see Cloud.ScheduledVolumeSnapshot).
frequency changes in place; serverId replaces the schedule.
Ownership. The API keeps no metadata for it and it has no generated name,
so nothing marks it as this stack’s: list enumerates it under every parent, and a
create interrupted before its state was saved is not recognised by the next deploy
(which creates it again, or gets the API’s conflict when its identity is unique).
Scheduling snapshots
Section titled “Scheduling snapshots”Daily snapshots of a server
yield* BetterStack.Cloud.ScheduledSnapshot("nightly", { serverId: server.id, frequency: "daily",});frequency "monthly" | "hourly" | "daily" | "weekly" | string required
How often we create a snapshot. A monthly schedule runs on the same day each month.
serverId string required
The ID of the server the schedule creates snapshots of. Can't be changed after the schedule is created.
availabilityZone string
Availability zone the resource lives in, such as us-west-2a. Defaults to the credentials' zone (BETTERSTACK_AVAILABILITY_ZONE, or the profile's). Changing it replaces the resource. A child of a resource in another zone (a firewall rule, a node pool, a snapshot of an instance outside the credentials' zone) must repeat the parent's availabilityZone: it receives only the parent's id, so its zone cannot be derived.
Attributes
Section titled “Attributes”availabilityZone string always set
Availability zone the resource lives in, such as us-west-2a.
id string always set
The schedule's ID.
createdAt string
When the schedule was created.
frequency "monthly" | "hourly" | "daily" | "weekly"
How often we create a snapshot. A monthly schedule runs on the same day each month.
lastRunAt string | null
When the schedule last created a snapshot, or null until the schedule first runs.
serverId string
The ID of the server the schedule creates snapshots of. Can't be changed after the schedule is created.
updatedAt string
When the schedule was last updated.
Lookup
Section titled “Lookup”ScheduledSnapshot.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
id string required
The schedule's ID.
availabilityZone string
Zone, such as us-west-2a. Defaults to the credentials' zone.