Retrieves information about the log anomaly detector that you specify. The KMS key ARN detected is valid.
Parameters:
-
anomaly_detector_arn
(AnomalyDetectorArn)
–
The ARN of the anomaly detector to retrieve information about. You can find the ARNs of log anomaly detectors in your account by using the ListLogAnomalyDetectors operation.
Raises:
Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
| def get_log_anomaly_detector(
self,
anomaly_detector_arn: "capo_cloudwatch_logs.types.anomaly_detector_arn.AnomalyDetectorArn",
*,
config_overrides: Optional[CloudWatchLogsClientConfig] = None,
) -> "capo_cloudwatch_logs.types.get_log_anomaly_detector_response.GetLogAnomalyDetectorResponse":
"""<p>Retrieves information about the log anomaly detector that you specify. The KMS key ARN detected is valid.</p>
Args:
anomaly_detector_arn: <p>The ARN of the anomaly detector to retrieve information about. You can find the ARNs of log anomaly detectors in your account by using the <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_ListLogAnomalyDetectors.html">ListLogAnomalyDetectors</a> operation.</p>
Raises:
capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
capo_cloudwatch_logs.errors.operation_aborted_exception.OperationAbortedException: <p>Multiple concurrent requests to update the same resource were in conflict.</p>
capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch_logs.types.get_log_anomaly_detector_request.GetLogAnomalyDetectorRequest]",
) -> OperationResponse[
"capo_cloudwatch_logs.types.get_log_anomaly_detector_response.GetLogAnomalyDetectorResponse"
]:
import capo_cloudwatch_logs._operations.logs_20140328.get_log_anomaly_detector
output, http_response = (
capo_cloudwatch_logs._operations.logs_20140328.get_log_anomaly_detector.get_log_anomaly_detector(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetLogAnomalyDetector")
)
input_: capo_cloudwatch_logs.types.get_log_anomaly_detector_request.GetLogAnomalyDetectorRequest = {
"anomaly_detector_arn": anomaly_detector_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|