Skip to content
v2.276.0

CfnAnomalyDetectorProps Struct ​

Properties for defining a CfnAnomalyDetector.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lookoutmetrics as lookoutmetrics } from 'aws-cdk-lib';
const cfnAnomalyDetectorProps: lookoutmetrics.CfnAnomalyDetectorProps = {
  anomalyDetectorConfig: {
    anomalyDetectorFrequency: 'anomalyDetectorFrequency',
  },
  metricSetList: [{
    metricList: [{
      aggregationFunction: 'aggregationFunction',
      metricName: 'metricName',

      // the properties below are optional
      namespace: 'namespace',
    }],
    metricSetName: 'metricSetName',
    metricSource: {
      appFlowConfig: {
        flowName: 'flowName',
        roleArn: 'roleArn',
      },
      cloudwatchConfig: {
        roleArn: 'roleArn',
      },
      rdsSourceConfig: {
        databaseHost: 'databaseHost',
        databaseName: 'databaseName',
        databasePort: 123,
        dbInstanceIdentifier: 'dbInstanceIdentifier',
        roleArn: 'roleArn',
        secretManagerArn: 'secretManagerArn',
        tableName: 'tableName',
        vpcConfiguration: {
          securityGroupIdList: ['securityGroupIdList'],
          subnetIdList: ['subnetIdList'],
        },
      },
      redshiftSourceConfig: {
        clusterIdentifier: 'clusterIdentifier',
        databaseHost: 'databaseHost',
        databaseName: 'databaseName',
        databasePort: 123,
        roleArn: 'roleArn',
        secretManagerArn: 'secretManagerArn',
        tableName: 'tableName',
        vpcConfiguration: {
          securityGroupIdList: ['securityGroupIdList'],
          subnetIdList: ['subnetIdList'],
        },
      },
      s3SourceConfig: {
        fileFormatDescriptor: {
          csvFormatDescriptor: {
            charset: 'charset',
            containsHeader: false,
            delimiter: 'delimiter',
            fileCompression: 'fileCompression',
            headerList: ['headerList'],
            quoteSymbol: 'quoteSymbol',
          },
          jsonFormatDescriptor: {
            charset: 'charset',
            fileCompression: 'fileCompression',
          },
        },
        roleArn: 'roleArn',

        // the properties below are optional
        historicalDataPathList: ['historicalDataPathList'],
        templatedPathList: ['templatedPathList'],
      },
    },

    // the properties below are optional
    dimensionList: ['dimensionList'],
    metricSetDescription: 'metricSetDescription',
    metricSetFrequency: 'metricSetFrequency',
    offset: 123,
    timestampColumn: {
      columnFormat: 'columnFormat',
      columnName: 'columnName',
    },
    timezone: 'timezone',
  }],

  // the properties below are optional
  anomalyDetectorDescription: 'anomalyDetectorDescription',
  anomalyDetectorName: 'anomalyDetectorName',
  kmsKeyArn: 'kmsKeyArn',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lookoutmetrics as lookoutmetrics

cfn_anomaly_detector_props = lookoutmetrics.CfnAnomalyDetectorProps(
    anomaly_detector_config=lookoutmetrics.CfnAnomalyDetector.AnomalyDetectorConfigProperty(
        anomaly_detector_frequency="anomalyDetectorFrequency"
    ),
    metric_set_list=[lookoutmetrics.CfnAnomalyDetector.MetricSetProperty(
        metric_list=[lookoutmetrics.CfnAnomalyDetector.MetricProperty(
            aggregation_function="aggregationFunction",
            metric_name="metricName",

            # the properties below are optional
            namespace="namespace"
        )],
        metric_set_name="metricSetName",
        metric_source=lookoutmetrics.CfnAnomalyDetector.MetricSourceProperty(
            app_flow_config=lookoutmetrics.CfnAnomalyDetector.AppFlowConfigProperty(
                flow_name="flowName",
                role_arn="roleArn"
            ),
            cloudwatch_config=lookoutmetrics.CfnAnomalyDetector.CloudwatchConfigProperty(
                role_arn="roleArn"
            ),
            rds_source_config=lookoutmetrics.CfnAnomalyDetector.RDSSourceConfigProperty(
                database_host="databaseHost",
                database_name="databaseName",
                database_port=123,
                db_instance_identifier="dbInstanceIdentifier",
                role_arn="roleArn",
                secret_manager_arn="secretManagerArn",
                table_name="tableName",
                vpc_configuration=lookoutmetrics.CfnAnomalyDetector.VpcConfigurationProperty(
                    security_group_id_list=["securityGroupIdList"],
                    subnet_id_list=["subnetIdList"]
                )
            ),
            redshift_source_config=lookoutmetrics.CfnAnomalyDetector.RedshiftSourceConfigProperty(
                cluster_identifier="clusterIdentifier",
                database_host="databaseHost",
                database_name="databaseName",
                database_port=123,
                role_arn="roleArn",
                secret_manager_arn="secretManagerArn",
                table_name="tableName",
                vpc_configuration=lookoutmetrics.CfnAnomalyDetector.VpcConfigurationProperty(
                    security_group_id_list=["securityGroupIdList"],
                    subnet_id_list=["subnetIdList"]
                )
            ),
            s3_source_config=lookoutmetrics.CfnAnomalyDetector.S3SourceConfigProperty(
                file_format_descriptor=lookoutmetrics.CfnAnomalyDetector.FileFormatDescriptorProperty(
                    csv_format_descriptor=lookoutmetrics.CfnAnomalyDetector.CsvFormatDescriptorProperty(
                        charset="charset",
                        contains_header=False,
                        delimiter="delimiter",
                        file_compression="fileCompression",
                        header_list=["headerList"],
                        quote_symbol="quoteSymbol"
                    ),
                    json_format_descriptor=lookoutmetrics.CfnAnomalyDetector.JsonFormatDescriptorProperty(
                        charset="charset",
                        file_compression="fileCompression"
                    )
                ),
                role_arn="roleArn",

                # the properties below are optional
                historical_data_path_list=["historicalDataPathList"],
                templated_path_list=["templatedPathList"]
            )
        ),

        # the properties below are optional
        dimension_list=["dimensionList"],
        metric_set_description="metricSetDescription",
        metric_set_frequency="metricSetFrequency",
        offset=123,
        timestamp_column=lookoutmetrics.CfnAnomalyDetector.TimestampColumnProperty(
            column_format="columnFormat",
            column_name="columnName"
        ),
        timezone="timezone"
    )],

    # the properties below are optional
    anomaly_detector_description="anomalyDetectorDescription",
    anomaly_detector_name="anomalyDetectorName",
    kms_key_arn="kmsKeyArn"
)
java
// 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.*;

CfnAnomalyDetectorProps cfnAnomalyDetectorProps = CfnAnomalyDetectorProps.builder()
        .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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.LookoutMetrics;

var cfnAnomalyDetectorProps = new CfnAnomalyDetectorProps {
    AnomalyDetectorConfig = new AnomalyDetectorConfigProperty {
        AnomalyDetectorFrequency = "anomalyDetectorFrequency"
    },
    MetricSetList = new [] { new MetricSetProperty {
        MetricList = new [] { new MetricProperty {
            AggregationFunction = "aggregationFunction",
            MetricName = "metricName",

            // the properties below are optional
            Namespace = "namespace"
        } },
        MetricSetName = "metricSetName",
        MetricSource = new MetricSourceProperty {
            AppFlowConfig = new AppFlowConfigProperty {
                FlowName = "flowName",
                RoleArn = "roleArn"
            },
            CloudwatchConfig = new CloudwatchConfigProperty {
                RoleArn = "roleArn"
            },
            RdsSourceConfig = new RDSSourceConfigProperty {
                DatabaseHost = "databaseHost",
                DatabaseName = "databaseName",
                DatabasePort = 123,
                DbInstanceIdentifier = "dbInstanceIdentifier",
                RoleArn = "roleArn",
                SecretManagerArn = "secretManagerArn",
                TableName = "tableName",
                VpcConfiguration = new VpcConfigurationProperty {
                    SecurityGroupIdList = new [] { "securityGroupIdList" },
                    SubnetIdList = new [] { "subnetIdList" }
                }
            },
            RedshiftSourceConfig = new RedshiftSourceConfigProperty {
                ClusterIdentifier = "clusterIdentifier",
                DatabaseHost = "databaseHost",
                DatabaseName = "databaseName",
                DatabasePort = 123,
                RoleArn = "roleArn",
                SecretManagerArn = "secretManagerArn",
                TableName = "tableName",
                VpcConfiguration = new VpcConfigurationProperty {
                    SecurityGroupIdList = new [] { "securityGroupIdList" },
                    SubnetIdList = new [] { "subnetIdList" }
                }
            },
            S3SourceConfig = new S3SourceConfigProperty {
                FileFormatDescriptor = new FileFormatDescriptorProperty {
                    CsvFormatDescriptor = new CsvFormatDescriptorProperty {
                        Charset = "charset",
                        ContainsHeader = false,
                        Delimiter = "delimiter",
                        FileCompression = "fileCompression",
                        HeaderList = new [] { "headerList" },
                        QuoteSymbol = "quoteSymbol"
                    },
                    JsonFormatDescriptor = new JsonFormatDescriptorProperty {
                        Charset = "charset",
                        FileCompression = "fileCompression"
                    }
                },
                RoleArn = "roleArn",

                // the properties below are optional
                HistoricalDataPathList = new [] { "historicalDataPathList" },
                TemplatedPathList = new [] { "templatedPathList" }
            }
        },

        // the properties below are optional
        DimensionList = new [] { "dimensionList" },
        MetricSetDescription = "metricSetDescription",
        MetricSetFrequency = "metricSetFrequency",
        Offset = 123,
        TimestampColumn = new TimestampColumnProperty {
            ColumnFormat = "columnFormat",
            ColumnName = "columnName"
        },
        Timezone = "timezone"
    } },

    // the properties below are optional
    AnomalyDetectorDescription = "anomalyDetectorDescription",
    AnomalyDetectorName = "anomalyDetectorName",
    KmsKeyArn = "kmsKeyArn"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAnomalyDetectorProps := &CfnAnomalyDetectorProps{
	AnomalyDetectorConfig: &AnomalyDetectorConfigProperty{
		AnomalyDetectorFrequency: jsii.String("anomalyDetectorFrequency"),
	},
	MetricSetList: []interface{}{
		&MetricSetProperty{
			MetricList: []interface{}{
				&MetricProperty{
					AggregationFunction: jsii.String("aggregationFunction"),
					MetricName: jsii.String("metricName"),

					// the properties below are optional
					Namespace: jsii.String("namespace"),
				},
			},
			MetricSetName: jsii.String("metricSetName"),
			MetricSource: &MetricSourceProperty{
				AppFlowConfig: &AppFlowConfigProperty{
					FlowName: jsii.String("flowName"),
					RoleArn: jsii.String("roleArn"),
				},
				CloudwatchConfig: &CloudwatchConfigProperty{
					RoleArn: jsii.String("roleArn"),
				},
				RdsSourceConfig: &RDSSourceConfigProperty{
					DatabaseHost: jsii.String("databaseHost"),
					DatabaseName: jsii.String("databaseName"),
					DatabasePort: jsii.Number(123),
					DbInstanceIdentifier: jsii.String("dbInstanceIdentifier"),
					RoleArn: jsii.String("roleArn"),
					SecretManagerArn: jsii.String("secretManagerArn"),
					TableName: jsii.String("tableName"),
					VpcConfiguration: &VpcConfigurationProperty{
						SecurityGroupIdList: []*string{
							jsii.String("securityGroupIdList"),
						},
						SubnetIdList: []*string{
							jsii.String("subnetIdList"),
						},
					},
				},
				RedshiftSourceConfig: &RedshiftSourceConfigProperty{
					ClusterIdentifier: jsii.String("clusterIdentifier"),
					DatabaseHost: jsii.String("databaseHost"),
					DatabaseName: jsii.String("databaseName"),
					DatabasePort: jsii.Number(123),
					RoleArn: jsii.String("roleArn"),
					SecretManagerArn: jsii.String("secretManagerArn"),
					TableName: jsii.String("tableName"),
					VpcConfiguration: &VpcConfigurationProperty{
						SecurityGroupIdList: []*string{
							jsii.String("securityGroupIdList"),
						},
						SubnetIdList: []*string{
							jsii.String("subnetIdList"),
						},
					},
				},
				S3SourceConfig: &S3SourceConfigProperty{
					FileFormatDescriptor: &FileFormatDescriptorProperty{
						CsvFormatDescriptor: &CsvFormatDescriptorProperty{
							Charset: jsii.String("charset"),
							ContainsHeader: jsii.Boolean(false),
							Delimiter: jsii.String("delimiter"),
							FileCompression: jsii.String("fileCompression"),
							HeaderList: []*string{
								jsii.String("headerList"),
							},
							QuoteSymbol: jsii.String("quoteSymbol"),
						},
						JsonFormatDescriptor: &JsonFormatDescriptorProperty{
							Charset: jsii.String("charset"),
							FileCompression: jsii.String("fileCompression"),
						},
					},
					RoleArn: jsii.String("roleArn"),

					// the properties below are optional
					HistoricalDataPathList: []*string{
						jsii.String("historicalDataPathList"),
					},
					TemplatedPathList: []*string{
						jsii.String("templatedPathList"),
					},
				},
			},

			// the properties below are optional
			DimensionList: []*string{
				jsii.String("dimensionList"),
			},
			MetricSetDescription: jsii.String("metricSetDescription"),
			MetricSetFrequency: jsii.String("metricSetFrequency"),
			Offset: jsii.Number(123),
			TimestampColumn: &TimestampColumnProperty{
				ColumnFormat: jsii.String("columnFormat"),
				ColumnName: jsii.String("columnName"),
			},
			Timezone: jsii.String("timezone"),
		},
	},

	// the properties below are optional
	AnomalyDetectorDescription: jsii.String("anomalyDetectorDescription"),
	AnomalyDetectorName: jsii.String("anomalyDetectorName"),
	KmsKeyArn: jsii.String("kmsKeyArn"),
}

Properties ​

anomalyDetectorConfigIResolvable | CfnAnomalyDetector.AnomalyDetectorConfigPropertyanomaly_detector_configtyping.Union[IResolvable, AnomalyDetectorConfigProperty]anomalyDetectorConfigIResolvableAnomalyDetectorConfigIResolvableAnomalyDetectorConfiginterface{}required#
Contains information about the configuration of the anomaly detector.
anomalyDetectorDescriptionoptionalstringanomaly_detector_descriptionoptionalstranomalyDetectorDescriptionoptionalStringAnomalyDetectorDescriptionoptionalstringAnomalyDetectorDescriptionoptional*string#
A description of the detector.
anomalyDetectorNameoptionalstringanomaly_detector_nameoptionalstranomalyDetectorNameoptionalStringAnomalyDetectorNameoptionalstringAnomalyDetectorNameoptional*string#
The name of the detector.
kmsKeyArnoptionalstring | IKeyRefkms_key_arnoptionaltyping.Union[str, IKeyRef]kmsKeyArnoptionalStringKmsKeyArnoptionalstringKmsKeyArnoptionalinterface{}#
The ARN of the KMS key to use to encrypt your data.
metricSetListIResolvable | IResolvable | CfnAnomalyDetector.MetricSetProperty[]metric_set_listtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricSetProperty]]]metricSetListIResolvableMetricSetListIResolvableMetricSetListinterface{}required#
The detector's dataset.