DescribeAlarmContributors
Source:
src/AWS/CloudWatch/DescribeAlarmContributors.ts
Runtime binding for cloudwatch:DescribeAlarmContributors — list the
time-series contributors currently in ALARM for a contributor-enabled
metric-math alarm. Bind it to the Alarm; the alarm name is
injected automatically.
Provide CloudWatch.DescribeAlarmContributorsHttp on the hosting Lambda
Function to satisfy the requirement.
Reading Alarm State
Section titled “Reading Alarm State”// init — grants cloudwatch:DescribeAlarmContributors on the alarmconst describeAlarmContributors = yield* AWS.CloudWatch.DescribeAlarmContributors(alarm);
// runtime — plain metric alarms have no contributor data; the typed// errors let you treat that as an empty resultconst contributors = yield* describeAlarmContributors().pipe( Effect.map((r) => r.AlarmContributors ?? []), Effect.catchTag( ["ResourceNotFoundException", "ValidationException"], () => Effect.succeed([]), ),);