diff --git a/packages/clients/src/api/rdb/v1/index.gen.ts b/packages/clients/src/api/rdb/v1/index.gen.ts index 7d436a982..5b5a665c2 100644 --- a/packages/clients/src/api/rdb/v1/index.gen.ts +++ b/packages/clients/src/api/rdb/v1/index.gen.ts @@ -135,3 +135,4 @@ export type { Volume, VolumeType, } from './types.gen' +export * as ValidationRules from './validation-rules.gen' diff --git a/packages/clients/src/api/rdb/v1/marshalling.gen.ts b/packages/clients/src/api/rdb/v1/marshalling.gen.ts index 2e9fbf377..166a76d90 100644 --- a/packages/clients/src/api/rdb/v1/marshalling.gen.ts +++ b/packages/clients/src/api/rdb/v1/marshalling.gen.ts @@ -183,6 +183,7 @@ const unmarshalBackupSchedule = (data: unknown) => { return { disabled: data.disabled, frequency: data.frequency, + nextRunAt: unmarshalDate(data.next_run_at), retention: data.retention, } as BackupSchedule } @@ -1145,6 +1146,7 @@ export const marshalUpdateInstanceRequest = ( backup_same_region: request.backupSameRegion, backup_schedule_frequency: request.backupScheduleFrequency, backup_schedule_retention: request.backupScheduleRetention, + backup_schedule_start_hour: request.backupScheduleStartHour, is_backup_schedule_disabled: request.isBackupScheduleDisabled, logs_policy: request.logsPolicy ? marshalLogsPolicy(request.logsPolicy, defaults) diff --git a/packages/clients/src/api/rdb/v1/types.gen.ts b/packages/clients/src/api/rdb/v1/types.gen.ts index 470054a3f..0d71b94fa 100644 --- a/packages/clients/src/api/rdb/v1/types.gen.ts +++ b/packages/clients/src/api/rdb/v1/types.gen.ts @@ -148,10 +148,16 @@ export interface AddInstanceSettingsResponse { settings: InstanceSetting[] } +/** Backup schedule. */ export interface BackupSchedule { + /** Frequency of the backup schedule (in hours). */ frequency: number + /** Default retention period of backups (in days). */ retention: number + /** Defines whether the backup schedule feature is disabled. */ disabled: boolean + /** Next run of the backup schedule (accurate to 10 minutes). */ + nextRunAt?: Date } /** Database. */ @@ -1037,6 +1043,8 @@ export type UpdateInstanceRequest = { logsPolicy?: LogsPolicy /** Store logical backups in the same region as the Database Instance. */ backupSameRegion?: boolean + /** Defines the start time of the autobackup. */ + backupScheduleStartHour?: number } export type DeleteInstanceRequest = { diff --git a/packages/clients/src/api/rdb/v1/validation-rules.gen.ts b/packages/clients/src/api/rdb/v1/validation-rules.gen.ts new file mode 100644 index 000000000..d1ac36559 --- /dev/null +++ b/packages/clients/src/api/rdb/v1/validation-rules.gen.ts @@ -0,0 +1,8 @@ +// This file was automatically generated. DO NOT EDIT. +// If you have any remark or suggestion do not hesitate to open an issue. + +export const UpdateInstanceRequest = { + backupScheduleStartHour: { + lessThanOrEqual: 23, + }, +}