Class: Aws::Lightsail::Types::Alarm

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb

Overview

Describes an alarm.

An alarm is a way to monitor your Amazon Lightsail resource metrics. For more information, see Alarms in Amazon Lightsail.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#arnString

The Amazon Resource Name (ARN) of the alarm.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#comparison_operatorString

The arithmetic operation used when comparing the specified statistic and threshold.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#contact_protocolsArray<String>

The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

Returns:

  • (Array<String>)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#created_atTime

The timestamp when the alarm was created.

Returns:

  • (Time)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#datapoints_to_alarmInteger

The number of data points that must not within the specified threshold to trigger the alarm.

Returns:

  • (Integer)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#evaluation_periodsInteger

The number of periods over which data is compared to the specified threshold.

Returns:

  • (Integer)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#locationTypes::ResourceLocation

An object that lists information about the location of the alarm.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#metric_nameString

The name of the metric associated with the alarm.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#monitored_resource_infoTypes::MonitoredResourceInfo

An object that lists information about the resource monitored by the alarm.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#nameString

The name of the alarm.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#notification_enabledBoolean

Indicates whether the alarm is enabled.

Returns:

  • (Boolean)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#notification_triggersArray<String>

The alarm states that trigger a notification.

Returns:

  • (Array<String>)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#periodInteger

The period, in seconds, over which the statistic is applied.

Returns:

  • (Integer)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#resource_typeString

The Lightsail resource type (e.g., Alarm).

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#stateString

The current state of the alarm.

An alarm has the following possible states:

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

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#statisticString

The statistic for the metric associated with the alarm.

The following statistics are available:

  • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

  • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

  • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

  • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

  • SampleCount - The count, or number, of data points used for the statistical calculation.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#support_codeString

The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#thresholdFloat

The value against which the specified statistic is compared.

Returns:

  • (Float)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#treat_missing_dataString

Specifies how the alarm handles missing data points.

An alarm can treat missing data in the following ways:

  • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

  • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

  • ignore - Ignore the missing data. Maintains the current alarm state.

  • missing - Missing data is treated as missing.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end

#unitString

The unit of the metric associated with the alarm.

Returns:

  • (String)


293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 293

class Alarm < Struct.new(
  :name,
  :arn,
  :created_at,
  :location,
  :resource_type,
  :support_code,
  :monitored_resource_info,
  :comparison_operator,
  :evaluation_periods,
  :period,
  :threshold,
  :datapoints_to_alarm,
  :treat_missing_data,
  :statistic,
  :metric_name,
  :state,
  :unit,
  :contact_protocols,
  :notification_triggers,
  :notification_enabled)
  SENSITIVE = []
  include Aws::Structure
end