Retrieves information about an alarm model. If you don't specify a value for the alarmModelVersion parameter, the latest version is returned.
Parameters:
Raises:
Source code in docs_src/capo_iot_events/_services/io_t_events.py
| def describe_alarm_model(
self,
alarm_model_name: "capo_iot_events.types.alarm_model_name.AlarmModelName",
*,
config_overrides: Optional[IoTEventsClientConfig] = None,
alarm_model_version: Optional[
"capo_iot_events.types.alarm_model_version.AlarmModelVersion"
] = None,
) -> (
"capo_iot_events.types.describe_alarm_model_response.DescribeAlarmModelResponse"
):
"""<p>Retrieves information about an alarm model. If you don't specify a value for the <code>alarmModelVersion</code> parameter, the latest version is returned.</p>
Args:
alarm_model_name: <p>The name of the alarm model.</p>
alarm_model_version: <p>The version of the alarm model.</p>
Raises:
capo_iot_events.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
capo_iot_events.errors.invalid_request_exception.InvalidRequestException: <p>The request was invalid.</p>
capo_iot_events.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found.</p>
capo_iot_events.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is currently unavailable.</p>
capo_iot_events.errors.throttling_exception.ThrottlingException: <p>The request could not be completed due to throttling.</p>
capo_iot_events.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iot_events.types.describe_alarm_model_request.DescribeAlarmModelRequest]",
) -> OperationResponse[
"capo_iot_events.types.describe_alarm_model_response.DescribeAlarmModelResponse"
]:
import capo_iot_events._operations.iot_columbo_service.describe_alarm_model
output, http_response = (
capo_iot_events._operations.iot_columbo_service.describe_alarm_model.describe_alarm_model(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeAlarmModel")
)
input_: capo_iot_events.types.describe_alarm_model_request.DescribeAlarmModelRequest = {
"alarm_model_name": alarm_model_name
}
if alarm_model_version is not None:
input_["alarm_model_version"] = alarm_model_version
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|