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.cloudwatch.CfnAnomalyDetector
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-22T02:23:58.469Z")
@Stability(Stable)
public class CfnAnomalyDetector
extends CfnResource
implements IInspectable
The
AWS::CloudWatch::AnomalyDetector
type specifies an anomaly detection band for a certain metric and statistic.
The band represents the expected "normal" range for the metric values. Anomaly detection bands can be used for visualization of a metric's expected values, and for alarms.
For more information see Using CloudWatch anomaly detection. .
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.cloudwatch.*; CfnAnomalyDetector cfnAnomalyDetector = CfnAnomalyDetector.Builder.create(this, "MyCfnAnomalyDetector") .configuration(ConfigurationProperty.builder() .excludedTimeRanges(List.of(RangeProperty.builder() .endTime("endTime") .startTime("startTime") .build())) .metricTimeZone("metricTimeZone") .build()) .dimensions(List.of(DimensionProperty.builder() .name("name") .value("value") .build())) .metricCharacteristics(MetricCharacteristicsProperty.builder() .periodicSpikes(false) .build()) .metricMathAnomalyDetector(MetricMathAnomalyDetectorProperty.builder() .metricDataQueries(List.of(MetricDataQueryProperty.builder() .id("id") // the properties below are optional .accountId("accountId") .expression("expression") .label("label") .metricStat(MetricStatProperty.builder() .metric(MetricProperty.builder() .metricName("metricName") .namespace("namespace") // the properties below are optional .dimensions(List.of(DimensionProperty.builder() .name("name") .value("value") .build())) .build()) .period(123) .stat("stat") // the properties below are optional .unit("unit") .build()) .period(123) .returnData(false) .build())) .build()) .metricName("metricName") .namespace("namespace") .singleMetricAnomalyDetector(SingleMetricAnomalyDetectorProperty.builder() .accountId("accountId") .dimensions(List.of(DimensionProperty.builder() .name("name") .value("value") .build())) .metricName("metricName") .namespace("namespace") .stat("stat") .build()) .stat("stat") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnAnomalyDetector
.static interface
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.static interface
A dimension is a name/value pair that is part of the identity of a metric.static interface
This object includes parameters that you can use to provide information to CloudWatch to help it build more accurate anomaly detection models.static interface
This structure is used in bothGetMetricData
andPutMetricAlarm
.static interface
Indicates the CloudWatch math expression that provides the time series the anomaly detector uses as input.static interface
Represents a specific metric.static interface
This structure defines the metric to be returned, along with the statistics, period, and units.static interface
EachRange
specifies one range of days or times to exclude from use for training or updating an anomaly detection model.static interface
Designates the CloudWatch metric and statistic that provides the time series the anomaly detector uses as input.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnAnomalyDetector
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAnomalyDetector
(software.amazon.jsii.JsiiObjectRef objRef) CfnAnomalyDetector
(software.constructs.Construct scope, String id) CfnAnomalyDetector
(software.constructs.Construct scope, String id, CfnAnomalyDetectorProps props) -
Method Summary
Modifier and TypeMethodDescriptionSpecifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.The dimensions of the metric associated with the anomaly detection band.Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models.The CloudWatch metric math expression for this anomaly detector.The name of the metric associated with the anomaly detection band.The namespace of the metric associated with the anomaly detection band.The CloudWatch metric and statistic for this anomaly detector.getStat()
The statistic of the metric associated with the anomaly detection band.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setConfiguration
(IResolvable value) Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.void
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.void
setDimensions
(List<Object> value) The dimensions of the metric associated with the anomaly detection band.void
setDimensions
(IResolvable value) The dimensions of the metric associated with the anomaly detection band.void
Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models.void
Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models.void
The CloudWatch metric math expression for this anomaly detector.void
The CloudWatch metric math expression for this anomaly detector.void
setMetricName
(String value) The name of the metric associated with the anomaly detection band.void
setNamespace
(String value) The namespace of the metric associated with the anomaly detection band.void
The CloudWatch metric and statistic for this anomaly detector.void
The CloudWatch metric and statistic for this anomaly detector.void
The statistic of the metric associated with the anomaly detection band.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, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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, @Nullable 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.
-
CfnAnomalyDetector
@Stability(Stable) public CfnAnomalyDetector(@NotNull software.constructs.Construct scope, @NotNull String id) - 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.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getConfiguration
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. -
setConfiguration
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. -
setConfiguration
@Stability(Stable) public void setConfiguration(@Nullable CfnAnomalyDetector.ConfigurationProperty value) Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. -
getDimensions
The dimensions of the metric associated with the anomaly detection band. -
setDimensions
The dimensions of the metric associated with the anomaly detection band. -
setDimensions
The dimensions of the metric associated with the anomaly detection band. -
getMetricCharacteristics
Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. -
setMetricCharacteristics
Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. -
setMetricCharacteristics
@Stability(Stable) public void setMetricCharacteristics(@Nullable CfnAnomalyDetector.MetricCharacteristicsProperty value) Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. -
getMetricMathAnomalyDetector
The CloudWatch metric math expression for this anomaly detector. -
setMetricMathAnomalyDetector
The CloudWatch metric math expression for this anomaly detector. -
setMetricMathAnomalyDetector
@Stability(Stable) public void setMetricMathAnomalyDetector(@Nullable CfnAnomalyDetector.MetricMathAnomalyDetectorProperty value) The CloudWatch metric math expression for this anomaly detector. -
getMetricName
The name of the metric associated with the anomaly detection band. -
setMetricName
The name of the metric associated with the anomaly detection band. -
getNamespace
The namespace of the metric associated with the anomaly detection band. -
setNamespace
The namespace of the metric associated with the anomaly detection band. -
getSingleMetricAnomalyDetector
The CloudWatch metric and statistic for this anomaly detector. -
setSingleMetricAnomalyDetector
The CloudWatch metric and statistic for this anomaly detector. -
setSingleMetricAnomalyDetector
@Stability(Stable) public void setSingleMetricAnomalyDetector(@Nullable CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty value) The CloudWatch metric and statistic for this anomaly detector. -
getStat
The statistic of the metric associated with the anomaly detection band. -
setStat
The statistic of the metric associated with the anomaly detection band.
-