Deletes a specific alarm mute rule.
When you delete a mute rule, any alarms that are currently being muted by that rule are immediately unmuted. If those alarms are in an ALARM state, their configured actions will trigger.
This operation is idempotent. If you delete a mute rule that does not exist, the operation succeeds without returning an error.
Permissions
To delete a mute rule, you need the cloudwatch:DeleteAlarmMuteRule permission on the alarm mute rule resource.
Parameters:
-
alarm_mute_rule_name
(Optional[Name], default:
None
)
–
The name of the alarm mute rule to delete.
Raises:
Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
| def delete_alarm_mute_rule(
self,
*,
config_overrides: Optional[CloudWatchClientConfig] = None,
alarm_mute_rule_name: Optional["capo_cloudwatch.types.name.Name"] = None,
) -> None:
"""<p>Deletes a specific alarm mute rule.</p> <p>When you delete a mute rule, any alarms that are currently being muted by that rule are immediately unmuted. If those alarms are in an ALARM state, their configured actions will trigger.</p> <p>This operation is idempotent. If you delete a mute rule that does not exist, the operation succeeds without returning an error.</p> <p> <b>Permissions</b> </p> <p>To delete a mute rule, you need the <code>cloudwatch:DeleteAlarmMuteRule</code> permission on the alarm mute rule resource.</p>
Args:
alarm_mute_rule_name: <p>The name of the alarm mute rule to delete.</p>
Raises:
capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch.types.delete_alarm_mute_rule_input.DeleteAlarmMuteRuleInput]",
) -> OperationResponse[None]:
import capo_cloudwatch._operations.granite_service_version20100801.delete_alarm_mute_rule
output, http_response = (
capo_cloudwatch._operations.granite_service_version20100801.delete_alarm_mute_rule.delete_alarm_mute_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteAlarmMuteRule")
)
input_: capo_cloudwatch.types.delete_alarm_mute_rule_input.DeleteAlarmMuteRuleInput = {}
if alarm_mute_rule_name is not None:
input_["alarm_mute_rule_name"] = alarm_mute_rule_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|