AnomalyMonitor
Source:
src/AWS/CostExplorer/AnomalyMonitor.ts
A Cost Explorer anomaly detection monitor. Monitors evaluate your spend for unusual patterns; pair with an AnomalySubscription to receive alerts.
Cost Explorer is a global service — all calls are pinned to us-east-1
regardless of the stack region. Monitors are free and take effect
immediately.
Creating Anomaly Monitors
Section titled “Creating Anomaly Monitors”Custom monitor scoped by a cost allocation tag
import * as CostExplorer from "alchemy/AWS/CostExplorer";
const monitor = yield* CostExplorer.AnomalyMonitor("TeamSpend", { monitorType: "CUSTOM", monitorSpecification: { Tags: { Key: "CostCenter", Values: ["10000"] }, },});Dimensional monitor across all AWS services
const monitor = yield* CostExplorer.AnomalyMonitor("ServiceSpend", { monitorType: "DIMENSIONAL", monitorDimension: "SERVICE",});