DescribeAlarms
In this article:
DescribeAlarms#
Description#
Returns alarms from the list of names.
Also alarms can be retrieved by using an alarm name prefix, the alarm state or a prefix for any action.
Request Parameters#
ActionPrefix — An alarm action prefix.
Required: No
Type: String
Length constraints: from 1 to 1024 symbols
Constraints: Cannot be specified at the same time as AlarmNamePrefix
AlarmNamePrefix — An alarm name prefix.
Required: No
Type: String
Length constraints: from 1 to 255 symbols
Constraints: Cannot be specified at the same time as AlarmNames
AlarmNames.member.n — Alarm names.
Required: No
Type: Array of strings
Length constraints (list): from 0 to 100 items
Length constraints (string): from 1 to 255 symbols
Constraints: Can’t be specified at the same time with AlarmNamePrefix
MaxRecords — The limit on the number of returned alarms.
Required: No
Type: Integer
Valid range: from 1 to 100
Default value:
20
NextToken — NextToken returned by a previous call (see Response Elements).
Required: No
Type: String
StateValue — The alarm state.
Required: No
Type: String
Valid values:
ok
|alarm
|insufficient_data
Response Elements#
MetricAlarms — List of alarms.
Type: List of MetricAlarm objects
NextToken — Is returned if not all eligible alarms were returned because of restrictions. In order to get the next batch of data, repeat the request with the returned value as the NextToken parameter value.
Type: String
Examples#
c2-cw DescribeAlarms
c2-cw DescribeAlarms AlarmNames.member.1 <alarm_name_1> AlarmNames.member.2 <alarm_name_2>
c2-cw DescribeAlarms AlarmNamePrefix <alarm_name_prefix> NextToken <next_token>