Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Retrieves the specified alarms. You can filter the results by specifying a prefix for the alarm name, the alarm state, or a prefix for any action.
This operation returns paginated results.
Synopsis
- data DescribeAlarms = DescribeAlarms' {}
- newDescribeAlarms :: DescribeAlarms
- describeAlarms_alarmNamePrefix :: Lens' DescribeAlarms (Maybe Text)
- describeAlarms_alarmTypes :: Lens' DescribeAlarms (Maybe [AlarmType])
- describeAlarms_actionPrefix :: Lens' DescribeAlarms (Maybe Text)
- describeAlarms_nextToken :: Lens' DescribeAlarms (Maybe Text)
- describeAlarms_stateValue :: Lens' DescribeAlarms (Maybe StateValue)
- describeAlarms_alarmNames :: Lens' DescribeAlarms (Maybe [Text])
- describeAlarms_maxRecords :: Lens' DescribeAlarms (Maybe Natural)
- describeAlarms_parentsOfAlarmName :: Lens' DescribeAlarms (Maybe Text)
- describeAlarms_childrenOfAlarmName :: Lens' DescribeAlarms (Maybe Text)
- data DescribeAlarmsResponse = DescribeAlarmsResponse' {}
- newDescribeAlarmsResponse :: Int -> DescribeAlarmsResponse
- describeAlarmsResponse_metricAlarms :: Lens' DescribeAlarmsResponse (Maybe [MetricAlarm])
- describeAlarmsResponse_compositeAlarms :: Lens' DescribeAlarmsResponse (Maybe [CompositeAlarm])
- describeAlarmsResponse_nextToken :: Lens' DescribeAlarmsResponse (Maybe Text)
- describeAlarmsResponse_httpStatus :: Lens' DescribeAlarmsResponse Int
Creating a Request
data DescribeAlarms Source #
See: newDescribeAlarms
smart constructor.
DescribeAlarms' | |
|
Instances
newDescribeAlarms :: DescribeAlarms Source #
Create a value of DescribeAlarms
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:alarmNamePrefix:DescribeAlarms'
, describeAlarms_alarmNamePrefix
- An alarm name prefix. If you specify this parameter, you receive
information about all alarms that have names that start with this
prefix.
If this parameter is specified, you cannot specify AlarmNames
.
$sel:alarmTypes:DescribeAlarms'
, describeAlarms_alarmTypes
- Use this parameter to specify whether you want the operation to return
metric alarms or composite alarms. If you omit this parameter, only
metric alarms are returned.
$sel:actionPrefix:DescribeAlarms'
, describeAlarms_actionPrefix
- Use this parameter to filter the results of the operation to only those
alarms that use a certain alarm action. For example, you could specify
the ARN of an SNS topic to find all alarms that send notifications to
that topic.
$sel:nextToken:DescribeAlarms'
, describeAlarms_nextToken
- The token returned by a previous call to indicate that there is more
data available.
$sel:stateValue:DescribeAlarms'
, describeAlarms_stateValue
- Specify this parameter to receive information only about alarms that are
currently in the state that you specify.
$sel:alarmNames:DescribeAlarms'
, describeAlarms_alarmNames
- The names of the alarms to retrieve information about.
$sel:maxRecords:DescribeAlarms'
, describeAlarms_maxRecords
- The maximum number of alarm descriptions to retrieve.
$sel:parentsOfAlarmName:DescribeAlarms'
, describeAlarms_parentsOfAlarmName
- If you use this parameter and specify the name of a metric or composite
alarm, the operation returns information about the "parent" alarms of
the alarm you specify. These are the composite alarms that have
AlarmRule
parameters that reference the alarm named in
ParentsOfAlarmName
. Information about the alarm that you specify in
ParentsOfAlarmName
is not returned.
If you specify ParentsOfAlarmName
, you cannot specify any other
parameters in the request except for MaxRecords
and NextToken
. If
you do so, you receive a validation error.
Only the Alarm Name and ARN are returned by this operation when you use
this parameter. To get complete information about these alarms, perform
another DescribeAlarms
operation and specify the parent alarm names in
the AlarmNames
parameter.
$sel:childrenOfAlarmName:DescribeAlarms'
, describeAlarms_childrenOfAlarmName
- If you use this parameter and specify the name of a composite alarm, the
operation returns information about the "children" alarms of the alarm
you specify. These are the metric alarms and composite alarms referenced
in the AlarmRule
field of the composite alarm that you specify in
ChildrenOfAlarmName
. Information about the composite alarm that you
name in ChildrenOfAlarmName
is not returned.
If you specify ChildrenOfAlarmName
, you cannot specify any other
parameters in the request except for MaxRecords
and NextToken
. If
you do so, you receive a validation error.
Only the Alarm Name
, ARN
, StateValue
(OK/ALARM/INSUFFICIENT_DATA), and StateUpdatedTimestamp
information
are returned by this operation when you use this parameter. To get
complete information about these alarms, perform another
DescribeAlarms
operation and specify the parent alarm names in the
AlarmNames
parameter.
Request Lenses
describeAlarms_alarmNamePrefix :: Lens' DescribeAlarms (Maybe Text) Source #
An alarm name prefix. If you specify this parameter, you receive information about all alarms that have names that start with this prefix.
If this parameter is specified, you cannot specify AlarmNames
.
describeAlarms_alarmTypes :: Lens' DescribeAlarms (Maybe [AlarmType]) Source #
Use this parameter to specify whether you want the operation to return metric alarms or composite alarms. If you omit this parameter, only metric alarms are returned.
describeAlarms_actionPrefix :: Lens' DescribeAlarms (Maybe Text) Source #
Use this parameter to filter the results of the operation to only those alarms that use a certain alarm action. For example, you could specify the ARN of an SNS topic to find all alarms that send notifications to that topic.
describeAlarms_nextToken :: Lens' DescribeAlarms (Maybe Text) Source #
The token returned by a previous call to indicate that there is more data available.
describeAlarms_stateValue :: Lens' DescribeAlarms (Maybe StateValue) Source #
Specify this parameter to receive information only about alarms that are currently in the state that you specify.
describeAlarms_alarmNames :: Lens' DescribeAlarms (Maybe [Text]) Source #
The names of the alarms to retrieve information about.
describeAlarms_maxRecords :: Lens' DescribeAlarms (Maybe Natural) Source #
The maximum number of alarm descriptions to retrieve.
describeAlarms_parentsOfAlarmName :: Lens' DescribeAlarms (Maybe Text) Source #
If you use this parameter and specify the name of a metric or composite
alarm, the operation returns information about the "parent" alarms of
the alarm you specify. These are the composite alarms that have
AlarmRule
parameters that reference the alarm named in
ParentsOfAlarmName
. Information about the alarm that you specify in
ParentsOfAlarmName
is not returned.
If you specify ParentsOfAlarmName
, you cannot specify any other
parameters in the request except for MaxRecords
and NextToken
. If
you do so, you receive a validation error.
Only the Alarm Name and ARN are returned by this operation when you use
this parameter. To get complete information about these alarms, perform
another DescribeAlarms
operation and specify the parent alarm names in
the AlarmNames
parameter.
describeAlarms_childrenOfAlarmName :: Lens' DescribeAlarms (Maybe Text) Source #
If you use this parameter and specify the name of a composite alarm, the
operation returns information about the "children" alarms of the alarm
you specify. These are the metric alarms and composite alarms referenced
in the AlarmRule
field of the composite alarm that you specify in
ChildrenOfAlarmName
. Information about the composite alarm that you
name in ChildrenOfAlarmName
is not returned.
If you specify ChildrenOfAlarmName
, you cannot specify any other
parameters in the request except for MaxRecords
and NextToken
. If
you do so, you receive a validation error.
Only the Alarm Name
, ARN
, StateValue
(OK/ALARM/INSUFFICIENT_DATA), and StateUpdatedTimestamp
information
are returned by this operation when you use this parameter. To get
complete information about these alarms, perform another
DescribeAlarms
operation and specify the parent alarm names in the
AlarmNames
parameter.
Destructuring the Response
data DescribeAlarmsResponse Source #
See: newDescribeAlarmsResponse
smart constructor.
DescribeAlarmsResponse' | |
|
Instances
newDescribeAlarmsResponse Source #
Create a value of DescribeAlarmsResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:metricAlarms:DescribeAlarmsResponse'
, describeAlarmsResponse_metricAlarms
- The information about any metric alarms returned by the operation.
$sel:compositeAlarms:DescribeAlarmsResponse'
, describeAlarmsResponse_compositeAlarms
- The information about any composite alarms returned by the operation.
$sel:nextToken:DescribeAlarms'
, describeAlarmsResponse_nextToken
- The token that marks the start of the next batch of returned results.
$sel:httpStatus:DescribeAlarmsResponse'
, describeAlarmsResponse_httpStatus
- The response's http status code.
Response Lenses
describeAlarmsResponse_metricAlarms :: Lens' DescribeAlarmsResponse (Maybe [MetricAlarm]) Source #
The information about any metric alarms returned by the operation.
describeAlarmsResponse_compositeAlarms :: Lens' DescribeAlarmsResponse (Maybe [CompositeAlarm]) Source #
The information about any composite alarms returned by the operation.
describeAlarmsResponse_nextToken :: Lens' DescribeAlarmsResponse (Maybe Text) Source #
The token that marks the start of the next batch of returned results.
describeAlarmsResponse_httpStatus :: Lens' DescribeAlarmsResponse Int Source #
The response's http status code.