Skip to content

Commit 3e03e25

Browse files
authored
feat(mongodb): add support for InstanceSnapshotSchedule (#2606)
1 parent c2e6c36 commit 3e03e25

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

api/mongodb/v1alpha1/mongodb_sdk.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,19 @@ type InstanceSetting struct {
478478
Value string `json:"value"`
479479
}
480480

481+
// InstanceSnapshotSchedule: instance snapshot schedule.
482+
type InstanceSnapshotSchedule struct {
483+
FrequencyHours int32 `json:"frequency_hours"`
484+
485+
RetentionDays int32 `json:"retention_days"`
486+
487+
Enabled bool `json:"enabled"`
488+
489+
NextUpdate *time.Time `json:"next_update"`
490+
491+
LastRun *time.Time `json:"last_run"`
492+
}
493+
481494
// Volume: volume.
482495
type Volume struct {
483496
// Type: type of volume where data is stored.
@@ -623,6 +636,9 @@ type Instance struct {
623636
// CreatedAt: creation date (must follow the ISO 8601 format).
624637
CreatedAt *time.Time `json:"created_at"`
625638

639+
// SnapshotSchedule: snapshot schedule configuration of the Database Instance.
640+
SnapshotSchedule *InstanceSnapshotSchedule `json:"snapshot_schedule"`
641+
626642
// Region: region the Database Instance is in.
627643
Region scw.Region `json:"region"`
628644
}

0 commit comments

Comments
 (0)