CloudWatchLogsClient.list_anomalies
rboto-cloudwatch-logs==0.4.0 · Service index · Types
Model summary (excerpt): Returns a list of anomalies that log anomaly detectors have found. For details about the structure format of each anomaly object that is returned, see the example in this section.
Install and imports
from rboto import CloudWatchLogsClient
from rboto_cloudwatch_logs.types import (
ListAnomaliesOutput,
SuppressionState,
)
Signature
async def list_anomalies(
*,
anomaly_detector_arn: str | None = None,
suppression_state: SuppressionState | None = None,
limit: int | None = None,
next_token: str | None = None,
) -> ListAnomaliesOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
anomaly_detector_arn |
No | Use this to optionally limit the results to only the anomalies found by a certain anomaly detector. |
suppression_state |
No | You can specify this parameter if you want to the operation to return only anomalies that are currently either suppressed or unsuppressed. |
limit |
No | The maximum number of items to return. If you don't specify a value, the default maximum value of 50 items is used. |
next_token |
No |
Output
ListAnomaliesOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
anomalies |
list[AnomalyOutput] | None |
Always present | AnomalyOutput |
next_token |
str | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
ListAnomaliesOutput, SuppressionState
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
client.paginators.list_anomalies(...) accepts the same arguments and returns AsyncIterator[ListAnomaliesOutput]. Direct calls return one page. Pages preserve the Output representation above.
Input cursors: next_token. Page-size argument: limit.
No output stream.
Errors
Import from rboto_cloudwatch_logs.exceptions:
InvalidParameterError, OperationAbortedError, ResourceNotFoundError, ServiceUnavailableError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.