/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace CloudWatchLogs { namespace Model { /** */ class CreateLogAnomalyDetectorRequest : public CloudWatchLogsRequest { public: AWS_CLOUDWATCHLOGS_API CreateLogAnomalyDetectorRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateLogAnomalyDetector"; } AWS_CLOUDWATCHLOGS_API Aws::String SerializePayload() const override; AWS_CLOUDWATCHLOGS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline const Aws::Vector& GetLogGroupArnList() const{ return m_logGroupArnList; } /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline bool LogGroupArnListHasBeenSet() const { return m_logGroupArnListHasBeenSet; } /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline void SetLogGroupArnList(const Aws::Vector& value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList = value; } /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline void SetLogGroupArnList(Aws::Vector&& value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList = std::move(value); } /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline CreateLogAnomalyDetectorRequest& WithLogGroupArnList(const Aws::Vector& value) { SetLogGroupArnList(value); return *this;} /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline CreateLogAnomalyDetectorRequest& WithLogGroupArnList(Aws::Vector&& value) { SetLogGroupArnList(std::move(value)); return *this;} /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline CreateLogAnomalyDetectorRequest& AddLogGroupArnList(const Aws::String& value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList.push_back(value); return *this; } /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline CreateLogAnomalyDetectorRequest& AddLogGroupArnList(Aws::String&& value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList.push_back(std::move(value)); return *this; } /** *

An array containing the ARN of the log group that this anomaly detector will * watch. You can specify only one log group ARN.

*/ inline CreateLogAnomalyDetectorRequest& AddLogGroupArnList(const char* value) { m_logGroupArnListHasBeenSet = true; m_logGroupArnList.push_back(value); return *this; } /** *

A name for this anomaly detector.

*/ inline const Aws::String& GetDetectorName() const{ return m_detectorName; } /** *

A name for this anomaly detector.

*/ inline bool DetectorNameHasBeenSet() const { return m_detectorNameHasBeenSet; } /** *

A name for this anomaly detector.

*/ inline void SetDetectorName(const Aws::String& value) { m_detectorNameHasBeenSet = true; m_detectorName = value; } /** *

A name for this anomaly detector.

*/ inline void SetDetectorName(Aws::String&& value) { m_detectorNameHasBeenSet = true; m_detectorName = std::move(value); } /** *

A name for this anomaly detector.

*/ inline void SetDetectorName(const char* value) { m_detectorNameHasBeenSet = true; m_detectorName.assign(value); } /** *

A name for this anomaly detector.

*/ inline CreateLogAnomalyDetectorRequest& WithDetectorName(const Aws::String& value) { SetDetectorName(value); return *this;} /** *

A name for this anomaly detector.

*/ inline CreateLogAnomalyDetectorRequest& WithDetectorName(Aws::String&& value) { SetDetectorName(std::move(value)); return *this;} /** *

A name for this anomaly detector.

*/ inline CreateLogAnomalyDetectorRequest& WithDetectorName(const char* value) { SetDetectorName(value); return *this;} /** *

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 evaluationFrequency .

*/ inline const EvaluationFrequency& GetEvaluationFrequency() const{ return m_evaluationFrequency; } /** *

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 evaluationFrequency .

*/ inline bool EvaluationFrequencyHasBeenSet() const { return m_evaluationFrequencyHasBeenSet; } /** *

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 evaluationFrequency .

*/ inline void SetEvaluationFrequency(const EvaluationFrequency& value) { m_evaluationFrequencyHasBeenSet = true; m_evaluationFrequency = value; } /** *

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 evaluationFrequency .

*/ inline void SetEvaluationFrequency(EvaluationFrequency&& value) { m_evaluationFrequencyHasBeenSet = true; m_evaluationFrequency = std::move(value); } /** *

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 evaluationFrequency .

*/ inline CreateLogAnomalyDetectorRequest& WithEvaluationFrequency(const EvaluationFrequency& value) { SetEvaluationFrequency(value); return *this;} /** *

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 evaluationFrequency .

*/ inline CreateLogAnomalyDetectorRequest& WithEvaluationFrequency(EvaluationFrequency&& value) { SetEvaluationFrequency(std::move(value)); return *this;} /** *

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 Filter * and Pattern Syntax.

*/ inline const Aws::String& GetFilterPattern() const{ return m_filterPattern; } /** *

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 Filter * and Pattern Syntax.

*/ inline bool FilterPatternHasBeenSet() const { return m_filterPatternHasBeenSet; } /** *

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 Filter * and Pattern Syntax.

*/ inline void SetFilterPattern(const Aws::String& value) { m_filterPatternHasBeenSet = true; m_filterPattern = value; } /** *

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 Filter * and Pattern Syntax.

*/ inline void SetFilterPattern(Aws::String&& value) { m_filterPatternHasBeenSet = true; m_filterPattern = std::move(value); } /** *

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 Filter * and Pattern Syntax.

*/ inline void SetFilterPattern(const char* value) { m_filterPatternHasBeenSet = true; m_filterPattern.assign(value); } /** *

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 Filter * and Pattern Syntax.

*/ inline CreateLogAnomalyDetectorRequest& WithFilterPattern(const Aws::String& value) { SetFilterPattern(value); return *this;} /** *

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 Filter * and Pattern Syntax.

*/ inline CreateLogAnomalyDetectorRequest& WithFilterPattern(Aws::String&& value) { SetFilterPattern(std::move(value)); return *this;} /** *

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 Filter * and Pattern Syntax.

*/ inline CreateLogAnomalyDetectorRequest& WithFilterPattern(const char* value) { SetFilterPattern(value); return *this;} /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline CreateLogAnomalyDetectorRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline CreateLogAnomalyDetectorRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

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.

For * more information about using a KMS key and to see the required IAM policy, see * Use * a KMS key with an anomaly detector.

*/ inline CreateLogAnomalyDetectorRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

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 anomalyVisibilityTime, it will be considered normal going * forward and will not be detected as an anomaly.

*/ inline long long GetAnomalyVisibilityTime() const{ return m_anomalyVisibilityTime; } /** *

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 anomalyVisibilityTime, it will be considered normal going * forward and will not be detected as an anomaly.

*/ inline bool AnomalyVisibilityTimeHasBeenSet() const { return m_anomalyVisibilityTimeHasBeenSet; } /** *

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 anomalyVisibilityTime, it will be considered normal going * forward and will not be detected as an anomaly.

*/ inline void SetAnomalyVisibilityTime(long long value) { m_anomalyVisibilityTimeHasBeenSet = true; m_anomalyVisibilityTime = value; } /** *

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 anomalyVisibilityTime, it will be considered normal going * forward and will not be detected as an anomaly.

*/ inline CreateLogAnomalyDetectorRequest& WithAnomalyVisibilityTime(long long value) { SetAnomalyVisibilityTime(value); return *this;} /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

An optional list of key-value pairs to associate with the resource.

*

For more information about tagging, see Tagging * Amazon Web Services resources

*/ inline CreateLogAnomalyDetectorRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::Vector m_logGroupArnList; bool m_logGroupArnListHasBeenSet = false; Aws::String m_detectorName; bool m_detectorNameHasBeenSet = false; EvaluationFrequency m_evaluationFrequency; bool m_evaluationFrequencyHasBeenSet = false; Aws::String m_filterPattern; bool m_filterPatternHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; long long m_anomalyVisibilityTime; bool m_anomalyVisibilityTimeHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws