Class: CfnGuardian::Models::BaseAlarm
- Inherits:
-
Object
- Object
- CfnGuardian::Models::BaseAlarm
- Defined in:
- lib/cfnguardian/models/alarm.rb
Direct Known Subclasses
AcmAlarm, AmazonMQBrokerAlarm, AmazonMQRabbitMQBrokerAlarm, AmazonMQRabbitMQNodeAlarm, AmazonMQRabbitMQQueueAlarm, ApiGatewayAlarm, ApplicationTargetGroupAlarm, AutoScalingGroupAlarm, AzureFileAlarm, BatchAlarm, CloudFrontDistributionAlarm, DMSClusterAlarm, DMSTaskAlarm, DocumentDBClusterAlarm, DomainExpiryAlarm, DynamoDBTableAlarm, ECSClusterAlarm, ECSServiceAlarm, EKSContainerInsightsClusterAlarm, EKSContainerInsightsNamespaceAlarm, Ec2InstanceAlarm, ElastiCacheReplicationGroupAlarm, ElasticFileSystemAlarm, ElasticLoadBalancerAlarm, ElasticSearchAlarm, GlueAlarm, HttpAlarm, JenkinsAlarm, KafkaClusterAlarm, KafkaTopicAlarm, LambdaAlarm, LogGroupAlarm, NetworkTargetGroupAlarm, NrpeAlarm, PortAlarm, RDSClusterInstanceAlarm, RDSInstanceAlarm, RedshiftClusterAlarm, SFTPAlarm, SQSQueueAlarm, SqlAlarm, SslAlarm, StepFunctionsAlarm, TLSAlarm, VPNConnectionAlarm, VPNTunnelAlarm, WebSocketAlarm
Instance Attribute Summary collapse
-
#actions_enabled ⇒ Object
Returns the value of attribute actions_enabled.
-
#additional_notifiers ⇒ Object
Returns the value of attribute additional_notifiers.
-
#alarm_action ⇒ Object
Returns the value of attribute alarm_action.
-
#comparison_operator ⇒ Object
Returns the value of attribute comparison_operator.
-
#datapoints_to_alarm ⇒ Object
Returns the value of attribute datapoints_to_alarm.
-
#dimensions ⇒ Object
Returns the value of attribute dimensions.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#evaluate_low_sample_count_percentile ⇒ Object
Returns the value of attribute evaluate_low_sample_count_percentile.
-
#evaluation_periods ⇒ Object
Returns the value of attribute evaluation_periods.
-
#extended_statistic ⇒ Object
Returns the value of attribute extended_statistic.
-
#group ⇒ Object
Returns the value of attribute group.
-
#maintenance_groups ⇒ Object
Returns the value of attribute maintenance_groups.
-
#metric_name ⇒ Object
Returns the value of attribute metric_name.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#period ⇒ Object
Returns the value of attribute period.
-
#resource_hash ⇒ Object
readonly
Returns the value of attribute resource_hash.
-
#resource_id ⇒ Object
Returns the value of attribute resource_id.
-
#resource_name ⇒ Object
Returns the value of attribute resource_name.
-
#statistic ⇒ Object
Returns the value of attribute statistic.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
-
#treat_missing_data ⇒ Object
Returns the value of attribute treat_missing_data.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(resource) ⇒ BaseAlarm
constructor
A new instance of BaseAlarm.
Constructor Details
#initialize(resource) ⇒ BaseAlarm
Returns a new instance of BaseAlarm.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/cfnguardian/models/alarm.rb', line 35 def initialize(resource) @type = 'Alarm' @group = nil @name = '' @metric_name = nil @namespace = nil @dimensions = nil @threshold = 0 @period = 60 @evaluation_periods = 1 @comparison_operator = 'GreaterThanThreshold' @statistic = 'Maximum' @actions_enabled = true @datapoints_to_alarm = nil @extended_statistic = nil @evaluate_low_sample_count_percentile = nil @unit = nil @enabled = true @resource_hash = Digest::MD5.hexdigest resource['Id'] @resource_id = resource['Id'] @resource_name = resource.fetch('Name', nil) @alarm_action = 'Critical' @treat_missing_data = nil @maintenance_groups = [] @additional_notifiers = [] @tags = {} end |
Instance Attribute Details
#actions_enabled ⇒ Object
Returns the value of attribute actions_enabled.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def actions_enabled @actions_enabled end |
#additional_notifiers ⇒ Object
Returns the value of attribute additional_notifiers.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def additional_notifiers @additional_notifiers end |
#alarm_action ⇒ Object
Returns the value of attribute alarm_action.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def alarm_action @alarm_action end |
#comparison_operator ⇒ Object
Returns the value of attribute comparison_operator.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def comparison_operator @comparison_operator end |
#datapoints_to_alarm ⇒ Object
Returns the value of attribute datapoints_to_alarm.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def datapoints_to_alarm @datapoints_to_alarm end |
#dimensions ⇒ Object
Returns the value of attribute dimensions.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def dimensions @dimensions end |
#enabled ⇒ Object
Returns the value of attribute enabled.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def enabled @enabled end |
#evaluate_low_sample_count_percentile ⇒ Object
Returns the value of attribute evaluate_low_sample_count_percentile.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def evaluate_low_sample_count_percentile @evaluate_low_sample_count_percentile end |
#evaluation_periods ⇒ Object
Returns the value of attribute evaluation_periods.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def evaluation_periods @evaluation_periods end |
#extended_statistic ⇒ Object
Returns the value of attribute extended_statistic.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def extended_statistic @extended_statistic end |
#group ⇒ Object
Returns the value of attribute group.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def group @group end |
#maintenance_groups ⇒ Object
Returns the value of attribute maintenance_groups.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def maintenance_groups @maintenance_groups end |
#metric_name ⇒ Object
Returns the value of attribute metric_name.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def metric_name @metric_name end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def namespace @namespace end |
#period ⇒ Object
Returns the value of attribute period.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def period @period end |
#resource_hash ⇒ Object (readonly)
Returns the value of attribute resource_hash.
8 9 10 |
# File 'lib/cfnguardian/models/alarm.rb', line 8 def resource_hash @resource_hash end |
#resource_id ⇒ Object
Returns the value of attribute resource_id.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def resource_id @resource_id end |
#resource_name ⇒ Object
Returns the value of attribute resource_name.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def resource_name @resource_name end |
#statistic ⇒ Object
Returns the value of attribute statistic.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def statistic @statistic end |
#tags ⇒ Object
Returns the value of attribute tags.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def @tags end |
#threshold ⇒ Object
Returns the value of attribute threshold.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def threshold @threshold end |
#treat_missing_data ⇒ Object
Returns the value of attribute treat_missing_data.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def treat_missing_data @treat_missing_data end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/cfnguardian/models/alarm.rb', line 8 def type @type end |
#unit ⇒ Object
Returns the value of attribute unit.
11 12 13 |
# File 'lib/cfnguardian/models/alarm.rb', line 11 def unit @unit end |