amazonka-cloudwatch-2.0: Amazon CloudWatch SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.

To use this operation and return information about composite alarms, you must be signed on with the cloudwatch:DescribeAlarms permission that is scoped to *. You can't return information about composite alarms if your cloudwatch:DescribeAlarms permission has a narrower scope.

This operation returns paginated results.

Synopsis

Creating a Request

data DescribeAlarms Source #

See: newDescribeAlarms smart constructor.

Constructors

DescribeAlarms' 

Fields

  • 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.

  • 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.

  • alarmNames :: Maybe [Text]

    The names of the alarms to retrieve information about.

  • 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.

  • 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.

  • maxRecords :: Maybe Natural

    The maximum number of alarm descriptions to retrieve.

  • nextToken :: Maybe Text

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

  • 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.

  • stateValue :: Maybe StateValue

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

Instances

Instances details
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

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 #

Generic DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Associated Types

type Rep DescribeAlarms :: Type -> Type #

Read DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Show DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

NFData DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Methods

rnf :: DescribeAlarms -> () #

Eq DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Hashable DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type AWSResponse DescribeAlarms Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type Rep 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: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: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:alarmNames:DescribeAlarms', describeAlarms_alarmNames - The names of the alarms to retrieve information about.

$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: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.

$sel:maxRecords:DescribeAlarms', describeAlarms_maxRecords - The maximum number of alarm descriptions to retrieve.

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

$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.

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

Request Lenses

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_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_alarmNames :: Lens' DescribeAlarms (Maybe [Text]) Source #

The names of the alarms to retrieve information about.

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_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.

describeAlarms_maxRecords :: Lens' DescribeAlarms (Maybe Natural) Source #

The maximum number of alarm descriptions to retrieve.

describeAlarms_nextToken :: Lens' DescribeAlarms (Maybe Text) Source #

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

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_stateValue :: Lens' DescribeAlarms (Maybe StateValue) Source #

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

Destructuring the Response

data DescribeAlarmsResponse Source #

See: newDescribeAlarmsResponse smart constructor.

Constructors

DescribeAlarmsResponse' 

Fields

Instances

Instances details
Generic DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Associated Types

type Rep DescribeAlarmsResponse :: Type -> Type #

Read DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Show DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

NFData DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

Methods

rnf :: DescribeAlarmsResponse -> () #

Eq DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type Rep DescribeAlarmsResponse Source # 
Instance details

Defined in Amazonka.CloudWatch.DescribeAlarms

type Rep DescribeAlarmsResponse = D1 ('MetaData "DescribeAlarmsResponse" "Amazonka.CloudWatch.DescribeAlarms" "amazonka-cloudwatch-2.0-9xq2AWTkbYo3pEtgQNn4jD" 'False) (C1 ('MetaCons "DescribeAlarmsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "compositeAlarms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [CompositeAlarm])) :*: S1 ('MetaSel ('Just "metricAlarms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [MetricAlarm]))) :*: (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:compositeAlarms:DescribeAlarmsResponse', describeAlarmsResponse_compositeAlarms - The information about any composite alarms returned by the operation.

$sel:metricAlarms:DescribeAlarmsResponse', describeAlarmsResponse_metricAlarms - The information about any metric alarms returned by the operation.

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_compositeAlarms :: Lens' DescribeAlarmsResponse (Maybe [CompositeAlarm]) Source #

The information about any composite alarms returned by the operation.

describeAlarmsResponse_metricAlarms :: Lens' DescribeAlarmsResponse (Maybe [MetricAlarm]) Source #

The information about any metric 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.