Describes a detector model. If the version parameter is not specified, information about the latest version is returned.
Parameters:
Raises:
Source code in docs_src/capo_iot_events/_services/async_io_t_events.py
| async def describe_detector_model(
self,
detector_model_name: "capo_iot_events.types.detector_model_name.DetectorModelName",
*,
config_overrides: Optional[AsyncIoTEventsClientConfig] = None,
detector_model_version: Optional[
"capo_iot_events.types.detector_model_version.DetectorModelVersion"
] = None,
) -> "capo_iot_events.types.describe_detector_model_response.DescribeDetectorModelResponse":
"""<p>Describes a detector model. If the <code>version</code> parameter is not specified, information about the latest version is returned.</p>
Args:
detector_model_name: <p>The name of the detector model.</p>
detector_model_version: <p>The version of the detector 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iot_events.types.describe_detector_model_request.DescribeDetectorModelRequest]",
) -> AsyncOperationResponse[
"capo_iot_events.types.describe_detector_model_response.DescribeDetectorModelResponse"
]:
import capo_iot_events._operations.iot_columbo_service.describe_detector_model
(
output,
http_response,
) = await capo_iot_events._operations.iot_columbo_service.describe_detector_model.async_describe_detector_model(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeDetectorModel")
)
input_: capo_iot_events.types.describe_detector_model_request.DescribeDetectorModelRequest = {
"detector_model_name": detector_model_name
}
if detector_model_version is not None:
input_["detector_model_version"] = detector_model_version
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|