@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:51.220Z") @Stability(value=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.
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.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAnomalyDetector(Construct scope,
String id)
Create a new `AWS::CloudWatch::AnomalyDetector`.
|
|
CfnAnomalyDetector(Construct scope,
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 Map<String,Object> |
getCfnProperties() |
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.
|
Object |
getDimensions()
The dimensions of the metric associated with the anomaly detection band.
|
Object |
getMetricMathAnomalyDetector()
The CloudWatch metric math expression for this anomaly detector.
|
String |
getMetricName()
The name of the metric associated with the anomaly detection band.
|
String |
getNamespace()
The namespace of the metric associated with the anomaly detection band.
|
Object |
getSingleMetricAnomalyDetector()
The CloudWatch metric and statistic for this anomaly detector.
|
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 Map<String,Object> |
renderProperties(Map<String,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(List<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(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 |
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(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, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAnomalyDetector(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAnomalyDetector(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAnomalyDetector(@NotNull
Construct scope,
@NotNull
String id,
@Nullable
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.@Stability(value=Stable)
public CfnAnomalyDetector(@NotNull
Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @Nullable public Object getConfiguration()
The configuration can also include the time zone to use for the metric.
@Stability(value=Stable)
public void setConfiguration(@Nullable
IResolvable value)
The configuration can also include the time zone to use for the metric.
@Stability(value=Stable)
public void setConfiguration(@Nullable
CfnAnomalyDetector.ConfigurationProperty value)
The configuration can also include the time zone to use for the metric.
@Stability(value=Stable) @Nullable public Object getDimensions()
@Stability(value=Stable)
public void setDimensions(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDimensions(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public Object getMetricMathAnomalyDetector()
@Stability(value=Stable)
public void setMetricMathAnomalyDetector(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setMetricMathAnomalyDetector(@Nullable
CfnAnomalyDetector.MetricMathAnomalyDetectorProperty value)
@Stability(value=Stable) @Nullable public String getMetricName()
@Stability(value=Stable)
public void setMetricName(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getNamespace()
@Stability(value=Stable)
public void setNamespace(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getSingleMetricAnomalyDetector()
@Stability(value=Stable)
public void setSingleMetricAnomalyDetector(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setSingleMetricAnomalyDetector(@Nullable
CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty value)
@Stability(value=Stable) @Nullable public String getStat()
@Stability(value=Stable)
public void setStat(@Nullable
String value)
Copyright © 2023. All rights reserved.