Skip to content

CloudWatchClient.describe_alarms_for_metric

rboto-cloudwatch==0.4.0 · Service index · Types

Model summary (excerpt): Retrieves the alarms for the specified metric. To filter the results, specify a statistic, period, or unit. This operation retrieves only standard alarms that are based on the specified metric. It does not return alarms based on math expressions that use the specified metric, or composite alarms that use the specified metric.

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 (
    DescribeAlarmsForMetricOutput,
    Dimension,
    StandardUnit,
    Statistic,
)

Signature

async def describe_alarms_for_metric(
    *,
    metric_name: str,
    namespace: str,
    statistic: Statistic | None = None,
    extended_statistic: str | None = None,
    dimensions: Sequence[Dimension] | None = None,
    period: int | None = None,
    unit: StandardUnit | None = None,
) -> DescribeAlarmsForMetricOutput: ...

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)
metric_name Yes The name of the metric.
namespace Yes The namespace of the metric.
statistic No The statistic for the metric, other than percentiles. For percentile statistics, use ExtendedStatistics .
extended_statistic No The percentile statistic for the metric. Specify a value between p0.0 and p100.
dimensions No The dimensions associated with the metric. If the metric has any associated dimensions, you must specify them in order for the call to succeed.
period No The period, in seconds, over which the statistic is applied.
unit No The unit for the metric.

Output

DescribeAlarmsForMetricOutput.

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
metric_alarms list[MetricAlarmOutput] | None Always present MetricAlarmOutput

| 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.

DescribeAlarmsForMetricOutput, Dimension, StandardUnit, Statistic

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

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

No modeled service errors for this operation.

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

Service guide · Pinned model