Skip to content

feat(mongodb): add support for InstanceSnapshotSchedule #2606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions api/mongodb/v1alpha1/mongodb_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,19 @@ type InstanceSetting struct {
Value string `json:"value"`
}

// InstanceSnapshotSchedule: instance snapshot schedule.
type InstanceSnapshotSchedule struct {
FrequencyHours int32 `json:"frequency_hours"`

RetentionDays int32 `json:"retention_days"`

Enabled bool `json:"enabled"`

NextUpdate *time.Time `json:"next_update"`

LastRun *time.Time `json:"last_run"`
}

// Volume: volume.
type Volume struct {
// Type: type of volume where data is stored.
Expand Down Expand Up @@ -623,6 +636,9 @@ type Instance struct {
// CreatedAt: creation date (must follow the ISO 8601 format).
CreatedAt *time.Time `json:"created_at"`

// SnapshotSchedule: snapshot schedule configuration of the Database Instance.
SnapshotSchedule *InstanceSnapshotSchedule `json:"snapshot_schedule"`

// Region: region the Database Instance is in.
Region scw.Region `json:"region"`
}
Expand Down
Loading