1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. logs
  6. LogAnomalyDetector

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi
aws-native logo aws-native logo AWS Cloud Control

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi

    The AWS::Logs::LogAnomalyDetector resource specifies a CloudWatch Logs LogAnomalyDetector.

    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: Optional[LogAnomalyDetectorArgs] = None,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def LogAnomalyDetector(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           account_id: Optional[str] = None,
                           anomaly_visibility_time: Optional[float] = None,
                           detector_name: Optional[str] = None,
                           evaluation_frequency: Optional[LogAnomalyDetectorEvaluationFrequency] = None,
                           filter_pattern: Optional[str] = None,
                           kms_key_id: Optional[str] = None,
                           log_group_arn_list: Optional[Sequence[str]] = None)
    func NewLogAnomalyDetector(ctx *Context, name string, args *LogAnomalyDetectorArgs, opts ...ResourceOption) (*LogAnomalyDetector, error)
    public LogAnomalyDetector(string name, LogAnomalyDetectorArgs? args = null, CustomResourceOptions? opts = null)
    public LogAnomalyDetector(String name, LogAnomalyDetectorArgs args)
    public LogAnomalyDetector(String name, LogAnomalyDetectorArgs args, CustomResourceOptions options)
    
    type: aws-native:logs:LogAnomalyDetector
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws-native_logs_log_anomaly_detector" "name" {
        # resource properties
    }

    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.

    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:

    AccountId string
    Account ID for owner of detector
    AnomalyVisibilityTime double
    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.
    DetectorName string
    Name of detector
    EvaluationFrequency Pulumi.AwsNative.Logs.LogAnomalyDetectorEvaluationFrequency
    How often log group is evaluated
    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 .
    KmsKeyId string
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    LogGroupArnList List<string>
    List of Arns for the given log group
    AccountId string
    Account ID for owner of detector
    AnomalyVisibilityTime float64
    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.
    DetectorName string
    Name of detector
    EvaluationFrequency LogAnomalyDetectorEvaluationFrequency
    How often log group is evaluated
    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 .
    KmsKeyId string
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    LogGroupArnList []string
    List of Arns for the given log group
    account_id string
    Account ID for owner of detector
    anomaly_visibility_time number
    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.
    detector_name string
    Name of detector
    evaluation_frequency "FIVE_MIN" | "TEN_MIN" | "FIFTEEN_MIN" | "THIRTY_MIN" | "ONE_HOUR"
    How often log group is evaluated
    filter_pattern 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 .
    kms_key_id string
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    log_group_arn_list list(string)
    List of Arns for the given log group
    accountId String
    Account ID for owner of detector
    anomalyVisibilityTime Double
    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.
    detectorName String
    Name of detector
    evaluationFrequency LogAnomalyDetectorEvaluationFrequency
    How often log group is evaluated
    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 .
    kmsKeyId String
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    logGroupArnList List<String>
    List of Arns for the given log group
    accountId string
    Account ID for owner of detector
    anomalyVisibilityTime number
    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.
    detectorName string
    Name of detector
    evaluationFrequency LogAnomalyDetectorEvaluationFrequency
    How often log group is evaluated
    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 .
    kmsKeyId string
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    logGroupArnList string[]
    List of Arns for the given log group
    account_id str
    Account ID for owner of detector
    anomaly_visibility_time float
    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.
    detector_name str
    Name of detector
    evaluation_frequency LogAnomalyDetectorEvaluationFrequency
    How often log group is evaluated
    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_id str
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    log_group_arn_list Sequence[str]
    List of Arns for the given log group
    accountId String
    Account ID for owner of detector
    anomalyVisibilityTime Number
    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.
    detectorName String
    Name of detector
    evaluationFrequency "FIVE_MIN" | "TEN_MIN" | "FIFTEEN_MIN" | "THIRTY_MIN" | "ONE_HOUR"
    How often log group is evaluated
    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 .
    kmsKeyId String
    The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
    logGroupArnList List<String>
    List of Arns for the given log group

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LogAnomalyDetector resource produces the following output properties:

    AnomalyDetectorArn string
    ARN of LogAnomalyDetector
    AnomalyDetectorStatus string
    Current status of detector.
    CreationTimeStamp double
    When detector was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedTimeStamp double
    When detector was lsat modified.
    AnomalyDetectorArn string
    ARN of LogAnomalyDetector
    AnomalyDetectorStatus string
    Current status of detector.
    CreationTimeStamp float64
    When detector was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModifiedTimeStamp float64
    When detector was lsat modified.
    anomaly_detector_arn string
    ARN of LogAnomalyDetector
    anomaly_detector_status string
    Current status of detector.
    creation_time_stamp number
    When detector was created.
    id string
    The provider-assigned unique ID for this managed resource.
    last_modified_time_stamp number
    When detector was lsat modified.
    anomalyDetectorArn String
    ARN of LogAnomalyDetector
    anomalyDetectorStatus String
    Current status of detector.
    creationTimeStamp Double
    When detector was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedTimeStamp Double
    When detector was lsat modified.
    anomalyDetectorArn string
    ARN of LogAnomalyDetector
    anomalyDetectorStatus string
    Current status of detector.
    creationTimeStamp number
    When detector was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModifiedTimeStamp number
    When detector was lsat modified.
    anomaly_detector_arn str
    ARN of LogAnomalyDetector
    anomaly_detector_status str
    Current status of detector.
    creation_time_stamp float
    When detector was created.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified_time_stamp float
    When detector was lsat modified.
    anomalyDetectorArn String
    ARN of LogAnomalyDetector
    anomalyDetectorStatus String
    Current status of detector.
    creationTimeStamp Number
    When detector was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModifiedTimeStamp Number
    When detector was lsat modified.

    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>, opts?: CustomResourceOptions): LogAnomalyDetector
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> LogAnomalyDetector
    func GetLogAnomalyDetector(ctx *Context, name string, id IDInput, state *LogAnomalyDetectorState, opts ...ResourceOption) (*LogAnomalyDetector, error)
    public static LogAnomalyDetector Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static LogAnomalyDetector get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingLogAnomalyDetector:    type: aws-native:logs:LogAnomalyDetector    get:      id: ${id}
    import {
      to = aws-native_logs_log_anomaly_detector.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state LogAnomalyDetectorState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Supporting Types

    LogAnomalyDetectorEvaluationFrequency

    How often log group is evaluated

    NameValue
    FiveMinFIVE_MIN
    TenMinTEN_MIN
    FifteenMinFIFTEEN_MIN
    ThirtyMinTHIRTY_MIN
    OneHourONE_HOUR
    NameValue
    LogAnomalyDetectorEvaluationFrequencyFiveMinFIVE_MIN
    LogAnomalyDetectorEvaluationFrequencyTenMinTEN_MIN
    LogAnomalyDetectorEvaluationFrequencyFifteenMinFIFTEEN_MIN
    LogAnomalyDetectorEvaluationFrequencyThirtyMinTHIRTY_MIN
    LogAnomalyDetectorEvaluationFrequencyOneHourONE_HOUR
    Value
    FIVE_MIN
    TEN_MIN
    FIFTEEN_MIN
    THIRTY_MIN
    ONE_HOUR
    NameValue
    FiveMinFIVE_MIN
    TenMinTEN_MIN
    FifteenMinFIFTEEN_MIN
    ThirtyMinTHIRTY_MIN
    OneHourONE_HOUR
    NameValue
    FiveMinFIVE_MIN
    TenMinTEN_MIN
    FifteenMinFIFTEEN_MIN
    ThirtyMinTHIRTY_MIN
    OneHourONE_HOUR
    NameValue
    FIVE_MINFIVE_MIN
    TEN_MINTEN_MIN
    FIFTEEN_MINFIFTEEN_MIN
    THIRTY_MINTHIRTY_MIN
    ONE_HOURONE_HOUR
    Value
    FIVE_MIN
    TEN_MIN
    FIFTEEN_MIN
    THIRTY_MIN
    ONE_HOUR

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo AWS Cloud Control

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.86.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial