Class: CfnGuardian::Resource::CloudFrontDistribution

Inherits:
Base
  • Object
show all
Defined in:
lib/cfnguardian/resources/cloudfront_distribution.rb

Instance Method Summary collapse

Methods inherited from Base

#default_checks, #default_event_subscriptions, #default_events, #default_metric_filters, #get_alarms, #get_checks, #get_cost, #get_event_subscriptions, #get_events, #get_metric_filters, #initialize, #resource_exists?

Methods included from Logging

colors, included, logger, #logger, logger=

Constructor Details

This class inherits a constructor from CfnGuardian::Resource::Base

Instance Method Details

#default_alarmsObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cfnguardian/resources/cloudfront_distribution.rb', line 4

def default_alarms    
  alarm = CfnGuardian::Models::CloudFrontDistributionAlarm.new(@resource)
  alarm.name = '4xxErrorRate'
  alarm.metric_name = '4xxErrorRate'
  alarm.threshold = 10
  alarm.statistic = 'Average'
  @alarms.push(alarm)
  
  alarm = CfnGuardian::Models::CloudFrontDistributionAlarm.new(@resource)
  alarm.name = '5xxErrorRate'
  alarm.metric_name = '5xxErrorRate'
  alarm.statistic = 'Average'
  alarm.threshold = 10
  @alarms.push(alarm)
end