Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . cloudwatch ]

put-anomaly-detector

Description

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 .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  put-anomaly-detector
--namespace <value>
--metric-name <value>
[--dimensions <value>]
--stat <value>
[--configuration <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--namespace (string)

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

--metric-name (string)

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

--dimensions (list)

The metric dimensions to create the anomaly detection model for.

(structure)

A dimension is a name/value pair that is part of the identity of a metric. You can assign up to 10 dimensions to a metric. Because dimensions are part of the unique identifier for a metric, whenever you add a unique name/value pair to one of your metrics, you are creating a new variation of that metric.

Name -> (string)

The name of the dimension. Dimension names must contain only ASCII characters and must include at least one non-whitespace character.

Value -> (string)

The value of the dimension. Dimension values must contain only ASCII characters and must include at least one non-whitespace character.

Shorthand Syntax:

Name=string,Value=string ...

JSON Syntax:

[
  {
    "Name": "string",
    "Value": "string"
  }
  ...
]

--stat (string)

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

--configuration (structure)

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.

ExcludedTimeRanges -> (list)

An array of time ranges to exclude from use when the anomaly detection model is trained. Use this to make sure that events that could cause unusual values for the metric, such as deployments, aren't used when CloudWatch creates the model.

(structure)

Specifies one range of days or times to exclude from use for training an anomaly detection model.

StartTime -> (timestamp)

The start time of the range to exclude. The format is yyyy-MM-dd'T'HH:mm:ss . For example, 2019-07-01T23:59:59 .

EndTime -> (timestamp)

The end time of the range to exclude. The format is yyyy-MM-dd'T'HH:mm:ss . For example, 2019-07-01T23:59:59 .

MetricTimezone -> (string)

The time zone to use for the metric. This is useful to enable the model to automatically account for daylight savings time changes if the metric is sensitive to such time changes.

To specify a time zone, use the name of the time zone as specified in the standard tz database. For more information, see tz database .

Shorthand Syntax:

ExcludedTimeRanges=[{StartTime=timestamp,EndTime=timestamp},{StartTime=timestamp,EndTime=timestamp}],MetricTimezone=string

JSON Syntax:

{
  "ExcludedTimeRanges": [
    {
      "StartTime": timestamp,
      "EndTime": timestamp
    }
    ...
  ],
  "MetricTimezone": "string"
}

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

None