GetDashboard
Source:
src/AWS/CloudWatch/GetDashboard.ts
Runtime binding for cloudwatch:GetDashboard — read the body and
metadata of the bound Dashboard; the dashboard name is injected
automatically.
Provide CloudWatch.GetDashboardHttp on the hosting Lambda Function to
satisfy the requirement.
Reading Dashboards
Section titled “Reading Dashboards”// init — grants cloudwatch:GetDashboard on the dashboardconst getDashboard = yield* AWS.CloudWatch.GetDashboard(dashboard);
// runtimeconst result = yield* getDashboard();const widgets = JSON.parse(result.DashboardBody ?? "{}").widgets;