libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudWatch.DescribeAlarms

Description

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

Creating a Request

data DescribeAlarms Source #

See: newDescribeAlarms smart constructor.

Constructors

DescribeAlarms' 

Fields

  • alarmNamePrefix :: Maybe Text

    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.

  • alarmTypes :: Maybe [AlarmType]

    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.

  • actionPrefix :: Maybe Text

    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.

  • nextToken :: Maybe Text

    The token returned by a previous call to indicate that there is more data available.

  • stateValue :: Maybe StateValue

    Specify this parameter to receive information only about alarms that are currently in the state that you specify.

  • alarmNames :: Maybe [Text]

    The names of the alarms to retrieve information about.

  • maxRecords :: Maybe Natural

    The maximum number of alarm descriptions to retrieve.

  • parentsOfAlarmName :: Maybe Text

    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.

  • childrenOfAlarmName :: Maybe Text

    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.

Instances

Instances details
Eq DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Read DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Show DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Generic DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Associated Types

type Rep DescribeAlarms :: Type -> Type #

NFData DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Methods

rnf :: DescribeAlarms -> () #

Hashable DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

AWSPager DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

AWSRequest DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Associated Types

type AWSResponse DescribeAlarms #

ToHeaders DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

ToPath DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

ToQuery DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type Rep DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type AWSResponse DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

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.

Constructors

DescribeAlarmsResponse' 

Fields

Instances

Instances details
Eq DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Read DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Show DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Generic DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Associated Types

type Rep DescribeAlarmsResponse :: Type -> Type #

NFData DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Methods

rnf :: DescribeAlarmsResponse -> () #

type Rep DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type Rep DescribeAlarmsResponse = D1 ('MetaData "DescribeAlarmsResponse" "Amazonka.CloudWatch.DescribeAlarms" "libZSservicesZSamazonka-cloudwatchZSamazonka-cloudwatch" 'False) (C1 ('MetaCons "DescribeAlarmsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "metricAlarms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [MetricAlarm])) :*: S1 ('MetaSel ('Just "compositeAlarms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CompositeAlarm]))) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.