Skip to content

Silence

Source: src/Cloudflare/Alerting/Silence.ts

A Cloudflare Notifications silence window.

A silence suppresses notification dispatches for a {@link NotificationPolicy} between startTime and endTime — e.g. during a planned maintenance window. The window times are explicit ISO8601 props supplied by you; Cloudflare requires the start time to be within 90 days of now.

Note: the create API returns no id, so the provider resolves the created silence by listing and matching on (policyId, startTime, endTime). Two silences sharing the exact same policy and window are indistinguishable.

const policy = yield* Cloudflare.NotificationPolicy("SslAlerts", {
alertType: "universal_ssl_event_type",
mechanisms: { email: [{ id: "ops@example.com" }] },
});
yield* Cloudflare.Silence("MaintenanceWindow", {
policyId: policy.policyId,
startTime: "2026-07-01T00:00:00Z",
endTime: "2026-07-01T04:00:00Z",
});

Window times are mutable — changing them updates the existing silence.

yield* Cloudflare.Silence("MaintenanceWindow", {
policyId: policy.policyId,
startTime: "2026-07-01T00:00:00Z",
endTime: "2026-07-01T08:00:00Z",
});