getAlarmMuteRule method

Future<GetAlarmMuteRuleOutput> getAlarmMuteRule({
  1. required String alarmMuteRuleName,
})

Retrieves details for a specific alarm mute rule.

This operation returns complete information about the mute rule, including its configuration, status, targeted alarms, and metadata.

The returned status indicates the current state of the mute rule:

  • SCHEDULED: The mute rule is configured and will become active in the future
  • ACTIVE: The mute rule is currently muting alarm actions
  • EXPIRED: The mute rule has passed its expiration date and will no longer become active
Permissions

To retrieve details for a mute rule, you need the cloudwatch:GetAlarmMuteRule permission on the alarm mute rule resource.

May throw ResourceNotFoundException.

Parameter alarmMuteRuleName : The name of the alarm mute rule to retrieve.

Implementation

Future<GetAlarmMuteRuleOutput> getAlarmMuteRule({
  required String alarmMuteRuleName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'GraniteServiceVersion20100801.GetAlarmMuteRule'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AlarmMuteRuleName': alarmMuteRuleName,
    },
  );

  return GetAlarmMuteRuleOutput.fromJson(jsonResponse.body);
}