Class CfnAnomalyDetector
The AWS::CloudWatch::AnomalyDetector
type specifies an anomaly detection band for a certain metric and statistic.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAnomalyDetector : CfnResource, IInspectable
Syntax (vb)
Public Class CfnAnomalyDetector
Inherits CfnResource
Implements IInspectable
Remarks
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. .
CloudformationResource: AWS::CloudWatch::AnomalyDetector
ExampleMetadata: fixture=_generated
Examples
// 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 cfnAnomalyDetector = new CfnAnomalyDetector(this, "MyCfnAnomalyDetector", new CfnAnomalyDetectorProps {
Configuration = new ConfigurationProperty {
ExcludedTimeRanges = new [] { new RangeProperty {
EndTime = "endTime",
StartTime = "startTime"
} },
MetricTimeZone = "metricTimeZone"
},
Dimensions = new [] { new DimensionProperty {
Name = "name",
Value = "value"
} },
MetricCharacteristics = new MetricCharacteristicsProperty {
PeriodicSpikes = false
},
MetricMathAnomalyDetector = new MetricMathAnomalyDetectorProperty {
MetricDataQueries = new [] { new MetricDataQueryProperty {
Id = "id",
// the properties below are optional
AccountId = "accountId",
Expression = "expression",
Label = "label",
MetricStat = new MetricStatProperty {
Metric = new MetricProperty {
MetricName = "metricName",
Namespace = "namespace",
// the properties below are optional
Dimensions = new [] { new DimensionProperty {
Name = "name",
Value = "value"
} }
},
Period = 123,
Stat = "stat",
// the properties below are optional
Unit = "unit"
},
Period = 123,
ReturnData = false
} }
},
MetricName = "metricName",
Namespace = "namespace",
SingleMetricAnomalyDetector = new SingleMetricAnomalyDetectorProperty {
AccountId = "accountId",
Dimensions = new [] { new DimensionProperty {
Name = "name",
Value = "value"
} },
MetricName = "metricName",
Namespace = "namespace",
Stat = "stat"
},
Stat = "stat"
});
Synopsis
Constructors
CfnAnomalyDetector(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAnomalyDetector(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAnomalyDetector(Construct, String, ICfnAnomalyDetectorProps) |
Properties
AttrId | |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Configuration | Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. |
Dimensions | The dimensions of the metric associated with the anomaly detection band. |
MetricCharacteristics | Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models. |
MetricMathAnomalyDetector | The CloudWatch metric math expression for this anomaly detector. |
MetricName | The name of the metric associated with the anomaly detection band. |
Namespace | The namespace of the metric associated with the anomaly detection band. |
SingleMetricAnomalyDetector | The CloudWatch metric and statistic for this anomaly detector. |
Stat | The statistic of the metric associated with the anomaly detection band. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAnomalyDetector(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAnomalyDetector(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAnomalyDetector(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAnomalyDetector(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAnomalyDetector(Construct, String, ICfnAnomalyDetectorProps)
public CfnAnomalyDetector(Construct scope, string id, ICfnAnomalyDetectorProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAnomalyDetectorProps
Resource properties.
Properties
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Configuration
Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model.
public virtual object Configuration { get; set; }
Property Value
System.Object
Dimensions
The dimensions of the metric associated with the anomaly detection band.
public virtual object Dimensions { get; set; }
Property Value
System.Object
MetricCharacteristics
Use this object to include parameters to provide information about your metric to CloudWatch to help it build more accurate anomaly detection models.
public virtual object MetricCharacteristics { get; set; }
Property Value
System.Object
MetricMathAnomalyDetector
The CloudWatch metric math expression for this anomaly detector.
public virtual object MetricMathAnomalyDetector { get; set; }
Property Value
System.Object
MetricName
The name of the metric associated with the anomaly detection band.
public virtual string MetricName { get; set; }
Property Value
System.String
Namespace
The namespace of the metric associated with the anomaly detection band.
public virtual string Namespace { get; set; }
Property Value
System.String
SingleMetricAnomalyDetector
The CloudWatch metric and statistic for this anomaly detector.
public virtual object SingleMetricAnomalyDetector { get; set; }
Property Value
System.Object
Stat
The statistic of the metric associated with the anomaly detection band.
public virtual string Stat { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>