CfnLogAnomalyDetectorPropsMixin
- class aws_cdk.mixins_preview.aws_logs.mixins.CfnLogAnomalyDetectorPropsMixin(props, *, strategy=None)
Bases:
MixinCreates or updates an anomaly detector that regularly scans one or more log groups and look for patterns and anomalies in the logs.
An anomaly detector can help surface issues by automatically discovering anomalies in your log event traffic. An anomaly detector uses machine learning algorithms to scan log events and find patterns . A pattern is a shared text structure that recurs among your log fields. Patterns provide a useful tool for analyzing large sets of logs because a large number of log events can often be compressed into a few patterns.
The anomaly detector uses pattern recognition to find
anomalies, which are unusual log events. It compares current log events and patterns with trained baselines.Fields within a pattern are called tokens . Fields that vary within a pattern, such as a request ID or timestamp, are referred to as dynamic tokens and represented by
<*>.For more information see Log anomaly detection .
- See:
- CloudformationResource:
AWS::Logs::LogAnomalyDetector
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins cfn_log_anomaly_detector_props_mixin = logs_mixins.CfnLogAnomalyDetectorPropsMixin(logs_mixins.CfnLogAnomalyDetectorMixinProps( account_id="accountId", anomaly_visibility_time=123, detector_name="detectorName", evaluation_frequency="evaluationFrequency", filter_pattern="filterPattern", kms_key_id="kmsKeyId", log_group_arn_list=["logGroupArnList"] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Logs::LogAnomalyDetector.- Parameters:
props (
Union[CfnLogAnomalyDetectorMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['accountId', 'anomalyVisibilityTime', 'detectorName', 'evaluationFrequency', 'filterPattern', 'kmsKeyId', 'logGroupArnList']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental