<a id="cli-aws-cloudwatchomni-list-anomalies"></a>

# list-anomalies

## Description

This operation is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

Retrieves the anomalies matching the given filters.

See also: [AWS API Documentation](https://docs.aws.amazon.com/goto/WebAPI/cloudwatchomni-2025-01-01/ListAnomalies)

`list-anomalies` is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the `--no-paginate` argument.
When using `--output text` and the `--query` argument on a paginated response, the `--query` argument must extract data from the results of the following query expressions: `items`

## Synopsis

```
  list-anomalies
[--time-range <value>]
[--services <value>]
[--signal-types <value>]
[--severity <value>]
[--source-account-id <value>]
[--anomaly-ids <value>]
[--starting-token <value>]
[--page-size <value>]
[--max-items <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]
```

## Options

`--time-range` (structure)

> Time window to scope the anomaly search.

> start -> (timestamp)

> > The inclusive start of the range.

> end -> (timestamp)

> > The inclusive end of the range.

Shorthand Syntax:

```
start=timestamp,end=timestamp
```

JSON Syntax:

```json
{
  "start": timestamp,
  "end": timestamp
}
```

`--services` (list)

> Filter by service names.

> Constraints:

> * min: `0`
> * max: `50`

> (string)

> > Service name filter value.

> > Constraints:

> > * min: `1`
> > * max: `1024`

Syntax:

```
"string" "string" ...
```

`--signal-types` (list)

> Filter by signal types (e.g. logs, metrics, traces).

> Constraints:

> * min: `0`
> * max: `3`

> (string)

> > The telemetry signal type in which an anomaly was detected. These values are lowercase, and the context graph signal types are uppercase.

> > Possible values:

> > * `logs`
> > * `metrics`
> > * `traces`

Syntax:

```
"string" "string" ...
```

`--severity` (string)

> Filter by severity level. Anomaly severities are lowercase, so send “high”, not “HIGH”. One level only; there is no severity list and no minimum-severity filter.

> Possible values:

> * `info`
> * `low`
> * `medium`
> * `high`
> * `critical`

`--source-account-id` (list)

> Filter by the accounts that produced the signal.

> Constraints:

> * min: `1`
> * max: `100`

> (string)

Syntax:

```
"string" "string" ...
```

`--anomaly-ids` (list)

> Optional batch-get filter. When set, anomalies are fetched by ID under the caller’s account. Pagination still applies: maxResults bounds the returned anomalies per page; nextToken cursors through the input ID list. An ID that does not exist, or that the caller is not permitted to read, is omitted from items; compare the IDs you requested against the IDs returned across all pages to find them.

> anomalyIds is mutually exclusive with the other filters (timeRange, services, signalTypes, severity, sourceAccountId) — passing any of them alongside anomalyIds returns a ValidationException. Use a follow-up ListAnomalies call without anomalyIds for filtered queries.

> Constraints:

> * min: `1`
> * max: `100`

> (string)

> > Unique identifier of an anomaly episode, exactly 64 lowercase hexadecimal characters. The current per-episode identifier and the legacy series-hash identifier share this format.

> > Constraints:

> > * min: `64`
> > * max: `64`
> > * pattern: `[0-9a-f]{64}`

Syntax:

```
"string" "string" ...
```

`--starting-token` (string)

> A token to specify where to start paginating. This is the `NextToken` from a previously truncated response.

> For usage examples, see [Pagination](https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) in the *AWS Command Line Interface User Guide* .

`--page-size` (integer)

> The size of each page to get in the AWS service call. This does not affect the number of items returned in the command’s output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.

> For usage examples, see [Pagination](https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) in the *AWS Command Line Interface User Guide* .

> Constraints:

> * min: `1`
> * max: `100`

`--max-items` (integer)

> The total number of items to return in the command’s output. If the total number of items available is more than the value specified, a `NextToken` is provided in the command’s output. To resume pagination, provide the `NextToken` value in the `starting-token` argument of a subsequent command. **Do not** use the `NextToken` response element directly outside of the AWS CLI.

> For usage examples, see [Pagination](https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) in the *AWS Command Line Interface User Guide* .

`--cli-input-json` | `--cli-input-yaml` (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by `--generate-cli-skeleton`. If other arguments are provided on the command line, those 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. This may not be specified along with `--cli-input-yaml`.

`--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`. Similarly, if provided `yaml-input` it will print a sample input YAML that can be used with `--cli-input-yaml`. If provided with the value `output`, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

## Global Options

`--debug` (boolean)

Turn on debug logging.

`--endpoint-url` (string)

Override command’s default URL with the given URL.

`--no-verify-ssl` (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

`--no-paginate` (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

`--output` (string)

The formatting style for command output.

* json
* text
* table
* yaml
* yaml-stream
* off

`--query` (string)

A JMESPath query to use in filtering the response data.

`--profile` (string)

Use a specific profile from your credential file.

`--region` (string)

The region to use. Overrides config/env settings.

`--version` (string)

Display the version of this tool.

`--color` (string)

Turn on/off color output.

* on
* off
* auto

`--no-sign-request` (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

`--ca-bundle` (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

`--cli-read-timeout` (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

`--cli-connect-timeout` (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

`--cli-binary-format` (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob `fileb://` will always be treated as binary and use the file contents directly regardless of the `cli-binary-format` setting. When using `file://` the file contents will need to properly formatted for the configured `cli-binary-format`.

* base64
* raw-in-base64-out

`--no-cli-pager` (boolean)

Disable cli pager for output.

`--cli-auto-prompt` (boolean)

Automatically prompt for CLI input parameters.

`--no-cli-auto-prompt` (boolean)

Disable automatically prompt for CLI input parameters.

`--cli-error-format` (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

* legacy
* json
* yaml
* text
* table
* enhanced

`--help` (boolean)

Display help for the command/subcommand.

## Output

items -> (list)

> The anomalies matching the request, up to maxResults.

> Constraints:

> * min: `0`
> * max: `100`

> (structure)

> > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > An anomaly detected for a monitored service.

> > anomalyId -> (string) [required]

> > > The unique identifier of the anomaly episode.

> > > Constraints:

> > > * min: `64`
> > > * max: `64`
> > > * pattern: `[0-9a-f]{64}`

> > service -> (string) [required]

> > > The monitored service the anomaly was detected on.

> > > Constraints:

> > > * min: `1`
> > > * max: `1024`

> > signalType -> (string) [required]

> > > The kind of telemetry signal the anomaly was detected in.

> > > Possible values:

> > > * `logs`
> > > * `metrics`
> > > * `traces`

> > anomalyType -> (string)

> > > The analyzer-specific classification of what kind of anomaly this is.

> > severity -> (string)

> > > The severity of the anomaly as most recently evaluated.

> > > Possible values:

> > > * `info`
> > > * `low`
> > > * `medium`
> > > * `high`
> > > * `critical`

> > description -> (string)

> > > A human-readable description of the detected behavior. Sensitive customer content.

> > lastSeenAt -> (timestamp)

> > > Timestamp of the most recent occurrence in this episode, serialized as epoch seconds.

> > firstSeenAt -> (timestamp)

> > > Timestamp of the first occurrence in this episode, serialized as epoch seconds.

> > details -> (map)

> > > Arbitrary key-value details. Nested values are flattened to strings. Sensitive customer content.

> > > key -> (string)

> > > value -> (string)

> > title -> (string)

> > > Short human-readable label assigned by the analyzer. Sensitive customer content.

> > occurrenceCount -> (integer)

> > > Total occurrences merged into this anomaly episode.

> > sourceAccountId -> (string)

> > > Account that produced the signal (may differ from owner for centralized monitoring).

> > sourceRegion -> (string)

> > > Region where the source signal was produced.

> > nodeId -> (string)

> > > Topology graph node ID resolved at write time. Absent when the topology resolver could not match the service to a graph node.

> > nodeType -> (string)

> > > Whether the node is a service, a resource, or a remote service.

> > > Possible values:

> > > * `SERVICE`
> > > * `RESOURCE`
> > > * `REMOTE_SERVICE`

> > cloudProvider -> (string)

> > > Cloud provider from the topology node identity (e.g. “aws”, “azure”).

> > evidenceSamples -> (list)

> > > Up to 100 timestamped per-occurrence samples.

> > > Constraints:

> > > * min: `0`
> > > * max: `100`

> > > (structure)

> > > > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > > > A single per-occurrence evidence sample retained for an anomaly episode. Sensitive customer content.

> > > > startedAt -> (timestamp)

> > > > > Start of the window these figures cover.

> > > > endedAt -> (timestamp)

> > > > > End of the window these figures cover.

> > > > measurement -> (structure)

> > > > > What was measured in this window and how it compared to expectation.

> > > > > quantity -> (string)

> > > > > > What was measured. Absent on a metric anomaly, where the anomaly itself already names the metric.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `64`

> > > > > statistic -> (string)

> > > > > > How the quantity was aggregated, as a CloudWatch statistic name — “Sum”, “Average”, “Maximum”, “Minimum”, “SampleCount” or a percentile. Absent when nothing aggregated the figure in CloudWatch’s sense, as on a derived error rate or request rate.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `64`

> > > > > unit -> (string)

> > > > > > Unit of currentValue, expectedValue, expectedLower and expectedUpper. On a metric anomaly this is the unit CloudWatch published the metric as, so it is absent when the metric was published without one, and on a counted statistic, which has no unit.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `32`

> > > > > transform -> (string)

> > > > > > Transform applied before comparison. Absent when the raw value was compared.

> > > > > > Constraints:

> > > > > > * min: `1`
> > > > > > * max: `32`

> > > > > currentValue -> (double)

> > > > > > The value observed in this window.

> > > > > expectedValue -> (double)

> > > > > > The point prediction. Absent when the detector produces a band instead.

> > > > > expectedLower -> (double)

> > > > > > Lower bound of the expected range. Absent when the detector produces a point prediction instead, or bounds only the other side.

> > > > > expectedUpper -> (double)

> > > > > > Upper bound of the expected range. Absent when the detector produces a point prediction instead, or bounds only the other side.

> > > > > threshold -> (double)

> > > > > > The value the comparison had to cross for this detector to fire, in the same unit as currentValue. Distinct from expectedLower and expectedUpper, which describe the learned normal range: a detector can fire on a boundary it chose rather than on the edge of that range. Absent whenever the band itself was the boundary, which is every anomaly but a trace one today.

> > > > > sampleCount -> (integer)

> > > > > > How many units the figures were computed over — calls for an error rate, turns for a per-turn quantity, events for a log count, buckets for a volume drop. A rate alone cannot distinguish 5 failures in 20 calls from 5 in 20,000.

> > > > > > Constraints:

> > > > > > * min: `0`

> > > > > periodMinutes -> (integer)

> > > > > > Minutes the figures cover: the aggregation bucket width on most detectors, and the elapsed span of the episode so far on detectors that report running totals.

> > > > > > Constraints:

> > > > > > * min: `0`

> > > > > baselineIsNew -> (boolean)

> > > > > > True when the expectation came from a newly learned, still-thin baseline, so the comparison is less reliable than usual.

> > > > detector -> (string)

> > > > > The rule that raised this occurrence. May differ between occurrences in the same episode.

> > > > > Constraints:

> > > > > * min: `1`
> > > > > * max: `64`

> > > > source -> (string)

> > > > > What the figures were computed from.

> > > > > Constraints:

> > > > > * min: `1`
> > > > > * max: `64`

> > > > sampledFraction -> (double)

> > > > > The trace sampling rate: the share of the service’s calls that its raw spans kept, measured over the last hour against a view that counts every call. When `source` is “raw”, this is the lowest share measured against any of the service’s views. When `source` names a view, it is the share measured against that view. Absent when the view it is measured against (for raw evidence, every view of the service) counted too few calls in the last hour. Present only on trace evidence.

> > > > > Constraints:

> > > > > * min: `0`
> > > > > * max: `1`

> > > > topContributors -> (list)

> > > > > What accounted for the anomalous excess, by dimension.

> > > > > Constraints:

> > > > > * min: `0`
> > > > > * max: `10`

> > > > > (structure)

> > > > > > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > > > > > One contributor to the anomalous excess in an evidence window, and the share of that excess it accounts for.

> > > > > > dimension -> (string)

> > > > > > > The dimension this contributor is a value of.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `64`

> > > > > > name -> (string)

> > > > > > > The contributor’s name.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `256`

> > > > > > share -> (double)

> > > > > > > Share attributed to this contributor, from 0.0 to 1.0. The basis differs by dimension: a tool share is a share of the anomalous excess, while an error-class or status-code share is a share of the total. The total is not on the response, so the bases cannot be reconciled — compare shares within a dimension, and do not sum across dimensions.

> > > > > > > Constraints:

> > > > > > > * min: `0`
> > > > > > > * max: `1`

> > > > omittedContributors -> (integer)

> > > > > Contributors with excess beyond those listed in topContributors.

> > > > > Constraints:

> > > > > * min: `0`

> > > > telemetrySamples -> (list)

> > > > > Telemetry recorded in this window. May be absent on older occurrences even when the signal type produces samples, because the total retained per anomaly is bounded and the most recent occurrences are kept.

> > > > > Constraints:

> > > > > * min: `0`
> > > > > * max: `5`

> > > > > (structure)

> > > > > > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > > > > > One sample from a telemetry stream attached to an anomaly.

> > > > > > For a log anomaly this is a real log line of the matched pattern. The structure is reused for other anomaly sample types; when a sample type records its own time it populates `recordedAt` , and when it does not (log lines today) the member is absent.

> > > > > > recordedAt -> (timestamp)

> > > > > > > Time the sample was recorded. Absent for log samples — the service does not store a per-line time, so the member is omitted. Present when a sample type records one.

> > > > > > message -> (string) [required]

> > > > > > > The sample text, as it was recorded.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `1500`

> > > > signalDetails -> (tagged union structure)

> > > > > Fields specific to the signal type.

> > > > > #### NOTE
> > > > > This is a Tagged Union structure. Only one of the following top level keys can be set: `log`, `metric`, `trace`.

> > > > > log -> (structure)

> > > > > > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > > > > > Fields specific to a log anomaly’s evidence window.

> > > > > > statusClass -> (string)

> > > > > > > The class of HTTP status code a status-code anomaly counted: “1xx” through “5xx”. Open-ended — treat an unrecognized value as opaque rather than failing.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `16`

> > > > > > statusCodeField -> (string)

> > > > > > > The name of the log field the status codes were read from.

> > > > > > > Constraints:

> > > > > > > * min: `1`
> > > > > > > * max: `256`

> > > > > metric -> (structure)

> > > > > > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > > > > > Fields specific to a metric anomaly’s evidence window. At most one member is present, matching the family of detector that raised the occurrence; a plain deviation carries none of them and relies on `measurement` alone.

> > > > > > signalLoss -> (structure)

> > > > > > > Present when the metric stopped reporting.

> > > > > > > lastReportedAt -> (timestamp)

> > > > > > > > When the metric last reported a value.

> > > > > > > missingMinutes -> (integer)

> > > > > > > > Minutes with no data as of this occurrence.

> > > > > > > > Constraints:

> > > > > > > > * min: `0`

> > > > > > > lastValue -> (double)

> > > > > > > > The last value reported before the gap.

> > > > > > signalOnset -> (structure)

> > > > > > > Present when the metric resumed reporting after an absence.

> > > > > > > firstValue -> (double)

> > > > > > > > The first value reported after the gap.

> > > > > > > absentMinutes -> (integer)

> > > > > > > > Minutes the metric was absent before it returned.

> > > > > > > > Constraints:

> > > > > > > > * min: `0`

> > > > > > countDrop -> (structure)

> > > > > > > Present when the metric’s event volume fell away.

> > > > > > > zeroCount -> (integer)

> > > > > > > > Buckets in the examined window that reported exactly zero, out of `measurement.sampleCount` .

> > > > > > > > Constraints:

> > > > > > > > * min: `0`

> > > > > > > tailProbability -> (double)

> > > > > > > > Probability of seeing this many zero buckets under the learned zero rate.

> > > > > > > > Constraints:

> > > > > > > > * min: `0`
> > > > > > > > * max: `1`

> > > > > trace -> (structure)

> > > > > > This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.

> > > > > > Fields specific to a trace anomaly’s evidence window.

> > > > > > errorCount -> (integer)

> > > > > > > Failed calls in this window — the exact numerator behind an error-rate measurement. Kept rather than derived because reconstructing it from a rounded rate loses precision at high call volumes.

> > > > > > > Constraints:

> > > > > > > * min: `0`

> > > > > > alarmedTools -> (list)

> > > > > > > Tools that also crossed their own threshold in this window. See topContributors for what accounted for the excess.

> > > > > > > Constraints:

> > > > > > > * min: `0`
> > > > > > > * max: `5`

> > > > > > > (string)

> > > > > > > > A tool name, as the emitting application named it. Not redacted by the service. Render as TEXT, never as HTML.

> > > > > > > > Constraints:

> > > > > > > > * min: `1`
> > > > > > > > * max: `256`

> > > > > > alarmedToolsOmitted -> (integer)

> > > > > > > Tools that also alarmed beyond those listed in alarmedTools.

> > > > > > > Constraints:

> > > > > > > * min: `0`

nextToken -> (string)

> Opaque cursor for fetching the next page of results.

> Constraints:

> * min: `1`
> * max: `2048`
