aws.cloudwatch.LogAnomalyDetector
Explore with Pulumi AI
Resource for managing an AWS CloudWatch Logs Log Anomaly Detector.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test: aws.cloudwatch.LogGroup[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
    test.push(new aws.cloudwatch.LogGroup(`test-${range.value}`, {name: `testing-${range.value}`}));
}
const testLogAnomalyDetector = new aws.cloudwatch.LogAnomalyDetector("test", {
    detectorName: "testing",
    logGroupArnLists: [test[0].arn],
    anomalyVisibilityTime: 7,
    evaluationFrequency: "TEN_MIN",
    enabled: false,
});
import pulumi
import pulumi_aws as aws
test = []
for range in [{"value": i} for i in range(0, 2)]:
    test.append(aws.cloudwatch.LogGroup(f"test-{range['value']}", name=f"testing-{range['value']}"))
test_log_anomaly_detector = aws.cloudwatch.LogAnomalyDetector("test",
    detector_name="testing",
    log_group_arn_lists=[test[0].arn],
    anomaly_visibility_time=7,
    evaluation_frequency="TEN_MIN",
    enabled=False)
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		var test []*cloudwatch.LogGroup
		for index := 0; index < 2; index++ {
			key0 := index
			val0 := index
			__res, err := cloudwatch.NewLogGroup(ctx, fmt.Sprintf("test-%v", key0), &cloudwatch.LogGroupArgs{
				Name: pulumi.Sprintf("testing-%v", val0),
			})
			if err != nil {
				return err
			}
			test = append(test, __res)
		}
		_, err = cloudwatch.NewLogAnomalyDetector(ctx, "test", &cloudwatch.LogAnomalyDetectorArgs{
			DetectorName: pulumi.String("testing"),
			LogGroupArnLists: pulumi.StringArray{
				test[0].Arn,
			},
			AnomalyVisibilityTime: pulumi.Int(7),
			EvaluationFrequency:   pulumi.String("TEN_MIN"),
			Enabled:               pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var test = new List<Aws.CloudWatch.LogGroup>();
    for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
    {
        var range = new { Value = rangeIndex };
        test.Add(new Aws.CloudWatch.LogGroup($"test-{range.Value}", new()
        {
            Name = $"testing-{range.Value}",
        }));
    }
    var testLogAnomalyDetector = new Aws.CloudWatch.LogAnomalyDetector("test", new()
    {
        DetectorName = "testing",
        LogGroupArnLists = new[]
        {
            test[0].Arn,
        },
        AnomalyVisibilityTime = 7,
        EvaluationFrequency = "TEN_MIN",
        Enabled = false,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogGroup;
import com.pulumi.aws.cloudwatch.LogGroupArgs;
import com.pulumi.aws.cloudwatch.LogAnomalyDetector;
import com.pulumi.aws.cloudwatch.LogAnomalyDetectorArgs;
import com.pulumi.codegen.internal.KeyedValue;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        for (var i = 0; i < 2; i++) {
            new LogGroup("test-" + i, LogGroupArgs.builder()
                .name(String.format("testing-%s", range.value()))
                .build());
        
}
        var testLogAnomalyDetector = new LogAnomalyDetector("testLogAnomalyDetector", LogAnomalyDetectorArgs.builder()
            .detectorName("testing")
            .logGroupArnLists(test[0].arn())
            .anomalyVisibilityTime(7)
            .evaluationFrequency("TEN_MIN")
            .enabled("false")
            .build());
    }
}
resources:
  test:
    type: aws:cloudwatch:LogGroup
    properties:
      name: testing-${range.value}
    options: {}
  testLogAnomalyDetector:
    type: aws:cloudwatch:LogAnomalyDetector
    name: test
    properties:
      detectorName: testing
      logGroupArnLists:
        - ${test[0].arn}
      anomalyVisibilityTime: 7
      evaluationFrequency: TEN_MIN
      enabled: 'false'
Create LogAnomalyDetector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LogAnomalyDetector(name: string, args: LogAnomalyDetectorArgs, opts?: CustomResourceOptions);@overload
def LogAnomalyDetector(resource_name: str,
                       args: LogAnomalyDetectorArgs,
                       opts: Optional[ResourceOptions] = None)
@overload
def LogAnomalyDetector(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       enabled: Optional[bool] = None,
                       log_group_arn_lists: Optional[Sequence[str]] = None,
                       anomaly_visibility_time: Optional[int] = None,
                       detector_name: Optional[str] = None,
                       evaluation_frequency: Optional[str] = None,
                       filter_pattern: Optional[str] = None,
                       kms_key_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)func NewLogAnomalyDetector(ctx *Context, name string, args LogAnomalyDetectorArgs, opts ...ResourceOption) (*LogAnomalyDetector, error)public LogAnomalyDetector(string name, LogAnomalyDetectorArgs args, CustomResourceOptions? opts = null)
public LogAnomalyDetector(String name, LogAnomalyDetectorArgs args)
public LogAnomalyDetector(String name, LogAnomalyDetectorArgs args, CustomResourceOptions options)
type: aws:cloudwatch:LogAnomalyDetector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args LogAnomalyDetectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LogAnomalyDetectorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LogAnomalyDetectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LogAnomalyDetectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LogAnomalyDetectorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var logAnomalyDetectorResource = new Aws.CloudWatch.LogAnomalyDetector("logAnomalyDetectorResource", new()
{
    Enabled = false,
    LogGroupArnLists = new[]
    {
        "string",
    },
    AnomalyVisibilityTime = 0,
    DetectorName = "string",
    EvaluationFrequency = "string",
    FilterPattern = "string",
    KmsKeyId = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := cloudwatch.NewLogAnomalyDetector(ctx, "logAnomalyDetectorResource", &cloudwatch.LogAnomalyDetectorArgs{
	Enabled: pulumi.Bool(false),
	LogGroupArnLists: pulumi.StringArray{
		pulumi.String("string"),
	},
	AnomalyVisibilityTime: pulumi.Int(0),
	DetectorName:          pulumi.String("string"),
	EvaluationFrequency:   pulumi.String("string"),
	FilterPattern:         pulumi.String("string"),
	KmsKeyId:              pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var logAnomalyDetectorResource = new LogAnomalyDetector("logAnomalyDetectorResource", LogAnomalyDetectorArgs.builder()
    .enabled(false)
    .logGroupArnLists("string")
    .anomalyVisibilityTime(0)
    .detectorName("string")
    .evaluationFrequency("string")
    .filterPattern("string")
    .kmsKeyId("string")
    .tags(Map.of("string", "string"))
    .build());
log_anomaly_detector_resource = aws.cloudwatch.LogAnomalyDetector("logAnomalyDetectorResource",
    enabled=False,
    log_group_arn_lists=["string"],
    anomaly_visibility_time=0,
    detector_name="string",
    evaluation_frequency="string",
    filter_pattern="string",
    kms_key_id="string",
    tags={
        "string": "string",
    })
const logAnomalyDetectorResource = new aws.cloudwatch.LogAnomalyDetector("logAnomalyDetectorResource", {
    enabled: false,
    logGroupArnLists: ["string"],
    anomalyVisibilityTime: 0,
    detectorName: "string",
    evaluationFrequency: "string",
    filterPattern: "string",
    kmsKeyId: "string",
    tags: {
        string: "string",
    },
});
type: aws:cloudwatch:LogAnomalyDetector
properties:
    anomalyVisibilityTime: 0
    detectorName: string
    enabled: false
    evaluationFrequency: string
    filterPattern: string
    kmsKeyId: string
    logGroupArnLists:
        - string
    tags:
        string: string
LogAnomalyDetector Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LogAnomalyDetector resource accepts the following input properties:
- Enabled bool
- LogGroup List<string>Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- AnomalyVisibility intTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- DetectorName string
- Name for this anomaly detector.
- EvaluationFrequency string
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- FilterPattern string
- 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.
- KmsKey stringId 
- Optionally assigns a AWS 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.
- Dictionary<string, string>
- Enabled bool
- LogGroup []stringArn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- AnomalyVisibility intTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- DetectorName string
- Name for this anomaly detector.
- EvaluationFrequency string
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- FilterPattern string
- 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.
- KmsKey stringId 
- Optionally assigns a AWS 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.
- map[string]string
- enabled Boolean
- logGroup List<String>Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- anomalyVisibility IntegerTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- detectorName String
- Name for this anomaly detector.
- evaluationFrequency String
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filterPattern String
- 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.
- kmsKey StringId 
- Optionally assigns a AWS 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.
- Map<String,String>
- enabled boolean
- logGroup string[]Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- anomalyVisibility numberTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- detectorName string
- Name for this anomaly detector.
- evaluationFrequency string
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filterPattern string
- 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.
- kmsKey stringId 
- Optionally assigns a AWS 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.
- {[key: string]: string}
- enabled bool
- log_group_ Sequence[str]arn_ lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- anomaly_visibility_ inttime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- detector_name str
- Name for this anomaly detector.
- evaluation_frequency str
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filter_pattern str
- 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.
- kms_key_ strid 
- Optionally assigns a AWS 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.
- Mapping[str, str]
- enabled Boolean
- logGroup List<String>Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- anomalyVisibility NumberTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- detectorName String
- Name for this anomaly detector.
- evaluationFrequency String
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filterPattern String
- 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.
- kmsKey StringId 
- Optionally assigns a AWS 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.
- Map<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the LogAnomalyDetector resource produces the following output properties:
Look up Existing LogAnomalyDetector Resource
Get an existing LogAnomalyDetector resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: LogAnomalyDetectorState, opts?: CustomResourceOptions): LogAnomalyDetector@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        anomaly_visibility_time: Optional[int] = None,
        arn: Optional[str] = None,
        detector_name: Optional[str] = None,
        enabled: Optional[bool] = None,
        evaluation_frequency: Optional[str] = None,
        filter_pattern: Optional[str] = None,
        kms_key_id: Optional[str] = None,
        log_group_arn_lists: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> LogAnomalyDetectorfunc GetLogAnomalyDetector(ctx *Context, name string, id IDInput, state *LogAnomalyDetectorState, opts ...ResourceOption) (*LogAnomalyDetector, error)public static LogAnomalyDetector Get(string name, Input<string> id, LogAnomalyDetectorState? state, CustomResourceOptions? opts = null)public static LogAnomalyDetector get(String name, Output<String> id, LogAnomalyDetectorState state, CustomResourceOptions options)resources:  _:    type: aws:cloudwatch:LogAnomalyDetector    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AnomalyVisibility intTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- Arn string
- ARN of the log anomaly detector that you just created.
- DetectorName string
- Name for this anomaly detector.
- Enabled bool
- EvaluationFrequency string
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- FilterPattern string
- 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.
- KmsKey stringId 
- Optionally assigns a AWS 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.
- LogGroup List<string>Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- Dictionary<string, string>
- Dictionary<string, string>
- AnomalyVisibility intTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- Arn string
- ARN of the log anomaly detector that you just created.
- DetectorName string
- Name for this anomaly detector.
- Enabled bool
- EvaluationFrequency string
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- FilterPattern string
- 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.
- KmsKey stringId 
- Optionally assigns a AWS 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.
- LogGroup []stringArn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- map[string]string
- map[string]string
- anomalyVisibility IntegerTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- arn String
- ARN of the log anomaly detector that you just created.
- detectorName String
- Name for this anomaly detector.
- enabled Boolean
- evaluationFrequency String
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filterPattern String
- 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.
- kmsKey StringId 
- Optionally assigns a AWS 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.
- logGroup List<String>Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- Map<String,String>
- Map<String,String>
- anomalyVisibility numberTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- arn string
- ARN of the log anomaly detector that you just created.
- detectorName string
- Name for this anomaly detector.
- enabled boolean
- evaluationFrequency string
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filterPattern string
- 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.
- kmsKey stringId 
- Optionally assigns a AWS 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.
- logGroup string[]Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- {[key: string]: string}
- {[key: string]: string}
- anomaly_visibility_ inttime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- arn str
- ARN of the log anomaly detector that you just created.
- detector_name str
- Name for this anomaly detector.
- enabled bool
- evaluation_frequency str
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filter_pattern str
- 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.
- kms_key_ strid 
- Optionally assigns a AWS 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.
- log_group_ Sequence[str]arn_ lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- Mapping[str, str]
- Mapping[str, str]
- anomalyVisibility NumberTime 
- 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 anomaly_visibility_time, it will be considered normal going forward and will not be detected as an anomaly. Valid Range: Minimum value of 7. Maximum value of 90.
- arn String
- ARN of the log anomaly detector that you just created.
- detectorName String
- Name for this anomaly detector.
- enabled Boolean
- evaluationFrequency String
- 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 evaluation_frequency. Valid Values:ONE_MIN | FIVE_MIN | TEN_MIN | FIFTEEN_MIN | THIRTY_MIN | ONE_HOUR.
- filterPattern String
- 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.
- kmsKey StringId 
- Optionally assigns a AWS 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.
- logGroup List<String>Arn Lists 
- Array containing the ARN of the log group that this anomaly detector will watch. You can specify only one log group ARN. - The following arguments are optional: 
- Map<String>
- Map<String>
Import
Using pulumi import, import CloudWatch Log Anomaly Detector using the example_id_arg. For example:
$ pulumi import aws:cloudwatch/logAnomalyDetector:LogAnomalyDetector example log_anomaly_detector-arn-12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.