Class CfnAnomalyDetector
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lookoutmetrics.CfnAnomalyDetector
- All Implemented Interfaces:
IInspectable,IAnomalyDetectorRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:43.240Z")
@Stability(Stable)
public class CfnAnomalyDetector
extends CfnResource
implements IInspectable, IAnomalyDetectorRef
End of support notice: On Oct 9, 2025, AWS will end support for Amazon Lookout for Metrics.
After Oct 9, 2025, you will no longer be able to access the Amazon Lookout for Metrics console or Amazon Lookout for Metrics resources. For more information, see Amazon Lookout for Metrics end of support .
The AWS::LookoutMetrics::AnomalyDetector type creates an anomaly detector.
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.lookoutmetrics.*;
CfnAnomalyDetector cfnAnomalyDetector = CfnAnomalyDetector.Builder.create(this, "MyCfnAnomalyDetector")
.anomalyDetectorConfig(AnomalyDetectorConfigProperty.builder()
.anomalyDetectorFrequency("anomalyDetectorFrequency")
.build())
.metricSetList(List.of(MetricSetProperty.builder()
.metricList(List.of(MetricProperty.builder()
.aggregationFunction("aggregationFunction")
.metricName("metricName")
// the properties below are optional
.namespace("namespace")
.build()))
.metricSetName("metricSetName")
.metricSource(MetricSourceProperty.builder()
.appFlowConfig(AppFlowConfigProperty.builder()
.flowName("flowName")
.roleArn("roleArn")
.build())
.cloudwatchConfig(CloudwatchConfigProperty.builder()
.roleArn("roleArn")
.build())
.rdsSourceConfig(RDSSourceConfigProperty.builder()
.databaseHost("databaseHost")
.databaseName("databaseName")
.databasePort(123)
.dbInstanceIdentifier("dbInstanceIdentifier")
.roleArn("roleArn")
.secretManagerArn("secretManagerArn")
.tableName("tableName")
.vpcConfiguration(VpcConfigurationProperty.builder()
.securityGroupIdList(List.of("securityGroupIdList"))
.subnetIdList(List.of("subnetIdList"))
.build())
.build())
.redshiftSourceConfig(RedshiftSourceConfigProperty.builder()
.clusterIdentifier("clusterIdentifier")
.databaseHost("databaseHost")
.databaseName("databaseName")
.databasePort(123)
.roleArn("roleArn")
.secretManagerArn("secretManagerArn")
.tableName("tableName")
.vpcConfiguration(VpcConfigurationProperty.builder()
.securityGroupIdList(List.of("securityGroupIdList"))
.subnetIdList(List.of("subnetIdList"))
.build())
.build())
.s3SourceConfig(S3SourceConfigProperty.builder()
.fileFormatDescriptor(FileFormatDescriptorProperty.builder()
.csvFormatDescriptor(CsvFormatDescriptorProperty.builder()
.charset("charset")
.containsHeader(false)
.delimiter("delimiter")
.fileCompression("fileCompression")
.headerList(List.of("headerList"))
.quoteSymbol("quoteSymbol")
.build())
.jsonFormatDescriptor(JsonFormatDescriptorProperty.builder()
.charset("charset")
.fileCompression("fileCompression")
.build())
.build())
.roleArn("roleArn")
// the properties below are optional
.historicalDataPathList(List.of("historicalDataPathList"))
.templatedPathList(List.of("templatedPathList"))
.build())
.build())
// the properties below are optional
.dimensionList(List.of("dimensionList"))
.metricSetDescription("metricSetDescription")
.metricSetFrequency("metricSetFrequency")
.offset(123)
.timestampColumn(TimestampColumnProperty.builder()
.columnFormat("columnFormat")
.columnName("columnName")
.build())
.timezone("timezone")
.build()))
// the properties below are optional
.anomalyDetectorDescription("anomalyDetectorDescription")
.anomalyDetectorName("anomalyDetectorName")
.kmsKeyArn("kmsKeyArn")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceContains information about a detector's configuration.static interfaceDetails about an Amazon AppFlow flow datasource.static final classA fluent builder forCfnAnomalyDetector.static interfaceDetails about an Amazon CloudWatch datasource.static interfaceContains information about how a source CSV data file should be analyzed.static interfaceContains information about a source file's formatting.static interfaceContains information about how a source JSON data file should be analyzed.static interfaceA calculation made by contrasting a measure and a dimension from your source data.static interfaceContains information about a dataset.static interfaceContains information about how the source data should be interpreted.static interfaceContains information about the Amazon Relational Database Service (RDS) configuration.static interfaceProvides information about the Amazon Redshift database configuration.static interfaceContains information about the configuration of the S3 bucket that contains source files.static interfaceContains information about the column used to track time in a source data file.static interfaceContains configuration information about the Amazon Virtual Private Cloud (VPC).Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.lookoutmetrics.IAnomalyDetectorRef
IAnomalyDetectorRef.Jsii$Default, IAnomalyDetectorRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAnomalyDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAnomalyDetector(software.amazon.jsii.JsiiObjectRef objRef) CfnAnomalyDetector(software.constructs.Construct scope, String id, CfnAnomalyDetectorProps props) -
Method Summary
Modifier and TypeMethodDescriptionContains information about the configuration of the anomaly detector.A description of the detector.The name of the detector.A reference to a AnomalyDetector resource.The Amazon Resource Name (ARN) of the detector.The ARN of the KMS key to use to encrypt your data.The detector's dataset.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidContains information about the configuration of the anomaly detector.voidContains information about the configuration of the anomaly detector.voidA description of the detector.voidsetAnomalyDetectorName(String value) The name of the detector.voidsetKmsKeyArn(String value) The ARN of the KMS key to use to encrypt your data.voidsetMetricSetList(List<Object> value) The detector's dataset.voidsetMetricSetList(IResolvable value) The detector's dataset.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAnomalyDetectorRef
A reference to a AnomalyDetector resource.- Specified by:
getAnomalyDetectorRefin interfaceIAnomalyDetectorRef
-
getAttrArn
The Amazon Resource Name (ARN) of the detector.For example,
arn:aws:lookoutmetrics:us-east-2:123456789012:AnomalyDetector:my-detector -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getAnomalyDetectorConfig
Contains information about the configuration of the anomaly detector.Returns union: either
IResolvableorCfnAnomalyDetector.AnomalyDetectorConfigProperty -
setAnomalyDetectorConfig
Contains information about the configuration of the anomaly detector. -
setAnomalyDetectorConfig
@Stability(Stable) public void setAnomalyDetectorConfig(@NotNull CfnAnomalyDetector.AnomalyDetectorConfigProperty value) Contains information about the configuration of the anomaly detector. -
getMetricSetList
The detector's dataset.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnAnomalyDetector.MetricSetProperty> -
setMetricSetList
The detector's dataset. -
setMetricSetList
The detector's dataset. -
getAnomalyDetectorDescription
A description of the detector. -
setAnomalyDetectorDescription
A description of the detector. -
getAnomalyDetectorName
The name of the detector. -
setAnomalyDetectorName
The name of the detector. -
getKmsKeyArn
The ARN of the KMS key to use to encrypt your data. -
setKmsKeyArn
The ARN of the KMS key to use to encrypt your data.
-