amazonka-lightsail-2.0: Amazon Lightsail 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.Lightsail.GetAlarms

Description

Returns information about the configured alarms. Specify an alarm name in your request to return information about a specific alarm, or specify a monitored resource name to return information about all alarms for a specific resource.

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 GetAlarms Source #

See: newGetAlarms smart constructor.

Constructors

GetAlarms' 

Fields

  • alarmName :: Maybe Text

    The name of the alarm.

    Specify an alarm name to return information about a specific alarm.

  • monitoredResourceName :: Maybe Text

    The name of the Lightsail resource being monitored by the alarm.

    Specify a monitored resource name to return information about all alarms for a specific resource.

  • pageToken :: Maybe Text

    The token to advance to the next page of results from your request.

    To get a page token, perform an initial GetAlarms request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Instances

Instances details
ToJSON GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

ToHeaders GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Methods

toHeaders :: GetAlarms -> [Header] #

ToPath GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

ToQuery GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

AWSRequest GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Associated Types

type AWSResponse GetAlarms #

Generic GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Associated Types

type Rep GetAlarms :: Type -> Type #

Read GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Show GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

NFData GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Methods

rnf :: GetAlarms -> () #

Eq GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Hashable GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

type AWSResponse GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

type Rep GetAlarms Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

type Rep GetAlarms = D1 ('MetaData "GetAlarms" "Amazonka.Lightsail.GetAlarms" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "GetAlarms'" 'PrefixI 'True) (S1 ('MetaSel ('Just "alarmName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "monitoredResourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "pageToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

newGetAlarms :: GetAlarms Source #

Create a value of GetAlarms 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:GetAlarms', getAlarms_alarmName - The name of the alarm.

Specify an alarm name to return information about a specific alarm.

$sel:monitoredResourceName:GetAlarms', getAlarms_monitoredResourceName - The name of the Lightsail resource being monitored by the alarm.

Specify a monitored resource name to return information about all alarms for a specific resource.

$sel:pageToken:GetAlarms', getAlarms_pageToken - The token to advance to the next page of results from your request.

To get a page token, perform an initial GetAlarms request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Request Lenses

getAlarms_alarmName :: Lens' GetAlarms (Maybe Text) Source #

The name of the alarm.

Specify an alarm name to return information about a specific alarm.

getAlarms_monitoredResourceName :: Lens' GetAlarms (Maybe Text) Source #

The name of the Lightsail resource being monitored by the alarm.

Specify a monitored resource name to return information about all alarms for a specific resource.

getAlarms_pageToken :: Lens' GetAlarms (Maybe Text) Source #

The token to advance to the next page of results from your request.

To get a page token, perform an initial GetAlarms request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

Destructuring the Response

data GetAlarmsResponse Source #

See: newGetAlarmsResponse smart constructor.

Constructors

GetAlarmsResponse' 

Fields

  • alarms :: Maybe [Alarm]

    An array of objects that describe the alarms.

  • nextPageToken :: Maybe Text

    The token to advance to the next page of results from your request.

    A next page token is not returned if there are no more results to display.

    To get the next page of results, perform another GetAlarms request and specify the next page token using the pageToken parameter.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetAlarmsResponse Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Associated Types

type Rep GetAlarmsResponse :: Type -> Type #

Read GetAlarmsResponse Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Show GetAlarmsResponse Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

NFData GetAlarmsResponse Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

Methods

rnf :: GetAlarmsResponse -> () #

Eq GetAlarmsResponse Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

type Rep GetAlarmsResponse Source # 
Instance details

Defined in Amazonka.Lightsail.GetAlarms

type Rep GetAlarmsResponse = D1 ('MetaData "GetAlarmsResponse" "Amazonka.Lightsail.GetAlarms" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "GetAlarmsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "alarms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Alarm])) :*: (S1 ('MetaSel ('Just "nextPageToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetAlarmsResponse Source #

Create a value of GetAlarmsResponse 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:alarms:GetAlarmsResponse', getAlarmsResponse_alarms - An array of objects that describe the alarms.

$sel:nextPageToken:GetAlarmsResponse', getAlarmsResponse_nextPageToken - The token to advance to the next page of results from your request.

A next page token is not returned if there are no more results to display.

To get the next page of results, perform another GetAlarms request and specify the next page token using the pageToken parameter.

$sel:httpStatus:GetAlarmsResponse', getAlarmsResponse_httpStatus - The response's http status code.

Response Lenses

getAlarmsResponse_alarms :: Lens' GetAlarmsResponse (Maybe [Alarm]) Source #

An array of objects that describe the alarms.

getAlarmsResponse_nextPageToken :: Lens' GetAlarmsResponse (Maybe Text) Source #

The token to advance to the next page of results from your request.

A next page token is not returned if there are no more results to display.

To get the next page of results, perform another GetAlarms request and specify the next page token using the pageToken parameter.

getAlarmsResponse_httpStatus :: Lens' GetAlarmsResponse Int Source #

The response's http status code.