Skip to content

Commit f95713b

Browse files
authored
feat(rdb): add possibility to update BackupSchedule next update (#739)
1 parent 6102ac5 commit f95713b

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

packages/clients/src/api/rdb/v1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,4 @@ export type {
135135
Volume,
136136
VolumeType,
137137
} from './types.gen'
138+
export * as ValidationRules from './validation-rules.gen'

packages/clients/src/api/rdb/v1/marshalling.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ const unmarshalBackupSchedule = (data: unknown) => {
183183
return {
184184
disabled: data.disabled,
185185
frequency: data.frequency,
186+
nextRunAt: unmarshalDate(data.next_run_at),
186187
retention: data.retention,
187188
} as BackupSchedule
188189
}
@@ -1145,6 +1146,7 @@ export const marshalUpdateInstanceRequest = (
11451146
backup_same_region: request.backupSameRegion,
11461147
backup_schedule_frequency: request.backupScheduleFrequency,
11471148
backup_schedule_retention: request.backupScheduleRetention,
1149+
backup_schedule_start_hour: request.backupScheduleStartHour,
11481150
is_backup_schedule_disabled: request.isBackupScheduleDisabled,
11491151
logs_policy: request.logsPolicy
11501152
? marshalLogsPolicy(request.logsPolicy, defaults)

packages/clients/src/api/rdb/v1/types.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,16 @@ export interface AddInstanceSettingsResponse {
148148
settings: InstanceSetting[]
149149
}
150150

151+
/** Backup schedule. */
151152
export interface BackupSchedule {
153+
/** Frequency of the backup schedule (in hours). */
152154
frequency: number
155+
/** Default retention period of backups (in days). */
153156
retention: number
157+
/** Defines whether the backup schedule feature is disabled. */
154158
disabled: boolean
159+
/** Next run of the backup schedule (accurate to 10 minutes). */
160+
nextRunAt?: Date
155161
}
156162

157163
/** Database. */
@@ -1037,6 +1043,8 @@ export type UpdateInstanceRequest = {
10371043
logsPolicy?: LogsPolicy
10381044
/** Store logical backups in the same region as the Database Instance. */
10391045
backupSameRegion?: boolean
1046+
/** Defines the start time of the autobackup. */
1047+
backupScheduleStartHour?: number
10401048
}
10411049

10421050
export type DeleteInstanceRequest = {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file was automatically generated. DO NOT EDIT.
2+
// If you have any remark or suggestion do not hesitate to open an issue.
3+
4+
export const UpdateInstanceRequest = {
5+
backupScheduleStartHour: {
6+
lessThanOrEqual: 23,
7+
},
8+
}

0 commit comments

Comments
 (0)