Amazon CloudWatch
API Reference (API Version 2010-08-01)

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

PutAnomalyDetector

Creates an anomaly detection model for a CloudWatch metric. You can use the model to display a band of expected normal values when the metric is graphed.

For more information, see CloudWatch Anomaly Detection.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Configuration

The configuration specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. You can specify as many as 10 time ranges.

The configuration can also include the time zone to use for the metric.

You can in

Type: AnomalyDetectorConfiguration object

Required: No

Dimensions.member.N

The metric dimensions to create the anomaly detection model for.

Type: Array of Dimension objects

Array Members: Maximum number of 10 items.

Required: No

MetricName

The name of the metric to create the anomaly detection model for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

Namespace

The namespace of the metric to create the anomaly detection model for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^:].*

Required: Yes

Stat

The statistic to use for the metric and the anomaly detection model.

Type: String

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServiceError

Request processing has failed due to some unknown error, exception, or failure.

HTTP Status Code: 500

InvalidParameterValue

The value of an input parameter is bad or out-of-range.

HTTP Status Code: 400

LimitExceeded

The operation exceeded one or more limits.

HTTP Status Code: 400

MissingParameter

An input parameter that is required is missing.

HTTP Status Code: 400

Example

The following example creates an anomaly detection model for the metric CPUUtilization.

Sample Request

{ "Namespace": "AWS/EC2", "MetricName:": "CPUUtilization", "Stat": "Average", "Dimensions": [ { "Name": "dimension1", "Value": "value1" }, { "Name": "dimension2", "Value": "value2" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: