describe_alarms_for_metric
¶
describe_alarms_for_metric(
*,
config_overrides: Optional[CloudWatchClientConfig] = None,
metric_name: Optional[MetricName] = None,
namespace: Optional[Namespace] = None,
statistic: Optional[Statistic] = None,
extended_statistic: Optional[ExtendedStatistic] = None,
dimensions: Optional[Dimensions] = None,
period: Optional[Period] = None,
unit: Optional[StandardUnit] = None,
) -> DescribeAlarmsForMetricOutput
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.
Parameters:
-
metric_name(Optional[MetricName], default:None) –The name of the metric.
-
namespace(Optional[Namespace], default:None) –The namespace of the metric.
-
statistic(Optional[Statistic], default:None) –The statistic for the metric, other than percentiles. For percentile statistics, use
ExtendedStatistics. -
extended_statistic(Optional[ExtendedStatistic], default:None) –The percentile statistic for the metric. Specify a value between p0.0 and p100.
-
dimensions(Optional[Dimensions], default:None) –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(Optional[Period], default:None) –The period, in seconds, over which the statistic is applied.
-
unit(Optional[StandardUnit], default:None) –The unit for the metric.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 | |