Skip to content

DescribeAnomalyDetectors

Source: src/AWS/CloudWatch/DescribeAnomalyDetectors.ts

Runtime binding for cloudwatch:DescribeAnomalyDetectors — list the anomaly detection models in the account/region, optionally filtered by namespace, metric name, or dimensions.

Provide CloudWatch.DescribeAnomalyDetectorsHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants cloudwatch:DescribeAnomalyDetectors
const describeAnomalyDetectors = yield* AWS.CloudWatch.DescribeAnomalyDetectors();
// runtime
const result = yield* describeAnomalyDetectors({
Namespace: "MyApp/Payments",
});
const detectors = result.AnomalyDetectors ?? [];