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.
example
Use a bare-bones client and the command you need to make an API call.
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.
Use a bare-bones client and the command you need to make an API call.
import { CloudWatchClient, DescribeAlarmsForMetricCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import // const { CloudWatchClient, DescribeAlarmsForMetricCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import const client = new CloudWatchClient(config); const command = new DescribeAlarmsForMetricCommand(input); const response = await client.send(command);
DescribeAlarmsForMetricCommandInput for command's
input
shape.DescribeAlarmsForMetricCommandOutput for command's
response
shape.config for CloudWatchClient's
config
shape.