| 1 | import * as cloudwatch from "@distilled.cloud/aws/cloudwatch"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { AlarmMuteRule } from "./AlarmMuteRule.ts"; |
| 5 | |
| 6 | export interface GetAlarmMuteRuleRequest extends Omit< |
| 7 | cloudwatch.GetAlarmMuteRuleInput, |
| 8 | "AlarmMuteRuleName" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `cloudwatch:GetAlarmMuteRule` — read the |
| 13 | * configuration of the bound {@link AlarmMuteRule}; the rule name is |
| 14 | * injected automatically. |
| 15 | * |
| 16 | * Provide `CloudWatch.GetAlarmMuteRuleHttp` on the hosting Lambda Function |
| 17 | * to satisfy the requirement. |
| 18 | * ### Reading Mute Rules |
| 19 | * **Example:** Read a Bound Mute Rule |
| 20 | * ```typescript |
| 21 | * // init — grants cloudwatch:GetAlarmMuteRule on the rule |
| 22 | * const getAlarmMuteRule = yield* AWS.CloudWatch.GetAlarmMuteRule(muteRule); |
| 23 | * |
| 24 | * // runtime |
| 25 | * const result = yield* getAlarmMuteRule(); |
| 26 | * const schedule = result.Rule?.Schedule; |
| 27 | * ``` |
| 28 | * |
| 29 | * @binding |
| 30 | */ |
| 31 | export interface GetAlarmMuteRule extends Binding.Service< |
| 32 | GetAlarmMuteRule, |
| 33 | "AWS.CloudWatch.GetAlarmMuteRule", |
| 34 | ( |
| 35 | rule: AlarmMuteRule, |
| 36 | ) => Effect.Effect< |
| 37 | ( |
| 38 | request?: GetAlarmMuteRuleRequest, |
| 39 | ) => Effect.Effect< |
| 40 | cloudwatch.GetAlarmMuteRuleOutput, |
| 41 | cloudwatch.GetAlarmMuteRuleError |
| 42 | > |
| 43 | > |
| 44 | > {} |
| 45 | |
| 46 | export const GetAlarmMuteRule = Binding.Service<GetAlarmMuteRule>( |
| 47 | "AWS.CloudWatch.GetAlarmMuteRule", |
| 48 | ); |