Lists all the versions of a detector model. Only the metadata associated with each detector model version is returned.
Parameters:
-
detector_model_name
(DetectorModelName)
–
The name of the detector model whose versions are returned.
-
next_token
(Optional[NextToken], default:
None
)
–
The token that you can use to return the next set of results.
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of results to be returned per request.
Raises:
Source code in docs_src/capo_iot_events/_services/io_t_events.py
| def list_detector_model_versions(
self,
detector_model_name: "capo_iot_events.types.detector_model_name.DetectorModelName",
*,
config_overrides: Optional[IoTEventsClientConfig] = None,
next_token: Optional["capo_iot_events.types.next_token.NextToken"] = None,
max_results: Optional["capo_iot_events.types.max_results.MaxResults"] = None,
) -> "capo_iot_events.types.list_detector_model_versions_response.ListDetectorModelVersionsResponse":
"""<p>Lists all the versions of a detector model. Only the metadata associated with each detector model version is returned.</p>
Args:
detector_model_name: <p>The name of the detector model whose versions are returned.</p>
next_token: <p>The token that you can use to return the next set of results.</p>
max_results: <p>The maximum number of results to be returned per request.</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.list_detector_model_versions_request.ListDetectorModelVersionsRequest]",
) -> OperationResponse[
"capo_iot_events.types.list_detector_model_versions_response.ListDetectorModelVersionsResponse"
]:
import capo_iot_events._operations.iot_columbo_service.list_detector_model_versions
output, http_response = (
capo_iot_events._operations.iot_columbo_service.list_detector_model_versions.list_detector_model_versions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDetectorModelVersions")
)
input_: capo_iot_events.types.list_detector_model_versions_request.ListDetectorModelVersionsRequest = {
"detector_model_name": detector_model_name
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|