Class CfnAnomalyDetectorProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.CfnAnomalyDetectorProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAnomalyDetectorProps>
- Enclosing interface:
CfnAnomalyDetectorProps
@Stability(Stable)
public static final class CfnAnomalyDetectorProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAnomalyDetectorProps>
A builder for
CfnAnomalyDetectorProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.configuration
(IResolvable configuration) Sets the value ofCfnAnomalyDetectorProps.getConfiguration()
configuration
(CfnAnomalyDetector.ConfigurationProperty configuration) Sets the value ofCfnAnomalyDetectorProps.getConfiguration()
dimensions
(List<? extends Object> dimensions) Sets the value ofCfnAnomalyDetectorProps.getDimensions()
dimensions
(IResolvable dimensions) Sets the value ofCfnAnomalyDetectorProps.getDimensions()
metricCharacteristics
(IResolvable metricCharacteristics) Sets the value ofCfnAnomalyDetectorProps.getMetricCharacteristics()
metricCharacteristics
(CfnAnomalyDetector.MetricCharacteristicsProperty metricCharacteristics) Sets the value ofCfnAnomalyDetectorProps.getMetricCharacteristics()
metricMathAnomalyDetector
(IResolvable metricMathAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getMetricMathAnomalyDetector()
metricMathAnomalyDetector
(CfnAnomalyDetector.MetricMathAnomalyDetectorProperty metricMathAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getMetricMathAnomalyDetector()
metricName
(String metricName) Sets the value ofCfnAnomalyDetectorProps.getMetricName()
Sets the value ofCfnAnomalyDetectorProps.getNamespace()
singleMetricAnomalyDetector
(IResolvable singleMetricAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getSingleMetricAnomalyDetector()
singleMetricAnomalyDetector
(CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty singleMetricAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getSingleMetricAnomalyDetector()
Sets the value ofCfnAnomalyDetectorProps.getStat()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
configuration
Sets the value ofCfnAnomalyDetectorProps.getConfiguration()
- Parameters:
configuration
- 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.- Returns:
this
-
configuration
@Stability(Stable) public CfnAnomalyDetectorProps.Builder configuration(CfnAnomalyDetector.ConfigurationProperty configuration) Sets the value ofCfnAnomalyDetectorProps.getConfiguration()
- Parameters:
configuration
- 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.- Returns:
this
-
dimensions
Sets the value ofCfnAnomalyDetectorProps.getDimensions()
- Parameters:
dimensions
- The dimensions of the metric associated with the anomaly detection band.- Returns:
this
-
dimensions
@Stability(Stable) public CfnAnomalyDetectorProps.Builder dimensions(List<? extends Object> dimensions) Sets the value ofCfnAnomalyDetectorProps.getDimensions()
- Parameters:
dimensions
- The dimensions of the metric associated with the anomaly detection band.- Returns:
this
-
metricCharacteristics
@Stability(Stable) public CfnAnomalyDetectorProps.Builder metricCharacteristics(IResolvable metricCharacteristics) Sets the value ofCfnAnomalyDetectorProps.getMetricCharacteristics()
- Parameters:
metricCharacteristics
- Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. Currently, it includes thePeriodicSpikes
parameter.- Returns:
this
-
metricCharacteristics
@Stability(Stable) public CfnAnomalyDetectorProps.Builder metricCharacteristics(CfnAnomalyDetector.MetricCharacteristicsProperty metricCharacteristics) Sets the value ofCfnAnomalyDetectorProps.getMetricCharacteristics()
- Parameters:
metricCharacteristics
- Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. Currently, it includes thePeriodicSpikes
parameter.- Returns:
this
-
metricMathAnomalyDetector
@Stability(Stable) public CfnAnomalyDetectorProps.Builder metricMathAnomalyDetector(IResolvable metricMathAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getMetricMathAnomalyDetector()
- Parameters:
metricMathAnomalyDetector
- The CloudWatch metric math expression for this anomaly detector.- Returns:
this
-
metricMathAnomalyDetector
@Stability(Stable) public CfnAnomalyDetectorProps.Builder metricMathAnomalyDetector(CfnAnomalyDetector.MetricMathAnomalyDetectorProperty metricMathAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getMetricMathAnomalyDetector()
- Parameters:
metricMathAnomalyDetector
- The CloudWatch metric math expression for this anomaly detector.- Returns:
this
-
metricName
Sets the value ofCfnAnomalyDetectorProps.getMetricName()
- Parameters:
metricName
- The name of the metric associated with the anomaly detection band.- Returns:
this
-
namespace
Sets the value ofCfnAnomalyDetectorProps.getNamespace()
- Parameters:
namespace
- The namespace of the metric associated with the anomaly detection band.- Returns:
this
-
singleMetricAnomalyDetector
@Stability(Stable) public CfnAnomalyDetectorProps.Builder singleMetricAnomalyDetector(IResolvable singleMetricAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getSingleMetricAnomalyDetector()
- Parameters:
singleMetricAnomalyDetector
- The CloudWatch metric and statistic for this anomaly detector.- Returns:
this
-
singleMetricAnomalyDetector
@Stability(Stable) public CfnAnomalyDetectorProps.Builder singleMetricAnomalyDetector(CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty singleMetricAnomalyDetector) Sets the value ofCfnAnomalyDetectorProps.getSingleMetricAnomalyDetector()
- Parameters:
singleMetricAnomalyDetector
- The CloudWatch metric and statistic for this anomaly detector.- Returns:
this
-
stat
Sets the value ofCfnAnomalyDetectorProps.getStat()
- Parameters:
stat
- The statistic of the metric associated with the anomaly detection band.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAnomalyDetectorProps>
- Returns:
- a new instance of
CfnAnomalyDetectorProps
- Throws:
NullPointerException
- if any required attribute was not provided
-