# ConfigurationProperty

Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.

The configuration can also include the time zone to use for the metric.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const configurationProperty: cloudwatch.CfnAnomalyDetector.ConfigurationProperty = {
  excludedTimeRanges: [{
    endTime: 'endTime',
    startTime: 'startTime',
  }],
  metricTimeZone: 'metricTimeZone',
};
```

Python:

```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_cloudwatch as cloudwatch

configuration_property = cloudwatch.CfnAnomalyDetector.ConfigurationProperty(
    excluded_time_ranges=[cloudwatch.CfnAnomalyDetector.RangeProperty(
        end_time="endTime",
        start_time="startTime"
    )],
    metric_time_zone="metricTimeZone"
)
```

Java:

```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.cloudwatch.*;

ConfigurationProperty configurationProperty = ConfigurationProperty.builder()
        .excludedTimeRanges(List.of(RangeProperty.builder()
                .endTime("endTime")
                .startTime("startTime")
                .build()))
        .metricTimeZone("metricTimeZone")
        .build();
```

C# / .NET:

```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.CloudWatch;

var configurationProperty = new ConfigurationProperty {
    ExcludedTimeRanges = new [] { new RangeProperty {
        EndTime = "endTime",
        StartTime = "startTime"
    } },
    MetricTimeZone = "metricTimeZone"
};
```

Golang:

```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"

configurationProperty := &ConfigurationProperty{
	ExcludedTimeRanges: []interface{}{
		&RangeProperty{
			EndTime: jsii.String("endTime"),
			StartTime: jsii.String("startTime"),
		},
	},
	MetricTimeZone: jsii.String("metricTimeZone"),
}
```

## Properties

- `excludedTimeRanges`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAnomalyDetector.RangeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnAnomalyDetector.RangeProperty.html)[] — Specifies an array of time ranges to exclude from use when the anomaly detection model is trained and updated.

  Use this to make sure that events that could cause unusual values for the metric, such as deployments, aren't used when CloudWatch creates or updates the model.

- `metricTimeZone`: string — The time zone to use for the metric.

  This is useful to enable the model to automatically account for daylight savings time changes if the metric is sensitive to such time changes.

  To specify a time zone, use the name of the time zone as specified in the standard tz database. For more information, see [tz database](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Tz_database) .
