Skip to content

CloudWatchClient.describe_alarm_history

rboto-cloudwatch==0.4.0 · Service index · Types

Model summary (excerpt): Retrieves the history for the specified alarm. You can filter the results by date range or item type. If an alarm name is not specified, the histories for either all metric alarms or all composite alarms are returned. CloudWatch retains the history of an alarm even if you delete the alarm. To use this operation and return information about a composite alarm, you must be signed on with the...

Install and imports

python -m pip install "rboto[cloudwatch]==0.4.0"
from rboto import CloudWatchClient
from collections.abc import Sequence
from rboto_cloudwatch.types import (
    AlarmType,
    DescribeAlarmHistoryOutput,
    HistoryItemType,
    ScanBy,
)

Signature

async def describe_alarm_history(
    *,
    alarm_name: str | None = None,
    alarm_contributor_id: str | None = None,
    alarm_types: Sequence[AlarmType] | None = None,
    history_item_type: HistoryItemType | None = None,
    start_date: str | None = None,
    end_date: str | None = None,
    max_records: int | None = None,
    next_token: str | None = None,
    scan_by: ScanBy | None = None,
) -> DescribeAlarmHistoryOutput: ...

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)
alarm_name No The name of the alarm.
alarm_contributor_id No The unique identifier of a specific alarm contributor to filter the alarm history results.
alarm_types No Use this parameter to specify whether you want the operation to return metric alarms, composite alarms, or log alarms. If you omit this parameter, only metric alarms are returned.
history_item_type No The type of alarm histories to retrieve.
start_date No The starting date to retrieve alarm history.
end_date No The ending date to retrieve alarm history.
max_records No The maximum number of alarm history records to retrieve.
next_token No The token returned by a previous call to indicate that there is more data available.
scan_by No Specified whether to return the newest or oldest alarm history first. Specify TimestampDescending to have the newest event history returned first, and specify TimestampAscending to have the oldest history returned first.

Output

DescribeAlarmHistoryOutput.

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
alarm_history_items list[AlarmHistoryItemOutput] | None Always present AlarmHistoryItemOutput
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.

AlarmType, DescribeAlarmHistoryOutput, HistoryItemType, ScanBy

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.describe_alarm_history(...) accepts the same arguments and returns AsyncIterator[DescribeAlarmHistoryOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: next_token. Page-size argument: max_records.

No output stream.

Errors

Import from rboto_cloudwatch.exceptions:

InvalidNextTokenError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model