@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-07-01T09:58:34.317Z") 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.
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())) .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() .dimensions(List.of(DimensionProperty.builder() .name("name") .value("value") .build())) .metricName("metricName") .namespace("namespace") .stat("stat") .build()) .stat("stat") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnAnomalyDetector.Builder
A fluent builder for
CfnAnomalyDetector . |
static interface |
CfnAnomalyDetector.ConfigurationProperty
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 |
CfnAnomalyDetector.DimensionProperty
A dimension is a name/value pair that is part of the identity of a metric.
|
static interface |
CfnAnomalyDetector.MetricDataQueryProperty
This structure is used in both `GetMetricData` and `PutMetricAlarm` .
|
static interface |
CfnAnomalyDetector.MetricMathAnomalyDetectorProperty
Indicates the CloudWatch math expression that provides the time series the anomaly detector uses as input.
|
static interface |
CfnAnomalyDetector.MetricProperty
Represents a specific metric.
|
static interface |
CfnAnomalyDetector.MetricStatProperty
This structure defines the metric to be returned, along with the statistics, period, and units.
|
static interface |
CfnAnomalyDetector.RangeProperty
Each `Range` specifies one range of days or times to exclude from use for training or updating an anomaly detection model.
|
static interface |
CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty
Designates the CloudWatch metric and statistic that provides the time series the anomaly detector uses as input.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnAnomalyDetector(Construct scope,
java.lang.String id)
Create a new `AWS::CloudWatch::AnomalyDetector`.
|
|
CfnAnomalyDetector(Construct scope,
java.lang.String id,
CfnAnomalyDetectorProps props)
Create a new `AWS::CloudWatch::AnomalyDetector`.
|
protected |
CfnAnomalyDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAnomalyDetector(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getConfiguration()
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.
|
java.lang.Object |
getDimensions()
The dimensions of the metric associated with the anomaly detection band.
|
java.lang.Object |
getMetricMathAnomalyDetector()
The CloudWatch metric math expression for this anomaly detector.
|
java.lang.String |
getMetricName()
The name of the metric associated with the anomaly detection band.
|
java.lang.String |
getNamespace()
The namespace of the metric associated with the anomaly detection band.
|
java.lang.Object |
getSingleMetricAnomalyDetector()
The CloudWatch metric and statistic for this anomaly detector.
|
java.lang.String |
getStat()
The statistic of the metric associated with the anomaly detection band.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setConfiguration(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.
|
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 |
setDimensions(IResolvable value)
The dimensions of the metric associated with the anomaly detection band.
|
void |
setDimensions(java.util.List<java.lang.Object> value)
The dimensions of the metric associated with the anomaly detection band.
|
void |
setMetricMathAnomalyDetector(CfnAnomalyDetector.MetricMathAnomalyDetectorProperty value)
The CloudWatch metric math expression for this anomaly detector.
|
void |
setMetricMathAnomalyDetector(IResolvable value)
The CloudWatch metric math expression for this anomaly detector.
|
void |
setMetricName(java.lang.String value)
The name of the metric associated with the anomaly detection band.
|
void |
setNamespace(java.lang.String value)
The namespace of the metric associated with the anomaly detection band.
|
void |
setSingleMetricAnomalyDetector(CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty value)
The CloudWatch metric and statistic for this anomaly detector.
|
void |
setSingleMetricAnomalyDetector(IResolvable value)
The CloudWatch metric and statistic for this anomaly detector.
|
void |
setStat(java.lang.String value)
The statistic of the metric associated with the anomaly detection band.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnAnomalyDetector(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAnomalyDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnAnomalyDetector(Construct scope, java.lang.String id, CfnAnomalyDetectorProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties.public CfnAnomalyDetector(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getConfiguration()
The configuration can also include the time zone to use for the metric.
public void setConfiguration(IResolvable value)
The configuration can also include the time zone to use for the metric.
public void setConfiguration(CfnAnomalyDetector.ConfigurationProperty value)
The configuration can also include the time zone to use for the metric.
public java.lang.Object getDimensions()
public void setDimensions(IResolvable value)
public void setDimensions(java.util.List<java.lang.Object> value)
public java.lang.Object getMetricMathAnomalyDetector()
public void setMetricMathAnomalyDetector(IResolvable value)
public void setMetricMathAnomalyDetector(CfnAnomalyDetector.MetricMathAnomalyDetectorProperty value)
public java.lang.String getMetricName()
public void setMetricName(java.lang.String value)
public java.lang.String getNamespace()
public void setNamespace(java.lang.String value)
public java.lang.Object getSingleMetricAnomalyDetector()
public void setSingleMetricAnomalyDetector(IResolvable value)
public void setSingleMetricAnomalyDetector(CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty value)
public java.lang.String getStat()
public void setStat(java.lang.String value)