Skip to content

DescribeNotificationsForBudget

Source: src/AWS/Budgets/DescribeNotificationsForBudget.ts

Runtime binding for budgets:ViewBudget via DescribeNotificationsForBudget.

Bind this operation to a Budget to list its alert thresholds and their alarm state (NotificationState is ALARM once a threshold has been crossed) — e.g. to gate expensive work on whether any budget alert has fired. Provide the implementation with Effect.provide(AWS.Budgets.DescribeNotificationsForBudgetHttp).

// init — bind the operation to the budget
const notifications = yield* AWS.Budgets.DescribeNotificationsForBudget(budget);
// runtime
const result = yield* notifications();
const inAlarm = (result.Notifications ?? []).some(
(n) => n.NotificationState === "ALARM",
);