Skip to content

ListDashboards

Source: src/AWS/CloudWatch/ListDashboards.ts

Runtime binding for cloudwatch:ListDashboards — list the dashboards in the account, optionally filtered by name prefix.

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

// init — grants cloudwatch:ListDashboards
const listDashboards = yield* AWS.CloudWatch.ListDashboards();
// runtime
const result = yield* listDashboards();
const names = (result.DashboardEntries ?? []).map((e) => e.DashboardName);