import { Construct } from './construct.js'; import { Diagnostics } from './diagnostics.js'; import { TimeZone } from './time-zone.js'; export type MaintenanceWindowRepeatUnit = 'DAY' | 'WEEK' | 'MONTH'; export interface MaintenanceWindowProps { /** * The name of the maintenance window. */ name: string; /** * Tags that select which checks are paused during the maintenance window. * A window must set at least one of `tags`, `pauseAllChecks`, `silenceAlertsTags` or `silenceAllAlerts`. */ tags?: Array; /** * The start date and time of the maintenance window in ISO 8601 format, "YYYY-MM-DDTHH:mm:ss.sssZ" as returned by * `new Date()` */ startsAt: Date; /** * The end date and time of the maintenance window in ISO 8601 format, "YYYY-MM-DDTHH:mm:ss.sssZ" as returned by * `new Date()` */ endsAt: Date; /** * The repeat interval of the maintenance window from the first occurrence. */ repeatInterval?: number; /** * The repeat strategy for the maintenance window. This is mandatory when you specify a repeat interval. */ repeatUnit?: MaintenanceWindowRepeatUnit; /** * The end date and time when the maintenance window should stop repeating. */ repeatEndsAt?: Date; /** * The named IANA time zone used to schedule recurring occurrences, e.g. `'America/New_York'`. * Occurrences keep the same local time across daylight-saving changes. * * `startsAt` and `endsAt` remain absolute instants; the time zone does not reinterpret them. * UTC offsets such as `'+05:00'` or `'Etc/GMT+5'` are not accepted. Removing a previously set * time zone resets the window to UTC on the next deploy. The time zone cannot be changed while a * maintenance is active. * * @defaultValue 'UTC' */ timezone?: TimeZone; /** * When true, checks are paused for every check in the account, regardless of `tags`. */ pauseAllChecks?: boolean; /** * A list of tags that filter which checks have their alerts silenced. Ignored when * `silenceAllAlerts` is true. */ silenceAlertsTags?: Array; /** * When true, alerts are silenced for every check in the account, overriding * `silenceAlertsTags`. */ silenceAllAlerts?: boolean; } /** * Creates a Maintenance Window * * @remarks * * This class make use of the Maintenance Window endpoints. */ export declare class MaintenanceWindow extends Construct { name: string; tags?: Array; startsAt: Date; endsAt: Date; repeatInterval?: number; repeatUnit?: MaintenanceWindowRepeatUnit; repeatEndsAt?: Date; timezone: TimeZone; pauseAllChecks?: boolean; silenceAlertsTags?: Array; silenceAllAlerts?: boolean; static readonly __checklyType = "maintenance-window"; /** * Constructs the Maintenance Window instance * * @param logicalId unique project-scoped resource name identification * @param props maintenance window configuration properties * * {@link https://www.checklyhq.com/docs/constructs/maintenance-window/ Read more in the docs} */ constructor(logicalId: string, props: MaintenanceWindowProps); describe(): string; validate(diagnostics: Diagnostics): Promise; synthesize(): any | null; }