Class CfnAnomalyDetector

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, IAnomalyDetectorRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)", date="2025-10-24T13:34:31.537Z") @Stability(Stable) public class CfnAnomalyDetector extends CfnResource implements IInspectable, IAnomalyDetectorRef, ITaggableV2
AnomalyDetector schema for cloudformation.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.aps.*;
 CfnAnomalyDetector cfnAnomalyDetector = CfnAnomalyDetector.Builder.create(this, "MyCfnAnomalyDetector")
         .alias("alias")
         .configuration(AnomalyDetectorConfigurationProperty.builder()
                 .randomCutForest(RandomCutForestConfigurationProperty.builder()
                         .query("query")
                         // the properties below are optional
                         .ignoreNearExpectedFromAbove(IgnoreNearExpectedProperty.builder()
                                 .amount(123)
                                 .ratio(123)
                                 .build())
                         .ignoreNearExpectedFromBelow(IgnoreNearExpectedProperty.builder()
                                 .amount(123)
                                 .ratio(123)
                                 .build())
                         .sampleSize(123)
                         .shingleSize(123)
                         .build())
                 .build())
         .workspace("workspace")
         // the properties below are optional
         .evaluationIntervalInSeconds(123)
         .labels(List.of(LabelProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .missingDataAction(MissingDataActionProperty.builder()
                 .markAsAnomaly(false)
                 .skip(false)
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnAnomalyDetector

      protected CfnAnomalyDetector(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAnomalyDetector

      protected CfnAnomalyDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAnomalyDetector

      @Stability(Stable) public CfnAnomalyDetector(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAnomalyDetectorProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAnomalyDetectorRef

      @Stability(Stable) @NotNull public AnomalyDetectorReference getAnomalyDetectorRef()
      A reference to a AnomalyDetector resource.
      Specified by:
      getAnomalyDetectorRef in interface IAnomalyDetectorRef
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The AnomalyDetector ARN.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAlias

      @Stability(Stable) @NotNull public String getAlias()
      The AnomalyDetector alias.
    • setAlias

      @Stability(Stable) public void setAlias(@NotNull String value)
      The AnomalyDetector alias.
    • getConfiguration

      @Stability(Stable) @NotNull public Object getConfiguration()
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull IResolvable value)
    • setConfiguration

      @Stability(Stable) public void setConfiguration(@NotNull CfnAnomalyDetector.AnomalyDetectorConfigurationProperty value)
    • getWorkspace

      @Stability(Stable) @NotNull public String getWorkspace()
      An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.
    • setWorkspace

      @Stability(Stable) public void setWorkspace(@NotNull String value)
      An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.
    • getEvaluationIntervalInSeconds

      @Stability(Stable) @Nullable public Number getEvaluationIntervalInSeconds()
      The AnomalyDetector period of detection and metric generation.
    • setEvaluationIntervalInSeconds

      @Stability(Stable) public void setEvaluationIntervalInSeconds(@Nullable Number value)
      The AnomalyDetector period of detection and metric generation.
    • getLabels

      @Stability(Stable) @Nullable public Object getLabels()
      An array of key-value pairs to provide meta-data.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnAnomalyDetector.LabelProperty>

    • setLabels

      @Stability(Stable) public void setLabels(@Nullable IResolvable value)
      An array of key-value pairs to provide meta-data.
    • setLabels

      @Stability(Stable) public void setLabels(@Nullable List<Object> value)
      An array of key-value pairs to provide meta-data.
    • getMissingDataAction

      @Stability(Stable) @Nullable public Object getMissingDataAction()
    • setMissingDataAction

      @Stability(Stable) public void setMissingDataAction(@Nullable IResolvable value)
    • setMissingDataAction

      @Stability(Stable) public void setMissingDataAction(@Nullable CfnAnomalyDetector.MissingDataActionProperty value)
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      An array of key-value pairs to apply to this resource.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.