aws_sdk_cloudwatchlogs/client/create_log_anomaly_detector.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateLogAnomalyDetector`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`log_group_arn_list(impl Into<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::log_group_arn_list) / [`set_log_group_arn_list(Option<Vec::<String>>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_log_group_arn_list):<br>required: **true**<br><p>An array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN.</p><br>
/// - [`detector_name(impl Into<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::detector_name) / [`set_detector_name(Option<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_detector_name):<br>required: **false**<br><p>A name for this anomaly detector.</p><br>
/// - [`evaluation_frequency(EvaluationFrequency)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::evaluation_frequency) / [`set_evaluation_frequency(Option<EvaluationFrequency>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_evaluation_frequency):<br>required: **false**<br><p>Specifies how often the anomaly detector is to run and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then 15 minutes might be a good setting for <code>evaluationFrequency</code> .</p><br>
/// - [`filter_pattern(impl Into<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::filter_pattern) / [`set_filter_pattern(Option<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_filter_pattern):<br>required: **false**<br><p>You can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html">Filter and Pattern Syntax</a>.</p><br>
/// - [`kms_key_id(impl Into<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>Optionally assigns a KMS key to secure this anomaly detector and its findings. If a key is assigned, the anomalies found and the model used by this detector are encrypted at rest with the key. If a key is assigned to an anomaly detector, a user must have permissions for both this key and for the anomaly detector to retrieve information about the anomalies that it finds.</p> <p>For more information about using a KMS key and to see the required IAM policy, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/LogsAnomalyDetection-KMS.html">Use a KMS key with an anomaly detector</a>.</p><br>
/// - [`anomaly_visibility_time(i64)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::anomaly_visibility_time) / [`set_anomaly_visibility_time(Option<i64>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_anomaly_visibility_time):<br>required: **false**<br><p>The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in <code>anomalyVisibilityTime</code>, it will be considered normal going forward and will not be detected as an anomaly.</p><br>
/// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::set_tags):<br>required: **false**<br><p>An optional list of key-value pairs to associate with the resource.</p> <p>For more information about tagging, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a></p><br>
/// - On success, responds with [`CreateLogAnomalyDetectorOutput`](crate::operation::create_log_anomaly_detector::CreateLogAnomalyDetectorOutput) with field(s):
/// - [`anomaly_detector_arn(Option<String>)`](crate::operation::create_log_anomaly_detector::CreateLogAnomalyDetectorOutput::anomaly_detector_arn): <p>The ARN of the log anomaly detector that you just created.</p>
/// - On failure, responds with [`SdkError<CreateLogAnomalyDetectorError>`](crate::operation::create_log_anomaly_detector::CreateLogAnomalyDetectorError)
pub fn create_log_anomaly_detector(&self) -> crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder {
crate::operation::create_log_anomaly_detector::builders::CreateLogAnomalyDetectorFluentBuilder::new(self.handle.clone())
}
}