CfnAnomalyDetectorProps Struct
Properties for defining a CfnAnomalyDetector.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_aps as aps } from 'aws-cdk-lib';
const cfnAnomalyDetectorProps: aps.CfnAnomalyDetectorProps = {
alias: 'alias',
configuration: {
randomCutForest: {
query: 'query',
// the properties below are optional
ignoreNearExpectedFromAbove: {
amount: 123,
ratio: 123,
},
ignoreNearExpectedFromBelow: {
amount: 123,
ratio: 123,
},
sampleSize: 123,
shingleSize: 123,
},
},
workspace: 'workspace',
// the properties below are optional
evaluationIntervalInSeconds: 123,
labels: [{
key: 'key',
value: 'value',
}],
missingDataAction: {
markAsAnomaly: false,
skip: false,
},
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_aps as aps
cfn_anomaly_detector_props = aps.CfnAnomalyDetectorProps(
alias="alias",
configuration=aps.CfnAnomalyDetector.AnomalyDetectorConfigurationProperty(
random_cut_forest=aps.CfnAnomalyDetector.RandomCutForestConfigurationProperty(
query="query",
# the properties below are optional
ignore_near_expected_from_above=aps.CfnAnomalyDetector.IgnoreNearExpectedProperty(
amount=123,
ratio=123
),
ignore_near_expected_from_below=aps.CfnAnomalyDetector.IgnoreNearExpectedProperty(
amount=123,
ratio=123
),
sample_size=123,
shingle_size=123
)
),
workspace="workspace",
# the properties below are optional
evaluation_interval_in_seconds=123,
labels=[aps.CfnAnomalyDetector.LabelProperty(
key="key",
value="value"
)],
missing_data_action=aps.CfnAnomalyDetector.MissingDataActionProperty(
mark_as_anomaly=False,
skip=False
),
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.aps.*;
CfnAnomalyDetectorProps cfnAnomalyDetectorProps = CfnAnomalyDetectorProps.builder()
.alias("alias")
.configuration(AnomalyDetectorConfigurationProperty.builder()
.randomCutForest(RandomCutForestConfigurationProperty.builder()
.query("query")
// the properties below are optional
.ignoreNearExpectedFromAbove(IgnoreNearExpectedProperty.builder()
.amount(123)
.ratio(123)
.build())
.ignoreNearExpectedFromBelow(IgnoreNearExpectedProperty.builder()
.amount(123)
.ratio(123)
.build())
.sampleSize(123)
.shingleSize(123)
.build())
.build())
.workspace("workspace")
// the properties below are optional
.evaluationIntervalInSeconds(123)
.labels(List.of(LabelProperty.builder()
.key("key")
.value("value")
.build()))
.missingDataAction(MissingDataActionProperty.builder()
.markAsAnomaly(false)
.skip(false)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APS;
var cfnAnomalyDetectorProps = new CfnAnomalyDetectorProps {
Alias = "alias",
Configuration = new AnomalyDetectorConfigurationProperty {
RandomCutForest = new RandomCutForestConfigurationProperty {
Query = "query",
// the properties below are optional
IgnoreNearExpectedFromAbove = new IgnoreNearExpectedProperty {
Amount = 123,
Ratio = 123
},
IgnoreNearExpectedFromBelow = new IgnoreNearExpectedProperty {
Amount = 123,
Ratio = 123
},
SampleSize = 123,
ShingleSize = 123
}
},
Workspace = "workspace",
// the properties below are optional
EvaluationIntervalInSeconds = 123,
Labels = new [] { new LabelProperty {
Key = "key",
Value = "value"
} },
MissingDataAction = new MissingDataActionProperty {
MarkAsAnomaly = false,
Skip = false
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnAnomalyDetectorProps := &CfnAnomalyDetectorProps{
Alias: jsii.String("alias"),
Configuration: &AnomalyDetectorConfigurationProperty{
RandomCutForest: &RandomCutForestConfigurationProperty{
Query: jsii.String("query"),
// the properties below are optional
IgnoreNearExpectedFromAbove: &IgnoreNearExpectedProperty{
Amount: jsii.Number(123),
Ratio: jsii.Number(123),
},
IgnoreNearExpectedFromBelow: &IgnoreNearExpectedProperty{
Amount: jsii.Number(123),
Ratio: jsii.Number(123),
},
SampleSize: jsii.Number(123),
ShingleSize: jsii.Number(123),
},
},
Workspace: jsii.String("workspace"),
// the properties below are optional
EvaluationIntervalInSeconds: jsii.Number(123),
Labels: []interface{}{
&LabelProperty{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
MissingDataAction: &MissingDataActionProperty{
MarkAsAnomaly: jsii.Boolean(false),
Skip: jsii.Boolean(false),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
The user-friendly name of the anomaly detector.
configurationIResolvable | CfnAnomalyDetector.configurationtyping.Union[IResolvable, AnomalyDetectorConfigurationProperty]configurationIResolvableConfigurationIResolvableConfigurationinterface{} required #The algorithm configuration of the anomaly detector.
evaluationIntervalInSecondsoptionalnumberevaluation_interval_in_secondsoptionalint | floatevaluationIntervalInSecondsoptionalNumberEvaluationIntervalInSecondsoptionaldoubleEvaluationIntervalInSecondsoptional*float64 = 60 #The frequency, in seconds, at which the anomaly detector evaluates metrics.
labelsoptionalIResolvable | IResolvable | CfnAnomalyDetector.LabelProperty[]labelsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LabelProperty]]]labelsoptionalIResolvableLabelsoptionalIResolvableLabelsoptionalinterface{} #The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
missingDataActionoptionalIResolvable | CfnAnomalyDetector.missing_data_actionoptionaltyping.Union[IResolvable, MissingDataActionProperty]missingDataActionoptionalIResolvableMissingDataActionoptionalIResolvableMissingDataActionoptionalinterface{} #The action taken when data is missing during evaluation.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #The tags applied to the anomaly detector.
An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.