Enables the actions for the specified alarms.
Parameters:
Raises:
Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
| def enable_alarm_actions(
self,
*,
config_overrides: Optional[CloudWatchClientConfig] = None,
alarm_names: Optional["capo_cloudwatch.types.alarm_names.AlarmNames"] = None,
) -> None:
"""<p>Enables the actions for the specified alarms.</p>
Args:
alarm_names: <p>The names of the alarms.</p>
Raises:
capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch.types.enable_alarm_actions_input.EnableAlarmActionsInput]",
) -> OperationResponse[None]:
import capo_cloudwatch._operations.granite_service_version20100801.enable_alarm_actions
output, http_response = (
capo_cloudwatch._operations.granite_service_version20100801.enable_alarm_actions.enable_alarm_actions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("EnableAlarmActions")
)
input_: capo_cloudwatch.types.enable_alarm_actions_input.EnableAlarmActionsInput = {}
if alarm_names is not None:
input_["alarm_names"] = alarm_names
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|