Sha256: bb270b60f285dec81ed484fe690d3112a95610c85f4f7726ef17a547b954e133

Contents?: true

Size: 675 Bytes

Versions: 1

Compression:

Stored size: 675 Bytes

Contents

module CfnGuardian::Resource
  class LogGroup < Base
    
    def initialize(resource)
      super(resource)
      @resource_list = resource['MetricFilters']
    end
    
    def default_alarms()
      @resource_list.each do |filter|
        alarm = CfnGuardian::Models::LogGroupAlarm.new(@resource)
        alarm.name = filter['MetricName']
        alarm.metric_name = filter['MetricName']
        @alarms.push(alarm)
      end
    end
    
    def default_metric_filters()
      @resource_list.each do |filter|
        metric_filter = CfnGuardian::Models::MetricFilter.new(@resource['Id'],filter)
        @metric_filters.push(metric_filter)
      end
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cfn-guardian-0.3.3 lib/cfnguardian/resources/log_group.rb