Cloud.ScheduledVolumeSnapshot
A schedule that snapshots a volume hourly, daily, weekly or
monthly. Volume snapshots are stored off the volume’s machine, billed by
the volume’s allocated size, and stay after the schedule is deleted.
frequency changes in place; volumeId 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 volume snapshots
Section titled “Scheduling volume snapshots”Weekly snapshots of a volume
yield* BetterStack.Cloud.ScheduledVolumeSnapshot("weekly", { volumeId: volume.id, frequency: "weekly",});frequency "monthly" | "hourly" | "daily" | "weekly" | string required
How often we create a snapshot. A monthly schedule runs on the same day each month.
volumeId string required
The ID of the volume 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.
updatedAt string
When the schedule was last updated.
volumeId string
The ID of the volume the schedule creates snapshots of. Can't be changed after the schedule is created.
Lookup
Section titled “Lookup”ScheduledVolumeSnapshot.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.