libZSservicesZSamazonka-lightsailZSamazonka-lightsail
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.Lightsail.TestAlarm

Description

Tests an alarm by displaying a banner on the Amazon Lightsail console. If a notification trigger is configured for the specified alarm, the test also sends a notification to the notification protocol (Email and/or SMS) configured for the alarm.

An alarm is used to monitor a single metric for one of your resources. When a metric condition is met, the alarm can notify you by email, SMS text message, and a banner displayed on the Amazon Lightsail console. For more information, see Alarms in Amazon Lightsail.

Synopsis

Creating a Request

data TestAlarm Source #

See: newTestAlarm smart constructor.

Constructors

TestAlarm' 

Fields

  • alarmName :: Text

    The name of the alarm to test.

  • state :: AlarmState

    The alarm state to test.

    An alarm has the following possible states that can be tested:

    • ALARM - The metric is outside of the defined threshold.
    • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
    • OK - The metric is within the defined threshold.

Instances

Instances details
Eq TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Read TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Show TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Generic TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Associated Types

type Rep TestAlarm :: Type -> Type #

NFData TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Methods

rnf :: TestAlarm -> () #

Hashable TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

ToJSON TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

AWSRequest TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Associated Types

type AWSResponse TestAlarm #

ToHeaders TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Methods

toHeaders :: TestAlarm -> [Header] #

ToPath TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

ToQuery TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

type Rep TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

type Rep TestAlarm = D1 ('MetaData "TestAlarm" "Amazonka.Lightsail.TestAlarm" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "TestAlarm'" 'PrefixI 'True) (S1 ('MetaSel ('Just "alarmName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "state") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 AlarmState)))
type AWSResponse TestAlarm Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

newTestAlarm Source #

Create a value of TestAlarm 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:alarmName:TestAlarm', testAlarm_alarmName - The name of the alarm to test.

$sel:state:TestAlarm', testAlarm_state - The alarm state to test.

An alarm has the following possible states that can be tested:

  • ALARM - The metric is outside of the defined threshold.
  • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
  • OK - The metric is within the defined threshold.

Request Lenses

testAlarm_alarmName :: Lens' TestAlarm Text Source #

The name of the alarm to test.

testAlarm_state :: Lens' TestAlarm AlarmState Source #

The alarm state to test.

An alarm has the following possible states that can be tested:

  • ALARM - The metric is outside of the defined threshold.
  • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
  • OK - The metric is within the defined threshold.

Destructuring the Response

data TestAlarmResponse Source #

See: newTestAlarmResponse smart constructor.

Constructors

TestAlarmResponse' 

Fields

  • operations :: Maybe [Operation]

    An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq TestAlarmResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Read TestAlarmResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Show TestAlarmResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Generic TestAlarmResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Associated Types

type Rep TestAlarmResponse :: Type -> Type #

NFData TestAlarmResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

Methods

rnf :: TestAlarmResponse -> () #

type Rep TestAlarmResponse Source # 
Instance details

Defined in Amazonka.Lightsail.TestAlarm

type Rep TestAlarmResponse = D1 ('MetaData "TestAlarmResponse" "Amazonka.Lightsail.TestAlarm" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "TestAlarmResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newTestAlarmResponse Source #

Create a value of TestAlarmResponse 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:operations:TestAlarmResponse', testAlarmResponse_operations - An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.

$sel:httpStatus:TestAlarmResponse', testAlarmResponse_httpStatus - The response's http status code.

Response Lenses

testAlarmResponse_operations :: Lens' TestAlarmResponse (Maybe [Operation]) Source #

An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.

testAlarmResponse_httpStatus :: Lens' TestAlarmResponse Int Source #

The response's http status code.